aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-03-29 19:01:13 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-03-31 17:39:50 +0200
commit58046e45d13c2881e5f150973655240a23f6db04 (patch)
tree10e538c2027cf681f31fd4cc93b2740b2b59fa02 /src
parent2c0931cedc23070425768270913ba42b632ad81d (diff)
tbf: Get rid of attribute poll_fn
That field is not needed anymore, and it works only under the assumption that only 1 poll request can be active at a time per TBF, which is not true. Change-Id: I63a34a702f028b871530fb7caeb13e8ea1cc78ac
Diffstat (limited to 'src')
-rw-r--r--src/bts.cpp12
-rw-r--r--src/pdch_ul_controller.c2
-rw-r--r--src/tbf.cpp20
-rw-r--r--src/tbf.h5
-rw-r--r--src/tbf_dl.cpp4
5 files changed, 18 insertions, 25 deletions
diff --git a/src/bts.cpp b/src/bts.cpp
index 0443df6d..b61c6b4a 100644
--- a/src/bts.cpp
+++ b/src/bts.cpp
@@ -1086,10 +1086,8 @@ void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta)
/* limit target TA in range 0..63 bits */
ta_target = ta_limit(ta_adj);
- LOGP(DL1IF, LOGL_INFO, "PH-DATA-IND is updating TLLI=0x%08x: TA %u -> %u on "
- "TRX = %d, TS = %d, FN = %d\n",
- tbf->tlli(), tbf->ta(), ta_target,
- tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn);
+ LOGP(DL1IF, LOGL_INFO, "PH-DATA-IND is updating %s: TA %u -> %u on "
+ "TRX = %d\n", tbf_name(tbf), tbf->ta(), ta_target, tbf->trx->trx_no);
tbf->set_ta(ta_target);
}
}
@@ -1103,10 +1101,8 @@ void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta)
/* limit target TA in range 0..63 bits */
ta_target = ta_limit(ta);
- LOGP(DL1IF, LOGL_INFO, "PH-RA-IND is updating TLLI=0x%08x: TA %u -> %u on "
- "TRX = %d, TS = %d, FN = %d\n",
- tbf->tlli(), tbf->ta(), ta_target,
- tbf->trx->trx_no , tbf->poll_ts, tbf->poll_fn);
+ LOGP(DL1IF, LOGL_INFO, "PH-RA-IND is updating %s: TA %u -> %u on "
+ "TRX = %d\n", tbf_name(tbf), tbf->ta(), ta_target, tbf->trx->trx_no);
tbf->set_ta(ta_target);
}
}
diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c
index 8fb5582f..59110800 100644
--- a/src/pdch_ul_controller.c
+++ b/src/pdch_ul_controller.c
@@ -318,7 +318,7 @@ void pdch_ulc_expire_fn(struct pdch_ulc *ulc, uint32_t fn)
LOGPDCH(ulc->pdch, DRLCMAC, LOGL_NOTICE,
"Timeout for registered POLL (FN=%u): %s\n",
item->fn, tbf_name(item->tbf_poll.poll_tbf));
- tbf_poll_timeout(item->tbf_poll.poll_tbf, item->tbf_poll.reason);
+ tbf_poll_timeout(item->tbf_poll.poll_tbf, item->fn, item->tbf_poll.reason);
break;
case PDCH_ULC_NODE_SBA:
sba = item->sba.sba;
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 0ea0ceb1..92dede57 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -125,7 +125,6 @@ gprs_rlcmac_tbf::gprs_rlcmac_tbf(struct gprs_rlcmac_bts *bts_, GprsMs *ms, gprs_
first_ts(0),
first_common_ts(0),
control_ts(0xff),
- poll_fn(0),
poll_ts(0),
fT(0),
num_fT_exp(0),
@@ -579,10 +578,9 @@ void gprs_rlcmac_tbf::set_polling(uint32_t new_poll_fn, uint8_t ts, enum pdch_ul
/* schedule polling */
if (pdch_ulc_reserve_tbf_poll(trx->pdch[ts].ulc, new_poll_fn, this, reason) < 0) {
LOGPTBFDL(this, LOGL_ERROR, "Failed scheduling poll on %s (FN=%d, TS=%d)\n",
- chan, poll_fn, ts);
+ chan, new_poll_fn, ts);
return;
}
- poll_fn = new_poll_fn;
poll_ts = ts;
switch (reason) {
@@ -590,32 +588,32 @@ void gprs_rlcmac_tbf::set_polling(uint32_t new_poll_fn, uint8_t ts, enum pdch_ul
ul_ass_state = GPRS_RLCMAC_UL_ASS_WAIT_ACK;
LOGPTBFDL(this, LOGL_INFO, "Scheduled UL Assignment polling on %s (FN=%d, TS=%d)\n",
- chan, poll_fn, poll_ts);
+ chan, new_poll_fn, poll_ts);
break;
case PDCH_ULC_POLL_DL_ASS:
dl_ass_state = GPRS_RLCMAC_DL_ASS_WAIT_ACK;
LOGPTBFDL(this, LOGL_INFO, "Scheduled DL Assignment polling on %s (FN=%d, TS=%d)\n",
- chan, poll_fn, poll_ts);
+ chan, new_poll_fn, poll_ts);
break;
case PDCH_ULC_POLL_UL_ACK:
ul_ack_state = GPRS_RLCMAC_UL_ACK_WAIT_ACK;
LOGPTBFUL(this, LOGL_DEBUG, "Scheduled UL Acknowledgement polling on %s (FN=%d, TS=%d)\n",
- chan, poll_fn, poll_ts);
+ chan, new_poll_fn, poll_ts);
break;
case PDCH_ULC_POLL_DL_ACK:
LOGPTBFDL(this, LOGL_DEBUG, "Scheduled DL Acknowledgement polling on %s (FN=%d, TS=%d)\n",
- chan, poll_fn, poll_ts);
+ chan, new_poll_fn, poll_ts);
break;
case PDCH_ULC_POLL_CELL_CHG_CONTINUE:
LOGPTBFDL(this, LOGL_DEBUG, "Scheduled 'Packet Cell Change Continue' polling on %s (FN=%d, TS=%d)\n",
- chan, poll_fn, poll_ts);
+ chan, new_poll_fn, poll_ts);
break;
}
}
-void gprs_rlcmac_tbf::poll_timeout(enum pdch_ulc_tbf_poll_reason reason)
+void gprs_rlcmac_tbf::poll_timeout(uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason)
{
uint16_t pgroup;
gprs_rlcmac_ul_tbf *ul_tbf = as_ul_tbf(this);
@@ -1211,7 +1209,7 @@ void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t
return tbf->set_polling(new_poll_fn, ts, t);
}
-void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, enum pdch_ulc_tbf_poll_reason reason)
+void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason)
{
- tbf->poll_timeout(reason);
+ tbf->poll_timeout(poll_fn, reason);
}
diff --git a/src/tbf.h b/src/tbf.h
index cb5aac46..b0bec313 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -193,7 +193,7 @@ uint8_t tbf_tfi(const struct gprs_rlcmac_tbf *tbf);
int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf);
int tbf_check_polling(const struct gprs_rlcmac_tbf *tbf, uint32_t fn, uint8_t ts, uint32_t *poll_fn, unsigned int *rrbp);
void tbf_set_polling(struct gprs_rlcmac_tbf *tbf, uint32_t new_poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason t);
-void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, enum pdch_ulc_tbf_poll_reason reason);
+void tbf_poll_timeout(struct gprs_rlcmac_tbf *tbf, uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason);
#ifdef __cplusplus
}
#endif
@@ -251,7 +251,7 @@ struct gprs_rlcmac_tbf {
int check_polling(uint32_t fn, uint8_t ts,
uint32_t *poll_fn, unsigned int *rrbp) const;
void set_polling(uint32_t poll_fn, uint8_t ts, enum pdch_ulc_tbf_poll_reason reason);
- void poll_timeout(enum pdch_ulc_tbf_poll_reason reason);
+ void poll_timeout(uint32_t poll_fn, enum pdch_ulc_tbf_poll_reason reason);
/** tlli handling */
uint32_t tlli() const;
@@ -292,7 +292,6 @@ struct gprs_rlcmac_tbf {
gprs_llc m_llc;
- uint32_t poll_fn; /* frame number to poll */
uint8_t poll_ts; /* TS to poll */
gprs_rlc m_rlc;
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 19415f17..c122bba8 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -990,11 +990,11 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
rlc.rrbp = rrbp;
rlc.es_p = 1; /* Polling */
- m_last_dl_poll_fn = poll_fn;
+ m_last_dl_poll_fn = new_poll_fn;
LOGPTBFDL(this, LOGL_INFO,
"Scheduled Ack/Nack polling on FN=%d, TS=%d\n",
- poll_fn, poll_ts);
+ new_poll_fn, poll_ts);
}
}