aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-07-28 18:22:00 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-08-23 17:14:22 +0200
commitc65c9e56e147f0179a8ace81b29e36f117235f11 (patch)
tree67aceef16d2e51fe1d3c70ed709cd1d4753b4053
parent5bc6560efca6084a6d389e6401a9904b20295f23 (diff)
tbf: Drop unuseful flag GPRS_RLCMAC_FLAG_UL_DATA
Same information is available under ul_tbf->m_rx_counter. Change-Id: I1d993117c7daa2609b132c2d0fd748e0338ef559
-rw-r--r--src/tbf.cpp20
-rw-r--r--src/tbf.h7
-rw-r--r--src/tbf_ul.cpp2
3 files changed, 15 insertions, 14 deletions
diff --git a/src/tbf.cpp b/src/tbf.cpp
index 0154babc..67e05bbc 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -997,14 +997,18 @@ const char* tbf_rlcmac_diag(const struct gprs_rlcmac_tbf *tbf)
OSMO_STRBUF_PRINTF(sb, "Assignment was on CCCH|");
if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_PACCH))
OSMO_STRBUF_PRINTF(sb, "Assignment was on PACCH|");
- if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_UL_DATA))
- OSMO_STRBUF_PRINTF(sb, "Uplink data was received|");
- else if (tbf->direction == GPRS_RLCMAC_UL_TBF)
- OSMO_STRBUF_PRINTF(sb, "No uplink data received yet|");
- if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_DL_ACK))
- OSMO_STRBUF_PRINTF(sb, "Downlink ACK was received|");
- else if (tbf->direction == GPRS_RLCMAC_DL_TBF)
- OSMO_STRBUF_PRINTF(sb, "No downlink ACK received yet|");
+ if (tbf->direction == GPRS_RLCMAC_UL_TBF) {
+ const struct gprs_rlcmac_ul_tbf *ul_tbf = static_cast<const gprs_rlcmac_ul_tbf *>(tbf);
+ if (ul_tbf->m_rx_counter)
+ OSMO_STRBUF_PRINTF(sb, "Uplink data was received|");
+ else
+ OSMO_STRBUF_PRINTF(sb, "No uplink data received yet|");
+ } else {
+ if (tbf->state_fsm.state_flags & (1 << GPRS_RLCMAC_FLAG_DL_ACK))
+ OSMO_STRBUF_PRINTF(sb, "Downlink ACK was received|");
+ else
+ OSMO_STRBUF_PRINTF(sb, "No downlink ACK received yet|");
+ }
return buf;
}
diff --git a/src/tbf.h b/src/tbf.h
index b8f1e187..96a57887 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -127,10 +127,9 @@ enum tbf_counters { /* TBF counters from 3GPP TS 44.060 ยง13.4 */
#define GPRS_RLCMAC_FLAG_CCCH 0 /* assignment on CCCH */
#define GPRS_RLCMAC_FLAG_PACCH 1 /* assignment on PACCH */
-#define GPRS_RLCMAC_FLAG_UL_DATA 2 /* uplink data received */
-#define GPRS_RLCMAC_FLAG_DL_ACK 3 /* downlink acknowledge received */
-#define GPRS_RLCMAC_FLAG_TO_UL_ACK 4
-#define GPRS_RLCMAC_FLAG_TO_DL_ACK 5
+#define GPRS_RLCMAC_FLAG_DL_ACK 2 /* downlink acknowledge received */
+#define GPRS_RLCMAC_FLAG_TO_UL_ACK 3
+#define GPRS_RLCMAC_FLAG_TO_DL_ACK 4
#define GPRS_RLCMAC_FLAG_TO_MASK 0xf0 /* timeout bits */
#define T_START(tbf, t, T, r, f) tbf->t_start(t, T, r, f, __FILE__, __LINE__)
diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp
index 31bb2736..c84f373d 100644
--- a/src/tbf_ul.cpp
+++ b/src/tbf_ul.cpp
@@ -404,8 +404,6 @@ int gprs_rlcmac_ul_tbf::rcv_data_block_acknowledged(
const uint16_t ws = m_window.ws();
- this->state_fsm.state_flags |= (1 << GPRS_RLCMAC_FLAG_UL_DATA);
-
LOGPTBFUL(this, LOGL_DEBUG, "UL DATA TFI=%d received (V(Q)=%d .. "
"V(R)=%d)\n", rlc->tfi, this->m_window.v_q(),
this->m_window.v_r());