diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2012-06-27 19:57:56 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-06-28 14:37:48 -0400 |
commit | 1a1fb970472d66d1668ff66bc46c2cd977f9a4fc (patch) | |
tree | d164ac3c4c2808fcc218bc798615254852fd31b7 /drivers/net/wireless/mwifiex/cmdevt.c | |
parent | 469979173ecda9c472c495608d6d540ec33ab85d (diff) | |
download | op-kernel-dev-1a1fb970472d66d1668ff66bc46c2cd977f9a4fc.zip op-kernel-dev-1a1fb970472d66d1668ff66bc46c2cd977f9a4fc.tar.gz |
mwifiex: wakeup main thread to handle command queued
We miss to wakeup main thread after adding command to cmd pending
queue at follwing places. These commands are handled later when
main thread is woken up for handling an interrupt for sleep event
from firmware. This adds worst case delay of 50msec.
1) We don't wakeup main thread when asynchronous command is added
to cmd pending queue. Move queue_work() call from
mwifiex_wait_queue_complete() to mwifiex_send_cmd_async() to wakeup
main thread for sync as well as async commands.
2) Scan operation is triggered due to following reasons
a) request from user (ex. "iw scan" command)
b) Scan performed by driver internally.
In first case main thread is woken up when first scan command is
queued in cmd pending queue (we don't need to wakeup main thread for
subsequent scan commands, because they are queued in scan command
response handler), but it is not done for second case. queue_work()
is moved inside mwifiex_scan_networks() to handle both the cases.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/cmdevt.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/cmdevt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c index ea37b88..c68adec 100644 --- a/drivers/net/wireless/mwifiex/cmdevt.c +++ b/drivers/net/wireless/mwifiex/cmdevt.c @@ -578,6 +578,7 @@ int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no, } else { adapter->cmd_queued = cmd_node; mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, true); + queue_work(adapter->workqueue, &adapter->main_work); } return ret; |