diff options
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 5 | ||||
-rw-r--r-- | include/net/mac80211.h | 20 | ||||
-rw-r--r-- | net/mac80211/ht.c | 8 | ||||
-rw-r--r-- | net/mac80211/main.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 |
5 files changed, 17 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 8929b02aa22d..5e9a3e19da40 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -2117,8 +2117,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
2117 | struct ieee80211_conf *conf = &hw->conf; | 2117 | struct ieee80211_conf *conf = &hw->conf; |
2118 | 2118 | ||
2119 | mutex_lock(&sc->mutex); | 2119 | mutex_lock(&sc->mutex); |
2120 | if (changed & (IEEE80211_CONF_CHANGE_CHANNEL | | 2120 | if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { |
2121 | IEEE80211_CONF_CHANGE_HT)) { | ||
2122 | struct ieee80211_channel *curchan = hw->conf.channel; | 2121 | struct ieee80211_channel *curchan = hw->conf.channel; |
2123 | int pos; | 2122 | int pos; |
2124 | 2123 | ||
@@ -2144,7 +2143,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) | |||
2144 | 2143 | ||
2145 | sc->sc_ah->ah_channels[pos].chanmode = | 2144 | sc->sc_ah->ah_channels[pos].chanmode = |
2146 | ath_get_extchanmode(sc, curchan, | 2145 | ath_get_extchanmode(sc, curchan, |
2147 | conf->ht.channel_type); | 2146 | conf->channel_type); |
2148 | } | 2147 | } |
2149 | 2148 | ||
2150 | ath_update_chainmask(sc, conf_is_ht(conf)); | 2149 | ath_update_chainmask(sc, conf_is_ht(conf)); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 0ffe932942fd..76537f103872 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -507,10 +507,6 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void) | |||
507 | } | 507 | } |
508 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) | 508 | #define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME()) |
509 | 509 | ||
510 | struct ieee80211_ht_conf { | ||
511 | enum nl80211_channel_type channel_type; | ||
512 | }; | ||
513 | |||
514 | /** | 510 | /** |
515 | * enum ieee80211_conf_changed - denotes which configuration changed | 511 | * enum ieee80211_conf_changed - denotes which configuration changed |
516 | * | 512 | * |
@@ -520,9 +516,8 @@ struct ieee80211_ht_conf { | |||
520 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed | 516 | * @IEEE80211_CONF_CHANGE_RADIOTAP: the radiotap flag changed |
521 | * @IEEE80211_CONF_CHANGE_PS: the PS flag changed | 517 | * @IEEE80211_CONF_CHANGE_PS: the PS flag changed |
522 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed | 518 | * @IEEE80211_CONF_CHANGE_POWER: the TX power changed |
523 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel changed | 519 | * @IEEE80211_CONF_CHANGE_CHANNEL: the channel/channel_type changed |
524 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed | 520 | * @IEEE80211_CONF_CHANGE_RETRY_LIMITS: retry limits changed |
525 | * @IEEE80211_CONF_CHANGE_HT: HT configuration changed | ||
526 | */ | 521 | */ |
527 | enum ieee80211_conf_changed { | 522 | enum ieee80211_conf_changed { |
528 | IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), | 523 | IEEE80211_CONF_CHANGE_RADIO_ENABLED = BIT(0), |
@@ -533,7 +528,6 @@ enum ieee80211_conf_changed { | |||
533 | IEEE80211_CONF_CHANGE_POWER = BIT(5), | 528 | IEEE80211_CONF_CHANGE_POWER = BIT(5), |
534 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), | 529 | IEEE80211_CONF_CHANGE_CHANNEL = BIT(6), |
535 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), | 530 | IEEE80211_CONF_CHANGE_RETRY_LIMITS = BIT(7), |
536 | IEEE80211_CONF_CHANGE_HT = BIT(8), | ||
537 | }; | 531 | }; |
538 | 532 | ||
539 | /** | 533 | /** |
@@ -547,7 +541,7 @@ enum ieee80211_conf_changed { | |||
547 | * @flags: configuration flags defined above | 541 | * @flags: configuration flags defined above |
548 | * @power_level: requested transmit power (in dBm) | 542 | * @power_level: requested transmit power (in dBm) |
549 | * @channel: the channel to tune to | 543 | * @channel: the channel to tune to |
550 | * @ht: the HT configuration for the device | 544 | * @channel_type: the channel (HT) type |
551 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame | 545 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame |
552 | * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, | 546 | * (a frame not RTS protected), called "dot11LongRetryLimit" in 802.11, |
553 | * but actually means the number of transmissions not the number of retries | 547 | * but actually means the number of transmissions not the number of retries |
@@ -566,7 +560,7 @@ struct ieee80211_conf { | |||
566 | u8 long_frame_max_tx_count, short_frame_max_tx_count; | 560 | u8 long_frame_max_tx_count, short_frame_max_tx_count; |
567 | 561 | ||
568 | struct ieee80211_channel *channel; | 562 | struct ieee80211_channel *channel; |
569 | struct ieee80211_ht_conf ht; | 563 | enum nl80211_channel_type channel_type; |
570 | }; | 564 | }; |
571 | 565 | ||
572 | /** | 566 | /** |
@@ -1960,19 +1954,19 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops); | |||
1960 | static inline bool | 1954 | static inline bool |
1961 | conf_is_ht20(struct ieee80211_conf *conf) | 1955 | conf_is_ht20(struct ieee80211_conf *conf) |
1962 | { | 1956 | { |
1963 | return conf->ht.channel_type == NL80211_CHAN_HT20; | 1957 | return conf->channel_type == NL80211_CHAN_HT20; |
1964 | } | 1958 | } |
1965 | 1959 | ||
1966 | static inline bool | 1960 | static inline bool |
1967 | conf_is_ht40_minus(struct ieee80211_conf *conf) | 1961 | conf_is_ht40_minus(struct ieee80211_conf *conf) |
1968 | { | 1962 | { |
1969 | return conf->ht.channel_type == NL80211_CHAN_HT40MINUS; | 1963 | return conf->channel_type == NL80211_CHAN_HT40MINUS; |
1970 | } | 1964 | } |
1971 | 1965 | ||
1972 | static inline bool | 1966 | static inline bool |
1973 | conf_is_ht40_plus(struct ieee80211_conf *conf) | 1967 | conf_is_ht40_plus(struct ieee80211_conf *conf) |
1974 | { | 1968 | { |
1975 | return conf->ht.channel_type == NL80211_CHAN_HT40PLUS; | 1969 | return conf->channel_type == NL80211_CHAN_HT40PLUS; |
1976 | } | 1970 | } |
1977 | 1971 | ||
1978 | static inline bool | 1972 | static inline bool |
@@ -1984,7 +1978,7 @@ conf_is_ht40(struct ieee80211_conf *conf) | |||
1984 | static inline bool | 1978 | static inline bool |
1985 | conf_is_ht(struct ieee80211_conf *conf) | 1979 | conf_is_ht(struct ieee80211_conf *conf) |
1986 | { | 1980 | { |
1987 | return conf->ht.channel_type != NL80211_CHAN_NO_HT; | 1981 | return conf->channel_type != NL80211_CHAN_NO_HT; |
1988 | } | 1982 | } |
1989 | 1983 | ||
1990 | #endif /* MAC80211_H */ | 1984 | #endif /* MAC80211_H */ |
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index f6547de5ac6b..832adf888ac3 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c | |||
@@ -131,12 +131,14 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, | |||
131 | } | 131 | } |
132 | 132 | ||
133 | ht_changed = conf_is_ht(&local->hw.conf) != enable_ht || | 133 | ht_changed = conf_is_ht(&local->hw.conf) != enable_ht || |
134 | channel_type != local->hw.conf.ht.channel_type; | 134 | channel_type != local->hw.conf.channel_type; |
135 | 135 | ||
136 | local->oper_channel_type = channel_type; | 136 | local->oper_channel_type = channel_type; |
137 | 137 | ||
138 | if (ht_changed) | 138 | if (ht_changed) { |
139 | ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT); | 139 | /* channel_type change automatically detected */ |
140 | ieee80211_hw_config(local, 0); | ||
141 | } | ||
140 | 142 | ||
141 | /* disable HT */ | 143 | /* disable HT */ |
142 | if (!enable_ht) | 144 | if (!enable_ht) |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index b55b9970dc97..e9f3e85d1a9e 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -208,9 +208,9 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) | |||
208 | } | 208 | } |
209 | 209 | ||
210 | if (chan != local->hw.conf.channel || | 210 | if (chan != local->hw.conf.channel || |
211 | channel_type != local->hw.conf.ht.channel_type) { | 211 | channel_type != local->hw.conf.channel_type) { |
212 | local->hw.conf.channel = chan; | 212 | local->hw.conf.channel = chan; |
213 | local->hw.conf.ht.channel_type = channel_type; | 213 | local->hw.conf.channel_type = channel_type; |
214 | changed |= IEEE80211_CONF_CHANGE_CHANNEL; | 214 | changed |= IEEE80211_CONF_CHANGE_CHANNEL; |
215 | } | 215 | } |
216 | 216 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index aafa112ae09c..6a90171c859f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -901,8 +901,8 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata, | |||
901 | 901 | ||
902 | rcu_read_unlock(); | 902 | rcu_read_unlock(); |
903 | 903 | ||
904 | /* channel(_type) changes are handled by ieee80211_hw_config */ | ||
904 | local->oper_channel_type = NL80211_CHAN_NO_HT; | 905 | local->oper_channel_type = NL80211_CHAN_NO_HT; |
905 | config_changed |= IEEE80211_CONF_CHANGE_HT; | ||
906 | 906 | ||
907 | del_timer_sync(&local->dynamic_ps_timer); | 907 | del_timer_sync(&local->dynamic_ps_timer); |
908 | cancel_work_sync(&local->dynamic_ps_enable_work); | 908 | cancel_work_sync(&local->dynamic_ps_enable_work); |