aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index c5445bae9d6c..a1f2332a6fed 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -95,16 +95,14 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
95 struct ieee80211_local *local = sdata->local; 95 struct ieee80211_local *local = sdata->local;
96 struct ieee80211_supported_band *sband; 96 struct ieee80211_supported_band *sband;
97 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 97 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
98 struct ieee80211_bss_ht_conf ht;
99 struct sta_info *sta; 98 struct sta_info *sta;
100 u32 changed = 0; 99 u32 changed = 0;
100 u16 ht_opmode;
101 bool enable_ht = true, ht_changed; 101 bool enable_ht = true, ht_changed;
102 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT; 102 enum nl80211_channel_type channel_type = NL80211_CHAN_NO_HT;
103 103
104 sband = local->hw.wiphy->bands[local->hw.conf.channel->band]; 104 sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
105 105
106 memset(&ht, 0, sizeof(ht));
107
108 /* HT is not supported */ 106 /* HT is not supported */
109 if (!sband->ht_cap.ht_supported) 107 if (!sband->ht_cap.ht_supported)
110 enable_ht = false; 108 enable_ht = false;
@@ -148,19 +146,18 @@ static u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
148 IEEE80211_RC_HT_CHANGED); 146 IEEE80211_RC_HT_CHANGED);
149 147
150 rcu_read_unlock(); 148 rcu_read_unlock();
151
152 } 149 }
153 150
154 /* disable HT */ 151 /* disable HT */
155 if (!enable_ht) 152 if (!enable_ht)
156 return 0; 153 return 0;
157 154
158 ht.operation_mode = le16_to_cpu(hti->operation_mode); 155 ht_opmode = le16_to_cpu(hti->operation_mode);
159 156
160 /* if bss configuration changed store the new one */ 157 /* if bss configuration changed store the new one */
161 if (memcmp(&sdata->vif.bss_conf.ht, &ht, sizeof(ht))) { 158 if (sdata->vif.bss_conf.ht_operation_mode != ht_opmode) {
162 changed |= BSS_CHANGED_HT; 159 changed |= BSS_CHANGED_HT;
163 sdata->vif.bss_conf.ht = ht; 160 sdata->vif.bss_conf.ht_operation_mode = ht_opmode;
164 } 161 }
165 162
166 return changed; 163 return changed;