diff options
author | Swarn Singh <swarnkum@codeaurora.org> | 2021-06-21 22:09:48 +0530 |
---|---|---|
committer | Swarn Singh <swarnkum@codeaurora.org> | 2021-06-21 22:20:23 +0530 |
commit | 123e3581b33bf45f3c3c8ad36b492926eeed478c (patch) | |
tree | 8ca7622e95f3fddd1eee57f96edfdc3b3108e999 | |
parent | 0ded7ce9802174313bb53d475ff7d4842f352268 (diff) |
Add user configurable transport mode
This commit gives the user opportunity to select the transport mode
to get the csi data. The command to add the transport mode as below
Example: CSI start 900 1
Here 900 represents the CSI duration (in sec) to capture CSI data.
Below is the transport mode corresponding to user
input:
0 - QCA_WLAN_VENDOR_CFR_DATA_RELAY_FS
1 - QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS
Change-Id: Ifcbb00ba8c284f685b1c01b6f09f0552e5417e3d
CRs-Fixed: 2974322
-rw-r--r-- | qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c index 93bd1a1..b06b84d 100644 --- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -2056,7 +2056,7 @@ static int wpa_driver_send_get_scan_cmd(struct i802_bss *bss, static int wpa_driver_start_csi_capture(struct i802_bss *bss, char *cmd, char *buf, size_t buf_len, - int *status) + int *status, int transport_mode) { struct wpa_driver_nl80211_data *drv = bss->drv; struct nl_msg *nlmsg; @@ -2085,8 +2085,7 @@ static int wpa_driver_start_csi_capture(struct i802_bss *bss, char *cmd, } if (nla_put_u8(nlmsg, QCA_WLAN_VENDOR_ATTR_PEER_CFR_DATA_TRANSPORT_MODE, - QCA_WLAN_VENDOR_CFR_DATA_NETLINK_EVENTS)) { - //QCA_WLAN_VENDOR_CFR_DATA_RELAY_FS)) { + transport_mode)) { wpa_printf(MSG_ERROR, "Failed to set transport mode"); nlmsg_free(nlmsg); return WPA_DRIVER_OEM_STATUS_FAILURE; @@ -2227,6 +2226,7 @@ static int wpa_driver_handle_csi_cmd(struct i802_bss *bss, char *cmd, int *status) { int csi_duration = -1; + int transport_mode = -1; char *next_arg; cmd = skip_white_space(cmd); @@ -2256,7 +2256,16 @@ static int wpa_driver_handle_csi_cmd(struct i802_bss *bss, char *cmd, } g_csi_param.bss = bss; - wpa_driver_start_csi_capture(bss, cmd, buf, buf_len, status); + cmd += 6; + next_arg = get_next_arg(cmd); + if (*next_arg != '\0' && *next_arg == ' ') + transport_mode = atoi(next_arg); + + if (transport_mode == 1 || transport_mode == -1) + transport_mode = 1; + else if (transport_mode == 0) + transport_mode = 0; + wpa_driver_start_csi_capture(bss, cmd, buf, buf_len, status, transport_mode); if (*status == 0) { signal(SIGALRM, stop_csi_callback); alarm(csi_duration); |