]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
RRM: Document Link Measurement Report frame construction steps
authorJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 16:17:59 +0000 (18:17 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 7 Jan 2017 16:17:59 +0000 (18:17 +0200)
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 <j@w1.fi>
wpa_supplicant/rrm.c

index af2759e16955c7c329412bb95ad3950c88390bbe..0786e0470ff6241706dddf7ab56806613eaeb7af 100644 (file)
@@ -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 */