Commit 4b35aad5 authored by Amitkumar Karwar's avatar Amitkumar Karwar Committed by Greg Kroah-Hartman

mwifiex: fix failed to reconnect after interface disabled/enabled

commit c8ccf3ad upstream.

Recent patch "mwifiex: fix NULL pointer" skips extended scan event
handling when suspend is in progress. It created a problem for scan
after interface disabled/enabled case.

This patch solves the problem by checking netif_running() status.

Fixes:16d25da9 ("mwifiex: fix NULL pointer dereference during suspend")
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1ce213ab
...@@ -708,7 +708,11 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv) ...@@ -708,7 +708,11 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
case EVENT_EXT_SCAN_REPORT: case EVENT_EXT_SCAN_REPORT:
mwifiex_dbg(adapter, EVENT, "event: EXT_SCAN Report\n"); mwifiex_dbg(adapter, EVENT, "event: EXT_SCAN Report\n");
if (adapter->ext_scan && !priv->scan_aborting) /* We intend to skip this event during suspend, but handle
* it in interface disabled case
*/
if (adapter->ext_scan && (!priv->scan_aborting ||
!netif_running(priv->netdev)))
ret = mwifiex_handle_event_ext_scan_report(priv, ret = mwifiex_handle_event_ext_scan_report(priv,
adapter->event_skb->data); adapter->event_skb->data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment