staging: wfx: retrieve the PS status from the vif
authorJérôme Pouiller <jerome.pouiller@silabs.com>
Tue, 26 May 2020 17:18:16 +0000 (19:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 May 2020 08:18:09 +0000 (10:18 +0200)
The Power Save status is stored for each virtual interface and for the
whole device. The WF200 is able to handle power saving per interface, so
use the value stored in vif.

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

index 6015cd2c4d8ae5b8b61c0f8d0c4ba2412678cc70..d0ab0b8dc404e3ccfc6df59f98748105f15def75 100644 (file)
@@ -203,7 +203,7 @@ void wfx_configure_filter(struct ieee80211_hw *hw, unsigned int changed_flags,
 static int wfx_update_pm(struct wfx_vif *wvif)
 {
        struct ieee80211_conf *conf = &wvif->wdev->hw->conf;
-       bool ps = conf->flags & IEEE80211_CONF_PS;
+       bool ps = wvif->vif->bss_conf.ps;
        int ps_timeout = conf->dynamic_ps_timeout;
        struct ieee80211_channel *chan0 = NULL, *chan1 = NULL;