aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intersil
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@gmail.com>2019-05-24 23:33:08 +0200
committerKalle Valo <kvalo@codeaurora.org>2019-05-28 15:27:06 +0300
commitc11c75ec784e8b6e29ce147cd53f6e98584743c2 (patch)
tree792d728cadee0ff532208cfe444d24f5682877ec /drivers/net/wireless/intersil
parentp54: fix crash during initialization (diff)
downloadlinux-dev-c11c75ec784e8b6e29ce147cd53f6e98584743c2.tar.xz
linux-dev-c11c75ec784e8b6e29ce147cd53f6e98584743c2.zip
p54: Support boottime in scan results
This patch fixes an issue with wpa_supplicant dropping all scan results because their where considered to be "too old" (e.g.: "skip - scan result not recent enough (121056.086325 seconds too old)") which is very weird because this looks like that the scan results have been received before a scan started. This is due to the inaccuracy of the default timing mechanism for calculating the BSS entry age. Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/intersil')
-rw-r--r--drivers/net/wireless/intersil/p54/txrx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/intersil/p54/txrx.c b/drivers/net/wireless/intersil/p54/txrx.c
index 5bf1c19ecced..f80c5056ccb7 100644
--- a/drivers/net/wireless/intersil/p54/txrx.c
+++ b/drivers/net/wireless/intersil/p54/txrx.c
@@ -334,6 +334,7 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
u16 freq = le16_to_cpu(hdr->freq);
size_t header_len = sizeof(*hdr);
u32 tsf32;
+ __le16 fc;
u8 rate = hdr->rate & 0xf;
/*
@@ -382,6 +383,11 @@ static int p54_rx_data(struct p54_common *priv, struct sk_buff *skb)
skb_pull(skb, header_len);
skb_trim(skb, le16_to_cpu(hdr->len));
+
+ fc = ((struct ieee80211_hdr *)skb->data)->frame_control;
+ if (ieee80211_is_probe_resp(fc) || ieee80211_is_beacon(fc))
+ rx_status->boottime_ns = ktime_get_boot_ns();
+
if (unlikely(priv->hw->conf.flags & IEEE80211_CONF_PS))
p54_pspoll_workaround(priv, skb);