Commit 5bddf549 authored by Wey-Yi Guy's avatar Wey-Yi Guy Committed by John W. Linville

iwlwifi: fix unloading driver while scanning

If NetworkManager is busy scanning when user
tries to unload the module, the driver can not be unloaded
because HW still scanning.

Make sure driver sends abort scan host command to uCode if it
is in the middle of scanning during driver unload.
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent b2ccb4db
...@@ -2155,7 +2155,7 @@ static void iwl_mac_stop(struct ieee80211_hw *hw) ...@@ -2155,7 +2155,7 @@ static void iwl_mac_stop(struct ieee80211_hw *hw)
priv->is_open = 0; priv->is_open = 0;
if (iwl_is_ready_rf(priv)) { if (iwl_is_ready_rf(priv) || test_bit(STATUS_SCAN_HW, &priv->status)) {
/* stop mac, cancel any scan request and clear /* stop mac, cancel any scan request and clear
* RXON_FILTER_ASSOC_MSK BIT * RXON_FILTER_ASSOC_MSK BIT
*/ */
......
...@@ -796,7 +796,8 @@ void iwl_bg_abort_scan(struct work_struct *work) ...@@ -796,7 +796,8 @@ void iwl_bg_abort_scan(struct work_struct *work)
{ {
struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan); struct iwl_priv *priv = container_of(work, struct iwl_priv, abort_scan);
if (!iwl_is_ready(priv)) if (!test_bit(STATUS_READY, &priv->status) ||
!test_bit(STATUS_GEO_CONFIGURED, &priv->status))
return; return;
mutex_lock(&priv->mutex); mutex_lock(&priv->mutex);
......
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