aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmo-bts
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-11-11 15:51:23 +0100
committerMax <msuraev@sysmocom.de>2016-11-11 15:52:49 +0100
commit66325aee71e23e01492935b6253031bcd7233aa4 (patch)
tree3f8ce43ec1871a663f5ef16145ed6ce83ede4281 /include/osmo-bts
parentbdf10eb70544855fb0425a38ac8d3232d8a5a214 (diff)
Replace link_id constant with define
Instead of using constant for link_id directly, use shared define value. Change-Id: Ibf3d439d8893bd994ba089796175b6c635db2cf8
Diffstat (limited to 'include/osmo-bts')
-rw-r--r--include/osmo-bts/l1sap.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index 97a2f04a..dcebc1d8 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -3,6 +3,10 @@
#include <osmocom/gsm/protocol/gsm_04_08.h>
+/* lchan link ID */
+#define LID_SACCH 0x40
+#define LID_DEDIC 0x00
+
/* timeslot and subslot from chan_nr */
#define L1SAP_CHAN2TS(chan_nr) (chan_nr & 7)
#define L1SAP_CHAN2SS_TCHH(chan_nr) ((chan_nr >> 3) & 1)
@@ -10,7 +14,7 @@
#define L1SAP_CHAN2SS_SDCCH8(chan_nr) ((chan_nr >> 3) & 7)
/* logical channel from chan_nr + link_id */
-#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == 0x40)
+#define L1SAP_IS_LINK_SACCH(link_id) ((link_id & 0xC0) == LID_SACCH)
#define L1SAP_IS_CHAN_TCHF(chan_nr) ((chan_nr & 0xf8) == 0x08)
#define L1SAP_IS_CHAN_TCHH(chan_nr) ((chan_nr & 0xf0) == 0x10)
#define L1SAP_IS_CHAN_SDCCH4(chan_nr) ((chan_nr & 0xe0) == 0x20)