diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-18 12:35:22 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-08-24 16:32:05 -0400 |
commit | 672ddeffeb2afad18fe1a2fc5aa14a07b4da1551 (patch) | |
tree | 4e382dd8ddaf81af6cf7431fb1818919da6fb5b0 /drivers/net/wireless/iwlwifi/iwl-scan.c | |
parent | 54c8067a4a0606f466faf0f30b16684b00060e70 (diff) |
iwlwifi: do not spuriously call ieee80211_scan_completed
When a scan is aborted because the corresponding
virtual interface is removed, we may still later
attempt to tell mac80211 that the scan completed.
This is obviously wrong, since we already told it
that it was aborted, so don't do that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-scan.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-scan.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index ac510840519c..8d7fa59364fe 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -508,6 +508,7 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
508 | struct iwl_priv *priv = | 508 | struct iwl_priv *priv = |
509 | container_of(work, struct iwl_priv, scan_completed); | 509 | container_of(work, struct iwl_priv, scan_completed); |
510 | bool internal = false; | 510 | bool internal = false; |
511 | bool scan_completed = false; | ||
511 | 512 | ||
512 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); | 513 | IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); |
513 | 514 | ||
@@ -518,7 +519,8 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
518 | priv->is_internal_short_scan = false; | 519 | priv->is_internal_short_scan = false; |
519 | IWL_DEBUG_SCAN(priv, "internal short scan completed\n"); | 520 | IWL_DEBUG_SCAN(priv, "internal short scan completed\n"); |
520 | internal = true; | 521 | internal = true; |
521 | } else { | 522 | } else if (priv->scan_request) { |
523 | scan_completed = true; | ||
522 | priv->scan_request = NULL; | 524 | priv->scan_request = NULL; |
523 | priv->scan_vif = NULL; | 525 | priv->scan_vif = NULL; |
524 | } | 526 | } |
@@ -549,7 +551,7 @@ static void iwl_bg_scan_completed(struct work_struct *work) | |||
549 | * into driver again into functions that will attempt to take | 551 | * into driver again into functions that will attempt to take |
550 | * mutex. | 552 | * mutex. |
551 | */ | 553 | */ |
552 | if (!internal) | 554 | if (scan_completed) |
553 | ieee80211_scan_completed(priv->hw, false); | 555 | ieee80211_scan_completed(priv->hw, false); |
554 | } | 556 | } |
555 | 557 | ||