Search Linux Wireless

Re: [RFC 2/3] mac80211: Support scanning only current active channel.

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

 



On 01/20/2011 11:14 AM, Helmut Schaa wrote:
Am Donnerstag, 20. Januar 2011 schrieb Ben Greear:
On 01/20/2011 10:17 AM, Johannes Berg wrote:
Yeah, so maybe it needs some re-work, but I think what you're doing is a
pretty strange hack.

If you have time to write some patches, I'll be happy to test them on
our ath9k and ath5k systems.

Try this, I only ran a quick test with iwlagn (disable_hw_scan=1), seems to
work fine. However, I did not think much about it yet ;)

I think it has a few issues, but might be moving in the right direction.

First, it doesn't deal with not calling change-channel on scan completion
if we never left the operating channel.  And doesn't mitigate the off-channel
call when scanning starts.

@@ -534,6 +536,21 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
  static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local,
  						    unsigned long *next_delay)
  {
+	struct ieee80211_channel *chan;
+	chan = local->scan_req->channels[local->scan_channel_idx];
+
+	/* remember when we left the operating channel */
+	local->leave_oper_channel_time = jiffies;
+
+	/* advance to the next channel to be scanned */
+	local->next_scan_state = SCAN_SET_CHANNEL;
+
+	/* Scanning operating channel, take the shortcut */
+	if (chan == local->oper_channel) {
+		*next_delay = 0;
+		return;
+	}

I think here you might need to compare against the current channel, which could be
one we are scanning on before we scan the operating channel, not the oper_channel.


  static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *local,
@@ -583,8 +594,10 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
  	chan = local->scan_req->channels[local->scan_channel_idx];

  	local->scan_channel = chan;
-	if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
-		skip = 1;
+
+	if (chan != local->oper_channel)
+		if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
+			skip = 1;

Same problem here I think.

I may be mis-understanding what oper_channel implies, however.

Thanks,
Ben


--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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