aboutsummaryrefslogtreecommitdiffstats
path: root/src/tbf.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-01 20:59:04 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:39 +0100
commitf1a7b8fc6651f92a8b7f3f27b7ca05d07f4e44e0 (patch)
tree7adf5d9b864822cc47d4e5794c8230d86e92bb37 /src/tbf.h
parent7c72acaa941fd7f3663b0f9b36fe30f4974f1979 (diff)
tbf: Add state WAIT_ASSIGN
Currently the state on the TBF is set to ASSIGN when it is created and in general changed to FLOW when it is acknowledged by the MS. The moment when the assignment is really transmitted to the MS (which can take some time) is not reflected by the state. A TBF can considered to be valid, when the assignment is received by the MS. Add the state WAIT_ASSIGN that is entered when the assigment has been send to the MS (more precisely: when the corresponding RTS has been processed or the message has been sent to the BTS). The TBF, its PDCH(s), and its TFI can be assumed to be valid, when the TBF has a state of WAIT_ASSIGN or higher (assuming that the TBF starting time has not been set, which is currently only done for SBA, which are not associated with a TBF). Note that due to queuing in the BTS there can still be a invalid time period for immediate assignments, when the request is lingering in the AGCH or PCH queues. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/tbf.h')
-rw-r--r--src/tbf.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/tbf.h b/src/tbf.h
index d1b286cb..443f85fc 100644
--- a/src/tbf.h
+++ b/src/tbf.h
@@ -43,7 +43,8 @@ class GprsMs;
enum gprs_rlcmac_tbf_state {
GPRS_RLCMAC_NULL = 0, /* new created TBF */
- GPRS_RLCMAC_ASSIGN, /* wait for downlink assignment */
+ GPRS_RLCMAC_ASSIGN, /* wait for DL transmission */
+ GPRS_RLCMAC_WAIT_ASSIGN,/* wait for confirmation */
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 */
@@ -230,7 +231,7 @@ protected:
int set_tlli_from_ul(uint32_t new_tlli);
void merge_and_clear_ms(GprsMs *old_ms);
- static const char *tbf_state_name[6];
+ static const char *tbf_state_name[7];
class GprsMs *m_ms;
@@ -315,10 +316,7 @@ inline bool gprs_rlcmac_tbf::is_tfi_assigned() const
{
/* The TBF is established or has been assigned by a IMM.ASS for
* download */
- return state > GPRS_RLCMAC_ASSIGN ||
- (direction == GPRS_RLCMAC_DL_TBF &&
- state == GPRS_RLCMAC_ASSIGN &&
- (state_flags & (1 << GPRS_RLCMAC_FLAG_CCCH)));
+ return state > GPRS_RLCMAC_ASSIGN;
}
inline uint8_t gprs_rlcmac_tbf::tfi() const