qcacmn: Add WMI API for setting bandwidth fairness

This change implements the Non-TLV WMI API for setting bandwidth
fairness. This WMI command was implemented as part of the recent WIN SW
release. This change ensures it is adapted to convergence code structure.

Change-Id: Ib9984c43b91b105bfb4687a7591f4fab509febc4
CRs-Fixed: 1060577
This commit is contained in:
Sathish Kumar
2016-08-09 16:50:46 +05:30
committed by qcabuildsw
parent 42d7c684d4
commit 58f12555ab
2 changed files with 62 additions and 0 deletions

View File

@@ -3140,6 +3140,49 @@ send_pdev_get_tpc_config_cmd_non_tlv(wmi_unified_t wmi_handle,
WMI_PDEV_GET_TPC_CONFIG_CMDID);
}
/**
* send_set_bwf_cmd_non_tlv() - send set bwf command to fw
* @wmi_handle: wmi handle
* @param: pointer to set bwf param
*
* Return: 0 for success or error code
*/
QDF_STATUS
send_set_bwf_cmd_non_tlv(wmi_unified_t wmi_handle,
struct set_bwf_params *param)
{
struct wmi_bwf_peer_info *peer_info;
wmi_peer_bwf_request *cmd;
wmi_buf_t buf;
int len = sizeof(wmi_peer_bwf_request);
int i, retval = 0;
len += param->num_peers * sizeof(struct wmi_bwf_peer_info);
buf = wmi_buf_alloc(wmi_handle, len);
if (!buf) {
qdf_print("%s:wmi_buf_alloc failed\n", __func__);
return QDF_STATUS_E_FAILURE;
}
cmd = (wmi_peer_bwf_request *)wmi_buf_data(buf);
qdf_mem_copy((void *)&(cmd->num_peers),
(void *)&(param->num_peers),
sizeof(u_int32_t));
peer_info = (struct wmi_bwf_peer_info *)&(cmd->peer_info[0]);
for (i = 0; i < param->num_peers; i++) {
qdf_mem_copy((void *)&(peer_info[i]),
(void *)&(param->peer_info[i]),
sizeof(struct wmi_bwf_peer_info));
}
retval = wmi_unified_cmd_send(wmi_handle, buf, len,
WMI_PEER_BWF_REQUEST_CMDID);
if (retval)
wmi_buf_free(buf);
return retval;
}
/**
* send_set_atf_cmd_non_tlv() - send set atf command to fw
* @wmi_handle: wmi handle
@@ -7207,6 +7250,7 @@ struct wmi_ops non_tlv_ops = {
.send_scan_chan_list_cmd = send_scan_chan_list_cmd_non_tlv,
.send_pdev_get_tpc_config_cmd = send_pdev_get_tpc_config_cmd_non_tlv,
.send_set_atf_cmd = send_set_atf_cmd_non_tlv,
.send_set_bwf_cmd = send_set_bwf_cmd_non_tlv,
.send_pdev_fips_cmd = send_pdev_fips_cmd_non_tlv,
.send_wlan_profile_enable_cmd = send_wlan_profile_enable_cmd_non_tlv,
.send_wlan_profile_trigger_cmd = send_wlan_profile_trigger_cmd_non_tlv,