diff mbox series

wcn36xx: Send NULL data packet when exiting BMPS

Message ID 20201120021403.2646574-2-bryan.odonoghue@linaro.org
State New
Headers show
Series wcn36xx: Send NULL data packet when exiting BMPS | expand

Commit Message

Bryan O'Donoghue Nov. 20, 2020, 2:14 a.m. UTC
This commit updates the BMPS exit path to be consistent with downstream in
terms of exiting BMPS mode. Downstream sets the flag to send a NULL data
frame to the host on exiting BMPS.

This will tell the AP to send any queued frames to the STA immediately.
Verified the relevant bit toggle in wireshark.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

---
 drivers/net/wireless/ath/wcn36xx/smd.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.28.0


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx

Comments

Loic Poulain Nov. 20, 2020, 8:15 a.m. UTC | #1
On Fri, 20 Nov 2020 at 03:13, Bryan O'Donoghue
<bryan.odonoghue@linaro.org> wrote:
>

> This commit updates the BMPS exit path to be consistent with downstream in

> terms of exiting BMPS mode. Downstream sets the flag to send a NULL data

> frame to the host on exiting BMPS.

>

> This will tell the AP to send any queued frames to the STA immediately.

> Verified the relevant bit toggle in wireshark.

>

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

> ---

>  drivers/net/wireless/ath/wcn36xx/smd.c | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c

> index 8ff1eda8f942..acf533fae46a 100644

> --- a/drivers/net/wireless/ath/wcn36xx/smd.c

> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c

> @@ -2176,6 +2176,7 @@ int wcn36xx_smd_exit_bmps(struct wcn36xx *wcn, struct ieee80211_vif *vif)

>         INIT_HAL_MSG(msg_body, WCN36XX_HAL_EXIT_BMPS_REQ);

>

>         msg_body.bss_index = vif_priv->bss_index;

> +       msg_body.send_data_null = 1;


I'm quite sure I've seen null data packet wakeup (PS=0) when sniffing
wcn3620, but maybe it was submitted by mac80211, have you then checked
you do not end with double null packets with that patch (one from
firmware and one from mac layer)?


>

>         PREPARE_HAL_BUF(wcn->hal_buf, msg_body);

>

> --

> 2.28.0

>


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx
Bryan O'Donoghue Nov. 20, 2020, 11:58 a.m. UTC | #2
On 20/11/2020 08:15, Loic Poulain wrote:
> On Fri, 20 Nov 2020 at 03:13, Bryan O'Donoghue

> <bryan.odonoghue@linaro.org> wrote:

>>

>> This commit updates the BMPS exit path to be consistent with downstream in

>> terms of exiting BMPS mode. Downstream sets the flag to send a NULL data

>> frame to the host on exiting BMPS.

>>

>> This will tell the AP to send any queued frames to the STA immediately.

>> Verified the relevant bit toggle in wireshark.

>>

>> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

>> ---

>>   drivers/net/wireless/ath/wcn36xx/smd.c | 1 +

>>   1 file changed, 1 insertion(+)

>>

>> diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c

>> index 8ff1eda8f942..acf533fae46a 100644

>> --- a/drivers/net/wireless/ath/wcn36xx/smd.c

>> +++ b/drivers/net/wireless/ath/wcn36xx/smd.c

>> @@ -2176,6 +2176,7 @@ int wcn36xx_smd_exit_bmps(struct wcn36xx *wcn, struct ieee80211_vif *vif)

>>          INIT_HAL_MSG(msg_body, WCN36XX_HAL_EXIT_BMPS_REQ);

>>

>>          msg_body.bss_index = vif_priv->bss_index;

>> +       msg_body.send_data_null = 1;

> 

> I'm quite sure I've seen null data packet wakeup (PS=0) when sniffing

> wcn3620, but maybe it was submitted by mac80211, have you then checked

> you do not end with double null packets with that patch (one from

> firmware and one from mac layer)?


Just did.

Definitely not double nulling

_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx
Kalle Valo Dec. 2, 2020, 6:33 p.m. UTC | #3
Bryan O'Donoghue <bryan.odonoghue@linaro.org> wrote:

> This commit updates the BMPS exit path to be consistent with downstream in

> terms of exiting BMPS mode. Downstream sets the flag to send a NULL data

> frame to the host on exiting BMPS.

> 

> This will tell the AP to send any queued frames to the STA immediately.

> Verified the relevant bit toggle in wireshark.

> 

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


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

9bc3a55f4ae5 wcn36xx: Send NULL data packet when exiting BMPS

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201120021403.2646574-2-bryan.odonoghue@linaro.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Kalle Valo Dec. 2, 2020, 6:33 p.m. UTC | #4
Bryan O'Donoghue <bryan.odonoghue@linaro.org> wrote:

> This commit updates the BMPS exit path to be consistent with downstream in

> terms of exiting BMPS mode. Downstream sets the flag to send a NULL data

> frame to the host on exiting BMPS.

> 

> This will tell the AP to send any queued frames to the STA immediately.

> Verified the relevant bit toggle in wireshark.

> 

> Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>

> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>


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

9bc3a55f4ae5 wcn36xx: Send NULL data packet when exiting BMPS

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201120021403.2646574-2-bryan.odonoghue@linaro.org/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


_______________________________________________
wcn36xx mailing list
wcn36xx@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/wcn36xx
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c
index 8ff1eda8f942..acf533fae46a 100644
--- a/drivers/net/wireless/ath/wcn36xx/smd.c
+++ b/drivers/net/wireless/ath/wcn36xx/smd.c
@@ -2176,6 +2176,7 @@  int wcn36xx_smd_exit_bmps(struct wcn36xx *wcn, struct ieee80211_vif *vif)
 	INIT_HAL_MSG(msg_body, WCN36XX_HAL_EXIT_BMPS_REQ);
 
 	msg_body.bss_index = vif_priv->bss_index;
+	msg_body.send_data_null = 1;
 
 	PREPARE_HAL_BUF(wcn->hal_buf, msg_body);