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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/25896 )
Change subject: struct gsm_lchan: move tch.rep_facch to rep_acch.dl_facch
......................................................................
struct gsm_lchan: move tch.rep_facch to rep_acch.dl_facch
Finally we have all ACCH repetition state variables in one place.
Change-Id: I1469619528bb69c78c2fdc25bc1db208ead936d0
Related: SYS#5114
---
M include/osmo-bts/lchan.h
M src/common/l1sap.c
M src/common/lchan.c
3 files changed, 18 insertions(+), 20 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h
index 3eb4f93..a7e9004 100644
--- a/include/osmo-bts/lchan.h
+++ b/include/osmo-bts/lchan.h
@@ -254,9 +254,6 @@
uint8_t last_cmr;
uint32_t last_fn;
- /* SLOT #0 and #1 to store FACCH for repetition */
- struct gsm_rep_facch rep_facch[2];
-
} tch;
/* 3GPP TS 48.058 § 9.3.37: [0; 255] ok, -1 means invalid*/
@@ -311,7 +308,8 @@
bool ul_sacch_active;
bool dl_sacch_active;
- /* Message buffer to store DL-SACCH repeation candidate */
+ /* Message buffers to store repeation candidates */
+ struct gsm_rep_facch dl_facch[2];
struct msgb *dl_sacch_msg;
} rep_acch;
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index d94e3bc..c89b2c3 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -987,14 +987,14 @@
/* Note: The repeated version of the FACCH block must be scheduled 8 or 9 bursts after the original
* transmission. see 3GPP TS 44.006, section 10.2 for a more detailed explaination. */
- if (lchan->tch.rep_facch[0].msg && GSM_TDMA_FN_SUB(fn, lchan->tch.rep_facch[0].fn) >= 8) {
+ if (lchan->rep_acch.dl_facch[0].msg && GSM_TDMA_FN_SUB(fn, lchan->rep_acch.dl_facch[0].fn) >= 8) {
/* Re-use stored FACCH message buffer from SLOT #0 for repetition. */
- msg = lchan->tch.rep_facch[0].msg;
- lchan->tch.rep_facch[0].msg = NULL;
- } else if (lchan->tch.rep_facch[1].msg && GSM_TDMA_FN_SUB(fn, lchan->tch.rep_facch[1].fn) >= 8) {
+ msg = lchan->rep_acch.dl_facch[0].msg;
+ lchan->rep_acch.dl_facch[0].msg = NULL;
+ } else if (lchan->rep_acch.dl_facch[1].msg && GSM_TDMA_FN_SUB(fn, lchan->rep_acch.dl_facch[1].fn) >= 8) {
/* Re-use stored FACCH message buffer from SLOT #1 for repetition. */
- msg = lchan->tch.rep_facch[1].msg;
- lchan->tch.rep_facch[1].msg = NULL;
+ msg = lchan->rep_acch.dl_facch[1].msg;
+ lchan->rep_acch.dl_facch[1].msg = NULL;
} else {
/* Fetch new FACCH from queue ... */
if (lapdm_phsap_dequeue_prim(le, &pp) < 0)
@@ -1010,12 +1010,12 @@
return msg;
/* ... and store the message buffer for repetition. */
- if (lchan->tch.rep_facch[0].msg == NULL) {
- lchan->tch.rep_facch[0].msg = msgb_copy(msg, "rep_facch_0");
- lchan->tch.rep_facch[0].fn = fn;
- } else if (lchan->tch.rep_facch[1].msg == NULL) {
- lchan->tch.rep_facch[1].msg = msgb_copy(msg, "rep_facch_1");
- lchan->tch.rep_facch[1].fn = fn;
+ if (lchan->rep_acch.dl_facch[0].msg == NULL) {
+ lchan->rep_acch.dl_facch[0].msg = msgb_copy(msg, "rep_facch_0");
+ lchan->rep_acch.dl_facch[0].fn = fn;
+ } else if (lchan->rep_acch.dl_facch[1].msg == NULL) {
+ lchan->rep_acch.dl_facch[1].msg = msgb_copy(msg, "rep_facch_1");
+ lchan->rep_acch.dl_facch[1].fn = fn;
} else {
/* By definition 3GPP TS 05.02 does not allow more than two (for TCH/H only one) FACCH blocks
* to be transmitted simultaniously. */
diff --git a/src/common/lchan.c b/src/common/lchan.c
index 423ecc1..9f27409 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -292,10 +292,10 @@
lapdm_channel_exit(&lchan->lapdm_ch);
/* Also ensure that there are no leftovers from repeated FACCH or
* repeated SACCH that might cause memory leakage. */
- msgb_free(lchan->tch.rep_facch[0].msg);
- msgb_free(lchan->tch.rep_facch[1].msg);
- lchan->tch.rep_facch[0].msg = NULL;
- lchan->tch.rep_facch[1].msg = NULL;
+ msgb_free(lchan->rep_acch.dl_facch[0].msg);
+ msgb_free(lchan->rep_acch.dl_facch[1].msg);
+ lchan->rep_acch.dl_facch[0].msg = NULL;
+ lchan->rep_acch.dl_facch[1].msg = NULL;
msgb_free(lchan->rep_acch.dl_sacch_msg);
lchan->rep_acch.dl_sacch_msg = NULL;
/* fall through */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25896
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I1469619528bb69c78c2fdc25bc1db208ead936d0
Gerrit-Change-Number: 25896
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211022/e33b490b/attachment.htm>