From 33468e5320a4f9df500e8ec1e415cf6ba017ca18 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 7 Jan 2017 18:17:59 +0200 Subject: [PATCH] RRM: Document Link Measurement Report frame construction steps Add a comment to note which fields are expected to be updated by the driver. In addition, reorder subfield writing to match the order in which the fields are in the frame. Signed-off-by: Jouni Malinen --- wpa_supplicant/rrm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c index af2759e16..0786e0470 100644 --- a/wpa_supplicant/rrm.c +++ b/wpa_supplicant/rrm.c @@ -1284,10 +1284,14 @@ void wpas_rrm_handle_link_measurement_request(struct wpa_supplicant *wpa_s, } os_memset(&report, 0, sizeof(report)); + report.dialog_token = req->dialog_token; report.tpc.eid = WLAN_EID_TPC_REPORT; report.tpc.len = 2; + /* Note: The driver is expected to update report.tpc.tx_power and + * report.tpc.link_margin subfields when sending out this frame. + * Similarly, the driver would need to update report.rx_ant_id and + * report.tx_ant_id subfields. */ report.rsni = 255; /* 255 indicates that RSNI is not available */ - report.dialog_token = req->dialog_token; report.rcpi = rssi_to_rcpi(rssi); /* action_category + action_code */