linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] wl12xx: mark no sched scan only after FW event
@ 2011-12-20 12:55 Eyal Shapira
  2011-12-20 20:51 ` Luciano Coelho
  0 siblings, 1 reply; 2+ messages in thread
From: Eyal Shapira @ 2011-12-20 12:55 UTC (permalink / raw)
  To: Luciano Coelho; +Cc: linux-wireless

stop sched scan isn't an immediate operation
and we need to wait for PERIODIC_SCAN_COMPLETE_EVENT_ID
after sending a stop before changing internal state
and notifying upper layers.
Not doing this caused problems when canceling an existing sched
scan and immediately requesting to start a new one
with a different configuration as the FW was still
in the middle of the previous sched scan.

Signed-off-by: Eyal Shapira <eyal@wizery.com>
---
 drivers/net/wireless/wl12xx/event.c |    2 +-
 drivers/net/wireless/wl12xx/scan.c  |    1 -
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/event.c b/drivers/net/wireless/wl12xx/event.c
index 00ce794..d3280df68 100644
--- a/drivers/net/wireless/wl12xx/event.c
+++ b/drivers/net/wireless/wl12xx/event.c
@@ -267,8 +267,8 @@ static int wl1271_event_process(struct wl1271 *wl, struct event_mailbox *mbox)
 		wl1271_debug(DEBUG_EVENT, "PERIODIC_SCAN_COMPLETE_EVENT "
 			     "(status 0x%0x)", mbox->scheduled_scan_status);
 		if (wl->sched_scanning) {
-			wl1271_scan_sched_scan_stop(wl);
 			ieee80211_sched_scan_stopped(wl->hw);
+			wl->sched_scanning = false;
 		}
 	}
 
diff --git a/drivers/net/wireless/wl12xx/scan.c b/drivers/net/wireless/wl12xx/scan.c
index 260986b..8ff680e 100644
--- a/drivers/net/wireless/wl12xx/scan.c
+++ b/drivers/net/wireless/wl12xx/scan.c
@@ -754,7 +754,6 @@ void wl1271_scan_sched_scan_stop(struct wl1271 *wl)
 		wl1271_error("failed to send sched scan stop command");
 		goto out_free;
 	}
-	wl->sched_scanning = false;
 
 out_free:
 	kfree(stop);
-- 
1.7.4.1


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

* Re: [PATCH] wl12xx: mark no sched scan only after FW event
  2011-12-20 12:55 [PATCH] wl12xx: mark no sched scan only after FW event Eyal Shapira
@ 2011-12-20 20:51 ` Luciano Coelho
  0 siblings, 0 replies; 2+ messages in thread
From: Luciano Coelho @ 2011-12-20 20:51 UTC (permalink / raw)
  To: Eyal Shapira; +Cc: linux-wireless

On Tue, 2011-12-20 at 14:55 +0200, Eyal Shapira wrote: 
> stop sched scan isn't an immediate operation
> and we need to wait for PERIODIC_SCAN_COMPLETE_EVENT_ID
> after sending a stop before changing internal state
> and notifying upper layers.
> Not doing this caused problems when canceling an existing sched
> scan and immediately requesting to start a new one
> with a different configuration as the FW was still
> in the middle of the previous sched scan.
> 
> Signed-off-by: Eyal Shapira <eyal@wizery.com>
> ---

Applied, thanks!

-- 
Cheers,
Luca.


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

end of thread, other threads:[~2011-12-20 20:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-20 12:55 [PATCH] wl12xx: mark no sched scan only after FW event Eyal Shapira
2011-12-20 20:51 ` Luciano Coelho

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).