UPSTREAM: mwifiex: wake up main thread to handle Tx traffic if scan is delayed/aborted
authorBing Zhao <bzhao@marvell.com>
Thu, 2 Aug 2012 21:53:39 +0000 (14:53 -0700)
committerGerrit <chrome-bot@google.com>
Fri, 3 Aug 2012 00:45:15 +0000 (17:45 -0700)
commitf6be7f3755bd87e1ddb151fbeb10bd526dd5d50b
tree200e1b21228666c96e94a0e2f2d6650af22485c3
parent273071beb740e32d4730252a8f8f1dcdb5f86348
UPSTREAM: mwifiex: wake up main thread to handle Tx traffic if scan is delayed/aborted

This is a flaw in recently implemented logic to handle Tx traffic
and scan operation simultaneously. We missed to wakeup main thread
to handle Tx traffic if scan is delayed/aborted.

For some cards (SD8797, for example), firmware will send SLEEP event
if there is no activity for 50msec. While handling the SLEEP event,
main thread will be woken up and Tx packet gets sent hence. In worst
case Tx traffic will be delayed for 50msec.

For other cards, such as USB8797, firmware won't send SLEEP event.
So, Tx traffic gets stuck if no other event triggers the wakeup of
main thread.

This patch fixes above issues.

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>
BUG=chrome-os-partner:12190
TEST=Build and run autotest WiFiMatFunc, WiFiSecMat, WiFiManager, WiFiPerf

Change-Id: I0f60e30639fe531b554fde32a6bb55303abb0fb4
Reviewed-on: https://gerrit.chromium.org/gerrit/29092
Reviewed-by: Sam Leffler <sleffler@chromium.org>
Tested-by: Bing Zhao <bzhao@marvell.com>
Commit-Ready: Bing Zhao <bzhao@marvell.com>
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.c