aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2023-06-24 12:54:02 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2023-07-21 13:20:11 +0200
commitbe93b87a64067e3f023ab5ddf029a5daaa46fbe4 (patch)
treef193f1934c18c96319b0cbfb3c85059b9e8c1d43 /src
parentba5d2e4a5f0e967043b5116831e58bd99581c6bd (diff)
ASCI: Repeat UPLINK FREE message until uplink becomes busy
According to TS 44.018 the UPLINK FREE message must be repeated when the uplink is marked as free. The BSC sends the UPLINK FREE message once and the BTS repeats it until UPLINK BUSY (uplink blocked by BSC) or VGCS UPLINK GRANT (talker accesses the uplink) is sent. It is important to stop sending UPLINK FREE message when a talker accesses the uplink and before the VGCS UPLINK GRANT message is sent, so that stopping must be controlled by the BTS. Related: OS#5781 Change-Id: Ia23c59f5e9a73bbc384fbc317a2cfcf707e3c28f
Diffstat (limited to 'src')
-rw-r--r--src/common/l1sap.c12
-rw-r--r--src/common/lchan.c1
2 files changed, 13 insertions, 0 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 268486e0..61fb3ee7 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1170,6 +1170,10 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
memcpy(p + 2, si, GSM_MACBLOCK_LEN - 2);
} else
memcpy(p + 2, fill_frame, GSM_MACBLOCK_LEN - 2);
+ } else if (vgcs_is_uplink_free(lchan)) {
+ /* If UPLINK FREE message is stored, send it with every DCCH frame. */
+ p = msgb_put(msg, GSM_MACBLOCK_LEN);
+ vgcs_uplink_free_get(lchan, p);
} else if (L1SAP_IS_CHAN_SDCCH4(chan_nr) || L1SAP_IS_CHAN_SDCCH8(chan_nr) ||
(lchan->rsl_cmode == RSL_CMOD_SPD_SIGN && !lchan->ts->trx->bts->dtxd)) {
/*
@@ -1194,6 +1198,14 @@ static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
check_for_ciph_cmd(pp_msg, lchan, chan_nr);
if (dtxd_facch)
dtx_dispatch(lchan, E_FACCH);
+ if (rsl_chan_rt_is_vgcs(lchan->rsl_chan_rt)) {
+ /* Check for UPLINK FREE message and store. */
+ if (pp_msg->data[0] == GSM48_MT_RR_SH_UL_FREE << 2)
+ vgcs_uplink_free_set(lchan, pp_msg->data);
+ /* Keep UPLINK FREE message when sending short header messages. */
+ else if ((pp_msg->data[0] & 0x03) != 0x00)
+ vgcs_uplink_free_reset(lchan);
+ }
}
msgb_free(pp_msg);
}
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 971f0a5d..bd503497 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -221,6 +221,7 @@ void gsm_lchan_release(struct gsm_lchan *lchan, enum lchan_rel_act_kind rel_kind
handover_reset(lchan);
vgcs_talker_reset(lchan);
vgcs_listener_reset(lchan);
+ vgcs_uplink_free_reset(lchan);
lchan->rel_act_kind = rel_kind;