{
might_sleep();
+ WARN_ON_ONCE(changed & (BSS_CHANGED_BEACON |
+ BSS_CHANGED_BEACON_ENABLED) &&
+ sdata->vif.type != NL80211_IFTYPE_AP &&
+ sdata->vif.type != NL80211_IFTYPE_ADHOC &&
+ sdata->vif.type != NL80211_IFTYPE_MESH_POINT);
+
check_sdata_in_driver(sdata);
trace_drv_bss_info_changed(local, sdata, info, changed);
return;
}
- switch (sdata->vif.type) {
- case NL80211_IFTYPE_AP:
- case NL80211_IFTYPE_ADHOC:
- case NL80211_IFTYPE_WDS:
- case NL80211_IFTYPE_MESH_POINT:
- break;
- default:
- /* do not warn to simplify caller in scan.c */
- changed &= ~BSS_CHANGED_BEACON_ENABLED;
- if (WARN_ON(changed & BSS_CHANGED_BEACON))
- return;
- break;
- }
-
drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed);
}
/* remove all interfaces */
list_for_each_entry(sdata, &local->interfaces, list) {
- u32 changed = BSS_CHANGED_BEACON_ENABLED;
+ u32 changed = 0;
if (!ieee80211_sdata_running(sdata))
continue;
changed = BSS_CHANGED_ASSOC |
BSS_CHANGED_BSSID |
BSS_CHANGED_IDLE;
- else
- changed = 0;
- /* fall through */
+ break;
+ case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_ADHOC:
+ case NL80211_IFTYPE_MESH_POINT:
+ if (sdata->vif.bss_conf.enable_beacon)
+ changed = BSS_CHANGED_BEACON_ENABLED;
+ break;
default:
- ieee80211_quiesce(sdata);
break;
}
+ ieee80211_quiesce(sdata);
+
sdata->suspend_bss_conf = sdata->vif.bss_conf;
memset(&sdata->vif.bss_conf, 0, sizeof(sdata->vif.bss_conf));
sdata->vif.bss_conf.idle = true;