Skip to contentSkip to conversation

iwl3945: queue the right work if the scan needs to be aborted

PATCH In review Florian Mickler 2 participants 5 messages Sep 24, 2010 – Sep 27, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iwl3945: queue the right work if the scan needs to be aborted

iwl3945's scan_completed calls into the mac80211 stack which triggers a warn on if there is no scan outstanding.

This can be avoided by not calling scan_completed but abort_scan in iwl3945_request_scan in the done: branch of the function which is used as an error out.

The done: branch seems to be an error-out branch, as, for example, if iwl_is_ready(priv) returns false the done: branch is executed.

NOTE:
I'm not familiar with the driver at all.
I just quickly scanned as a reaction to

https://bugzilla.kernel.org/show_bug.cgi?id=17722

the users of scan_completed in the iwl3945 driver and noted the odd discrepancy between the comment above this instance and the comment in mac80211 scan_completed function.

---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    2 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-lib.c +1 -1
index 9dd9e64..8fd00a6 100644
@@ -1411,7 +1411,7 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCAN_HW, &priv->status);
 	clear_bit(STATUS_SCANNING, &priv->status);
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->scan_completed);
+	queue_work(priv->workqueue, &priv->abort_scan);
 }
 
 int iwlagn_manage_ibss_station(struct iwl_priv *priv,
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
index 59a308b..d31661c 100644
@@ -3018,7 +3018,7 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCANNING, &priv->status);
 
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->scan_completed);
+	queue_work(priv->workqueue, &priv->abort_scan);
 }
 
 static void iwl3945_bg_restart(struct work_struct *data)
Signature · 6 lines
1.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#1 lore raw

Hi Florian,

Quoted 44 lines · Florian Mickler

iwl3945's scan_completed calls into the mac80211 stack which triggers a warn on if there is no scan outstanding.

This can be avoided by not calling scan_completed but abort_scan in iwl3945_request_scan in the done: branch of the function which is used as an error out.

The done: branch seems to be an error-out branch, as, for example, if iwl_is_ready(priv) returns false the done: branch is executed.

NOTE:
I'm not familiar with the driver at all.
I just quickly scanned as a reaction to

https://bugzilla.kernel.org/show_bug.cgi?id=17722

the users of scan_completed in the iwl3945 driver and noted the odd discrepancy between the comment above this instance and the comment in mac80211 scan_completed function.

---
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    2 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-lib.c +1 -1
index 9dd9e64..8fd00a6 100644
@@ -1411,7 +1411,7 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCAN_HW, &priv->status);
 	clear_bit(STATUS_SCANNING, &priv->status);
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->scan_completed);
+	queue_work(priv->workqueue, &priv->abort_scan);
 }
 
 int iwlagn_manage_ibss_station(struct iwl_priv *priv,
drivers/net/wireless/iwlwifi/iwl3945-base.c +0 -0
index 59a308b..d31661c 100644

drivers/net/wireless/iwlwifi/iwl3945-base.c void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) · line 3024

Quoted 8 lines
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
@@ -3018,7 +3018,7 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCANNING, &priv->status);
 
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->scan_completed);
+	queue_work(priv->workqueue, &priv->abort_scan);
 }
 
 static void iwl3945_bg_restart(struct work_struct *data)

Thanks for sending the patch, the scan operation in iwlwifi just being modified and the changes you have no longer apply.please check the latest kernel.

Thanks
Wey

#2 lore raw
Quoted 9 lines · Wey-Yi

Hi Florian,

Thanks for sending the patch, the scan operation in iwlwifi just being modified and the changes you have no longer apply.please check the latest kernel.

Thanks
Wey

Ok, I checked out
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
and it definitely looks better in there. This patch shouldn't be necessary for that.

Do you plan on submitting this for 2.6.36 or .37?

I think my patch should fix the instance reported in the bug in a less invasive manner.
Only remaining question is why it did only show up now. But that's probably due to the workqueue changes.

Regards,
Flo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw

Hi Florian,

Agree the patch is needed for .35 and .36.

Thanks

Wey

-----Original Message-----
From: Florian Mickler [mailto:[email protected]]
Sent: Sunday, September 26, 2010 11:14 PM
To: Guy, Wey-Yi W
Cc: [email protected]; Chatre, Reinette; Intel Linux Wireless; John W. Linville; Berg, Johannes; Zhu Yi; Cahill, Ben M; [email protected]; [email protected]
Subject: Re: [PATCH] iwl3945: queue the right work if the scan needs to be aborted

Quoted 9 lines · Wey-Yi

Hi Florian,

Thanks for sending the patch, the scan operation in iwlwifi just being modified and the changes you have no longer apply.please check the latest kernel.

Thanks
Wey

Ok, I checked out
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6.git
and it definitely looks better in there. This patch shouldn't be necessary for that.

Do you plan on submitting this for 2.6.36 or .37?

I think my patch should fix the instance reported in the bug in a less invasive manner.
Only remaining question is why it did only show up now. But that's probably due to the workqueue changes.

Regards,
Flo

Acked-by on v1 1/1
#4 lore raw
In reply to Florian Mickler
Quoted 14 lines · Florian Mickler

iwl3945's scan_completed calls into the mac80211 stack which triggers a warn on if there is no scan outstanding.

This can be avoided by not calling scan_completed but abort_scan in iwl3945_request_scan in the done: branch of the function which is used as an error out.

The done: branch seems to be an error-out branch, as, for example, if iwl_is_ready(priv) returns false the done: branch is executed.

NOTE:
I'm not familiar with the driver at all.
I just quickly scanned as a reaction to

Quoted 6 lines

https://bugzilla.kernel.org/show_bug.cgi?id=17722

the users of scan_completed in the iwl3945 driver and noted the odd discrepancy between the comment above this instance and the comment in mac80211 scan_completed function.

Quoted 1 line

---

go into wireless-2.6 and stable only, scan fix already in wireless-next-2.6

Thanks
Wey

Quoted 30 lines
 drivers/net/wireless/iwlwifi/iwl-agn-lib.c  |    2 +-
 drivers/net/wireless/iwlwifi/iwl3945-base.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/iwlwifi/iwl-agn-lib.c +1 -1
index 9dd9e64..8fd00a6 100644
@@ -1411,7 +1411,7 @@ void iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCAN_HW, &priv->status);
 	clear_bit(STATUS_SCANNING, &priv->status);
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->scan_completed);
+	queue_work(priv->workqueue, &priv->abort_scan);
 }
 
 int iwlagn_manage_ibss_station(struct iwl_priv *priv,
drivers/net/wireless/iwlwifi/iwl3945-base.c +1 -1
index 59a308b..d31661c 100644
@@ -3018,7 +3018,7 @@ void iwl3945_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif)
 	clear_bit(STATUS_SCANNING, &priv->status);
 
 	/* inform mac80211 scan aborted */
-	queue_work(priv->workqueue, &priv->scan_completed);
+	queue_work(priv->workqueue, &priv->abort_scan);
 }
 
 static void iwl3945_bg_restart(struct work_struct *data)