summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-core.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2010-09-13 14:46:39 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-09-14 16:13:26 -0400
commitf5354c17dc29681c241f2774f3ef9478fb586673 (patch)
tree7960a2d0b24396b890c0a5d2412675c6513680de /drivers/net/wireless/iwlwifi/iwl-core.c
parent02d8c14b590f583fd6e8c16fe779f845845effd9 (diff)
iwlwifi: force scan complete after timeout
If we do not get notification from hardware about scan complete, after timeout do mac80211 scan completion anyway. This assure we end scan in case of firmware hung. Patch fix one of the causes of wdev_cleanup_work warning reported at https://bugzilla.redhat.com/show_bug.cgi?id=593566 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index c9c523b2883f..b04a4f81ee97 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -2081,7 +2081,6 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
{
struct iwl_priv *priv = hw->priv;
struct iwl_rxon_context *ctx = iwl_rxon_ctx_from_vif(vif);
- bool scan_completed = false;
IWL_DEBUG_MAC80211(priv, "enter\n");
@@ -2090,18 +2089,13 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
WARN_ON(ctx->vif != vif);
ctx->vif = NULL;
- iwl_scan_cancel_timeout(priv, 100);
+ if (priv->scan_vif == vif)
+ iwl_scan_cancel_timeout(priv, 100);
iwl_set_mode(priv, vif);
if (!ctx->always_active)
ctx->is_active = false;
- if (priv->scan_vif == vif) {
- scan_completed = true;
- priv->scan_vif = NULL;
- priv->scan_request = NULL;
- }
-
/*
* When removing the IBSS interface, overwrite the
* BT traffic load with the stored one from the last
@@ -2115,9 +2109,6 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
memset(priv->bssid, 0, ETH_ALEN);
mutex_unlock(&priv->mutex);
- if (scan_completed)
- ieee80211_scan_completed(priv->hw, true);
-
IWL_DEBUG_MAC80211(priv, "leave\n");
}
@@ -2298,6 +2289,7 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
spin_unlock_irqrestore(&priv->lock, flags);
+ iwl_scan_cancel_timeout(priv, 100);
if (!iwl_is_ready_rf(priv)) {
IWL_DEBUG_MAC80211(priv, "leave - not ready\n");
mutex_unlock(&priv->mutex);
@@ -2307,7 +2299,6 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
/* we are restarting association process
* clear RXON_FILTER_ASSOC_MSK bit
*/
- iwl_scan_cancel_timeout(priv, 100);
ctx->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
iwlcore_commit_rxon(priv, ctx);