diff mbox series

[2/2] wcn36xx: Advertise beacon filtering support in bmps

Message ID 1592471863-31402-2-git-send-email-loic.poulain@linaro.org (mailing list archive)
State Accepted
Commit fd5ad4d1e9808c96245433d92a6fbc6256cc5e42
Delegated to: Kalle Valo
Headers show
Series [1/2] mac80211: Do not report beacon loss if beacon filtering enabled | expand

Commit Message

Loic Poulain June 18, 2020, 9:17 a.m. UTC
In bmps mode, beacons are filtered, and firmware is in charge
of monitoring the beacons and report changes or loss.

mac80211 must be advertised about such change to prevent it's
internal timer based beacon monitor to report beacon loss.

Fix that by setting/clearing the IEEE80211_VIF_BEACON_FILTER
vif flag on bmps entry/exit.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
 drivers/net/wireless/ath/wcn36xx/pmc.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Kalle Valo Oct. 1, 2020, 7:34 p.m. UTC | #1
Loic Poulain <loic.poulain@linaro.org> wrote:

> In bmps mode, beacons are filtered, and firmware is in charge
> of monitoring the beacons and report changes or loss.
> 
> mac80211 must be advertised about such change to prevent it's
> internal timer based beacon monitor to report beacon loss.
> 
> Fix that by setting/clearing the IEEE80211_VIF_BEACON_FILTER
> vif flag on bmps entry/exit.
> 
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

Patch applied to ath-next branch of ath.git, thanks.

fd5ad4d1e980 wcn36xx: Advertise beacon filtering support in bmps
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/pmc.c b/drivers/net/wireless/ath/wcn36xx/pmc.c
index 1976b80..2936aaf 100644
--- a/drivers/net/wireless/ath/wcn36xx/pmc.c
+++ b/drivers/net/wireless/ath/wcn36xx/pmc.c
@@ -28,6 +28,7 @@  int wcn36xx_pmc_enter_bmps_state(struct wcn36xx *wcn,
 	if (!ret) {
 		wcn36xx_dbg(WCN36XX_DBG_PMC, "Entered BMPS\n");
 		vif_priv->pw_state = WCN36XX_BMPS;
+		vif->driver_flags |= IEEE80211_VIF_BEACON_FILTER;
 	} else {
 		/*
 		 * One of the reasons why HW will not enter BMPS is because
@@ -52,6 +53,7 @@  int wcn36xx_pmc_exit_bmps_state(struct wcn36xx *wcn,
 	}
 	wcn36xx_smd_exit_bmps(wcn, vif);
 	vif_priv->pw_state = WCN36XX_FULL_POWER;
+	vif->driver_flags &= ~IEEE80211_VIF_BEACON_FILTER;
 	return 0;
 }