From: Ben Greear <greearb@candelatech.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/2] ath9k: Check for identical channels when changing channels.
Date: Tue, 28 Sep 2010 08:22:21 -0700 [thread overview]
Message-ID: <4CA2082D.3040907@candelatech.com> (raw)
In-Reply-To: <4CA1F641.5090300@openwrt.org>
On 09/28/2010 07:05 AM, Felix Fietkau wrote:
> On 2010-09-28 3:37 PM, Ben Greear wrote:
>> On 09/28/2010 01:51 AM, Felix Fietkau wrote:
>>> On 2010-09-28 2:07 AM, greearb@candelatech.com wrote:
>>>> From: Ben Greear<greearb@candelatech.com>
>>>>
>>>> Don't do un-needed work. Should be useful when scanning on
>>>> only the working channel.
>>>>
>>>> Signed-off-by: Ben Greear<greearb@candelatech.com>
>>>> ---
>>>> :100644 100644 a133878... 4d34ba5... M drivers/net/wireless/ath/ath9k/main.c
>>>> drivers/net/wireless/ath/ath9k/main.c | 5 +++++
>>>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
>>>> index a133878..4d34ba5 100644
>>>> --- a/drivers/net/wireless/ath/ath9k/main.c
>>>> +++ b/drivers/net/wireless/ath/ath9k/main.c
>>>> @@ -1602,6 +1602,11 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
>>>> struct ieee80211_channel *curchan = hw->conf.channel;
>>>> int pos = curchan->hw_value;
>>>>
>>>> + /* If channels are the same, then don't actually do anything.
>>>> + */
>>>> + if (sc->sc_ah->curchan ==&sc->sc_ah->channels[pos])
>>>> + goto skip_chan_change;
>>>> +
>>> NACK. This ignores off-channel flag changes, which are important for
>>> calibration.
>>
>> Is it enough to just add a check to make sure no changes were made to
>> the SC_OP_OFFCHANNEL flag?
> Shouldn't this check be done in mac80211 then?
Maybe so...I was curious why the check wasn't already in place,
and assumed that maybe some drivers needed it, or maybe the calling
code doesn't always know the driver's current channel?
Thanks,
Ben
>
> - Felix
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
prev parent reply other threads:[~2010-09-28 15:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 0:07 [PATCH 1/2] ath9k: Check for identical channels when changing channels greearb
2010-09-28 0:07 ` [PATCH 2/2] mac80211: Allow scanning single channel if other VIF is associated greearb
2010-09-28 7:22 ` Johannes Berg
2010-09-28 13:50 ` Ben Greear
2010-09-28 13:57 ` Johannes Berg
2010-09-28 15:17 ` Ben Greear
2010-09-28 15:18 ` Johannes Berg
2010-09-29 5:48 ` Jouni Malinen
2010-09-29 15:27 ` Ben Greear
2010-09-28 8:51 ` [PATCH 1/2] ath9k: Check for identical channels when changing channels Felix Fietkau
2010-09-28 13:37 ` Ben Greear
2010-09-28 14:05 ` Felix Fietkau
2010-09-28 15:22 ` Ben Greear [this message]
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=4CA2082D.3040907@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
--cc=nbd@openwrt.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 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).