]> git.baikalelectronics.ru Git - kernel.git/commit
mwifiex: fix simultaneous scan and Tx traffic problem
authorAmitkumar Karwar <akarwar@marvell.com>
Thu, 7 Jun 2012 04:12:41 +0000 (21:12 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 11 Jun 2012 18:59:43 +0000 (14:59 -0400)
commit9799ae24982d39636ba7409dd0881afc1f476788
tree7c4c762095bbb0e77261b9b1399d688aea04eeb4
parent951fab5195bec7eeb1731dd256c999a259e5a66d
mwifiex: fix simultaneous scan and Tx traffic problem

If scan operation is started when Tx traffic is already running,
driver locks Tx queue until it gets completed. With this logic
there is a delay for Tx packets.

This patch implements new approach to give Tx path higher priority
in this case. Driver internally sends multiple synchronous scan
commands to firmware when scan is requested by user. Now we will
make sure that Tx queue is empty everytime before sending next scan
command. If Tx queue isn't empty scan command will be postponsed by
20msec. This rule will be followed until Tx queue becomes empty or
timeout of 1 second happens. In case of timeout scan operation will
be aborted.

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
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/scan.c