mac80211: update to 2011-08-10
[openwrt.git] / package / mac80211 / patches / 513-ath9k_channelbw_debugfs.patch
1 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
2 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
3 @@ -588,6 +588,7 @@ struct ath_softc {
4 struct ieee80211_hw *hw;
5 struct device *dev;
6
7 + u32 chan_bw;
8 int chan_idx;
9 int chan_is_ht;
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 @@ -1323,6 +1323,9 @@ int ath9k_init_debug(struct ath_hw *ah)
14 debugfs_create_file("eeprom", S_IRUSR, sc->debug.debugfs_phy, sc,
15 &fops_eeprom);
16
17 + debugfs_create_u32("chanbw", S_IRUSR | S_IWUSR, sc->debug.debugfs_phy,
18 + &sc->chan_bw);
19 +
20 sc->debug.regidx = 0;
21 return 0;
22 }
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;
29 + u32 oldflags;
30 int r;
31
32 if (sc->sc_flags & SC_OP_INVALID)
33 @@ -268,6 +269,24 @@ static int ath_set_channel(struct ath_so
34 if (!stopped || !(sc->sc_flags & SC_OP_OFFCHANNEL))
35 fastcc = false;
36
37 + oldflags = hchan->channelFlags;
38 + switch (sc->chan_bw) {
39 + case 5:
40 + hchan->channelFlags &= ~CHANNEL_HALF;
41 + hchan->channelFlags |= CHANNEL_QUARTER;
42 + break;
43 + case 10:
44 + hchan->channelFlags &= ~CHANNEL_QUARTER;
45 + hchan->channelFlags |= CHANNEL_HALF;
46 + break;
47 + default:
48 + hchan->channelFlags &= ~(CHANNEL_HALF | CHANNEL_QUARTER);
49 + break;
50 + }
51 +
52 + if (oldflags != hchan->channelFlags)
53 + fastcc = false;
54 +
55 if (!(sc->sc_flags & SC_OP_OFFCHANNEL))
56 caldata = &sc->caldata;
57
This page took 0.055424 seconds and 5 git commands to generate.