linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "mac80211: fix sw scan bracketing"
@ 2010-07-27 19:04 Luis R. Rodriguez
  2010-07-27 20:15 ` Luis R. Rodriguez
  0 siblings, 1 reply; 2+ messages in thread
From: Luis R. Rodriguez @ 2010-07-27 19:04 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez, Johannes Berg

This reverts this commit. While in theory the change is
correct the patch does not address current assumptions made
by some drivers, one which is definitley affected is ath9k.

Prior to this change the scan complete callback would be
called after we returned to the home channel and configured
the hardware filters. After this change we call the scan
complete callback prior to both the hw config and the config
filter.

At least for ath9k this breaks quite a few assumptions on the
callback, leading to disconnects to the AP after every scan
making the driver pretty useless on STA mode. The goal behind
this commit was to address the now understood spurious warnings
from ath9k and mac80211_hwsim on scanning on two wiphys at the
same time. The issue was that the scan complete callback was
called after the lock was released. The spurious warnings
will come up still but since they are wrapped under KERN_DEBUG
and this will be addressed in the next kernel release we leave
then in place.

When fixing this for good next we must first review the other
driver's dependence on this logic and perhaps consider removal
of the scan complete callback all together.

Cc: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---

John, without this ath9k is useless in STA mode, please consider
as a regresion fix for for 2.6.36.

 net/mac80211/scan.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 4dcbf8b..9aa19ec 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -287,8 +287,6 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
 	local->scanning = 0;
 	local->scan_channel = NULL;
 
-	drv_sw_scan_complete(local);
-
 	/* we only have to protect scan_req and hw/sw scan */
 	mutex_unlock(&local->scan_mtx);
 
@@ -298,6 +296,8 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
 
 	ieee80211_configure_filter(local);
 
+	drv_sw_scan_complete(local);
+
 	ieee80211_offchannel_return(local, true);
 
  done:
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Revert "mac80211: fix sw scan bracketing"
  2010-07-27 19:04 [PATCH] Revert "mac80211: fix sw scan bracketing" Luis R. Rodriguez
@ 2010-07-27 20:15 ` Luis R. Rodriguez
  0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2010-07-27 20:15 UTC (permalink / raw)
  To: linville, johannes; +Cc: linux-wireless, Luis R. Rodriguez, Johannes Berg

On Tue, Jul 27, 2010 at 12:04 PM, Luis R. Rodriguez
<lrodriguez@atheros.com> wrote:
> The spurious warnings
> will come up still but since they are wrapped under KERN_DEBUG
> and this will be addressed in the next kernel release we leave
> then in place.

Johannes wants these to go away so I'll resend in a new series
removing these first.

  Luis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-27 20:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-27 19:04 [PATCH] Revert "mac80211: fix sw scan bracketing" Luis R. Rodriguez
2010-07-27 20:15 ` Luis R. Rodriguez

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).