OSDN Git Service

staging: wfx: drop wvif->setbssparams_done
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Wed, 15 Jan 2020 13:54:38 +0000 (13:54 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jan 2020 19:59:48 +0000 (20:59 +0100)
setbssparams_done was here to ensure that the firmware does not enable
powersave before to get the first beacon. However, mac80211 already
ensures it gets a beacon before to associate to the BSS. And even, if
it won't, the firmware wake up at least on every DTIM, which is
sufficient to finalize the association.

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

index 021daa9..7abe272 100644 (file)
@@ -326,8 +326,7 @@ int wfx_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
        hif_set_edca_queue_params(wvif, queue, params);
        if (wvif->vif->type == NL80211_IFTYPE_STATION) {
                hif_set_uapsd_info(wvif, wvif->uapsd_mask);
-               if (wvif->setbssparams_done && wvif->state == WFX_STATE_STA)
-                       ret = wfx_update_pm(wvif);
+               wfx_update_pm(wvif);
        }
        mutex_unlock(&wdev->conf_mutex);
        return ret;
@@ -475,7 +474,6 @@ static void wfx_do_unjoin(struct wfx_vif *wvif)
        wvif->disable_beacon_filter = false;
        wfx_update_filtering(wvif);
        memset(&wvif->bss_params, 0, sizeof(wvif->bss_params));
-       wvif->setbssparams_done = false;
 
 done:
        mutex_unlock(&wvif->wdev->conf_mutex);
@@ -799,7 +797,6 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
        if (!info->ibss_joined) {
                hif_keep_alive_period(wvif, 30 /* sec */);
                hif_set_bss_params(wvif, &wvif->bss_params);
-               wvif->setbssparams_done = true;
                hif_set_beacon_wakeup_period(wvif, info->dtim_period,
                                             info->dtim_period);
                wfx_update_pm(wvif);
@@ -1224,7 +1221,8 @@ int wfx_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
        INIT_WORK(&wvif->mcast_stop_work, wfx_mcast_stop_work);
        timer_setup(&wvif->mcast_timeout, wfx_mcast_timeout, 0);
 
-       wvif->setbssparams_done = false;
+       memset(&wvif->bss_params, 0, sizeof(wvif->bss_params));
+
        mutex_init(&wvif->bss_loss_lock);
        INIT_DELAYED_WORK(&wvif->bss_loss_work, wfx_bss_loss_work);
 
index 1b487d9..5e1a763 100644 (file)
@@ -105,7 +105,6 @@ struct wfx_vif {
        struct work_struct      update_filtering_work;
 
        u32                     erp_info;
-       bool                    setbssparams_done;
        unsigned long           uapsd_mask;
        struct ieee80211_tx_queue_params edca_params[IEEE80211_NUM_ACS];
        struct hif_req_set_bss_params bss_params;