diff options
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r-- | net/mac80211/main.c | 70 |
1 files changed, 3 insertions, 67 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 1b087fff93e7..39cfe8f10ad2 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -207,76 +207,10 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | |||
207 | u32 changed) | 207 | u32 changed) |
208 | { | 208 | { |
209 | struct ieee80211_local *local = sdata->local; | 209 | struct ieee80211_local *local = sdata->local; |
210 | static const u8 zero[ETH_ALEN] = { 0 }; | ||
211 | 210 | ||
212 | if (!changed) | 211 | if (!changed) |
213 | return; | 212 | return; |
214 | 213 | ||
215 | if (sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
216 | sdata->vif.bss_conf.bssid = sdata->u.mgd.bssid; | ||
217 | } else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) | ||
218 | sdata->vif.bss_conf.bssid = sdata->u.ibss.bssid; | ||
219 | else if (sdata->vif.type == NL80211_IFTYPE_AP) | ||
220 | sdata->vif.bss_conf.bssid = sdata->vif.addr; | ||
221 | else if (sdata->vif.type == NL80211_IFTYPE_WDS) | ||
222 | sdata->vif.bss_conf.bssid = NULL; | ||
223 | else if (ieee80211_vif_is_mesh(&sdata->vif)) { | ||
224 | sdata->vif.bss_conf.bssid = zero; | ||
225 | } else if (sdata->vif.type == NL80211_IFTYPE_P2P_DEVICE) { | ||
226 | sdata->vif.bss_conf.bssid = sdata->vif.addr; | ||
227 | WARN_ONCE(changed & ~(BSS_CHANGED_IDLE), | ||
228 | "P2P Device BSS changed %#x", changed); | ||
229 | } else { | ||
230 | WARN_ON(1); | ||
231 | return; | ||
232 | } | ||
233 | |||
234 | switch (sdata->vif.type) { | ||
235 | case NL80211_IFTYPE_AP: | ||
236 | case NL80211_IFTYPE_ADHOC: | ||
237 | case NL80211_IFTYPE_WDS: | ||
238 | case NL80211_IFTYPE_MESH_POINT: | ||
239 | break; | ||
240 | default: | ||
241 | /* do not warn to simplify caller in scan.c */ | ||
242 | changed &= ~BSS_CHANGED_BEACON_ENABLED; | ||
243 | if (WARN_ON(changed & BSS_CHANGED_BEACON)) | ||
244 | return; | ||
245 | break; | ||
246 | } | ||
247 | |||
248 | if (changed & BSS_CHANGED_BEACON_ENABLED) { | ||
249 | if (local->quiescing || !ieee80211_sdata_running(sdata) || | ||
250 | test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) { | ||
251 | sdata->vif.bss_conf.enable_beacon = false; | ||
252 | } else { | ||
253 | /* | ||
254 | * Beacon should be enabled, but AP mode must | ||
255 | * check whether there is a beacon configured. | ||
256 | */ | ||
257 | switch (sdata->vif.type) { | ||
258 | case NL80211_IFTYPE_AP: | ||
259 | sdata->vif.bss_conf.enable_beacon = | ||
260 | !!sdata->u.ap.beacon; | ||
261 | break; | ||
262 | case NL80211_IFTYPE_ADHOC: | ||
263 | sdata->vif.bss_conf.enable_beacon = | ||
264 | !!sdata->u.ibss.presp; | ||
265 | break; | ||
266 | #ifdef CONFIG_MAC80211_MESH | ||
267 | case NL80211_IFTYPE_MESH_POINT: | ||
268 | sdata->vif.bss_conf.enable_beacon = | ||
269 | !!sdata->u.mesh.mesh_id_len; | ||
270 | break; | ||
271 | #endif | ||
272 | default: | ||
273 | /* not reached */ | ||
274 | WARN_ON(1); | ||
275 | break; | ||
276 | } | ||
277 | } | ||
278 | } | ||
279 | |||
280 | drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed); | 214 | drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed); |
281 | } | 215 | } |
282 | 216 | ||
@@ -537,6 +471,7 @@ static const struct ieee80211_ht_cap mac80211_ht_capa_mod_mask = { | |||
537 | 471 | ||
538 | .cap_info = cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40 | | 472 | .cap_info = cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40 | |
539 | IEEE80211_HT_CAP_MAX_AMSDU | | 473 | IEEE80211_HT_CAP_MAX_AMSDU | |
474 | IEEE80211_HT_CAP_SGI_20 | | ||
540 | IEEE80211_HT_CAP_SGI_40), | 475 | IEEE80211_HT_CAP_SGI_40), |
541 | .mcs = { | 476 | .mcs = { |
542 | .rx_mask = { 0xff, 0xff, 0xff, 0xff, 0xff, | 477 | .rx_mask = { 0xff, 0xff, 0xff, 0xff, 0xff, |
@@ -606,7 +541,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len, | |||
606 | wiphy->features |= NL80211_FEATURE_SK_TX_STATUS | | 541 | wiphy->features |= NL80211_FEATURE_SK_TX_STATUS | |
607 | NL80211_FEATURE_SAE | | 542 | NL80211_FEATURE_SAE | |
608 | NL80211_FEATURE_HT_IBSS | | 543 | NL80211_FEATURE_HT_IBSS | |
609 | NL80211_FEATURE_VIF_TXPOWER; | 544 | NL80211_FEATURE_VIF_TXPOWER | |
545 | NL80211_FEATURE_FULL_AP_CLIENT_STATE; | ||
610 | 546 | ||
611 | if (!ops->hw_scan) | 547 | if (!ops->hw_scan) |
612 | wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN | | 548 | wiphy->features |= NL80211_FEATURE_LOW_PRIORITY_SCAN | |