aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-10-22 13:18:15 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2018-10-22 13:18:23 +0200
commit34018dd4c9a192d7a9b8568ed41d4ed9a35bf0f2 (patch)
tree4b0566a646782ef5bacdb8e792bb59d6381a6507 /include/osmo-bts
parente6ce1718aea468e1995fd6d6a4048e894d6a7ddb (diff)
Convert lchan CCCH_LCHAN to chan_nr BCCH and viceversa
Before this patch it was being coded as SDCCH4 TS0 SS 0, and as a result the state LCHAN_REL_ACT_OML applied in opstart_compl in abused SDCCH4 TS0 SS 4 was not being checked when deciding whether to send a Chan Act ACK in rsl_tx_chan_act_acknack. Fixes: OS#3513 Change-Id: I1641960c9ffbb3ed0de74ab5b53e24e5b4ff3397
Diffstat (limited to 'include/osmo-bts')
-rw-r--r--include/osmo-bts/l1sap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index e2c92fa2..3cf0ea58 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -12,6 +12,7 @@
#define L1SAP_CHAN2SS_TCHH(chan_nr) ((chan_nr >> 3) & 1)
#define L1SAP_CHAN2SS_SDCCH4(chan_nr) ((chan_nr >> 3) & 3)
#define L1SAP_CHAN2SS_SDCCH8(chan_nr) ((chan_nr >> 3) & 7)
+#define L1SAP_CHAN2SS_BCCH(chan_nr) (CCCH_LCHAN)
/* logical channel from chan_nr + link_id */
#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == LID_SACCH)
@@ -48,6 +49,8 @@ static const uint8_t fill_frame[GSM_MACBLOCK_LEN] = {
/* subslot from any chan_nr */
static inline uint8_t l1sap_chan2ss(uint8_t chan_nr)
{
+ if (L1SAP_IS_CHAN_BCCH(chan_nr))
+ return L1SAP_CHAN2SS_BCCH(chan_nr);
if (L1SAP_IS_CHAN_SDCCH8(chan_nr))
return L1SAP_CHAN2SS_SDCCH8(chan_nr);
if (L1SAP_IS_CHAN_SDCCH4(chan_nr))