aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-01-15 13:55:22 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-01-16 20:59:52 +0100
commitb5d4d98ec807a248e41ed7e8a3a649b8d88a745c (patch)
treec1b85482dceab45acef33cded389a65f9af518a7 /drivers/staging
parentstaging: wfx: sta and dtim (diff)
downloadlinux-dev-b5d4d98ec807a248e41ed7e8a3a649b8d88a745c.tar.xz
linux-dev-b5d4d98ec807a248e41ed7e8a3a649b8d88a745c.zip
staging: wfx: firmware never return PS status for stations
At the beginning, firmware could send suspend_resume indication to notify that a station wake up or sleep down. However, mac80211 already handles power save status of stations and this behavior has been removed from the firmware. So now, when suspend_resume indication is received, it is always to notify that a DTIM is about to be sent. So, it is possible to simply wfx_suspend_resume(). Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200115135338.14374-56-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/wfx/sta.c43
1 files changed, 17 insertions, 26 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 9f4c566517a1..7c9e93f52993 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -985,38 +985,29 @@ int wfx_ampdu_action(struct ieee80211_hw *hw,
return -ENOTSUPP;
}
-static void wfx_dtim_notify(struct wfx_vif *wvif)
-{
- spin_lock_bh(&wvif->ps_state_lock);
- wvif->sta_asleep_mask = 0;
- wfx_bh_request_tx(wvif->wdev);
- spin_unlock_bh(&wvif->ps_state_lock);
-}
-
void wfx_suspend_resume(struct wfx_vif *wvif,
const struct hif_ind_suspend_resume_tx *arg)
{
- if (arg->suspend_resume_flags.bc_mc_only) {
- bool cancel_tmo = false;
+ bool cancel_tmo = false;
- spin_lock_bh(&wvif->ps_state_lock);
- if (!arg->suspend_resume_flags.resume)
- wvif->mcast_tx = false;
- else
- wvif->mcast_tx = wvif->aid0_bit_set &&
- wvif->mcast_buffered;
- if (wvif->mcast_tx) {
- cancel_tmo = true;
- wfx_bh_request_tx(wvif->wdev);
- }
- spin_unlock_bh(&wvif->ps_state_lock);
- if (cancel_tmo)
- del_timer_sync(&wvif->mcast_timeout);
- } else if (arg->suspend_resume_flags.resume) {
- wfx_dtim_notify(wvif);
- } else {
+ if (!arg->suspend_resume_flags.bc_mc_only) {
dev_warn(wvif->wdev->dev, "unsupported suspend/resume notification\n");
+ return;
}
+
+ spin_lock_bh(&wvif->ps_state_lock);
+ if (!arg->suspend_resume_flags.resume)
+ wvif->mcast_tx = false;
+ else
+ wvif->mcast_tx = wvif->aid0_bit_set &&
+ wvif->mcast_buffered;
+ if (wvif->mcast_tx) {
+ cancel_tmo = true;
+ wfx_bh_request_tx(wvif->wdev);
+ }
+ spin_unlock_bh(&wvif->ps_state_lock);
+ if (cancel_tmo)
+ del_timer_sync(&wvif->mcast_timeout);
}
int wfx_add_chanctx(struct ieee80211_hw *hw,