aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2020-09-10 20:40:35 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2020-09-11 14:38:54 +0200
commit1482ec481393f8812ab9672edf7cb8710dea39cc (patch)
tree3fea55075d1ef456ef9d268192a538aef600a207
parent27a887f666adb67450470d7240e25fce1d178c76 (diff)
abis_rsl.c: flush channel request queue on RSL bootstrap
When RSL link is bootstrapped the BSC should clear the channel request queue. Change-Id: Iefb333817033e8d376184b58d89b186d875b968f Related: OS#4549
-rw-r--r--include/osmocom/bsc/abis_rsl.h1
-rw-r--r--src/osmo-bsc/abis_rsl.c12
-rw-r--r--src/osmo-bsc/osmo_bsc_main.c3
3 files changed, 16 insertions, 0 deletions
diff --git a/include/osmocom/bsc/abis_rsl.h b/include/osmocom/bsc/abis_rsl.h
index 9879497f4..964e282b5 100644
--- a/include/osmocom/bsc/abis_rsl.h
+++ b/include/osmocom/bsc/abis_rsl.h
@@ -119,6 +119,7 @@ int ipacc_payload_type(enum gsm48_chan_mode tch_mode, enum gsm_chan_t type);
int rsl_tx_rf_chan_release(struct gsm_lchan *lchan);
void abis_rsl_chan_rqd_queue_poll(struct gsm_bts *bts);
+void abis_rsl_chan_rqd_queue_flush(struct gsm_bts *bts);
#endif /* RSL_MT_H */
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index 74cc760c5..c0907c0a8 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -1398,6 +1398,18 @@ static void reduce_rach_dos(struct gsm_bts *bts)
}
}
+/* Flush all channel requests pending on this BTS */
+void abis_rsl_chan_rqd_queue_flush(struct gsm_bts *bts)
+{
+ struct chan_rqd *rqd;
+ struct chan_rqd *rqd_tmp;
+
+ llist_for_each_entry_safe(rqd, rqd_tmp, &bts->chan_rqd_queue, entry) {
+ llist_del(&rqd->entry);
+ talloc_free(rqd);
+ }
+}
+
/* MS has requested a channel on the RACH */
static int rsl_rx_chan_rqd(struct msgb *msg)
{
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 560f8fd7c..6d835ba18 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -329,6 +329,9 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx)
/* Start CBCH transmit timer if CBCH is present */
if (trx->nr == 0 && gsm_bts_get_cbch(trx->bts))
bts_cbch_timer_schedule(trx->bts);
+
+ /* Drop all expired channel requests in the list */
+ abis_rsl_chan_rqd_queue_flush(trx->bts);
}
static void all_ts_dispatch_event(struct gsm_bts_trx *trx, uint32_t event)