From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v4 2/3] rrm: include actual scan start time in report
Date: Thu, 21 Nov 2019 10:29:04 -0800 [thread overview]
Message-ID: <20191121182905.20409-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20191121182905.20409-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
---
src/rrm.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/rrm.c b/src/rrm.c
index 2b0a22fb..ca30a7f7 100644
--- a/src/rrm.c
+++ b/src/rrm.c
@@ -109,6 +109,7 @@ struct rrm_beacon_req_info {
char ssid[33]; /* Request filtered by SSID */
bool has_ssid;
uint32_t scan_id;
+ uint64_t scan_start_time;
};
/* Per-netdev state */
@@ -249,8 +250,7 @@ static size_t build_report_for_bss(struct rrm_beacon_req_info *beacon,
*to++ = beacon->oper_class;
*to++ = scan_freq_to_channel(bss->frequency, NULL);
- /* skip start time */
- memset(to, 0, 8);
+ l_put_le64(beacon->scan_start_time, to);
to += 8;
l_put_le16(beacon->duration, to);
to += 2;
@@ -390,11 +390,18 @@ static bool rrm_scan_results(int err, struct l_queue *bss_list, void *userdata)
static void rrm_scan_triggered(int err, void *userdata)
{
struct rrm_state *rrm = userdata;
+ struct rrm_beacon_req_info *beacon = l_container_of(rrm->pending,
+ struct rrm_beacon_req_info,
+ info);
if (err < 0) {
l_error("Could not start RRM scan");
rrm_reject_measurement_request(rrm, REPORT_REJECT_INCAPABLE);
+ return;
}
+
+ beacon->scan_start_time = scan_get_triggered_time(rrm->wdev_id,
+ beacon->scan_id);
}
static void rrm_handle_beacon_scan(struct rrm_state *rrm,
--
2.17.1
next prev parent reply other threads:[~2019-11-21 18:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-21 18:29 [PATCH v4 1/3] scan: parse the scan start time James Prestwood
2019-11-21 18:29 ` James Prestwood [this message]
2019-11-21 18:29 ` [PATCH v4 3/3] rrm: add packed struct for beacon reports James Prestwood
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=20191121182905.20409-2-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.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