@@ -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)
@@ -328,14 +358,14 @@
generate_cell_chan_list(ca, trx->bts);
llist_for_each_entry(cur_trx, &trx->bts->trx_list, list) {
- 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);