tbf: Only create dummy frames if necessary

Currently a lot of LLC dummy commands will be generated while waiting
for an ACK for the DL TBF, even if there are blocks that could be
resent instead.

This patch modifies create_dl_acked_block to only call
create_new_bsn() if there is unsent LLC data or m_window is empty.
If the TBF is in state FLOW, no unsent LLC data is left, but there
are blocks left in m_window, those are resent instead.

Sponsored-by: On-Waves ehf
This commit is contained in:
Jacob Erlbeck 2015-03-19 14:21:33 +01:00
parent 2cbe80b53e
commit e25b5b91f6
1 changed files with 9 additions and 1 deletions

View File

@ -275,8 +275,16 @@ do_resend:
"because all window is stalled.\n",
m_window.v_a());
bts->rlc_stalled();
} else if (have_data()) {
/* New blocks may be send */
return create_new_bsn(fn, ts);
} else if (!m_window.window_empty()) {
LOGP(DRLCMACDL, LOGL_DEBUG, "- Restarting at BSN %d, "
"because all blocks have been transmitted (FLOW).\n",
m_window.v_a());
bts->rlc_restarted();
} else {
/* No blocks are left */
/* Nothing left to send, create dummy LLC commands */
return create_new_bsn(fn, ts);
}