diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-07-30 16:03:32 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-07-30 17:38:37 +0200 |
commit | d6da809d2fe35a00e03b0ae1422536245acd28be (patch) | |
tree | 5f9e6cd159a2118c397cc08ae27eb2c939b38fe8 /src | |
parent | 69e0461674611425beefa4753d8743978259f19c (diff) |
TRX / VIRT-PHY: Make check for BCCH/CCCH more specific
In bts_model_l1sap_down() we want to identify BCCH/CCCH channel numbers,
but our check is a bit non-specific. Let's make the check more specific
to only cover the BCCH, Uplink CCCH and Downlink CCCH C-bits as defined
n 3GPP TS 08.58 Section 9.3.1
Change-Id: Ia20ab09b96c87c0dfbfaf98e5b2a8d36423fac67
Diffstat (limited to 'src')
-rw-r--r-- | src/osmo-bts-trx/l1_if.c | 4 | ||||
-rw-r--r-- | src/osmo-bts-virtual/l1_if.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 37a399f3..f69e5872 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -555,7 +555,7 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) chan_nr = l1sap->u.info.u.act_req.chan_nr; lchan = get_lchan_by_chan_nr(trx, chan_nr); if (l1sap->u.info.type == PRIM_INFO_ACTIVATE) { - if ((chan_nr & 0x80)) { + if ((chan_nr & 0xE0) == 0x80) { LOGP(DL1C, LOGL_ERROR, "Cannot activate" " chan_nr 0x%02x\n", chan_nr); break; @@ -605,7 +605,7 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) break; } /* here, type == PRIM_INFO_DEACTIVATE */ - if ((chan_nr & 0x80)) { + if ((chan_nr & 0xE0) == 0x80) { LOGP(DL1C, LOGL_ERROR, "Cannot deactivate " "chan_nr 0x%02x\n", chan_nr); break; diff --git a/src/osmo-bts-virtual/l1_if.c b/src/osmo-bts-virtual/l1_if.c index 4fe1ec8f..bdbf2a70 100644 --- a/src/osmo-bts-virtual/l1_if.c +++ b/src/osmo-bts-virtual/l1_if.c @@ -370,7 +370,7 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) /* we receive a channel activation request from the BSC, * e.g. as a response to a channel req on RACH */ if (l1sap->u.info.type == PRIM_INFO_ACTIVATE) { - if ((chan_nr & 0x80)) { + if ((chan_nr & 0xE0) == 0x80) { LOGP(DL1C, LOGL_ERROR, "Cannot activate" " chan_nr 0x%02x\n", chan_nr); break; @@ -419,7 +419,7 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap) 0); break; } - if ((chan_nr & 0x80)) { + if ((chan_nr & 0xE0) == 0x80) { LOGP(DL1C, LOGL_ERROR, "Cannot deactivate " "chan_nr 0x%02x\n", chan_nr); break; |