aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-08-30 08:03:09 +0200
committerHarald Welte <laforge@gnumonks.org>2015-09-22 16:39:03 +0200
commitace9a8742f700a748620f4b590b6c5468cd4d584 (patch)
tree76638b56030fae6c02590baacdf50070b1e603a3 /src/common
parent54eceac257c1359c13ec11337912fa69d45fe6e8 (diff)
Add PCH/AGCH message to PH-/MPH-/TCH-SAP interface
This part moves PCH and AGCH message primitives from osmo-bts-sysmo to common part.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/l1sap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 2dedf021..da4cc480 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -79,6 +79,7 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
uint8_t tn;
uint32_t fn;
uint8_t *p, *si;
+ int rc;
chan_nr = rts_ind->chan_nr;
link_id = rts_ind->link_id;
@@ -109,6 +110,13 @@ 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_AGCH_PCH(chan_nr)) {
+ p = msgb_put(msg, GSM_MACBLOCK_LEN);
+ /* if CCCH block is 0, it is AGCH */
+ rc = bts_ccch_copy_msg(trx->bts, p, &g_time,
+ (L1SAP_FN2CCCHBLOCK(fn) < 1));
+ if (rc <= 0)
+ memcpy(p, fill_frame, GSM_MACBLOCK_LEN);
}
DEBUGP(DL1P, "Tx PH-DATA.req %02u/%02u/%02u chan_nr=%d link_id=%d\n",