osmo-bsc/openbsc/src
Neels Hofmeyr d35fc4408c dyn TS: fix OS#1798: on late RF CHAN REL ACK, activate PDCH
Tested by hacking a REL ACK delay of a couple of seconds into osmo-bts' rsl.c
for the first TCH_H lchan:

[[[
diff --git a/include/osmo-bts/rsl.h b/include/osmo-bts/rsl.h
index 093e9cb..b35c3bb 100644
--- a/include/osmo-bts/rsl.h
+++ b/include/osmo-bts/rsl.h
@@ -22,6 +22,7 @@ int rsl_tx_est_ind(struct gsm_lchan *lchan, uint8_t link_id, uint8_t *data, int
 int rsl_tx_chan_act_acknack(struct gsm_lchan *lchan, uint8_t cause);
 int rsl_tx_conn_fail(struct gsm_lchan *lchan, uint8_t cause);
 int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan);
+int rsl_tx_rf_rel_ack_later(struct gsm_lchan *lchan);
 int rsl_tx_hando_det(struct gsm_lchan *lchan, uint8_t *ho_delay);

 /* call-back for LAPDm code, called when it wants to send msgs UP */
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 3802e25..1f92b0d 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -491,7 +491,16 @@ static int l1sap_info_rel_cnf(struct gsm_bts_trx *trx,

 	lchan = get_lchan_by_chan_nr(trx, info_act_cnf->chan_nr);

-	rsl_tx_rf_rel_ack(lchan);
+	static int yyy = 0;
+
+	DEBUGP(DRSL, "%s YYYYYYYYYYYYYYYYYYYYY %d %s\n",
+	       gsm_lchan_name(lchan), yyy, gsm_lchant_name(lchan->type));
+
+	if (lchan->type == GSM_LCHAN_TCH_H && !yyy) {
+		yyy ++;
+		rsl_tx_rf_rel_ack_later(lchan);
+	} else
+		rsl_tx_rf_rel_ack(lchan);

 	/* During PDCH DEACT, this marks the deactivation of the PDTCH as
 	 * requested by the PCU. Next up, we disconnect the TS completely and
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 3c97af9..7926f21 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -534,6 +534,22 @@ int rsl_tx_rf_rel_ack(struct gsm_lchan *lchan)
 	return abis_bts_rsl_sendmsg(msg);
 }

+struct osmo_timer_list yyy_timer;
+
+static void yyy_timer_cb(void *data)
+{
+	rsl_tx_rf_rel_ack(data);
+}
+
+int rsl_tx_rf_rel_ack_later(struct gsm_lchan *lchan)
+{
+	yyy_timer.cb = yyy_timer_cb;
+	yyy_timer.data = lchan;
+	osmo_timer_schedule(&yyy_timer, 10, 0);
+	return 0;
+}
+
+
 /* 8.4.2 sending CHANnel ACTIVation ACKnowledge */
 static int rsl_tx_chan_act_ack(struct gsm_lchan *lchan)
 {
]]]

Change-Id: I87e07e1d54882f8f3d667fa300c6e3679f5c920d
Fixes: OS#1798
2016-08-27 02:23:47 +00:00
..
gprs sgsn: add statistics counter for LLC packets 2016-08-27 01:27:43 +00:00
ipaccess drop unneccessary duplicate/unused linking: ipaccess 2016-05-21 15:20:47 +00:00
libbsc dyn TS: fix OS#1798: on late RF CHAN REL ACK, activate PDCH 2016-08-27 02:23:47 +00:00
libcommon move ts_sublots() to gsm_data_shared.c, it will be used by osmo-bts 2016-08-27 01:23:49 +00:00
libfilter 04.08: apply new bitmask functions, fix bitmask use 2016-03-15 14:15:00 +01:00
libmgcp osmux: Add negotiation state so race conditions can't disable osmux 2016-07-11 19:19:05 +00:00
libmsc libmsc: add missing count of sms no receiver when using smpp_first 2016-08-27 01:58:19 +00:00
libtrau Fix SIGABRT on wrong AMR payload 2016-06-14 10:20:05 +00:00
osmo-bsc drop unneccessary duplicate linking: osmo-bsc 2016-05-21 15:02:55 +00:00
osmo-bsc_mgcp rm dup: use channel type names from libosmocore 2016-06-18 11:34:21 +00:00
osmo-bsc_nat osmux: Add negotiation state so race conditions can't disable osmux 2016-07-11 19:19:05 +00:00
osmo-nitb dyn TS: OS#1778 workaround: disable TCH/F on dyn TS for nitb 2016-07-28 17:40:59 +02:00
utils bs11_config: add brackets to fix warning in argument parsing 2016-07-25 00:14:44 +00:00
Makefile.am filter: Move the gsm 04.08 filter to a common place 2015-05-03 21:42:27 +02:00