diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-16 17:12:38 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2009-11-17 09:46:33 +0100 |
commit | f7d752f7acc0ccee32959ad0586cbbb54b1efaf8 (patch) | |
tree | 08acaefa8086ef65ef59d6abde331c2c56d2c257 /openbsc/src/gsm_04_08_utils.c | |
parent | 0fef39a8ac17484f42840a898e06923c4989db38 (diff) |
[si] Make it possible to set the NECI value...
Allow to configure the NECI value... and change code
that is relying on the NECI value.
Diffstat (limited to 'openbsc/src/gsm_04_08_utils.c')
-rw-r--r-- | openbsc/src/gsm_04_08_utils.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/gsm_04_08_utils.c b/openbsc/src/gsm_04_08_utils.c index 2545f33a6..0e242b778 100644 --- a/openbsc/src/gsm_04_08_utils.c +++ b/openbsc/src/gsm_04_08_utils.c @@ -302,13 +302,13 @@ static const enum gsm_chreq_reason_t reason_by_chreq[] = { [CHREQ_T_PAG_R_TCH_FH] = GSM_CHREQ_REASON_PAG, }; -enum gsm_chan_t get_ctype_by_chreq(struct gsm_bts *bts, u_int8_t ra) +enum gsm_chan_t get_ctype_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci) { int i; /* FIXME: determine if we set NECI = 0 in the BTS SI4 */ for (i = 0; i < ARRAY_SIZE(chreq_type_neci0); i++) { - const struct chreq *chr = &chreq_type_neci0[i]; + const struct chreq *chr = neci ? &chreq_type_neci1[i] : &chreq_type_neci0[i]; if ((ra & chr->mask) == chr->val) return ctype_by_chreq[chr->type]; } @@ -316,13 +316,13 @@ enum gsm_chan_t get_ctype_by_chreq(struct gsm_bts *bts, u_int8_t ra) return GSM_LCHAN_SDCCH; } -enum gsm_chreq_reason_t get_reason_by_chreq(struct gsm_bts *bts, u_int8_t ra) +enum gsm_chreq_reason_t get_reason_by_chreq(struct gsm_bts *bts, u_int8_t ra, int neci) { int i; /* FIXME: determine if we set NECI = 0 in the BTS SI4 */ for (i = 0; i < ARRAY_SIZE(chreq_type_neci0); i++) { - const struct chreq *chr = &chreq_type_neci0[i]; + const struct chreq *chr = neci ? &chreq_type_neci1[i] : &chreq_type_neci0[i]; if ((ra & chr->mask) == chr->val) return reason_by_chreq[chr->type]; } |