2011-07-01 16:11:53 +00:00
|
|
|
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
2011-08-11 13:52:27 +00:00
|
|
|
@@ -588,6 +588,7 @@ struct ath_softc {
|
2011-07-01 16:11:53 +00:00
|
|
|
struct ieee80211_hw *hw;
|
|
|
|
struct device *dev;
|
|
|
|
|
|
|
|
+ u32 chan_bw;
|
|
|
|
int chan_idx;
|
|
|
|
int chan_is_ht;
|
|
|
|
struct survey_info *cur_survey;
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
2011-08-11 13:52:27 +00:00
|
|
|
@@ -1323,6 +1323,9 @@ int ath9k_init_debug(struct ath_hw *ah)
|
2011-07-01 16:11:53 +00:00
|
|
|
debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
|
|
|
|
&fops_eeprom);
|
|
|
|
|
|
|
|
+ debugfs_create_u32("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
|
|
|
|
+ &sc->chan_bw);
|
|
|
|
+
|
|
|
|
sc->debug.regidx = 0;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
|
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
|
|
@@ -226,6 +226,7 @@ static int ath_set_channel(struct ath_so
|
|
|
|
bool fastcc = true, stopped;
|
|
|
|
struct ieee80211_channel *channel = hw->conf.channel;
|
|
|
|
struct ath9k_hw_cal_data *caldata = NULL;
|
|
|
|
+ u32 oldflags;
|
|
|
|
int r;
|
|
|
|
|
|
|
|
if (sc->sc_flags & SC_OP_INVALID)
|
2011-07-29 12:25:46 +00:00
|
|
|
@@ -268,6 +269,24 @@ static int ath_set_channel(struct ath_so
|
2011-07-01 16:11:53 +00:00
|
|
|
if (!stopped || !(sc->sc_flags & SC_OP_OFFCHANNEL))
|
|
|
|
fastcc = false;
|
|
|
|
|
|
|
|
+ oldflags = hchan->channelFlags;
|
|
|
|
+ switch (sc->chan_bw) {
|
|
|
|
+ case 5:
|
|
|
|
+ hchan->channelFlags &= ~CHANNEL_HALF;
|
|
|
|
+ hchan->channelFlags |= CHANNEL_QUARTER;
|
|
|
|
+ break;
|
|
|
|
+ case 10:
|
|
|
|
+ hchan->channelFlags &= ~CHANNEL_QUARTER;
|
|
|
|
+ hchan->channelFlags |= CHANNEL_HALF;
|
|
|
|
+ break;
|
2011-07-29 12:25:46 +00:00
|
|
|
+ default:
|
|
|
|
+ hchan->channelFlags &= ~(CHANNEL_HALF | CHANNEL_QUARTER);
|
|
|
|
+ break;
|
2011-07-01 16:11:53 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (oldflags != hchan->channelFlags)
|
|
|
|
+ fastcc = false;
|
|
|
|
+
|
|
|
|
if (!(sc->sc_flags & SC_OP_OFFCHANNEL))
|
|
|
|
caldata = &sc->caldata;
|
|
|
|
|