1 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
2 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
3 @@ -586,6 +586,7 @@ struct ath_softc {
4 struct ieee80211_hw *hw;
10 struct survey_info *cur_survey;
11 --- a/drivers/net/wireless/ath/ath9k/debug.c
12 +++ b/drivers/net/wireless/ath/ath9k/debug.c
13 @@ -1281,6 +1281,9 @@ int ath9k_init_debug(struct ath_hw *ah)
14 debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
17 + debugfs_create_u32("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
23 --- a/drivers/net/wireless/ath/ath9k/main.c
24 +++ b/drivers/net/wireless/ath/ath9k/main.c
25 @@ -226,6 +226,7 @@ static int ath_set_channel(struct ath_so
26 bool fastcc = true, stopped;
27 struct ieee80211_channel *channel = hw->conf.channel;
28 struct ath9k_hw_cal_data *caldata = NULL;
32 if (sc->sc_flags & SC_OP_INVALID)
33 @@ -268,6 +269,21 @@ static int ath_set_channel(struct ath_so
34 if (!stopped || !(sc->sc_flags & SC_OP_OFFCHANNEL))
37 + oldflags = hchan->channelFlags;
38 + switch (sc->chan_bw) {
40 + hchan->channelFlags &= ~CHANNEL_HALF;
41 + hchan->channelFlags |= CHANNEL_QUARTER;
44 + hchan->channelFlags &= ~CHANNEL_QUARTER;
45 + hchan->channelFlags |= CHANNEL_HALF;
49 + if (oldflags != hchan->channelFlags)
52 if (!(sc->sc_flags & SC_OP_OFFCHANNEL))
53 caldata = &sc->caldata;