All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2] wl12xx: Increase scan channel dwell time for passive scans
@ 2011-01-18  6:32 juuso.oikarinen
  2011-01-21 13:35 ` Luciano Coelho
  0 siblings, 1 reply; 3+ messages in thread
From: juuso.oikarinen @ 2011-01-18  6:32 UTC (permalink / raw)
  To: coelho; +Cc: linux-wireless

From: Juuso Oikarinen <juuso.oikarinen@nokia.com>

The passive scan channel dwell time currently used is 30ms-60ms. A typical
beacon interval for AP's is 100ms. This leads to a ~30% worst-case probability
of finding an AP via passive scanning.

For 5GHz bands for DFS frequencies passive scanning is the only scanning
option. Hence for these, the probability of finding an AP is very low.

To fix this, increase the passive channel scan dwell times (also the early
leave value, as 5GHz channels are still typically very silent.) Use a value
of 100ms, because that covers most typical AP configurations.

Based on testing the probability of finding an AP (102.4ms beacon interval) on
a single scan round are as follows (based on 100 iterations):

dwell min/max (ms)   | probability
---------------------+------------
30/60                | 35%
60/60                | 56%
80/80                | 77%
100/100              | 100%

Total scan times now and after the change:

Region | Before (s) | After (s)
-------+------------+----------
00     | 0.77       | 1.48
FI     | 0.95       | 2.01
US     | 0.91       | 1.76

Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
---
v2: Minor comment change "maximum" => "minimum"

 drivers/net/wireless/wl12xx/conf.h |   18 +++++++++---------
 drivers/net/wireless/wl12xx/main.c |    4 ++--
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/conf.h b/drivers/net/wireless/wl12xx/conf.h
index f5c048c..7aecbb5 100644
--- a/drivers/net/wireless/wl12xx/conf.h
+++ b/drivers/net/wireless/wl12xx/conf.h
@@ -1084,30 +1084,30 @@ struct conf_scan_settings {
 	/*
 	 * The minimum time to wait on each channel for active scans
 	 *
-	 * Range: 0 - 65536 tu
+	 * Range: u32 tu/1000
 	 */
-	u16 min_dwell_time_active;
+	u32 min_dwell_time_active;
 
 	/*
 	 * The maximum time to wait on each channel for active scans
 	 *
-	 * Range: 0 - 65536 tu
+	 * Range: u32 tu/1000
 	 */
-	u16 max_dwell_time_active;
+	u32 max_dwell_time_active;
 
 	/*
-	 * The maximum time to wait on each channel for passive scans
+	 * The minimum time to wait on each channel for passive scans
 	 *
-	 * Range: 0 - 65536 tu
+	 * Range: u32 tu/1000
 	 */
-	u16 min_dwell_time_passive;
+	u32 min_dwell_time_passive;
 
 	/*
 	 * The maximum time to wait on each channel for passive scans
 	 *
-	 * Range: 0 - 65536 tu
+	 * Range: u32 tu/1000
 	 */
-	u16 max_dwell_time_passive;
+	u32 max_dwell_time_passive;
 
 	/*
 	 * Number of probe requests to transmit on each active scan channel
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 863e660..c1814f2 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -279,8 +279,8 @@ static struct conf_drv_settings default_conf = {
 	.scan = {
 		.min_dwell_time_active        = 7500,
 		.max_dwell_time_active        = 30000,
-		.min_dwell_time_passive       = 30000,
-		.max_dwell_time_passive       = 60000,
+		.min_dwell_time_passive       = 100000,
+		.max_dwell_time_passive       = 100000,
 		.num_probe_reqs               = 2,
 	},
 	.rf = {
-- 
1.7.1


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

* Re: [PATCHv2] wl12xx: Increase scan channel dwell time for passive scans
  2011-01-18  6:32 [PATCHv2] wl12xx: Increase scan channel dwell time for passive scans juuso.oikarinen
@ 2011-01-21 13:35 ` Luciano Coelho
  2011-01-24  5:53   ` Juuso Oikarinen
  0 siblings, 1 reply; 3+ messages in thread
From: Luciano Coelho @ 2011-01-21 13:35 UTC (permalink / raw)
  To: juuso.oikarinen; +Cc: linux-wireless

Hi Juuso,

Just a quick comment/question:


On Tue, 2011-01-18 at 07:32 +0100, juuso.oikarinen@nokia.com wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> 
> The passive scan channel dwell time currently used is 30ms-60ms. A typical
> beacon interval for AP's is 100ms. This leads to a ~30% worst-case probability
> of finding an AP via passive scanning.

The beacon intervals are defined in TUs.


> For 5GHz bands for DFS frequencies passive scanning is the only scanning
> option. Hence for these, the probability of finding an AP is very low.
> 
> To fix this, increase the passive channel scan dwell times (also the early
> leave value, as 5GHz channels are still typically very silent.) Use a value
> of 100ms, because that covers most typical AP configurations.

In the firmware API, the dwell times are expressed in milli-TUs.  So I
guess here you mean "use a value of 100 TUs", isn't it?


> Based on testing the probability of finding an AP (102.4ms beacon interval) on
> a single scan round are as follows (based on 100 iterations):

Here you use milliseconds for the AP beacon interval.  102.4ms is 100
TUs, so that's correct.

It's just a bit confusing because of the slight difference between TUs
and msecs.  Gery was wondering why you were using 100ms if the most
common beacon interval is 102.4ms (100 TUs).  Of course, you're actually
using 100 TUs, so it's fine.

I just think it's easier to follow if you forget msecs and use only TUs
in your explanation.


-- 
Cheers,
Luca.


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

* Re: [PATCHv2] wl12xx: Increase scan channel dwell time for passive scans
  2011-01-21 13:35 ` Luciano Coelho
@ 2011-01-24  5:53   ` Juuso Oikarinen
  0 siblings, 0 replies; 3+ messages in thread
From: Juuso Oikarinen @ 2011-01-24  5:53 UTC (permalink / raw)
  To: ext Luciano Coelho; +Cc: linux-wireless

On Fri, 2011-01-21 at 15:35 +0200, ext Luciano Coelho wrote:
> Hi Juuso,
> 
> Just a quick comment/question:
> 
> 
> On Tue, 2011-01-18 at 07:32 +0100, juuso.oikarinen@nokia.com wrote:
> > From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
> > 
> > The passive scan channel dwell time currently used is 30ms-60ms. A typical
> > beacon interval for AP's is 100ms. This leads to a ~30% worst-case probability
> > of finding an AP via passive scanning.
> 
> The beacon intervals are defined in TUs.
> 
> 
> > For 5GHz bands for DFS frequencies passive scanning is the only scanning
> > option. Hence for these, the probability of finding an AP is very low.
> > 
> > To fix this, increase the passive channel scan dwell times (also the early
> > leave value, as 5GHz channels are still typically very silent.) Use a value
> > of 100ms, because that covers most typical AP configurations.
> 
> In the firmware API, the dwell times are expressed in milli-TUs.  So I
> guess here you mean "use a value of 100 TUs", isn't it?

> > Based on testing the probability of finding an AP (102.4ms beacon interval) on
> > a single scan round are as follows (based on 100 iterations):
> 
> Here you use milliseconds for the AP beacon interval.  102.4ms is 100
> TUs, so that's correct.
> 
> It's just a bit confusing because of the slight difference between TUs
> and msecs.  Gery was wondering why you were using 100ms if the most
> common beacon interval is 102.4ms (100 TUs).  Of course, you're actually
> using 100 TUs, so it's fine.
> 
> I just think it's easier to follow if you forget msecs and use only TUs
> in your explanation.
> 

You're right. I'll convert the ms to mTU's in the description in v2.

This is a bit unclear to me too, though, because I don't know exactly
what the unit is we give the firmware. It's either TU/1024 or TU/1000.
Some reference I saw way back claimed it was plain TU's, which obviously
is not a possibility.

-Juuso


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

end of thread, other threads:[~2011-01-24  5:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18  6:32 [PATCHv2] wl12xx: Increase scan channel dwell time for passive scans juuso.oikarinen
2011-01-21 13:35 ` Luciano Coelho
2011-01-24  5:53   ` Juuso Oikarinen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.