summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJérôme Pouiller <jerome.pouiller@silabs.com>2020-04-10 15:32:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-13 14:42:42 +0200
commiteeab4787d95b05a338e2a7ce125dc660c5fb232f (patch)
tree07b0809fcbd899035500923beb9c7e09225c4050 /drivers
parenteb63e2fddb51370fcb2ba77ce5e9d49515acc295 (diff)
downloadlinux-eeab4787d95b05a338e2a7ce125dc660c5fb232f.tar.bz2
staging: wfx: fix support for BSS_CHANGED_KEEP_ALIVE
Chip firmware is able to send periodic null frames to keep the association with the AP. The driver arbitrary set this period to 30sec. We prefer to rely on BSS_CHANGED_KEEP_ALIVE that provide a true value. Note that if BSS_CHANGED_KEEP_ALIVE is not received, we just disable keep_alive feature. It is not very disturbing since AP will probably ping the station before to disconnect it. Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com> Link: https://lore.kernel.org/r/20200410133239.438347-9-Jerome.Pouiller@silabs.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/wfx/sta.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/staging/wfx/sta.c b/drivers/staging/wfx/sta.c
index 7693ce22f300..67e16c435848 100644
--- a/drivers/staging/wfx/sta.c
+++ b/drivers/staging/wfx/sta.c
@@ -646,7 +646,7 @@ static void wfx_join_finalize(struct wfx_vif *wvif,
if (!info->ibss_joined) {
wvif->state = WFX_STATE_STA;
- hif_keep_alive_period(wvif, 30 /* sec */);
+ hif_keep_alive_period(wvif, 0);
hif_set_bss_params(wvif, &wvif->bss_params);
hif_set_beacon_wakeup_period(wvif, info->dtim_period,
info->dtim_period);
@@ -728,6 +728,10 @@ void wfx_bss_info_changed(struct ieee80211_hw *hw,
__func__);
}
+ if (changed & BSS_CHANGED_KEEP_ALIVE)
+ hif_keep_alive_period(wvif, info->max_idle_period *
+ USEC_PER_TU / USEC_PER_MSEC);
+
if (changed & BSS_CHANGED_ASSOC ||
changed & BSS_CHANGED_ERP_CTS_PROT ||
changed & BSS_CHANGED_ERP_PREAMBLE) {