Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] wcn36xx: Fix missing frame timestamp for beacon/probe-resp
@ 2021-08-26 15:46 Loic Poulain
2021-08-29 7:11 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2021-08-26 15:46 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless, netdev, Loic Poulain
When receiving a beacon or probe response, we should update the
boottime_ns field which is the timestamp the frame was received at.
(cf mac80211.h)
This fixes a scanning issue with Android since it relies on this
timestamp to determine when the AP has been seen for the last time
(via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
drivers/net/wireless/ath/wcn36xx/txrx.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wireless/ath/wcn36xx/txrx.c b/drivers/net/wireless/ath/wcn36xx/txrx.c
index 1b83115..cab196b 100644
--- a/drivers/net/wireless/ath/wcn36xx/txrx.c
+++ b/drivers/net/wireless/ath/wcn36xx/txrx.c
@@ -287,6 +287,10 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
status.rate_idx = 0;
}
+ if (ieee80211_is_beacon(hdr->frame_control) ||
+ ieee80211_is_probe_resp(hdr->frame_control))
+ status.boottime_ns = ktime_get_boottime_ns();
+
memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
if (ieee80211_is_beacon(hdr->frame_control)) {
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] wcn36xx: Fix missing frame timestamp for beacon/probe-resp
2021-08-26 15:46 [PATCH] wcn36xx: Fix missing frame timestamp for beacon/probe-resp Loic Poulain
@ 2021-08-29 7:11 ` Kalle Valo
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2021-08-29 7:11 UTC (permalink / raw)
To: Loic Poulain; +Cc: linux-wireless, netdev, Loic Poulain
Loic Poulain <loic.poulain@linaro.org> wrote:
> When receiving a beacon or probe response, we should update the
> boottime_ns field which is the timestamp the frame was received at.
> (cf mac80211.h)
>
> This fixes a scanning issue with Android since it relies on this
> timestamp to determine when the AP has been seen for the last time
> (via the nl80211 BSS_LAST_SEEN_BOOTTIME parameter).
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> Reviewed-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.
8678fd31f2d3 wcn36xx: Fix missing frame timestamp for beacon/probe-resp
--
https://patchwork.kernel.org/project/linux-wireless/patch/1629992768-23785-1-git-send-email-loic.poulain@linaro.org/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-29 7:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-26 15:46 [PATCH] wcn36xx: Fix missing frame timestamp for beacon/probe-resp Loic Poulain
2021-08-29 7:11 ` Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).