aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gprs_rlcmac_sched.cpp4
-rw-r--r--src/tbf.cpp7
-rw-r--r--src/tbf.h6
-rw-r--r--src/tbf_dl.cpp2
4 files changed, 11 insertions, 8 deletions
diff --git a/src/gprs_rlcmac_sched.cpp b/src/gprs_rlcmac_sched.cpp
index 140a0be7..e03f84be 100644
--- a/src/gprs_rlcmac_sched.cpp
+++ b/src/gprs_rlcmac_sched.cpp
@@ -46,7 +46,7 @@ static uint32_t sched_poll(BTS *bts,
ul_tbf = as_ul_tbf(pos->entry());
OSMO_ASSERT(ul_tbf);
/* this trx, this ts */
- if (ul_tbf->trx->trx_no != trx || ul_tbf->control_ts != ts)
+ if (ul_tbf->trx->trx_no != trx || !ul_tbf->is_control_ts(ts))
continue;
/* polling for next uplink block */
if (ul_tbf->poll_state == GPRS_RLCMAC_POLL_SCHED
@@ -64,7 +64,7 @@ static uint32_t sched_poll(BTS *bts,
dl_tbf = as_dl_tbf(pos->entry());
OSMO_ASSERT(dl_tbf);
/* this trx, this ts */
- if (dl_tbf->trx->trx_no != trx || dl_tbf->control_ts != ts)
+ if (dl_tbf->trx->trx_no != trx || !dl_tbf->is_control_ts(ts))
continue;
/* polling for next uplink block */
if (dl_tbf->poll_state == GPRS_RLCMAC_POLL_SCHED
diff --git a/src/tbf.cpp b/src/tbf.cpp
index f73f1e07..35a004cf 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -861,7 +861,7 @@ struct msgb *gprs_rlcmac_tbf::create_dl_ass(uint32_t fn, uint8_t ts)
struct gprs_rlcmac_dl_tbf *new_dl_tbf = NULL;
int poll_ass_dl = 1;
- if (direction == GPRS_RLCMAC_DL_TBF && ts != first_common_ts) {
+ if (direction == GPRS_RLCMAC_DL_TBF && !is_control_ts(ts)) {
LOGP(DRLCMAC, LOGL_NOTICE, "Cannot poll for downlink "
"assigment, because MS cannot reply. (TS=%d, "
"first common TS=%d)\n", ts,
@@ -1171,3 +1171,8 @@ uint8_t gprs_rlcmac_tbf::ul_slots() const
return slots;
}
+
+bool gprs_rlcmac_tbf::is_control_ts(uint8_t ts) const
+{
+ return ts == control_ts;
+}
diff --git a/src/tbf.h b/src/tbf.h
index 835d2c48..f3487c6e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -144,6 +144,8 @@ struct gprs_rlcmac_tbf {
uint8_t dl_slots() const;
uint8_t ul_slots() const;
+ bool is_control_ts(uint8_t ts) const;
+
/* EGPRS */
bool is_egprs_enabled() const;
void enable_egprs();
@@ -357,10 +359,6 @@ struct gprs_rlcmac_dl_tbf : public gprs_rlcmac_tbf {
int release();
int abort();
- bool is_control_ts(uint8_t ts) const {
- return ts == control_ts;
- }
-
/* TODO: add the gettimeofday as parameter */
struct msgb *llc_dequeue(bssgp_bvc_ctx *bctx);
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 64ebea4f..21a042ed 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -575,7 +575,7 @@ struct msgb *gprs_rlcmac_dl_tbf::create_dl_acked_block(
LOGP(DRLCMACDL, LOGL_DEBUG, "Polling is already "
"sheduled for %s, so we must wait for "
"requesting downlink ack\n", tbf_name(this));
- else if (control_ts != ts)
+ else if (!is_control_ts(ts))
LOGP(DRLCMACDL, LOGL_DEBUG, "Polling cannot be "
"sheduled in this TS %d, waiting for "
"TS %d\n", ts, control_ts);