tbf: Always increase the tx_counter when we transmit a frame
In case the ACK could not be scheduled we were not increasing the
tx_counter. Change the code flow to always increase the tx_counter
after we have created a frame.
diff --git a/src/tbf.cpp b/src/tbf.cpp
index baa01ef..b76a5ec 100644
--- a/src/tbf.cpp
+++ b/src/tbf.cpp
@@ -1181,19 +1181,17 @@
/* set polling in header */
rh->rrbp = 0; /* N+13 */
rh->s_p = 1; /* Polling */
-
- /* Increment TX-counter */
- dir.dl.tx_counter++;
}
- } else {
- /* Increment TX-counter */
- dir.dl.tx_counter++;
}
/* return data block as message */
dl_msg = msgb_alloc(len, "rlcmac_dl_data");
if (!dl_msg)
return NULL;
+
+ /* Increment TX-counter */
+ dir.dl.tx_counter++;
+
memcpy(msgb_put(dl_msg, len), data, len);
bts->rlc_sent();