aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2014-04-14 18:31:05 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-04-15 13:27:05 -0400
commit20474129d8bb0e6f113634f4f0f4f1584d0beed2 (patch)
tree7a90e4c3e633b0ca1cc7cb51b2b3ca00a80454ba /drivers/net
parentc0da71ff4d2cbf113465bff9a7c413154be25a89 (diff)
mwifiex: process event before command response
During extended scan, SCAN report event is always followed by command response. Sometimes It is observed that command response is processed before SCAN report which leads to a crash, because current command node is cleared while handling the response. This patch makes sure that driver's main thread gives priority to events over command responses. Signed-off-by: Amitkumar Karwar <akarwar@marvell.com> Signed-off-by: Maithili Hinge <maithili@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/mwifiex/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index 77db0886c6e2..9c771b3e9918 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -292,6 +292,12 @@ process_start:
292 while ((skb = skb_dequeue(&adapter->usb_rx_data_q))) 292 while ((skb = skb_dequeue(&adapter->usb_rx_data_q)))
293 mwifiex_handle_rx_packet(adapter, skb); 293 mwifiex_handle_rx_packet(adapter, skb);
294 294
295 /* Check for event */
296 if (adapter->event_received) {
297 adapter->event_received = false;
298 mwifiex_process_event(adapter);
299 }
300
295 /* Check for Cmd Resp */ 301 /* Check for Cmd Resp */
296 if (adapter->cmd_resp_received) { 302 if (adapter->cmd_resp_received) {
297 adapter->cmd_resp_received = false; 303 adapter->cmd_resp_received = false;
@@ -304,12 +310,6 @@ process_start:
304 } 310 }
305 } 311 }
306 312
307 /* Check for event */
308 if (adapter->event_received) {
309 adapter->event_received = false;
310 mwifiex_process_event(adapter);
311 }
312
313 /* Check if we need to confirm Sleep Request 313 /* Check if we need to confirm Sleep Request
314 received previously */ 314 received previously */
315 if (adapter->ps_state == PS_STATE_PRE_SLEEP) { 315 if (adapter->ps_state == PS_STATE_PRE_SLEEP) {