aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-12-14 08:06:28 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 07:01:35 -0500
commitd6a83228823fc0cc8d79d95c9f0bf568b7317862 (patch)
tree322f306f105337ae9e641eb11e16cc01efd83753 /net/mac80211/main.c
parent8a61af65c6d03781015315dbc43d0942a5b31db9 (diff)
mac80211: track enable_beacon explicitly
Instead of calculating in ieee80211_bss_info_change_notify() whether beaconing should be enabled or not, set it in the correct places in the callers. This simplifies the logic in this function at the expense of offchannel, but is also more robust. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/main.c')
-rw-r--r--net/mac80211/main.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 0c0d4cabd76c..71a64f49fe61 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -245,38 +245,6 @@ void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
245 break; 245 break;
246 } 246 }
247 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); 248 drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed);
281} 249}
282 250