diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-02 15:37:02 +0100 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2016-02-02 17:06:39 +0100 |
commit | d58d81f5914cec26e520bd722dd5c2927b5ed54a (patch) | |
tree | 2b32fc38ca57b87e96ac0dd1a6ea9719b33742cf | |
parent | d5f5356fd3d45e89df0c028bfe09b13e641a8ee8 (diff) |
Revert "WIP: Use current_pacch_slots (TODO)"
This reverts commit 02fddb6c964d797926006898346a0192c6ac41f9.
-rw-r--r-- | src/tbf.cpp | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp index 5058b254..eaadc15b 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -378,7 +378,6 @@ int gprs_rlcmac_tbf::update() return 0; } -/* TODO: Remove me */ int tbf_assign_control_ts(struct gprs_rlcmac_tbf *tbf) { if (tbf->control_ts == 0xff) @@ -919,11 +918,10 @@ struct msgb *gprs_rlcmac_tbf::create_dl_ass(uint32_t fn, uint8_t 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 control TS=%d)\n", ts, - first_control_ts()); + "first common TS=%d)\n", ts, + first_common_ts); poll_ass_dl = 0; } - if (poll_ass_dl) { if (poll_state == GPRS_RLCMAC_POLL_SCHED && ul_ass_state == GPRS_RLCMAC_UL_ASS_WAIT_ACK) @@ -1231,12 +1229,11 @@ uint8_t gprs_rlcmac_tbf::ul_slots() const size_t i; if (direction == GPRS_RLCMAC_DL_TBF) { -#if 0 /* This depends on the existence of an concurrent TBF */ if (control_ts < 8) slots |= 1 << control_ts; if (first_common_ts < 8) slots |= 1 << first_common_ts; -#endif + return slots; } @@ -1249,25 +1246,10 @@ uint8_t gprs_rlcmac_tbf::ul_slots() const bool gprs_rlcmac_tbf::is_control_ts(uint8_t ts) const { - if (!ms()) - return ts == control_ts; - - return ms()->current_pacch_slots() & (1 << ts); + return ts == control_ts; } uint8_t gprs_rlcmac_tbf::first_control_ts() const { - uint8_t bitnum; - - if (!ms()) - return first_ts; - - bitnum = ffs(ms()->current_pacch_slots()); - - if (bitnum == 0) { - LOGP(DRLCMAC, LOGL_ERROR, "%s: No valid PACCH slot\n", name()); - return first_ts; - } - - return bitnum - 1; + return first_ts; } |