summaryrefslogtreecommitdiff
path: root/gsmstack/get_lctype.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2008-12-01 12:54:30 +0530
committerHarald Welte <laforge@gnumonks.org>2008-12-01 12:54:30 +0530
commit602a3c8aa8a3d9bd4d93deda6ac932404f39584d (patch)
treea8c44956098cc4a6151fd9d8e0d8afc035182159 /gsmstack/get_lctype.c
parent10f2fcca8dd1be2719bccefa16fd9dac9a76c749 (diff)
Add README, various compile fixes
Diffstat (limited to 'gsmstack/get_lctype.c')
-rw-r--r--gsmstack/get_lctype.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gsmstack/get_lctype.c b/gsmstack/get_lctype.c
index 953b56d..fcffaa1 100644
--- a/gsmstack/get_lctype.c
+++ b/gsmstack/get_lctype.c
@@ -81,6 +81,8 @@ static int get_lctype_for_tch_f(unsigned int fnr)
return lc_type;
}
+/* get the logical channel type based on frame number and
+ * physical channel configuration */
int get_lctype(struct gsm_phys_chan *pchan, int fnr)
{
switch (pchan->config) {
@@ -98,8 +100,10 @@ int get_lctype(struct gsm_phys_chan *pchan, int fnr)
return -EINVAL;
}
+/* get a pointer to the logical channel structure based on frame number
+ * and physical channel configuration */
struct gsm_logi_chan *get_lchan(struct gsm_phys_chan *pchan, int fnr)
{
int lctype = get_lctype(pchan, fnr);
- return pchan->logi_chan[lctype];
+ return &pchan->logi_chan[lctype];
}
personal git repositories of Harald Welte. Your mileage may vary