aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmo-bts/rsl.h6
-rw-r--r--src/common/l1sap.c9
-rw-r--r--src/common/oml.c1
-rw-r--r--src/common/rsl.c50
-rw-r--r--src/osmo-bts-litecell15/oml.c4
-rw-r--r--src/osmo-bts-sysmo/oml.c4
6 files changed, 45 insertions, 29 deletions
diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 173e0863..f13e9681 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -35,9 +35,9 @@ int rsl_tx_ccch_load_ind_rach(struct gsm_bts *bts, uint16_t total,
struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr);
-void dyn_pdch_ts_disconnected(struct gsm_bts_trx_ts *ts);
-void dyn_pdch_ts_connected(struct gsm_bts_trx_ts *ts);
-void dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc);
+void cb_ts_disconnected(struct gsm_bts_trx_ts *ts);
+void cb_ts_connected(struct gsm_bts_trx_ts *ts);
+void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc);
#endif // _RSL_H */
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index d73715b1..23bc66e8 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -463,8 +463,10 @@ static int l1sap_info_act_cnf(struct gsm_bts_trx *trx,
/* During PDCH ACT, this is where we know that the PCU is done
* activating a PDCH, and PDCH switchover is complete. See
* rsl_rx_dyn_pdch() */
- if (lchan->ts->flags & TS_F_PDCH_ACT_PENDING)
- dyn_pdch_complete(lchan->ts, info_act_cnf->cause? -EIO : 0);
+ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH
+ && (lchan->ts->flags & TS_F_PDCH_ACT_PENDING))
+ ipacc_dyn_pdch_complete(lchan->ts,
+ info_act_cnf->cause? -EIO : 0);
return 0;
}
@@ -486,7 +488,8 @@ static int l1sap_info_rel_cnf(struct gsm_bts_trx *trx,
/* During PDCH DEACT, this marks the deactivation of the PDTCH as
* requested by the PCU. Next up, we disconnect the TS completely and
* call back to dyn_pdch_ts_disconnected(). See rsl_rx_dyn_pdch(). */
- if (lchan->ts->flags & TS_F_PDCH_DEACT_PENDING)
+ if (lchan->ts->pchan == GSM_PCHAN_TCH_F_PDCH
+ && (lchan->ts->flags & TS_F_PDCH_DEACT_PENDING))
bts_model_ts_disconnect(lchan->ts);
return 0;
diff --git a/src/common/oml.c b/src/common/oml.c
index 9d3c454d..38df11ae 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -691,6 +691,7 @@ static int conf_lchans_for_pchan(struct gsm_bts_trx_ts *ts)
unsigned int i;
enum gsm_phys_chan_config pchan = ts->pchan;
+ /* RSL_MT_IPAC_PDCH_ACT style dyn PDCH */
if (pchan == GSM_PCHAN_TCH_F_PDCH)
pchan = ts->flags & TS_F_PDCH_ACTIVE? GSM_PCHAN_PDCH
: GSM_PCHAN_TCH_F;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index b4245c1a..10b95ae1 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1687,13 +1687,13 @@ static int rsl_tx_dyn_pdch_nack(struct gsm_lchan *lchan, bool pdch_act,
*
* PDCH ACT == TCH/F -> PDCH:
* 1. call bts_model_ts_disconnect() to disconnect TCH/F;
- * 2. dyn_pdch_ts_disconnected() is called when done;
+ * 2. cb_ts_disconnected() is called when done;
* 3. call bts_model_ts_connect() to connect as PDTCH;
- * 4. dyn_pdch_ts_connected() is called when done;
+ * 4. cb_ts_connected() is called when done;
* 5. instruct the PCU to enable PDTCH;
* 6. the PCU will call back with an activation request;
- * 7. l1sap_info_act_cnf() will call dyn_pdch_complete() when SAPI activations
- * are done;
+ * 7. l1sap_info_act_cnf() will call ipacc_dyn_pdch_complete() when SAPI
+ * activations are done;
* 8. send a PDCH ACT ACK.
*
* PDCH DEACT == PDCH -> TCH/F:
@@ -1701,11 +1701,11 @@ static int rsl_tx_dyn_pdch_nack(struct gsm_lchan *lchan, bool pdch_act,
* 2. the PCU will call back with a deactivation request;
* 3. l1sap_info_rel_cnf() will call bts_model_ts_disconnect() when SAPI
* deactivations are done;
- * 4. dyn_pdch_ts_disconnected() is called when done;
+ * 4. cb_ts_disconnected() is called when done;
* 5. call bts_model_ts_connect() to connect as TCH/F;
- * 6. dyn_pdch_ts_connected() is called when done;
- * 7. directly call dyn_pdch_complete(), since no further action required for
- * TCH/F;
+ * 6. cb_ts_connected() is called when done;
+ * 7. directly call ipacc_dyn_pdch_complete(), since no further action required
+ * for TCH/F;
* 8. send a PDCH DEACT ACK.
*
* When an error happens along the way, a PDCH DE/ACT NACK is sent.
@@ -1740,7 +1740,7 @@ static void rsl_rx_dyn_pdch(struct msgb *msg, bool pdch_act)
"%s Attempt to PDCH %s on TS that is not a TCH/F_PDCH (is %s)\n",
gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT",
gsm_pchan_name(ts->pchan));
- dyn_pdch_complete(ts, -EINVAL);
+ ipacc_dyn_pdch_complete(ts, -EINVAL);
return;
}
@@ -1748,7 +1748,7 @@ static void rsl_rx_dyn_pdch(struct msgb *msg, bool pdch_act)
LOGP(DL1C, LOGL_NOTICE,
"%s Request to PDCH %s, but is already so\n",
gsm_lchan_name(lchan), pdch_act? "ACT" : "DEACT");
- dyn_pdch_complete(ts, 0);
+ ipacc_dyn_pdch_complete(ts, 0);
return;
}
@@ -1772,10 +1772,10 @@ static void rsl_rx_dyn_pdch(struct msgb *msg, bool pdch_act)
/* Error? then NACK right now. */
if (rc)
- dyn_pdch_complete(ts, rc);
+ ipacc_dyn_pdch_complete(ts, rc);
}
-void dyn_pdch_ts_disconnected(struct gsm_bts_trx_ts *ts)
+static void ipacc_dyn_pdch_ts_disconnected(struct gsm_bts_trx_ts *ts)
{
int rc;
enum gsm_phys_chan_config as_pchan;
@@ -1799,10 +1799,16 @@ void dyn_pdch_ts_disconnected(struct gsm_bts_trx_ts *ts)
rc = bts_model_ts_connect(ts, as_pchan);
/* Error? then NACK right now. */
if (rc)
- dyn_pdch_complete(ts, rc);
+ ipacc_dyn_pdch_complete(ts, rc);
}
-void dyn_pdch_ts_connected(struct gsm_bts_trx_ts *ts)
+void cb_ts_disconnected(struct gsm_bts_trx_ts *ts)
+{
+ if (ts->pchan == GSM_PCHAN_TCH_F_PDCH)
+ ipacc_dyn_pdch_ts_disconnected(ts);
+}
+
+static void ipacc_dyn_pdch_ts_connected(struct gsm_bts_trx_ts *ts)
{
int rc;
@@ -1820,7 +1826,7 @@ void dyn_pdch_ts_connected(struct gsm_bts_trx_ts *ts)
/* During PDCH DEACT, we're done right after the TCH/F came
* back up. */
- dyn_pdch_complete(ts, 0);
+ ipacc_dyn_pdch_complete(ts, 0);
} else if (ts->flags & TS_F_PDCH_ACT_PENDING) {
if (ts->lchan[0].type != GSM_LCHAN_PDTCH)
@@ -1838,22 +1844,28 @@ void dyn_pdch_ts_connected(struct gsm_bts_trx_ts *ts)
* when the PCU is not connected (yet), then there's nothing
* left to do now. The PCU will catch up when it connects. */
if (!pcu_connected()) {
- dyn_pdch_complete(ts, 0);
+ ipacc_dyn_pdch_complete(ts, 0);
return;
}
/* The PCU will request to activate the PDTCH SAPIs, which,
- * when done, will call back to dyn_pdch_complete(). */
+ * when done, will call back to ipacc_dyn_pdch_complete(). */
/* TODO: timeout on channel connect / disconnect request from PCU? */
rc = pcu_tx_info_ind();
/* Error? then NACK right now. */
if (rc)
- dyn_pdch_complete(ts, rc);
+ ipacc_dyn_pdch_complete(ts, rc);
}
}
-void dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc)
+void cb_ts_connected(struct gsm_bts_trx_ts *ts)
+{
+ if (ts->pchan == GSM_PCHAN_TCH_F_PDCH)
+ ipacc_dyn_pdch_ts_connected(ts);
+}
+
+void ipacc_dyn_pdch_complete(struct gsm_bts_trx_ts *ts, int rc)
{
bool pdch_act = ts->flags & TS_F_PDCH_ACT_PENDING;
diff --git a/src/osmo-bts-litecell15/oml.c b/src/osmo-bts-litecell15/oml.c
index 8f783f3a..4d88ac58 100644
--- a/src/osmo-bts-litecell15/oml.c
+++ b/src/osmo-bts-litecell15/oml.c
@@ -1848,7 +1848,7 @@ static int ts_disconnect_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg,
gsm_lchan_name(ts->lchan));
if (ts->flags & TS_F_PDCH_PENDING_MASK)
- dyn_pdch_ts_disconnected(ts);
+ cb_ts_disconnected(ts);
return 0;
}
@@ -1883,7 +1883,7 @@ static int ts_connect_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg,
ts->flags & TS_F_PDCH_DEACT_PENDING ? "DEACT_PENDING " : "");
if (ts->flags & TS_F_PDCH_PENDING_MASK)
- dyn_pdch_ts_connected(ts);
+ cb_ts_connected(ts);
return 0;
}
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 6be04fb3..01425aa4 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -1867,7 +1867,7 @@ static int ts_disconnect_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg,
gsm_lchan_name(ts->lchan));
if (ts->flags & TS_F_PDCH_PENDING_MASK)
- dyn_pdch_ts_disconnected(ts);
+ cb_ts_disconnected(ts);
return 0;
}
@@ -1902,7 +1902,7 @@ static int ts_connect_cb(struct gsm_bts_trx *trx, struct msgb *l1_msg,
ts->flags & TS_F_PDCH_DEACT_PENDING ? "DEACT_PENDING " : "");
if (ts->flags & TS_F_PDCH_PENDING_MASK)
- dyn_pdch_ts_connected(ts);
+ cb_ts_connected(ts);
return 0;
}