UPSTREAM: mwifiex: improve scan delay logic during Tx traffic
authorBing Zhao <bzhao@marvell.com>
Fri, 21 Sep 2012 19:20:32 +0000 (12:20 -0700)
committerGerrit <chrome-bot@google.com>
Mon, 24 Sep 2012 23:28:58 +0000 (16:28 -0700)
commit951e1c85e05750e9fd4d40264f7cc43716d8f607
tree7de14c396ef7263704e303916380368bfdd5b830
parent144fa2347b87b543f6fc38b6fe5009eb48393b5b
UPSTREAM: mwifiex: improve scan delay logic during Tx traffic

Earlier scan command was postponed by 20msec multiple times to give
preference to Tx traffic until we find empty wmm queue.

There is a corner case in which wmm queue becomes empty immediately
after processing the packet(before 20msec) and there may be next
packet coming after some time. In this case we should not resume scan
operation.

We will use new flag to check Tx traffic and resume scan operation
only if there is no traffic for 200msec.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Note:
The original patch had a bug which has been fixed by patch
"mwifiex: fix issue in resumed scan operation".
I've merged these two patches together in this UPSTREAM port.

BUG=chrome-os-partner:13861
TEST=Build and run autotest suites

Change-Id: I29b0fe1eaa9df79bf2220130a44df13ed842ac94
Reviewed-on: https://gerrit.chromium.org/gerrit/33850
Reviewed-by: Gary Morain <gmorain@chromium.org>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
Tested-by: Bing Zhao <bzhao@marvell.com>
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.c
drivers/net/wireless/mwifiex/main.h