[PATCH] openbsc[master]: dyn PDCH: send PDCH ACT for each TCH/F_PDCH on TRX RSL UP

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Tue Jun 7 10:50:42 UTC 2016


Review at  https://gerrit.osmocom.org/211

dyn PDCH: send PDCH ACT for each TCH/F_PDCH on TRX RSL UP

Add dyn_pdch_init() and call from inp_sig_cb() upon RSL UP.

Revert the |= TS_F_PDCH_MODE chunk from previous commit, since this flag will
now be set after dyn_pdch_init() sent out the PDCH ACT, i.e. when the PDCH ACT
ACK messages are received.

Change-Id: I0cad93dec59d546b3f3b19e332e0833496031575
---
M openbsc/src/libbsc/bsc_init.c
1 file changed, 34 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/11/211/1

diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index 04452f7..0c0eb84 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -302,6 +302,36 @@
 		generate_ma_for_ts(&trx->ts[i]);
 }
 
+static void dyn_pdch_init(struct gsm_bts_trx *trx)
+{
+	unsigned int i;
+	struct gsm_bts_trx_ts *ts;
+	int rc;
+	unsigned int pdch_act_count = 0;
+
+	for (i = 0; i < TRX_NR_TS; i++) {
+		ts = &trx->ts[i];
+		if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
+			rc = rsl_ipacc_pdch_activate(ts, 1);
+			if (rc != 0) {
+				LOGP(DRSL, LOGL_ERROR,
+				     "Failed to activate PDCH on"
+				     " BTS %u TRX %u TS %u: %d\n",
+				     trx->bts->nr, trx->nr, i, rc);
+				continue;
+			}
+			pdch_act_count ++;
+		}
+	}
+
+	if (pdch_act_count) {
+		LOGP(DRSL, LOGL_NOTICE,
+		     "Activated PDCH on %u dynamic TCH/F_PDCH time slots"
+		     " for BTS %u TRX %u\n",
+		     pdch_act_count, trx->bts->nr, trx->nr);
+	}
+}
+
 /* Callback function to be called every time we receive a signal from INPUT */
 static int inp_sig_cb(unsigned int subsys, unsigned int signal,
 		      void *handler_data, void *signal_data)
@@ -329,14 +359,14 @@
 			llist_for_each_entry(cur_trx, &trx->bts->trx_list, list) {
 				int i;
 
-				for (i = 0; i < ARRAY_SIZE(cur_trx->ts); i++) {
+				for (i = 0; i < ARRAY_SIZE(cur_trx->ts); i++)
 					generate_ma_for_ts(&cur_trx->ts[i]);
-					cur_trx->ts[i].flags |= TS_F_PDCH_MODE;
-				}
 			}
 		}
-		if (isd->link_type == E1INP_SIGN_RSL)
+		if (isd->link_type == E1INP_SIGN_RSL) {
 			bootstrap_rsl(trx);
+			dyn_pdch_init(trx);
+		}
 		break;
 	case S_L_INP_TEI_DN:
 		LOGP(DLMI, LOGL_ERROR, "Lost some E1 TEI link: %d %p\n", isd->link_type, trx);

-- 
To view, visit https://gerrit.osmocom.org/211
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cad93dec59d546b3f3b19e332e0833496031575
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list