diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-01-07 04:13:27 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:55 -0500 |
commit | 4797938c5dfa22af30fd16679192972f878419a1 (patch) | |
tree | 5e9de4801903f0e8fd5aac75c26295ed0069667a /net | |
parent | 47166791b7296db5c0a7189401e42b8c7f4cca25 (diff) |
mac80211: clean up channel type config
The channel_type really doesn't need to be the only member in
a new structure, so remove the struct. Additionally, remove
the _CONF_CHANGE_HT flag and use _CONF_CHANGE_CHANNEL when the
channel type changes, since that's enough of a change to require
reprogramming the hardware anyway.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/ht.c | 8 | ||||
-rw-r--r-- | net/mac80211/main.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 |
3 files changed, 8 insertions, 6 deletions
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); |