* mac80211/scan.c: scanning ceases after a double rescheduling
@ 2012-05-31 16:39 Jean-Pierre TOSONI
2012-06-01 9:12 ` Stanislaw Gruszka
0 siblings, 1 reply; 2+ messages in thread
From: Jean-Pierre TOSONI @ 2012-05-31 16:39 UTC (permalink / raw)
To: linux-wireless
Hello all,
I am using compat-wireless-2012-04-17 in a OpenWrt box, client mode,
kernel 2.6.33.
I arrange to run an active background scan every second under some load
(iperf UDP 40 Mbps).
I observed that the probes can be delayed due to two events flagged as
IEEE80211_STA_BEACON_POLL and IEEE80211_STA_CONNECTION_POLL. They make
__ieee80211_start_scan() return early in mac80211/scan.c when it is
called by ieee80211_request_scan().
When one of these events occurs, the function returns and
__ieee80211_start_scan() is reentered later, called this time by
ieee80211_scan_work(). Now if it finds the other event flagged, it
returns early but will never be called again. As a result later scan
requests result in a "EBUSY" error.
I made a workaround by always returning an error, but I am pretty sure
this is a wrong solution. I wonder if scan_work should not be
rescheduled in this case.
Here is my try:
==================
--- a/mac80211/scan.c 2012-05-31 18:37:41.000000000 +0200
+++ b/mac80211/scan.c 2012-05-31 18:37:48.000000000 +0200
@@ -413,10 +413,7 @@
return -EBUSY;
if (!ieee80211_can_scan(local, sdata)) {
- /* wait for the work to finish/time out */
- local->scan_req = req;
- local->scan_sdata = sdata;
- return 0;
+ return -EAGAIN;
}
if (local->ops->hw_scan) {
==================
Any thoughts / suggestions ?
Thanks,
Jean-Pierre Tosoni
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mac80211/scan.c: scanning ceases after a double rescheduling
2012-05-31 16:39 mac80211/scan.c: scanning ceases after a double rescheduling Jean-Pierre TOSONI
@ 2012-06-01 9:12 ` Stanislaw Gruszka
0 siblings, 0 replies; 2+ messages in thread
From: Stanislaw Gruszka @ 2012-06-01 9:12 UTC (permalink / raw)
To: Jean-Pierre TOSONI, John W. Linville; +Cc: linux-wireless
On Thu, May 31, 2012 at 06:39:51PM +0200, Jean-Pierre TOSONI wrote:
> Hello all,
>
> I am using compat-wireless-2012-04-17 in a OpenWrt box, client mode,
> kernel 2.6.33.
> I arrange to run an active background scan every second under some load
> (iperf UDP 40 Mbps).
>
> I observed that the probes can be delayed due to two events flagged as
> IEEE80211_STA_BEACON_POLL and IEEE80211_STA_CONNECTION_POLL. They make
> __ieee80211_start_scan() return early in mac80211/scan.c when it is
> called by ieee80211_request_scan().
>
> When one of these events occurs, the function returns and
> __ieee80211_start_scan() is reentered later, called this time by
> ieee80211_scan_work(). Now if it finds the other event flagged, it
> returns early but will never be called again. As a result later scan
> requests result in a "EBUSY" error.
>
> I made a workaround by always returning an error, but I am pretty sure
> this is a wrong solution. I wonder if scan_work should not be
> rescheduled in this case.
I posted fix here:
http://marc.info/?l=linux-wireless&m=133717501822158&w=2
It is needed for 3.5 and it is still not appied in wireless-testing ...
Stanislaw
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-01 9:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-31 16:39 mac80211/scan.c: scanning ceases after a double rescheduling Jean-Pierre TOSONI
2012-06-01 9:12 ` Stanislaw Gruszka
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).