pespin submitted this change.

View Change



7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.

Approvals: laforge: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified
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
---
M include/osmo-bts/asci.h
M include/osmo-bts/lchan.h
M src/common/l1sap.c
M src/common/lchan.c
4 files changed, 56 insertions(+), 0 deletions(-)

diff --git a/include/osmo-bts/asci.h b/include/osmo-bts/asci.h
index fae9dde..59b48b2 100644
--- a/include/osmo-bts/asci.h
+++ b/include/osmo-bts/asci.h
@@ -18,3 +18,24 @@
void vgcs_talker_reset(struct gsm_lchan *lchan);

void vgcs_listener_reset(struct gsm_lchan *lchan);
+
+static inline bool vgcs_is_uplink_free(struct gsm_lchan *lchan)
+{
+ return lchan->asci.uplink_free;
+}
+
+static inline void vgcs_uplink_free_get(struct gsm_lchan *lchan, uint8_t *msg)
+{
+ memcpy(msg, lchan->asci.uplink_free_msg, GSM_MACBLOCK_LEN);
+}
+
+static inline void vgcs_uplink_free_set(struct gsm_lchan *lchan, uint8_t *msg)
+{
+ memcpy(lchan->asci.uplink_free_msg, msg, GSM_MACBLOCK_LEN);
+ lchan->asci.uplink_free = true;
+}
+
+static inline void vgcs_uplink_free_reset(struct gsm_lchan *lchan)
+{
+ lchan->asci.uplink_free = false;
+}
diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h
index f4da04d..a0e99bf 100644
--- a/include/osmo-bts/lchan.h
+++ b/include/osmo-bts/lchan.h
@@ -312,6 +312,9 @@
struct osmo_timer_list t3115;
/* counts up to Ny2 */
unsigned int vgcs_ul_grant_count;
+ /* uplink free message */
+ bool uplink_free;
+ uint8_t uplink_free_msg[GSM_MACBLOCK_LEN];
} asci;
/* S counter for link loss */
int s;
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 268486e..61fb3ee 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1170,6 +1170,10 @@
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 @@
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 971f0a5..bd50349 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -221,6 +221,7 @@
handover_reset(lchan);
vgcs_talker_reset(lchan);
vgcs_listener_reset(lchan);
+ vgcs_uplink_free_reset(lchan);

lchan->rel_act_kind = rel_kind;


To view, visit change 33449. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ia23c59f5e9a73bbc384fbc317a2cfcf707e3c28f
Gerrit-Change-Number: 33449
Gerrit-PatchSet: 11
Gerrit-Owner: jolly <andreas@eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier@sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>
Gerrit-MessageType: merged