From d6a83228823fc0cc8d79d95c9f0bf568b7317862 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 14 Dec 2012 14:06:28 +0100 Subject: 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 --- net/mac80211/main.c | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'net/mac80211/main.c') diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 0c0d4cabd76..71a64f49fe6 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, break; } - if (changed & BSS_CHANGED_BEACON_ENABLED) { - if (local->quiescing || !ieee80211_sdata_running(sdata) || - test_bit(SDATA_STATE_OFFCHANNEL, &sdata->state)) { - sdata->vif.bss_conf.enable_beacon = false; - } else { - /* - * Beacon should be enabled, but AP mode must - * check whether there is a beacon configured. - */ - switch (sdata->vif.type) { - case NL80211_IFTYPE_AP: - sdata->vif.bss_conf.enable_beacon = - !!sdata->u.ap.beacon; - break; - case NL80211_IFTYPE_ADHOC: - sdata->vif.bss_conf.enable_beacon = - !!sdata->u.ibss.presp; - break; -#ifdef CONFIG_MAC80211_MESH - case NL80211_IFTYPE_MESH_POINT: - sdata->vif.bss_conf.enable_beacon = - !!sdata->u.mesh.mesh_id_len; - break; -#endif - default: - /* not reached */ - WARN_ON(1); - break; - } - } - } - drv_bss_info_changed(local, sdata, &sdata->vif.bss_conf, changed); } -- cgit v1.2.3