Search Linux Wireless

Re: [PATCH 09/13] mac80211: remove hw_scan callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 27 April 2007 02:54, James Ketrenos wrote:
> 	hw scan: 2.2s
> 	sw scan: 4.7s
>
Alright, so I put together a patch to optimize software scanning a little and 
tune the delays to be a bit closer to what the iwlwifi firmware uses. I don't 
actually have a ipw3945 card, so I asked Andy Green to test it. Here are his 
results:

options iwlwifi disable_hw_scan=0 debug=0x800

real    0m2.974s
real    0m2.855s
real    0m2.853s
real    0m2.753s

options iwlwifi disable_hw_scan=1 debug=0x800

real    0m2.754s
real    0m2.753s
real    0m2.757s
real    0m2.754s

The hw scans settle around 2.753s so there's basically no difference in speed 
between sw and hw scan for this particular case. This is with 11 active, 2 
passive 2.4ghz channels and 4 active, 16 passive 5.4ghz channels. For people 
not in Europe, software scanning should be roughly 20ms slower due to some 
(fixable) dumbness in the ieee80211_sta scanning code.

Patch containing the optimizations and delay adjustments attached. 
IEEE80211_HW_NO_PROBE_FILTER also needs to be set in dev->flags (or 
the "[PATCH 10/13] mac80211: set bssid to broadcast before scan" patch backed 
out) in order for software scanning to work with iwlwifi.

-Michael Wu
mac80211: optimize scanning code

From: Michael Wu <flamingice@xxxxxxxxxxxx>


---

 net/mac80211/ieee80211_sta.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index d0a3aa0..f3017a1 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -45,9 +45,8 @@
 #define IEEE80211_SCAN_INTERVAL_SLOW (15 * HZ)
 #define IEEE80211_IBSS_JOIN_TIMEOUT (20 * HZ)
 
-#define IEEE80211_PROBE_DELAY (HZ / 33)
-#define IEEE80211_CHANNEL_TIME (HZ / 33)
-#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 5)
+#define IEEE80211_CHANNEL_TIME (HZ / 50)
+#define IEEE80211_PASSIVE_CHANNEL_TIME (HZ / 9)
 #define IEEE80211_SCAN_RESULT_EXPIRE (10 * HZ)
 #define IEEE80211_IBSS_MERGE_INTERVAL (30 * HZ)
 #define IEEE80211_IBSS_INACTIVITY_LIMIT (60 * HZ)
@@ -2669,15 +2668,17 @@ void ieee80211_sta_scan_work(struct work_struct *work)
 		if (skip)
 			break;
 
-		next_delay = IEEE80211_PROBE_DELAY +
-			     usecs_to_jiffies(local->hw.channel_change_time);
+		next_delay = usecs_to_jiffies(local->hw.channel_change_time);
 		local->scan_state = SCAN_SEND_PROBE;
-		break;
+		if (local->hw.channel_change_time)
+			break;
 	case SCAN_SEND_PROBE:
 		if (local->scan_channel->flag & IEEE80211_CHAN_W_ACTIVE_SCAN) {
 			ieee80211_send_probe_req(dev, NULL, local->scan_ssid,
 						 local->scan_ssid_len);
 			next_delay = IEEE80211_CHANNEL_TIME;
+			if (local->scan_hw_mode->mode == MODE_IEEE80211A)
+				next_delay >>= 1;
 		} else
 			next_delay = IEEE80211_PASSIVE_CHANNEL_TIME;
 		local->scan_state = SCAN_SET_CHANNEL;

Attachment: pgp1d5aoBqvXg.pgp
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux