mwifiex: wake up main thread to handle Tx traffic if scan is delayed/aborted
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 21 Jun 2012 02:58:36 +0000 (19:58 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 22 Jun 2012 18:44:04 +0000 (14:44 -0400)
commitf931c7705bb3e21edd345a0fa748462fd3df4122
tree1be2e22cade991e6661d82e43d5f838d302b7b93
parent0fd66be4a369e4a93bfd559c931e689539cc8e5f
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>
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.c