From: dimitrysh@google.com
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net, franky.lin@broadcom.com
Subject: [PATCH] brcmfmac: Add timestamp to scan results report
Date: Wed, 21 Mar 2018 22:44:36 +0000 [thread overview]
Message-ID: <00000000000080af470567f3ef29@google.com> (raw)
From 01da9ee11ce6e0973972b2ffd37eef660714f71a Mon Sep 17 00:00:00 2001
From: Dmitry Shmidt <dimitrysh@google.com>
Date: Wed, 21 Mar 2018 15:35:45 -0700
Subject: [PATCH] brcmfmac: Add timestamp to scan results report
Monotonic time from boot is good timestamp indicator
and it can be used by kernel and userspace.
Change-Id: I122374fa79c6dbd7967b2c30553cb04dee032ebc
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 4157c90ad973..76d6ed553b7c 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -2845,6 +2845,8 @@ static s32 brcmf_inform_single_bss(struct
brcmf_cfg80211_info *cfg,
struct cfg80211_bss *bss;
struct ieee80211_supported_band *band;
struct brcmu_chan ch;
+ struct timespec ts;
+ u64 timestamp;
u16 channel;
u32 freq;
u16 notify_capability;
@@ -2885,10 +2887,12 @@ static s32 brcmf_inform_single_bss(struct
brcmf_cfg80211_info *cfg,
brcmf_dbg(CONN, "Beacon interval: %d\n", notify_interval);
brcmf_dbg(CONN, "Signal: %d\n", notify_signal);
+ get_monotonic_boottime(&ts);
+ timestamp = (u64)ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
bss = cfg80211_inform_bss(wiphy, notify_channel,
CFG80211_BSS_FTYPE_UNKNOWN,
(const u8 *)bi->BSSID,
- 0, notify_capability,
+ timestamp, notify_capability,
notify_interval, notify_ie,
notify_ielen, notify_signal,
GFP_KERNEL);
--
2.17.0.rc0.231.g781580f067-goog
next reply other threads:[~2018-03-21 22:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-21 22:44 dimitrysh [this message]
2018-03-22 10:44 ` [PATCH] brcmfmac: Add timestamp to scan results report Arend van Spriel
2018-03-22 11:48 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=00000000000080af470567f3ef29@google.com \
--to=dimitrysh@google.com \
--cc=franky.lin@broadcom.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).