diff options
author | Jérôme Pouiller <jerome.pouiller@silabs.com> | 2020-01-15 13:54:38 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-01-16 20:59:48 +0100 |
commit | 963aff5728a0295fe90146289c2a9251024575a4 (patch) | |
tree | b784336c28b4cb81d821a4889c2d11fa9fbc8cf1 | |
parent | ba366b9268263f7f86cf8e53e00bda84e238d29b (diff) |
staging: wfx: drop wvif->setbssparams_done
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>
-rw-r--r-- | drivers/staging/wfx/sta.c | 8 | ||||
-rw-r--r-- | drivers/staging/wfx/wfx.h | 1 |
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c index 021daa9f7a33..7abe272ddc0d 100644 --- a/drivers/staging/wfx/sta.c +++ b/drivers/staging/wfx/sta.c @@ -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); diff --git a/drivers/staging/wfx/wfx.h b/drivers/staging/wfx/wfx.h index 1b487d96eca2..5e1a763eb4b5 100644 --- a/drivers/staging/wfx/wfx.h +++ b/drivers/staging/wfx/wfx.h @@ -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; |