Revert "tbf: Add state WAIT_ASSIGN"
This reverts commit f1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0.
Conflicts:
tests/tbf/TbfTest.err
The commit broke GPRS service at least for osmo-bts-sysmo on a SysmoBTS 1002
with current master of osmo-bts (ef30f50d5d6d5f863fc147d05ccdceb89284934e).
The error observed is the following log output (was viewing both osmo-bts-sysmo
and osmo-pcu logs interleaved):
<0002> tbf.cpp:874 TBF(TFI=0 TLLI=0x00000000 DIR=UL STATE=WAIT ASSIGN) T3169 timeout during transsmission
<0002> tbf.cpp:893 - Assignment was on CCCH
<0002> tbf.cpp:899 - No uplink data received yet
<0007> l1sap.c:904 RACH for packet access
<0001> pcu_l1_if.cpp:311 RACH request received: sapi=1 qta=0, ra=121, fn=13653
[repeat]
When removing this single commit from current osmo-pcu master, GPRS service
works well on SysmoBTS, with current osmo-bts master.
The TbfTest.err expected output needed adjustment after the revert.
Disclaimer: I am not aware of adverse effects this commit may have. I have no
idea what the WAIT_ASSIGN state is used for -- further review is required.
Change-Id: I1532f8e93194368cdc1e3846f82afa6d68cd5fbd
diff --git a/src/tbf.h b/src/tbf.h
index 37401bf..3205f6e 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -43,8 +43,7 @@
enum gprs_rlcmac_tbf_state {
GPRS_RLCMAC_NULL = 0, /* new created TBF */
- GPRS_RLCMAC_ASSIGN, /* wait for DL transmission */
- GPRS_RLCMAC_WAIT_ASSIGN,/* wait for confirmation */
+ GPRS_RLCMAC_ASSIGN, /* wait for downlink assignment */
GPRS_RLCMAC_FLOW, /* RLC/MAC flow, resource needed */
GPRS_RLCMAC_FINISHED, /* flow finished, wait for release */
GPRS_RLCMAC_WAIT_RELEASE,/* wait for release or restart of DL TBF */
@@ -233,7 +232,7 @@
gprs_llc_queue *llc_queue();
const gprs_llc_queue *llc_queue() const;
- static const char *tbf_state_name[7];
+ static const char *tbf_state_name[6];
class GprsMs *m_ms;
@@ -318,7 +317,10 @@
{
/* The TBF is established or has been assigned by a IMM.ASS for
* download */
- return state > GPRS_RLCMAC_ASSIGN;
+ return state > GPRS_RLCMAC_ASSIGN ||
+ (direction == GPRS_RLCMAC_DL_TBF &&
+ state == GPRS_RLCMAC_ASSIGN &&
+ (state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)));
}
inline uint8_t gprs_rlcmac_tbf::tfi() const