qcacmn: Add WMI support for WMI_PEER_UNMAP_CONF_CMDID
Add WMI support to send WMI_PEER_UNMAP_CONF_CMDID to FW for peer unmap confirmation. Change-Id: I1a260f840ed28f90568d9cba912cc5e5128c8c7d CRs-Fixed: 2358066
This commit is contained in:
@@ -5266,6 +5266,7 @@ typedef enum {
|
|||||||
wmi_service_obss_spatial_reuse,
|
wmi_service_obss_spatial_reuse,
|
||||||
wmi_service_per_vdev_chain_support,
|
wmi_service_per_vdev_chain_support,
|
||||||
wmi_service_new_htt_msg_format,
|
wmi_service_new_htt_msg_format,
|
||||||
|
wmi_service_peer_unmap_cnf_support,
|
||||||
wmi_services_max,
|
wmi_services_max,
|
||||||
} wmi_conv_service_ids;
|
} wmi_conv_service_ids;
|
||||||
#define WMI_SERVICE_UNAVAILABLE 0xFFFF
|
#define WMI_SERVICE_UNAVAILABLE 0xFFFF
|
||||||
@@ -5355,6 +5356,7 @@ struct wmi_host_fw_abi_ver {
|
|||||||
* @atf_config: ATF config
|
* @atf_config: ATF config
|
||||||
* @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt
|
* @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt
|
||||||
* @tx_msdu_new_partition_id_support: new partiition id support for tx msdu
|
* @tx_msdu_new_partition_id_support: new partiition id support for tx msdu
|
||||||
|
* @peer_unmap_conf_support: peer unmap conf support in fw
|
||||||
* @iphdr_pad_config: ipheader pad config
|
* @iphdr_pad_config: ipheader pad config
|
||||||
* @qwrap_config: Qwrap configuration
|
* @qwrap_config: Qwrap configuration
|
||||||
* @alloc_frag_desc_for_data_pkt: Frag desc for data
|
* @alloc_frag_desc_for_data_pkt: Frag desc for data
|
||||||
@@ -5430,7 +5432,8 @@ typedef struct {
|
|||||||
uint32_t atf_config:1,
|
uint32_t atf_config:1,
|
||||||
mgmt_comp_evt_bundle_support:1,
|
mgmt_comp_evt_bundle_support:1,
|
||||||
tx_msdu_new_partition_id_support:1,
|
tx_msdu_new_partition_id_support:1,
|
||||||
new_htt_msg_format:1;
|
new_htt_msg_format:1,
|
||||||
|
peer_unmap_conf_support:1;
|
||||||
uint32_t iphdr_pad_config;
|
uint32_t iphdr_pad_config;
|
||||||
uint32_t
|
uint32_t
|
||||||
qwrap_config:16,
|
qwrap_config:16,
|
||||||
|
@@ -298,6 +298,12 @@ QDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi,
|
|||||||
uint8_t peer_addr[IEEE80211_ADDR_LEN],
|
uint8_t peer_addr[IEEE80211_ADDR_LEN],
|
||||||
uint8_t vdev_id);
|
uint8_t vdev_id);
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
(*send_peer_unmap_conf_cmd)(wmi_unified_t wmi,
|
||||||
|
uint8_t vdev_id,
|
||||||
|
uint32_t peer_id_cnt,
|
||||||
|
uint16_t *peer_id_list);
|
||||||
|
|
||||||
QDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
|
QDF_STATUS (*send_peer_param_cmd)(wmi_unified_t wmi,
|
||||||
uint8_t peer_addr[IEEE80211_ADDR_LEN],
|
uint8_t peer_addr[IEEE80211_ADDR_LEN],
|
||||||
struct peer_set_params *param);
|
struct peer_set_params *param);
|
||||||
|
@@ -460,4 +460,18 @@ QDF_STATUS wmi_unified_set_arp_stats_req(void *wmi_hdl,
|
|||||||
QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
|
QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
|
||||||
struct get_arp_stats *req_buf);
|
struct get_arp_stats *req_buf);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wmi_unified_peer_unmap_conf_send() - send PEER unmap conf command to fw
|
||||||
|
* @wmi: wmi handle
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
* @peer_id_cnt: number of peer id
|
||||||
|
* @peer_id_list: list of peer ids
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
|
||||||
|
*/
|
||||||
|
QDF_STATUS wmi_unified_peer_unmap_conf_send(void *wmi_hdl,
|
||||||
|
uint8_t vdev_id,
|
||||||
|
uint32_t peer_id_cnt,
|
||||||
|
uint16_t *peer_id_list);
|
||||||
|
|
||||||
#endif /* _WMI_UNIFIED_STA_API_H_ */
|
#endif /* _WMI_UNIFIED_STA_API_H_ */
|
||||||
|
@@ -491,3 +491,17 @@ QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl,
|
|||||||
return QDF_STATUS_E_FAILURE;
|
return QDF_STATUS_E_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS wmi_unified_peer_unmap_conf_send(void *wmi_hdl,
|
||||||
|
uint8_t vdev_id,
|
||||||
|
uint32_t peer_id_cnt,
|
||||||
|
uint16_t *peer_id_list)
|
||||||
|
{
|
||||||
|
wmi_unified_t wmi_handle = (wmi_unified_t)wmi_hdl;
|
||||||
|
|
||||||
|
if (wmi_handle->ops->send_peer_unmap_conf_cmd)
|
||||||
|
return wmi_handle->ops->send_peer_unmap_conf_cmd(wmi_handle,
|
||||||
|
vdev_id, peer_id_cnt, peer_id_list);
|
||||||
|
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -2468,6 +2468,76 @@ error:
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* send_peer_unmap_conf_cmd_tlv() - send PEER UNMAP conf command to fw
|
||||||
|
* @wmi: wmi handle
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
* @peer_id_cnt: no. of peer ids
|
||||||
|
* @peer_id_list: list of peer ids
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS_SUCCESS for success or error code
|
||||||
|
*/
|
||||||
|
static QDF_STATUS send_peer_unmap_conf_cmd_tlv(wmi_unified_t wmi,
|
||||||
|
uint8_t vdev_id,
|
||||||
|
uint32_t peer_id_cnt,
|
||||||
|
uint16_t *peer_id_list)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
wmi_buf_t buf;
|
||||||
|
uint8_t *buf_ptr;
|
||||||
|
A_UINT32 *peer_ids;
|
||||||
|
wmi_peer_unmap_response_cmd_fixed_param *cmd;
|
||||||
|
uint32_t peer_id_list_len;
|
||||||
|
uint32_t len = sizeof(*cmd);
|
||||||
|
|
||||||
|
if (!peer_id_cnt || !peer_id_list)
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
|
||||||
|
len += WMI_TLV_HDR_SIZE;
|
||||||
|
|
||||||
|
peer_id_list_len = peer_id_cnt * sizeof(A_UINT32);
|
||||||
|
|
||||||
|
len += peer_id_list_len;
|
||||||
|
|
||||||
|
buf = wmi_buf_alloc(wmi, len);
|
||||||
|
|
||||||
|
if (!buf) {
|
||||||
|
WMI_LOGP("%s: wmi_buf_alloc failed", __func__);
|
||||||
|
return QDF_STATUS_E_NOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
|
cmd = (wmi_peer_unmap_response_cmd_fixed_param *)wmi_buf_data(buf);
|
||||||
|
buf_ptr = (uint8_t *)wmi_buf_data(buf);
|
||||||
|
|
||||||
|
WMITLV_SET_HDR(&cmd->tlv_header,
|
||||||
|
WMITLV_TAG_STRUC_wmi_peer_unmap_response_cmd_fixed_param,
|
||||||
|
WMITLV_GET_STRUCT_TLVLEN
|
||||||
|
(wmi_peer_unmap_response_cmd_fixed_param));
|
||||||
|
|
||||||
|
buf_ptr += sizeof(wmi_peer_unmap_response_cmd_fixed_param);
|
||||||
|
|
||||||
|
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_UINT32,
|
||||||
|
peer_id_list_len);
|
||||||
|
|
||||||
|
peer_ids = (A_UINT32 *)(buf_ptr + WMI_TLV_HDR_SIZE);
|
||||||
|
|
||||||
|
for (i = 0; i < peer_id_cnt; i++)
|
||||||
|
peer_ids[i] = peer_id_list[i];
|
||||||
|
|
||||||
|
WMI_LOGD("%s: vdev_id %d peer_id_cnt %d", __func__,
|
||||||
|
vdev_id, peer_id_cnt);
|
||||||
|
wmi_mtrace(WMI_PEER_UNMAP_RESPONSE_CMDID, vdev_id, 0);
|
||||||
|
if (wmi_unified_cmd_send(wmi, buf, len,
|
||||||
|
WMI_PEER_UNMAP_RESPONSE_CMDID)) {
|
||||||
|
WMI_LOGP("%s: Failed to send peer delete conf command",
|
||||||
|
__func__);
|
||||||
|
wmi_buf_free(buf);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
void wmi_sta_attach_tlv(wmi_unified_t wmi_handle)
|
void wmi_sta_attach_tlv(wmi_unified_t wmi_handle)
|
||||||
{
|
{
|
||||||
struct wmi_ops *ops = wmi_handle->ops;
|
struct wmi_ops *ops = wmi_handle->ops;
|
||||||
@@ -2509,6 +2579,7 @@ void wmi_sta_attach_tlv(wmi_unified_t wmi_handle)
|
|||||||
send_dbs_scan_sel_params_cmd_tlv;
|
send_dbs_scan_sel_params_cmd_tlv;
|
||||||
ops->send_set_arp_stats_req_cmd = send_set_arp_stats_req_cmd_tlv;
|
ops->send_set_arp_stats_req_cmd = send_set_arp_stats_req_cmd_tlv;
|
||||||
ops->send_get_arp_stats_req_cmd = send_get_arp_stats_req_cmd_tlv;
|
ops->send_get_arp_stats_req_cmd = send_get_arp_stats_req_cmd_tlv;
|
||||||
|
ops->send_peer_unmap_conf_cmd = send_peer_unmap_conf_cmd_tlv;
|
||||||
|
|
||||||
wmi_tdls_attach_tlv(wmi_handle);
|
wmi_tdls_attach_tlv(wmi_handle);
|
||||||
wmi_disa_attach_tlv(wmi_handle);
|
wmi_disa_attach_tlv(wmi_handle);
|
||||||
|
@@ -6360,6 +6360,10 @@ void wmi_copy_resource_config(wmi_resource_config *resource_cfg,
|
|||||||
resource_cfg->flag1, 1);
|
resource_cfg->flag1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tgt_res_cfg->peer_unmap_conf_support)
|
||||||
|
WMI_RSRC_CFG_FLAG_PEER_UNMAP_RESPONSE_SUPPORT_SET(
|
||||||
|
resource_cfg->flag1, 1);
|
||||||
|
|
||||||
wmi_copy_twt_resource_config(resource_cfg, tgt_res_cfg);
|
wmi_copy_twt_resource_config(resource_cfg, tgt_res_cfg);
|
||||||
resource_cfg->peer_map_unmap_v2_support =
|
resource_cfg->peer_map_unmap_v2_support =
|
||||||
tgt_res_cfg->peer_map_unmap_v2;
|
tgt_res_cfg->peer_map_unmap_v2;
|
||||||
@@ -11947,6 +11951,8 @@ static void populate_tlv_service(uint32_t *wmi_service)
|
|||||||
WMI_SERVICE_PER_VDEV_CHAINMASK_CONFIG_SUPPORT;
|
WMI_SERVICE_PER_VDEV_CHAINMASK_CONFIG_SUPPORT;
|
||||||
wmi_service[wmi_service_new_htt_msg_format] =
|
wmi_service[wmi_service_new_htt_msg_format] =
|
||||||
WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN;
|
WMI_SERVICE_HTT_H2T_NO_HTC_HDR_LEN_IN_MSG_LEN;
|
||||||
|
wmi_service[wmi_service_peer_unmap_cnf_support] =
|
||||||
|
WMI_SERVICE_PEER_UNMAP_RESPONSE_SUPPORT;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user