aboutsummaryrefslogtreecommitdiffstats
path: root/src/common/l1sap.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-08-24 23:37:45 +0200
committerHarald Welte <laforge@gnumonks.org>2018-09-09 15:40:58 +0000
commit02d99db08b13589e1417c3448a07747f8805ba88 (patch)
treea54221a2e25add9a0d15df940aba855d5bad6827 /src/common/l1sap.c
parent4280829dfae0620c2326ba44caa31f5205d52a91 (diff)
CBCH: Move processing via L1SAP
for some historical reason, CBCH handling was not using the normal L1SAP boundary. Let's change that and traverse L1SAP just like for e.g. BCCH which is quite similar to CBCH handling. This also has the added benefit of logging CBCH via GSMTAP. Change-Id: Ibdba4c5e808330f8406f441a97fe0e81170fce97 Closes: OS#3534
Diffstat (limited to 'src/common/l1sap.c')
-rw-r--r--src/common/l1sap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 55b4a4bb..b29fcc71 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -53,6 +53,7 @@
#include <osmo-bts/power_control.h>
#include <osmo-bts/msg_utils.h>
#include <osmo-bts/pcuif_proto.h>
+#include <osmo-bts/cbch.h>
struct gsm_lchan *get_lchan_by_chan_nr(struct gsm_bts_trx *trx,
unsigned int chan_nr)
@@ -265,6 +266,8 @@ static int gsmtap_ph_data(struct osmo_phsap_prim *l1sap, uint8_t *chan_type,
*chan_type = GSMTAP_CHANNEL_PCH;
else
*chan_type = GSMTAP_CHANNEL_AGCH;
+ } else if (L1SAP_IS_CHAN_CBCH(chan_nr)) {
+ *chan_type = GSMTAP_CHANNEL_CBCH51;
} else if (L1SAP_IS_CHAN_PDCH(chan_nr)) {
*chan_type = GSMTAP_CHANNEL_PDTCH;
}
@@ -737,6 +740,9 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
memcpy(p, si, GSM_MACBLOCK_LEN);
else
memcpy(p, fill_frame, GSM_MACBLOCK_LEN);
+ } else if (L1SAP_IS_CHAN_CBCH(chan_nr)) {
+ p = msgb_put(msg, GSM_MACBLOCK_LEN);
+ bts_cbch_get(trx->bts, p, &g_time);
} else if (!(chan_nr & 0x80)) { /* only TCH/F, TCH/H, SDCCH/4 and SDCCH/8 have C5 bit cleared */
lchan = get_active_lchan_by_chan_nr(trx, chan_nr);
if (!lchan) {