Skip to contentSkip to conversation

iwlwifi: notify on scan completion even when shutting down

PATCH In review Johannes Berg 2 participants 2 messages Apr 23, 2009 Networking drivers (wireless)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 iwlwifi: notify on scan completion even when shutting down

Under certain circumstances iwlwifi can get stuck and will no longer accept scan requests, because the core code (cfg80211) thinks that it's still processing one. This fixes one of the points where it can happen, but I've still seen it (although only with my radio-off-when-idle patch).

---
 drivers/net/wireless/iwlwifi/iwl-scan.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-scan.c +3 -3
@@ -814,12 +814,12 @@ void iwl_bg_scan_completed(struct work_s
 
 	IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
 
-	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
-		return;
-
 	priv->scan_request = NULL;
 	ieee80211_scan_completed(priv->hw, false);
 
+	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+		return;
+
 	/* Since setting the TXPOWER may have been deferred while
 	 * performing the scan, fire one off */
 	mutex_lock(&priv->mutex);
Acked-by on v1 1/1
#1 lore raw
Quoted 21 lines · Johannes Berg

Under certain circumstances iwlwifi can get stuck and will no longer accept scan requests, because the core code (cfg80211) thinks that it's still processing one. This fixes one of the points where it can happen, but I've still seen it (although only with my radio-off-when-idle patch).

---
 drivers/net/wireless/iwlwifi/iwl-scan.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/iwlwifi/iwl-scan.c +0 -2
@@ -814,12 +814,12 @@ void iwl_bg_scan_completed(struct work_s
 
 	IWL_DEBUG_SCAN(priv, "SCAN complete scan\n");
 
-	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
-		return;

drivers/net/wireless/iwlwifi/iwl-scan.c void iwl_bg_scan_completed(struct work_s · line 825

Quoted 10 lines
drivers/net/wireless/iwlwifi/iwl-scan.c +3 -1
-
 	priv->scan_request = NULL;
 	ieee80211_scan_completed(priv->hw, false);
 
+	if (test_bit(STATUS_EXIT_PENDING, &priv->status))
+		return;
+
 	/* Since setting the TXPOWER may have been deferred while
 	 * performing the scan, fire one off */
 	mutex_lock(&priv->mutex);

Thank you

Reinette