Change in osmo-bts[master]: measurement: get rid of *le in lchan_meas_handle_sacch()

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.org
Thu Nov 4 13:47:14 UTC 2021


fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/26051 )

Change subject: measurement: get rid of *le in lchan_meas_handle_sacch()
......................................................................

measurement: get rid of *le in lchan_meas_handle_sacch()

The current Timing Advance value can be obtained either from the
L1 SACCH header (if received) or from lchan->ta_ctrl.current.

Change-Id: I2b3693a0e49f03f2b4496c9dbd30cf47e9bc86b5
---
M src/common/measurement.c
1 file changed, 3 insertions(+), 6 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/measurement.c b/src/common/measurement.c
index 73c5e43..042f8b9 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -782,9 +782,9 @@
 	lchan->meas.last_fn = LCHAN_FN_DUMMY;
 }
 
-static inline uint8_t ms_to2rsl(const struct gsm_lchan *lchan, const struct lapdm_entity *le)
+static inline uint8_t ms_to2rsl(const struct gsm_lchan *lchan, uint8_t ta)
 {
-	return (lchan->ms_t_offs >= 0) ? lchan->ms_t_offs : (lchan->p_offs - le->ta);
+	return (lchan->ms_t_offs >= 0) ? lchan->ms_t_offs : (lchan->p_offs - ta);
 }
 
 static inline bool ms_to_valid(const struct gsm_lchan *lchan)
@@ -898,7 +898,6 @@
 	const struct gsm48_meas_res *mr = NULL;
 	const struct gsm48_hdr *gh = NULL;
 	int timing_offset, rc;
-	struct lapdm_entity *le;
 	bool dtxu_used = true; /* safe default assumption */
 	uint8_t ms_pwr;
 	uint8_t ms_ta;
@@ -932,9 +931,7 @@
 		ms_ta = lchan->ta_ctrl.current;
 	}
 
-	le = &lchan->lapdm_ch.lapdm_acch;
-
-	timing_offset = ms_to_valid(lchan) ? ms_to2rsl(lchan, le) : -1;
+	timing_offset = ms_to_valid(lchan) ? ms_to2rsl(lchan, ms_ta) : -1;
 	rc = rsl_tx_meas_res(lchan, msgb_l3(msg), msgb_l3len(msg), timing_offset);
 	if (rc == 0) /* Count successful transmissions */
 		lchan->meas.res_nr++;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/26051
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2b3693a0e49f03f2b4496c9dbd30cf47e9bc86b5
Gerrit-Change-Number: 26051
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
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/20211104/700901f7/attachment.htm>


More information about the gerrit-log mailing list