OSDN Git Service

staging: wfx: drop wvif->enable_beacon
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 15 Jan 2020 13:54:35 +0000 (13:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 19:59:48 +0000 (20:59 +0100)
It seems that current code try to save calls to hif_beacon_transmit() by
keeping a copy of the previous value of bss_conf->enable_beacon.
However, hif_beacon_transmit() does not cost so much and mac80211
already take care to not send useless events.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200115135338.14374-24-Jerome.Pouiller@silabs.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/sta.c
drivers/staging/wfx/wfx.h

index 3764514..dede632 100644 (file)
@@ -843,12 +843,8 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
        }
 
        if (changed & BSS_CHANGED_BEACON_ENABLED &&
-           wvif->state != WFX_STATE_IBSS) {
-               if (wvif->enable_beacon != info->enable_beacon) {
-                       hif_beacon_transmit(wvif, info->enable_beacon);
-                       wvif->enable_beacon = info->enable_beacon;
-               }
-       }
+           wvif->state != WFX_STATE_IBSS)
+               hif_beacon_transmit(wvif, info->enable_beacon);
 
        if (changed & BSS_CHANGED_BEACON_INFO)
                hif_set_beacon_wakeup_period(wvif, info->dtim_period,
@@ -1299,7 +1295,6 @@ void wfx_remove_interface(struct ieee80211_hw *hw,
                }
                memset(wvif->link_id_db, 0, sizeof(wvif->link_id_db));
                wvif->sta_asleep_mask = 0;
-               wvif->enable_beacon = false;
                wvif->mcast_tx = false;
                wvif->aid0_bit_set = false;
                wvif->mcast_buffered = false;
index bd4b55e..84cb3a8 100644 (file)
@@ -99,7 +99,6 @@ struct wfx_vif {
        struct work_struct      set_tim_work;
 
        int                     beacon_int;
-       bool                    enable_beacon;
        bool                    filter_bssid;
        bool                    fwd_probe_req;
        bool                    disable_beacon_filter;