aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/mac80211.h1
-rw-r--r--net/mac80211/ht.c3
-rw-r--r--net/mac80211/main.c10
-rw-r--r--net/mac80211/mlme.c1
4 files changed, 1 insertions, 14 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 1e8db8ae615..9d67fdf1c26 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -508,7 +508,6 @@ static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
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
510struct ieee80211_ht_conf { 510struct ieee80211_ht_conf {
511 bool enabled;
512 enum nl80211_channel_type channel_type; 511 enum nl80211_channel_type channel_type;
513}; 512};
514 513
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index c5c0c527109..f6547de5ac6 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -130,11 +130,10 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
130 } 130 }
131 } 131 }
132 132
133 ht_changed = local->hw.conf.ht.enabled != 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.ht.channel_type;
135 135
136 local->oper_channel_type = channel_type; 136 local->oper_channel_type = channel_type;
137 local->hw.conf.ht.enabled = enable_ht;
138 137
139 if (ht_changed) 138 if (ht_changed)
140 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT); 139 ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_HT);
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 24b14363d6e..a6cb480dda0 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -211,16 +211,6 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
211 channel_type != local->hw.conf.ht.channel_type) { 211 channel_type != local->hw.conf.ht.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.ht.channel_type = channel_type;
214 switch (channel_type) {
215 case NL80211_CHAN_NO_HT:
216 local->hw.conf.ht.enabled = false;
217 break;
218 case NL80211_CHAN_HT20:
219 case NL80211_CHAN_HT40MINUS:
220 case NL80211_CHAN_HT40PLUS:
221 local->hw.conf.ht.enabled = true;
222 break;
223 }
224 changed |= IEEE80211_CONF_CHANGE_CHANNEL; 214 changed |= IEEE80211_CONF_CHANGE_CHANNEL;
225 } 215 }
226 216
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 599a42172a1..12976026cc4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -901,7 +901,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
901 901
902 rcu_read_unlock(); 902 rcu_read_unlock();
903 903
904 local->hw.conf.ht.enabled = false;
905 local->oper_channel_type = NL80211_CHAN_NO_HT; 904 local->oper_channel_type = NL80211_CHAN_NO_HT;
906 config_changed |= IEEE80211_CONF_CHANGE_HT; 905 config_changed |= IEEE80211_CONF_CHANGE_HT;
907 906