mwifiex: more_task flag for main_process
authorShengzhen Li <szli@marvell.com>
Wed, 11 Feb 2015 17:42:24 +0000 (23:12 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 27 Feb 2015 08:08:40 +0000 (10:08 +0200)
commit04c7b363c9f7b05cb1bb94e14afbdd3661f9dd61
treee7cfc11ba436f407c1d6488d1fafe8c54f679efc
parent8a1959beca2b58dc0173ef42eb60476637e86ff9
mwifiex: more_task flag for main_process

This patch handles a corner case where TX packet would remain in
driver queue till next packet comes in.
Here is sequence:
1. TX packet is queued via hard_start_xmit and main_work is queued
2. SDIO interrupt comes in which directly call mwifiex_main_process.
This starts executing main superloop.
3. Now work from step1 is scheduled but at first check itself it sees
mwifiex_processing is set and exits.
4. Now if superloop from step2 has passed TX processing part of superloop
this packet would remain in queue until next packet/command/SDIO interrupt
arrives and queues main_work.

This patch fixes this corner case by defining more_task flag which is set when
mwifiex_processing is found to be true. At end of superloop we again check if
more_task flag is set and if set, execute superloop again.

Signed-off-by: Shengzhen Li <szli@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mwifiex/main.c
drivers/net/wireless/mwifiex/main.h