Change in osmo-pcu[master]: Use Timing Advance Index in UL assignments

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

Max gerrit-no-reply at lists.osmocom.org
Wed Mar 27 12:32:07 UTC 2019


Max has submitted this change and it was merged. ( https://gerrit.osmocom.org/12956 )

Change subject: Use Timing Advance Index in UL assignments
......................................................................

Use Timing Advance Index in UL assignments

Write TAI (if available) when generating Rest Octets for UL
Assignment. This should not affect actual PCU behavior because TAI is
not yet supported by upper layers but we have to adjust corresponding
tests anyway.

That's updated version of reverted commit.

Change-Id: I69407793bdb863be5fc42adadf75842d22f27335
Related: OS#3014
---
M src/encoding.cpp
M tests/types/TypesTest.cpp
M tests/types/TypesTest.ok
3 files changed, 12 insertions(+), 12 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/encoding.cpp b/src/encoding.cpp
index 55838fb..b460d41 100644
--- a/src/encoding.cpp
+++ b/src/encoding.cpp
@@ -263,7 +263,7 @@
 }
 
 static int write_ia_rest_uplink_mba(const gprs_rlcmac_ul_tbf *tbf, bitvec *dest, uint8_t usf,
-				    uint8_t alpha, uint8_t gamma)
+				    uint8_t alpha, uint8_t gamma, int8_t ta_idx)
 {
 	int rc = 0;
 
@@ -282,8 +282,8 @@
 	rc = write_alpha_gamma(dest, alpha, gamma);
 	CHECK(rc);
 
-	/* No TIMING_ADVANCE_INDEX */
-	SET_0(dest);
+	rc = write_ta_index(dest, ta_idx);
+	CHECK(rc);
 
 	/* No TBF_STARTING_TIME */
 	SET_0(dest);
@@ -311,7 +311,7 @@
 }
 
 static int write_ia_rest_egprs_uplink_sba(const gprs_rlcmac_ul_tbf *tbf, bitvec * dest, uint8_t usf,
-					  uint8_t alpha, uint8_t gamma)
+					  uint8_t alpha, uint8_t gamma, int8_t ta_idx)
 {
 	int rc = 0;
 
@@ -339,8 +339,8 @@
 	rc = write_alpha_gamma(dest, alpha, gamma);
 	CHECK(rc);
 
-	/* No TIMING_ADVANCE_INDEX */
-	SET_0(dest);
+	rc = write_ta_index(dest, ta_idx);
+	CHECK(rc);
 
 	/* No TBF_STARTING_TIME */
 	SET_0(dest);
@@ -514,7 +514,7 @@
 
 		if (as_ul_tbf(tbf) != NULL) {
 			dest->cur_bit = wp;
-			rc = write_ia_rest_egprs_uplink_sba(as_ul_tbf(tbf), dest, usf, alpha, gamma);
+			rc = write_ia_rest_egprs_uplink_sba(as_ul_tbf(tbf), dest, usf, alpha, gamma, ta_idx);
 		} else {
 			dest->cur_bit = wp;
 			rc = write_ia_rest_egprs_uplink_mba(dest, fn, alpha, gamma);
@@ -527,7 +527,7 @@
 
 		if (as_ul_tbf(tbf) != NULL) {
 			dest->cur_bit = wp;
-			rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, usf, alpha, gamma);
+			rc = write_ia_rest_uplink_mba(as_ul_tbf(tbf), dest, usf, alpha, gamma, ta_idx);
 		} else {
 			dest->cur_bit = wp;
 			rc = write_ia_rest_uplink_sba(dest, fn, alpha, gamma);
diff --git a/tests/types/TypesTest.cpp b/tests/types/TypesTest.cpp
index 822bd51..589f156 100644
--- a/tests/types/TypesTest.cpp
+++ b/tests/types/TypesTest.cpp
@@ -497,7 +497,7 @@
 				 0x23, /* TA */
 				 0x00, /* 0-length §10.5.2.21 Mobile Allocation */
 				 /* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
-				 0xc8, 0x02, 0x1b, 0xa0, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+				 0xc8, 0x02, 0x1b, 0xa2, 0x0b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
 
 	check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_0, res, sizeof(res), "ia_rest_uplink(MBA)");
 }
@@ -537,7 +537,7 @@
 				 0x23, /* TA */
 				 0x00, /* 0-length §10.5.2.21 Mobile Allocation */
 				 /* ETSI TS 44.018 §10.5.2.16 IA Rest Octets */
-				 0x46, 0xa0, 0x08, 0x00, 0x17, 0x40, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
+				 0x46, 0xa0, 0x08, 0x00, 0x17, 0x44, 0x0b, 0x2b, 0x2b, 0x2b, 0x2b, 0x2b, };
 
 	check_imm_ass(tbf, false, GSM_L1_BURST_TYPE_ACCESS_1, res, sizeof(res), "ia_rest_egprs_uplink(SBA)");
 }
diff --git a/tests/types/TypesTest.ok b/tests/types/TypesTest.ok
index c6974d5..a5c58b8 100644
--- a/tests/types/TypesTest.ok
+++ b/tests/types/TypesTest.ok
@@ -9,13 +9,13 @@
 [11] DL Immediate Assignment <ia_rest_downlink>:
 	06 3f 30 0d 23 6d 7f 03 18 23 00 d0 00 00 00 08 17 47 08 0b 5b 2b 2b 
 [11] UL Immediate Assignment <ia_rest_uplink(MBA)>:
-	06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 1b a0 2b 2b 2b 2b 2b 2b 2b 2b 
+	06 3f 10 0d 23 6d 0d 03 18 23 00 c8 02 1b a2 0b 2b 2b 2b 2b 2b 2b 2b 
 [11] UL Immediate Assignment <ia_rest_uplink(SBA)>:
 	06 3f 10 0d 23 6d 0d 03 18 23 00 c5 d0 80 b5 ab 2b 2b 2b 2b 2b 2b 2b 
 [11] UL Immediate Assignment <ia_rest_egprs_uplink(MBA)>:
 	06 3f 10 0d 23 6d 7f 03 18 23 00 46 97 40 0b 58 2b 2b 2b 2b 2b 2b 2b 
 [11] UL Immediate Assignment <ia_rest_egprs_uplink(SBA)>:
-	06 3f 10 0d 23 6d 7f 03 18 23 00 46 a0 08 00 17 40 2b 2b 2b 2b 2b 2b 
+	06 3f 10 0d 23 6d 7f 03 18 23 00 46 a0 08 00 17 44 0b 2b 2b 2b 2b 2b 
 assignment reject: 06 3a 10 7f 06 36 14 7f 06 36 14 7f 06 36 14 7f 06 36 14 c0 2b 2b 
 assignment reject: 06 3a 10 70 06 36 14 70 06 36 14 70 06 36 14 70 06 36 14 0b 2b 2b 
 Testing LBS utility...

-- 
To view, visit https://gerrit.osmocom.org/12956
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I69407793bdb863be5fc42adadf75842d22f27335
Gerrit-Change-Number: 12956
Gerrit-PatchSet: 14
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190327/c994f4b4/attachment.htm>


More information about the gerrit-log mailing list