aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-05-12 19:27:16 +0200
committerpespin <pespin@sysmocom.de>2020-05-14 11:19:05 +0000
commit5dc6e465cbf50ecd451866168a8d4e1296e78ed5 (patch)
tree9ff67aede84493335c2ca4b968a19e7d5ef98040
parentce60011e77fe1118bf8afe738353fbab6966a1cb (diff)
Drop unneeded arg 'ta' in tbf_alloc_ul()
The function is simply setting the ta on the ms, so simply make sure ta is set on callers before passing the ms object. Change-Id: Iebb9c57f458690e045ddc45c800209ad8cf621e0
-rw-r--r--src/pdch.cpp8
-rw-r--r--src/tbf.cpp4
-rw-r--r--src/tbf.h2
-rw-r--r--tests/tbf/TbfTest.err22
4 files changed, 16 insertions, 20 deletions
diff --git a/src/pdch.cpp b/src/pdch.cpp
index 048577de..88d5d31a 100644
--- a/src/pdch.cpp
+++ b/src/pdch.cpp
@@ -118,7 +118,7 @@ static inline void sched_ul_ass_or_rej(BTS *bts, gprs_rlcmac_bts *bts_data, stru
bts->channel_request_description();
/* This call will register the new TBF with the MS on success */
- gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli(), tbf->ta());
+ gprs_rlcmac_ul_tbf *ul_tbf = tbf_alloc_ul(bts_data, tbf->ms(), tbf->trx->trx_no, tbf->tlli());
/* schedule uplink assignment or reject */
if (ul_tbf) {
@@ -551,7 +551,6 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
struct gprs_rlcmac_ul_tbf *ul_tbf;
struct gprs_rlcmac_dl_tbf *dl_tbf;
uint32_t tlli = request->ID.u.TLLI;
- uint8_t ta = GSM48_TA_INVALID;
bool found = true;
GprsMs *ms = bts()->ms_by_tlli(tlli);
@@ -566,7 +565,6 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
if (found) {
ul_tbf = ms->ul_tbf();
dl_tbf = ms->dl_tbf();
- ta = ms->ta();
/* We got a RACH so the MS was in packet idle mode and thus
* didn't have any active TBFs */
if (ul_tbf) {
@@ -593,7 +591,7 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
"block, but there is no resource request "
"scheduled!\n");
} else {
- ta = sba->ta;
+ ms->set_ta(sba->ta);
bts()->sba()->free_sba(sba);
}
if (request->Exist_MS_Radio_Access_capability2) {
@@ -613,7 +611,7 @@ void gprs_rlcmac_pdch::rcv_resource_request(Packet_Resource_Request_t *request,
"MS supports EGPRS multislot class %d.\n",
ms->egprs_ms_class());
- ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli, ta);
+ ul_tbf = tbf_alloc_ul(bts_data(), ms, trx_no(), tlli);
if (!ul_tbf) {
handle_tbf_reject(bts_data(), ms, tlli,
trx_no(), ts_no);
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 56fdcd13..2693223c 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -416,7 +416,7 @@ void gprs_rlcmac_tbf::update_ms(uint32_t tlli, enum gprs_rlcmac_tbf_direction di
}
gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx,
- uint32_t tlli, uint8_t ta)
+ uint32_t tlli)
{
struct gprs_rlcmac_ul_tbf *tbf;
@@ -435,8 +435,6 @@ gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t
tbf->update_ms(tlli, GPRS_RLCMAC_UL_TBF);
OSMO_ASSERT(tbf->ms());
- tbf->ms()->set_ta(ta);
-
return tbf;
}
diff --git a/src/tbf.h b/src/tbf.h
index 5ebd2e81..2b4cf6df 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -347,7 +347,7 @@ private:
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul(struct gprs_rlcmac_bts *bts, GprsMs *ms,
- int8_t use_trx, uint32_t tlli, uint8_t ta);
+ int8_t use_trx, uint32_t tlli);
struct gprs_rlcmac_ul_tbf *tbf_alloc_ul_tbf(struct gprs_rlcmac_bts *bts, GprsMs *ms, int8_t use_trx, bool single_slot);
diff --git a/tests/tbf/TbfTest.err b/tests/tbf/TbfTest.err
index 6019def7..ca161492 100644
--- a/tests/tbf/TbfTest.err
+++ b/tests/tbf/TbfTest.err
@@ -1526,6 +1526,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
********** UL-TBF starts here **********
Allocating UL TBF: MS_CLASS=1/0
@@ -1545,7 +1546,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80,
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
@@ -1608,6 +1608,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
********** UL-TBF starts here **********
Allocating UL TBF: MS_CLASS=1/0
@@ -1627,7 +1628,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80,
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) start Packet Uplink Assignment (PACCH)
@@ -1738,6 +1738,7 @@ TBF(TFI=0 TLLI=0xf1223344 DIR=DL STATE=FINISHED) No downlink ACK received yet
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
********** UL-TBF starts here **********
Allocating UL TBF: MS_CLASS=1/0
@@ -1757,7 +1758,6 @@ TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80,
TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=1 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf5667788, not yet confirmed
-Modifying MS object, TLLI = 0xf5667788, TA 220 -> 7
TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=1 TLLI=0xf5667788 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
Received RTS for PDCH: TRX=0 TS=7 FN=2654335 block_nr=11 scheduling USF=0 for required uplink resource of UL TFI=0
@@ -1805,6 +1805,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
********** UL-TBF starts here **********
Allocating UL TBF: MS_CLASS=1/0
@@ -1824,7 +1825,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80,
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2
@@ -1977,6 +1977,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
********** UL-TBF starts here **********
Allocating UL TBF: MS_CLASS=1/0
@@ -1996,7 +1997,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80,
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2
@@ -2128,6 +2128,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
********** UL-TBF starts here **********
Allocating UL TBF: MS_CLASS=1/0
@@ -2147,7 +2148,6 @@ TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) Allocated: trx = 0, ul_slots = 80,
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
MS (IMSI ): Link quality 12dB (old 12dB) left window [0, 0], modifying uplink CS level: CS-1 -> CS-2
@@ -3151,6 +3151,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
MS supports EGPRS multislot class 1.
@@ -3175,7 +3176,6 @@ ws(64)
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
max_cs_ul cannot be derived (current UL CS: UNKNOWN)
@@ -3243,6 +3243,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
MS supports EGPRS multislot class 1.
@@ -3267,7 +3268,6 @@ ws(64)
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
max_cs_ul cannot be derived (current UL CS: UNKNOWN)
@@ -5882,6 +5882,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
MS supports EGPRS multislot class 1.
@@ -5906,7 +5907,6 @@ ws(64)
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
max_cs_ul cannot be derived (current UL CS: UNKNOWN)
@@ -6047,6 +6047,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
MS supports EGPRS multislot class 1.
@@ -6071,7 +6072,6 @@ ws(64)
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
max_cs_ul cannot be derived (current UL CS: UNKNOWN)
@@ -6392,6 +6392,7 @@ Searching for first unallocated TFI: TRX=0
------------------------- RX : Uplink Control Block -------------------------
Creating MS object, TLLI = 0x00000000
MS requests UL TBF in packet resource request of single block, so we provide one:
+Modifying MS object, TLLI = 0x00000000, TA 220 -> 7
Modifying MS object, TLLI = 0x00000000, MS class 0 -> 1
Modifying MS object, TLLI = 0x00000000, EGPRS MS class 0 -> 1
MS supports EGPRS multislot class 1.
@@ -6416,7 +6417,6 @@ ws(192)
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=NULL EGPRS) changes state from NULL to ASSIGN
TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=ASSIGN EGPRS) starting timer T3169 [allocation (UL-TBF)] with 5 sec. 0 microsec, cur_fn=0
Modifying MS object, UL TLLI: 0x00000000 -> 0xf1223344, not yet confirmed
-Modifying MS object, TLLI = 0xf1223344, TA 220 -> 7
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) change control TS 7 -> 7 until assignment is complete.
TBF(TFI=0 TLLI=0xf1223344 DIR=UL STATE=ASSIGN EGPRS) changes UL ASS state from GPRS_RLCMAC_UL_ASS_NONE to GPRS_RLCMAC_UL_ASS_SEND_ASS
max_cs_ul cannot be derived (current UL CS: UNKNOWN)