Change in osmo-bsc[master]: rename lchan->rqd_ta to last_ta

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/.

neels gerrit-no-reply at lists.osmocom.org
Fri Feb 5 19:24:53 UTC 2021


neels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/22511 )

Change subject: rename lchan->rqd_ta to last_ta
......................................................................

rename lchan->rqd_ta to last_ta

Originally, the lchan stored only the Timing Advance from the initial
channel request, hence it was called rqd_ta.

Since quite a while now, rqd_ta also stores the most recent Timing
Advance from each received Measurement Report. So rename to last_ta.

This is cosmetic preparation for an upcoming patch that clarifies
whether the Timing Advance is already known for Channel Activation.

Change-Id: I1049526a173819baeb4978db5bf018ba3f1006a0
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/abis_rsl.c
M src/osmo-bsc/handover_decision_2.c
M src/osmo-bsc/lchan_fsm.c
M src/osmo-bsc/lcs_loc_req.c
M src/osmo-bsc/lcs_ta_req.c
6 files changed, 14 insertions(+), 12 deletions(-)



diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8b53902..6cb3cf0 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -657,7 +657,9 @@
 		} ass_compl;
 	} abis_ip;
 
-	uint8_t rqd_ta;
+	/* At first, the Timing Advance from the initial Channel Request. Later, the Timing Advance value received from
+	 * the most recent Measurement Report. */
+	uint8_t last_ta;
 
 	/* table of neighbor cell measurements */
 	struct neigh_meas_proc neigh_meas[MAX_NEIGH_MEAS];
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c
index f45b507..edffd35 100644
--- a/src/osmo-bsc/abis_rsl.c
+++ b/src/osmo-bsc/abis_rsl.c
@@ -541,7 +541,7 @@
 		return rc;
 	}
 
-	ta = lchan->rqd_ta;
+	ta = lchan->last_ta;
 
 	/* BS11 requires TA shifted by 2 bits */
 	if (bts->type == GSM_BTS_TYPE_BS11)
@@ -1147,8 +1147,8 @@
 		if (msg->lchan->ts->trx->bts->type == GSM_BTS_TYPE_BS11
 		 || msg->lchan->ts->trx->bts->type == GSM_BTS_TYPE_NOKIA_SITE)
 			mr->ms_l1.ta >>= 2;
-		/* store TA for next assignment/handover */
-		mr->lchan->rqd_ta = mr->ms_l1.ta;
+		/* store TA for handover decision, and for intra-cell re-assignment */
+		mr->lchan->last_ta = mr->ms_l1.ta;
 	}
 	if (TLVP_PRESENT(&tp, RSL_IE_L3_INFO)) {
 		msg->l3h = (uint8_t *) TLVP_VAL(&tp, RSL_IE_L3_INFO);
@@ -1756,7 +1756,7 @@
 	OSMO_ASSERT(lchan->rqd_ref);
 
 	*(lchan->rqd_ref) = rqd->ref;
-	lchan->rqd_ta = rqd->ta;
+	lchan->last_ta = rqd->ta;
 
 	LOG_LCHAN(lchan, LOGL_DEBUG, "MS: Channel Request: reason=%s ra=0x%02x ta=%d\n",
 		  gsm_chreq_name(rqd->reason), rqd->ref.ra, rqd->ta);
@@ -1788,7 +1788,7 @@
 
 	/* use request reference extracted from CHAN_RQD */
 	memcpy(&ia->req_ref, lchan->rqd_ref, sizeof(ia->req_ref));
-	ia->timing_advance = lchan->rqd_ta;
+	ia->timing_advance = lchan->last_ta;
 	if (!lchan->ts->hopping.enabled) {
 		ia->mob_alloc_len = 0;
 	} else {
diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c
index 2cb7a54..134f502 100644
--- a/src/osmo-bsc/handover_decision_2.c
+++ b/src/osmo-bsc/handover_decision_2.c
@@ -1543,10 +1543,10 @@
 
 	/* Max Distance */
 	if (lchan->meas_rep_count > 0
-	    && lchan->rqd_ta > ho_get_hodec2_max_distance(bts->ho)) {
+	    && lchan->last_ta > ho_get_hodec2_max_distance(bts->ho)) {
 		global_ho_reason = HO_REASON_MAX_DISTANCE;
 		LOGPHOLCHAN(lchan, LOGL_NOTICE, "TA is TOO HIGH: %u > %d\n",
-			    lchan->rqd_ta, ho_get_hodec2_max_distance(bts->ho));
+			    lchan->last_ta, ho_get_hodec2_max_distance(bts->ho));
 		/* start penalty timer to prevent coming back too
 		 * early. it must be started before selecting a better cell,
 		 * so there is no assignment selected, due to running
diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c
index 5790b3f..7a75c0b 100644
--- a/src/osmo-bsc/lchan_fsm.c
+++ b/src/osmo-bsc/lchan_fsm.c
@@ -580,7 +580,7 @@
 		ms_power_dbm = ms_pwr_dbm(bts->band, old_lchan->ms_power);
 		lchan_update_ms_power_ctrl_level(lchan, ms_power_dbm >= 0 ? ms_power_dbm : bts->ms_max_power);
 		lchan->bs_power = old_lchan->bs_power;
-		lchan->rqd_ta = old_lchan->rqd_ta;
+		lchan->last_ta = old_lchan->last_ta;
 	} else {
 		lchan_update_ms_power_ctrl_level(lchan, bts->ms_max_power);
 		/* Upon last entering the UNUSED state, from lchan_reset():
diff --git a/src/osmo-bsc/lcs_loc_req.c b/src/osmo-bsc/lcs_loc_req.c
index ca5c7b9..39bc341 100644
--- a/src/osmo-bsc/lcs_loc_req.c
+++ b/src/osmo-bsc/lcs_loc_req.c
@@ -313,7 +313,7 @@
 		plr.bssmap_le.perform_loc_req.apdu = (struct bsslap_pdu){
 			.msg_type = BSSLAP_MSGT_TA_LAYER3,
 			.ta_layer3 = {
-				.ta = lchan->rqd_ta,
+				.ta = lchan->last_ta,
 			},
 		};
 	} else {
@@ -365,7 +365,7 @@
 			.msg_type = BSSLAP_MSGT_RESET,
 			.reset = {
 				.cell_id = lchan->ts->trx->bts->cell_identity,
-				.ta = lchan->rqd_ta,
+				.ta = lchan->last_ta,
 				.cause = BSSLAP_CAUSE_INTRA_BSS_HO,
 			},
 		};
diff --git a/src/osmo-bsc/lcs_ta_req.c b/src/osmo-bsc/lcs_ta_req.c
index 97d6eb5..3b859a7 100644
--- a/src/osmo-bsc/lcs_ta_req.c
+++ b/src/osmo-bsc/lcs_ta_req.c
@@ -210,7 +210,7 @@
 					.msg_type = BSSLAP_MSGT_TA_RESPONSE,
 					.ta_response = {
 						.cell_id = lchan->ts->trx->bts->cell_identity,
-						.ta = lchan->rqd_ta,
+						.ta = lchan->last_ta,
 					},
 				},
 			},

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

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1049526a173819baeb4978db5bf018ba3f1006a0
Gerrit-Change-Number: 22511
Gerrit-PatchSet: 2
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
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/20210205/0df86a91/attachment.htm>


More information about the gerrit-log mailing list