Search Linux Wireless

Re: [PATCH 1/2] ath9k: Check for identical channels when changing channels.

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

 



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@xxxxxxxxxxxxxxx wrote:
From: Ben Greear<greearb@xxxxxxxxxxxxxxx>

Don't do un-needed work.  Should be useful when scanning on
only the working channel.

Signed-off-by: Ben Greear<greearb@xxxxxxxxxxxxxxx>
---
: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@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