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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2017-01-07 18:17:59 +02:00
parent 332a685a4b
commit 33468e5320

View file

@ -1284,10 +1284,14 @@ void wpas_rrm_handle_link_measurement_request(struct wpa_supplicant *wpa_s,
} }
os_memset(&report, 0, sizeof(report)); os_memset(&report, 0, sizeof(report));
report.dialog_token = req->dialog_token;
report.tpc.eid = WLAN_EID_TPC_REPORT; report.tpc.eid = WLAN_EID_TPC_REPORT;
report.tpc.len = 2; 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.rsni = 255; /* 255 indicates that RSNI is not available */
report.dialog_token = req->dialog_token;
report.rcpi = rssi_to_rcpi(rssi); report.rcpi = rssi_to_rcpi(rssi);
/* action_category + action_code */ /* action_category + action_code */