All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Helmut Schaa <helmut.schaa@googlemail.com>
Cc: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC 2/3] mac80211: Support scanning only current active channel.
Date: Thu, 20 Jan 2011 20:39:02 -0800	[thread overview]
Message-ID: <4D390DE6.8030507@candelatech.com> (raw)
In-Reply-To: <201101202014.51161.helmut.schaa@googlemail.com>

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@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2011-01-21  4:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-20 17:32 [RFC 1/3] mac80211: Support sw_scan_start_cur greearb
2011-01-20 17:32 ` [RFC 2/3] mac80211: Support scanning only current active channel greearb
2011-01-20 17:39   ` Johannes Berg
2011-01-20 18:06     ` Ben Greear
2011-01-20 18:17       ` Johannes Berg
2011-01-20 18:21         ` Ben Greear
2011-01-20 18:25           ` Johannes Berg
2011-01-20 19:14           ` Helmut Schaa
2011-01-21  4:39             ` Ben Greear [this message]
2011-01-21  5:42             ` Ben Greear
2011-01-20 17:32 ` [RFC 3/3] ath9k: Support scanning on current channel greearb
2011-01-20 17:37 ` [RFC 1/3] mac80211: Support sw_scan_start_cur Johannes Berg
2011-01-20 17:52   ` Ben Greear

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D390DE6.8030507@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=helmut.schaa@googlemail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.