diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pdch_ul_controller.c | 3 | ||||
-rw-r--r-- | src/tbf.cpp | 6 | ||||
-rw-r--r-- | src/tbf_ul.cpp | 14 | ||||
-rw-r--r-- | src/tbf_ul.h | 2 |
4 files changed, 18 insertions, 7 deletions
diff --git a/src/pdch_ul_controller.c b/src/pdch_ul_controller.c index c865f59a..3f3776db 100644 --- a/src/pdch_ul_controller.c +++ b/src/pdch_ul_controller.c @@ -26,6 +26,7 @@ #include "sba.h" #include "pdch.h" #include "pcu_utils.h" +#include "tbf_ul.h" /* TS 44.060 Table 10.4.5.1 states maximum RRBP is N + 26. Give extra space for time diff between Tx and Rx? */ #define MAX_FN_RESERVED (27 + 50) @@ -261,7 +262,7 @@ void pdch_ulc_expire_fn(struct pdch_ulc *ulc, uint32_t fn) LOGPDCH(ulc->pdch, DRLCMAC, LOGL_INFO, "Timeout for registered USF (FN=%u): %s\n", item->fn, tbf_name((struct gprs_rlcmac_tbf *)item->tbf_usf.ul_tbf)); - /* TODO: increase N3101 */ + tbf_usf_timeout(item->tbf_usf.ul_tbf); break; case PDCH_ULC_NODE_TBF_POLL: LOGPDCH(ulc->pdch, DRLCMAC, LOGL_NOTICE, diff --git a/src/tbf.cpp b/src/tbf.cpp index 7237f583..a24f536c 100644 --- a/src/tbf.cpp +++ b/src/tbf.cpp @@ -637,12 +637,6 @@ void gprs_rlcmac_tbf::poll_timeout() poll_state = GPRS_RLCMAC_POLL_NONE; - if (n_inc(N3101)) { - TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); - T_START(this, T3169, 3169, "MAX N3101 reached", false); - return; - } - if (ul_tbf && ul_tbf->handle_ctrl_ack()) { if (!ul_tbf->ctrl_ack_to_toggle()) { LOGPTBF(this, LOGL_NOTICE, diff --git a/src/tbf_ul.cpp b/src/tbf_ul.cpp index f226b290..ba491f6d 100644 --- a/src/tbf_ul.cpp +++ b/src/tbf_ul.cpp @@ -772,6 +772,15 @@ gprs_rlc_window *gprs_rlcmac_ul_tbf::window() return &m_window; } +void gprs_rlcmac_ul_tbf::usf_timeout() +{ + if (n_inc(N3101)) { + TBF_SET_STATE(this, GPRS_RLCMAC_RELEASING); + T_START(this, T3169, 3169, "MAX N3101 reached", false); + return; + } +} + struct gprs_rlcmac_ul_tbf *as_ul_tbf(struct gprs_rlcmac_tbf *tbf) { if (tbf && tbf->direction == GPRS_RLCMAC_UL_TBF) @@ -779,3 +788,8 @@ struct gprs_rlcmac_ul_tbf *as_ul_tbf(struct gprs_rlcmac_tbf *tbf) else return NULL; } + +void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf) +{ + tbf->usf_timeout(); +} diff --git a/src/tbf_ul.h b/src/tbf_ul.h index 0c78e104..e3de1dad 100644 --- a/src/tbf_ul.h +++ b/src/tbf_ul.h @@ -86,6 +86,7 @@ struct gprs_rlcmac_ul_tbf : public gprs_rlcmac_tbf { uint16_t window_size() const; void set_window_size(); void update_coding_scheme_counter_ul(enum CodingScheme cs); + void usf_timeout(); /* Please note that all variables here will be reset when changing * from WAIT RELEASE back to FLOW state (re-use of TBF). @@ -133,6 +134,7 @@ extern "C" { void update_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, int8_t ta_delta); void set_tbf_ta(struct gprs_rlcmac_ul_tbf *tbf, uint8_t ta); struct gprs_rlcmac_ul_tbf *as_ul_tbf(struct gprs_rlcmac_tbf *tbf); +void tbf_usf_timeout(struct gprs_rlcmac_ul_tbf *tbf); #ifdef __cplusplus } #endif |