This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/21105 )
Change subject: l1sap: add repeated downlink SACCH
......................................................................
l1sap: add repeated downlink SACCH
3GPP TS 44.006, section 11 describes a method how the downlink
SACCH transmission can be repeated to increase transmission
reliability.
Depends: libosmocore I61ea6bf54ea90bd69b73ea0f0f3dc19a4214207b
Change-Id: I00806f936b15fbaf6a4e7bbd61f3bec262cdbb28
Related: OS#4794, SYS#5114
---
M include/osmo-bts/bts.h
M include/osmo-bts/gsm_data.h
M src/common/l1sap.c
M src/common/rsl.c
M src/common/vty.c
5 files changed, 77 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/05/21105/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index fdcc67b..950551c 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -341,6 +341,9 @@
/* 3GPP TS 44.006, section 10, Repeated Downlink FACCH */
bool facch_repetition_enabled;
+ /* 3GPP TS 44.006, section 11.2, Procedure for Repeated SACCH on the downlink */
+ bool dl_sacch_repetition_enabled;
+
void *model_priv; /* Allocated by bts_model, contains model specific data pointer */
};
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index 59fd809..2441286 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -264,6 +264,7 @@
/* SLOT #0 and #1 to store FACCH for repetition */
struct gsm_rep_facch rep_facch[2];
+ struct msgb *rep_sacch;
} tch;
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 6001b9f..30f226a 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -964,6 +964,44 @@
return msg;
}
+/* Special dequeueing function with SACCH repetition (3GPP TS 44.006, section 11) */
+static inline struct msgb *lapdm_phsap_dequeue_msg_sacch(struct gsm_lchan *lchan, struct lapdm_entity *le)
+{
+ struct osmo_phsap_prim pp;
+ struct msgb *msg;
+ uint8_t sapi;
+
+ /* SACCH repetition disabled by the MS */
+ if (((lchan->meas.l1_info[0] >> 1) & 1) == 0) {
+ /* Toss pending repetition candidate */
+ if (lchan->tch.rep_sacch)
+ msgb_free(lchan->tch.rep_sacch);
+ lchan->tch.rep_sacch = NULL;
+
+ /* Fetch new FACCH from queue normally */
+ return lapdm_phsap_dequeue_msg(le);
+ }
+
+ /* Repeat pending candidate */
+ if (lchan->tch.rep_sacch) {
+ msg = lchan->tch.rep_sacch;
+ lchan->tch.rep_sacch = NULL;
+ return msg;
+ }
+
+ /* Fetch new SACCH from queue ... */
+ if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
+ return NULL;
+ msg = pp.oph.msg;
+
+ /* Only SAPI 0 SACCH frames are repetition candidates, see also 3GPP TS 44.006, section 11.2 */
+ sapi = (msg->data[0] >> 2) & 0x07;
+ if (sapi == 0)
+ lchan->tch.rep_sacch = msg;
+
+ return msg;
+}
+
/* PH-RTS-IND prim received from bts model */
static int l1sap_ph_rts_ind(struct gsm_bts_trx *trx,
struct osmo_phsap_prim *l1sap, struct ph_data_param *rts_ind)
@@ -1044,7 +1082,10 @@
p[0] = lchan->ms_power_ctrl.current;
p[1] = lchan->rqd_ta;
le = &lchan->lapdm_ch.lapdm_acch;
- pp_msg = lapdm_phsap_dequeue_msg(le);
+ if (lchan->ts->trx->bts->dl_sacch_repetition_enabled)
+ pp_msg = lapdm_phsap_dequeue_msg_sacch(lchan, le);
+ else
+ pp_msg = lapdm_phsap_dequeue_msg(le);
} else {
if (lchan->ts->trx->bts->dtxd)
dtxd_facch = true;
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 16109b2..26560b9 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -823,13 +823,16 @@
*/
lapdm_channel_exit(&lchan->lapdm_ch);
- /* Also ensure that there are no leftovers from repeated FACCH
- * that might cause memory leakage. */
+ /* Also ensure that there are no leftovers from repeated FACCH or
+ * repeated SACCH that might cause memory leakage. */
if (lchan->tch.rep_facch[0].msg)
msgb_free(lchan->tch.rep_facch[0].msg);
if (lchan->tch.rep_facch[1].msg)
msgb_free(lchan->tch.rep_facch[1].msg);
memset(lchan->tch.rep_facch, 0, sizeof(lchan->tch.rep_facch));
+ if(lchan->tch.rep_sacch)
+ msgb_free(lchan->tch.rep_sacch);
+ lchan->tch.rep_sacch = NULL;
return tx_rf_rel_ack(lchan, chan_nr);
}
diff --git a/src/common/vty.c b/src/common/vty.c
index 59a6dee..f8033df 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -307,6 +307,8 @@
vty_out(vty, " smscb queue-hysteresis %d%s", bts->smscb_queue_hyst, VTY_NEWLINE);
if (bts->facch_repetition_enabled)
vty_out(vty, " facch-repetition%s", VTY_NEWLINE);
+ if (bts->dl_sacch_repetition_enabled)
+ vty_out(vty, " sacch-repetition%s", VTY_NEWLINE);
bts_model_config_write_bts(vty, bts);
@@ -823,6 +825,28 @@
return CMD_SUCCESS;
}
+DEFUN_ATTR(cfg_bts_dl_sacch_repetition, cfg_bts_dl_sacch_repetition_cmd,
+ "dl-sacch-repetition",
+ "enable downlink SACCH repetition\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ bts->dl_sacch_repetition_enabled = true;
+ return CMD_SUCCESS;
+}
+
+DEFUN_ATTR(cfg_bts_no_dl_sacch_repetition, cfg_bts_no_dl_sacch_repetition_cmd,
+ "no dl-sacch-repetition",
+ NO_STR "disable downlink SACCH repetition\n",
+ CMD_ATTR_IMMEDIATE)
+{
+ struct gsm_bts *bts = vty->index;
+
+ bts->dl_sacch_repetition_enabled = false;
+ return CMD_SUCCESS;
+}
+
#define DB_MDB_STR \
"Unit is dB (decibels)\n" \
"Unit is mdB (milli-decibels, or rather 1/10000 bel)\n"
@@ -1917,6 +1941,8 @@
install_element(BTS_NODE, &cfg_bts_smscb_qhyst_cmd);
install_element(BTS_NODE, &cfg_bts_facch_repetition_cmd);
install_element(BTS_NODE, &cfg_bts_no_facch_repetition_cmd);
+ install_element(BTS_NODE, &cfg_bts_dl_sacch_repetition_cmd);
+ install_element(BTS_NODE, &cfg_bts_no_dl_sacch_repetition_cmd);
install_element(BTS_NODE, &cfg_trx_gsmtap_sapi_all_cmd);
install_element(BTS_NODE, &cfg_trx_gsmtap_sapi_cmd);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/21105
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I00806f936b15fbaf6a4e7bbd61f3bec262cdbb28
Gerrit-Change-Number: 21105
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201111/5b2f07a0/attachment.htm>