Skip to content
Snippets Groups Projects
Commit 2691f271 authored by Vladimir Kondratiev's avatar Vladimir Kondratiev Committed by Ian Maund
Browse files

wil6210: optimize wil_release_reorder_frames


In case of receiving frame with sequence number far greater than current,
wil_release_reorder_frames() will iterate many times over empty buffer.

Optimize this case by checking buffer emptiness and simply update
head_seq_num without iterating.

Suggested-by: default avatarVladimir Shulman <Vladimir.Shulman@Wilocity.com>
Signed-off-by: default avatarVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
Git-commit: cf42c4e5
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarLiron Kuch <lkuch@codeaurora.org>
parent e9c8a8bf
No related branches found
No related tags found
No related merge requests found
...@@ -49,10 +49,17 @@ static void wil_release_reorder_frames(struct wil6210_priv *wil, ...@@ -49,10 +49,17 @@ static void wil_release_reorder_frames(struct wil6210_priv *wil,
{ {
int index; int index;
while (seq_less(r->head_seq_num, hseq)) { /* note: this function is never called with
* hseq preceding r->head_seq_num, i.e it is always true
* !seq_less(hseq, r->head_seq_num)
* and thus on loop exit it should be
* r->head_seq_num == hseq
*/
while (seq_less(r->head_seq_num, hseq) && r->stored_mpdu_num) {
index = reorder_index(r, r->head_seq_num); index = reorder_index(r, r->head_seq_num);
wil_release_reorder_frame(wil, r, index); wil_release_reorder_frame(wil, r, index);
} }
r->head_seq_num = hseq;
} }
static void wil_reorder_release(struct wil6210_priv *wil, static void wil_reorder_release(struct wil6210_priv *wil,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment