tbf: Move the check if the window is stalled to a separate method
This commit is contained in:
parent
1577779526
commit
c03e38291a
|
@ -906,8 +906,7 @@ do_resend:
|
||||||
|
|
||||||
/* if the window has stalled, or transfer is complete,
|
/* if the window has stalled, or transfer is complete,
|
||||||
* send an unacknowledged block */
|
* send an unacknowledged block */
|
||||||
if (state_is(GPRS_RLCMAC_FINISHED)
|
if (state_is(GPRS_RLCMAC_FINISHED) || dl_window_stalled()) {
|
||||||
|| ((dir.dl.v_s - dir.dl.v_a) & mod_sns) == m_ws) {
|
|
||||||
int resend = 0;
|
int resend = 0;
|
||||||
|
|
||||||
if (state_is(GPRS_RLCMAC_FINISHED)) {
|
if (state_is(GPRS_RLCMAC_FINISHED)) {
|
||||||
|
@ -1859,3 +1858,9 @@ void gprs_rlcmac_tbf::reuse_tbf(const uint8_t *data, const uint16_t len)
|
||||||
tbf_name(this));
|
tbf_name(this));
|
||||||
bts->trigger_dl_ass(this, this, NULL);
|
bts->trigger_dl_ass(this, this, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool gprs_rlcmac_tbf::dl_window_stalled() const
|
||||||
|
{
|
||||||
|
const uint16_t mod_sns = m_sns - 1;
|
||||||
|
return ((dir.dl.v_s - dir.dl.v_a) & mod_sns) == m_ws;
|
||||||
|
}
|
||||||
|
|
|
@ -241,6 +241,7 @@ struct gprs_rlcmac_tbf {
|
||||||
protected:
|
protected:
|
||||||
void reuse_tbf(const uint8_t *data, const uint16_t len);
|
void reuse_tbf(const uint8_t *data, const uint16_t len);
|
||||||
gprs_rlcmac_bts *bts_data() const;
|
gprs_rlcmac_bts *bts_data() const;
|
||||||
|
bool dl_window_stalled() const;
|
||||||
|
|
||||||
int append_data(const uint8_t ms_class,
|
int append_data(const uint8_t ms_class,
|
||||||
const uint16_t pdu_delay_csec,
|
const uint16_t pdu_delay_csec,
|
||||||
|
|
Loading…
Reference in New Issue