qcacmn: Add support for RTT PASN events
Add support in wmi to handle below new RTT PASN events: WMI_RTT_PASN_PEER_DELETE_EVENTID WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID Change-Id: Ib33c2def2d7ef66a6a2717e2a8e1756ab4318e4d CRs-Fixed: 3150069
这个提交包含在:

提交者
Madan Koyyalamudi

父节点
74ede2801b
当前提交
87ce989ee0
@@ -41,6 +41,7 @@ INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/mlme/connection_mgr/dispatcher/inc
|
||||
INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/thermal/dispatcher/inc
|
||||
INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/mlme/connection_mgr/utf/inc
|
||||
INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/mlo_mgr/inc
|
||||
INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/wifi_pos/inc
|
||||
|
||||
INCS += -I$(obj)/$(DEPTH)/cmn_dev/umac/cmn_services/crypto/inc
|
||||
INCS += -I$(obj)/$(DEPTH)/component_dev/crypto/inc
|
||||
|
@@ -4362,6 +4362,33 @@ QDF_STATUS
|
||||
wmi_extract_oem_response_param(wmi_unified_t wmi_hdl, void *resp_buf,
|
||||
struct wmi_oem_response_param *oem_resp_param);
|
||||
#endif /* WIFI_POS_CONVERGED */
|
||||
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
/**
|
||||
* wmi_extract_pasn_peer_create_req() - Extract peer create request event
|
||||
* @wmi_hdl: WMI handle
|
||||
* @evt_buf: Event buffer
|
||||
* @dst: Destination buffer
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_extract_pasn_peer_create_req(wmi_unified_t wmi, void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst);
|
||||
|
||||
/**
|
||||
* wmi_extract_pasn_peer_delete_req() - Extract PASN peer delete request
|
||||
* @wmi: WMI handle
|
||||
* @evt_buf: Event buffer
|
||||
* @dst: Destination buffer pointer
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS
|
||||
wmi_extract_pasn_peer_delete_req(wmi_unified_t wmi, void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* wmi_critical_events_in_flight() - get the number of critical events in flight
|
||||
*
|
||||
|
@@ -32,6 +32,8 @@
|
||||
#ifdef WLAN_CONV_SPECTRAL_ENABLE
|
||||
#include <wlan_spectral_public_structs.h>
|
||||
#endif /* WLAN_CONV_SPECTRAL_ENABLE */
|
||||
|
||||
#include "wifi_pos_public_struct.h"
|
||||
#include <wlan_vdev_mgr_tgt_if_tx_defs.h>
|
||||
#include <wlan_vdev_mgr_tgt_if_rx_defs.h>
|
||||
#include <reg_services_public_struct.h>
|
||||
@@ -4993,6 +4995,10 @@ typedef enum {
|
||||
#endif
|
||||
#ifdef MULTI_CLIENT_LL_SUPPORT
|
||||
wmi_vdev_latency_event_id,
|
||||
#endif
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
wmi_rtt_pasn_peer_create_req_eventid,
|
||||
wmi_rtt_pasn_peer_delete_eventid,
|
||||
#endif
|
||||
wmi_events_max,
|
||||
} wmi_conv_event_id;
|
||||
@@ -8368,6 +8374,20 @@ struct wmi_oem_response_param {
|
||||
struct wmi_host_oem_indirect_data indirect_data;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct wifi_pos_11az_peer_delete_data - Wifi pos 11az ranging peer delete
|
||||
* data. This structure is used to copy the peer related info from PASN
|
||||
* events and pass it to wifi pos module
|
||||
* @vdev_id: vdev id
|
||||
* @num_peers: Total number of peers to be deleted
|
||||
* @peer_info: PASN peer entry details
|
||||
*/
|
||||
struct wifi_pos_pasn_peer_data {
|
||||
uint8_t vdev_id;
|
||||
uint8_t num_peers;
|
||||
struct wlan_pasn_request peer_info[WLAN_MAX_11AZ_PEERS];
|
||||
};
|
||||
|
||||
/**
|
||||
* struct mws_coex_state - Modem Wireless Subsystem(MWS) coex info
|
||||
* @vdev_id : vdev id
|
||||
|
@@ -2704,6 +2704,18 @@ QDF_STATUS (*extract_oem_response_param)
|
||||
struct wmi_oem_response_param *oem_resp_param);
|
||||
#endif /* WIFI_POS_CONVERGED */
|
||||
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
QDF_STATUS (*extract_pasn_peer_create_req_event)
|
||||
(wmi_unified_t wmi_handle,
|
||||
void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst);
|
||||
|
||||
QDF_STATUS (*extract_pasn_peer_delete_req_event)
|
||||
(wmi_unified_t wmi_handle,
|
||||
void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst);
|
||||
#endif
|
||||
|
||||
QDF_STATUS (*extract_hw_mode_resp_event)(wmi_unified_t wmi_handle,
|
||||
void *evt_buf, uint32_t *cmd_status);
|
||||
|
||||
|
@@ -3410,6 +3410,32 @@ wmi_extract_oem_response_param(wmi_unified_t wmi_hdl, void *resp_buf,
|
||||
}
|
||||
#endif /* WIFI_POS_CONVERGED */
|
||||
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
QDF_STATUS
|
||||
wmi_extract_pasn_peer_create_req(wmi_unified_t wmi, void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst)
|
||||
{
|
||||
if (wmi->ops->extract_pasn_peer_create_req_event)
|
||||
return wmi->ops->extract_pasn_peer_create_req_event(wmi,
|
||||
evt_buf,
|
||||
dst);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
wmi_extract_pasn_peer_delete_req(wmi_unified_t wmi, void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst)
|
||||
{
|
||||
if (wmi->ops->extract_pasn_peer_delete_req_event)
|
||||
return wmi->ops->extract_pasn_peer_delete_req_event(wmi,
|
||||
evt_buf,
|
||||
dst);
|
||||
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDF_STATUS wmi_unified_extract_hw_mode_resp(wmi_unified_t wmi,
|
||||
void *evt_buf,
|
||||
uint32_t *cmd_status)
|
||||
|
@@ -15954,6 +15954,130 @@ extract_oem_response_param_tlv(wmi_unified_t wmi_handle, void *resp_buf,
|
||||
}
|
||||
#endif /* WIFI_POS_CONVERGED */
|
||||
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
static QDF_STATUS
|
||||
extract_pasn_peer_create_req_event_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst)
|
||||
{
|
||||
WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID_param_tlvs *param_buf;
|
||||
wmi_rtt_pasn_peer_create_req_event_fixed_param *fixed_param;
|
||||
wmi_rtt_pasn_peer_create_req_param *buf;
|
||||
uint8_t security_mode, i;
|
||||
|
||||
param_buf = (WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID_param_tlvs *)evt_buf;
|
||||
if (!param_buf) {
|
||||
wmi_err("Invalid peer_create req buffer");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
fixed_param = param_buf->fixed_param;
|
||||
|
||||
if (param_buf->num_rtt_pasn_peer_param >
|
||||
((WMI_SVC_MSG_MAX_SIZE - sizeof(*fixed_param)) /
|
||||
sizeof(wmi_rtt_pasn_peer_create_req_param))) {
|
||||
wmi_err("Invalid TLV size");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!param_buf->num_rtt_pasn_peer_param ||
|
||||
param_buf->num_rtt_pasn_peer_param > WLAN_MAX_11AZ_PEERS) {
|
||||
wmi_err("Invalid num TLV:%d",
|
||||
param_buf->num_rtt_pasn_peer_param);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dst->vdev_id = fixed_param->vdev_id;
|
||||
if (dst->vdev_id >= WLAN_UMAC_PDEV_MAX_VDEVS) {
|
||||
wmi_err("Invalid vdev id:%d", dst->vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
buf = param_buf->rtt_pasn_peer_param;
|
||||
if (!buf) {
|
||||
wmi_err("NULL peer param TLV");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < param_buf->num_rtt_pasn_peer_param; i++) {
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&buf->self_mac_addr,
|
||||
dst->peer_info[i].self_mac.bytes);
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&buf->dest_mac_addr,
|
||||
dst->peer_info[i].peer_mac.bytes);
|
||||
security_mode = WMI_RTT_PASN_PEER_CREATE_SECURITY_MODE_GET(
|
||||
buf->control_flag);
|
||||
if (security_mode)
|
||||
dst->peer_info[i].peer_type =
|
||||
WLAN_WIFI_POS_PASN_SECURE_PEER;
|
||||
else
|
||||
dst->peer_info[i].peer_type =
|
||||
WLAN_WIFI_POS_PASN_UNSECURE_PEER;
|
||||
|
||||
dst->peer_info[i].force_self_mac_usage =
|
||||
WMI_RTT_PASN_PEER_CREATE_FORCE_SELF_MAC_USE_GET(
|
||||
buf->control_flag);
|
||||
dst->num_peers++;
|
||||
buf++;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
extract_pasn_peer_delete_req_event_tlv(wmi_unified_t wmi_handle, void *evt_buf,
|
||||
struct wifi_pos_pasn_peer_data *dst)
|
||||
{
|
||||
WMI_RTT_PASN_PEER_DELETE_EVENTID_param_tlvs *param_buf;
|
||||
wmi_rtt_pasn_peer_delete_event_fixed_param *fixed_param;
|
||||
wmi_rtt_pasn_peer_delete_param *buf;
|
||||
uint8_t i;
|
||||
|
||||
param_buf = (WMI_RTT_PASN_PEER_DELETE_EVENTID_param_tlvs *)evt_buf;
|
||||
if (!param_buf) {
|
||||
wmi_err("Invalid peer_delete evt buffer");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
fixed_param = param_buf->fixed_param;
|
||||
|
||||
if (param_buf->num_rtt_pasn_peer_param >
|
||||
((WMI_SVC_MSG_MAX_SIZE - sizeof(*fixed_param)) /
|
||||
sizeof(wmi_rtt_pasn_peer_delete_param))) {
|
||||
wmi_err("Invalid TLV size");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!param_buf->num_rtt_pasn_peer_param ||
|
||||
param_buf->num_rtt_pasn_peer_param > WLAN_MAX_11AZ_PEERS) {
|
||||
wmi_err("Invalid num TLV:%d",
|
||||
param_buf->num_rtt_pasn_peer_param);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
dst->vdev_id = fixed_param->vdev_id;
|
||||
if (dst->vdev_id >= WLAN_UMAC_PDEV_MAX_VDEVS) {
|
||||
wmi_err("Invalid vdev id:%d", dst->vdev_id);
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
buf = param_buf->rtt_pasn_peer_param;
|
||||
if (!buf) {
|
||||
wmi_err("NULL peer param TLV");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
for (i = 0; i < param_buf->num_rtt_pasn_peer_param; i++) {
|
||||
WMI_MAC_ADDR_TO_CHAR_ARRAY(&buf->peer_mac_addr,
|
||||
dst->peer_info[i].peer_mac.bytes);
|
||||
dst->peer_info[i].control_flags = buf->control_flag;
|
||||
|
||||
dst->num_peers++;
|
||||
buf++;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
#endif /* WLAN_FEATURE_RTT_11AZ_SUPPORT */
|
||||
|
||||
/**
|
||||
* extract_hw_mode_resp_event_status_tlv() - Extract HW mode change status
|
||||
* @wmi_handle: wmi handle
|
||||
@@ -17843,6 +17967,12 @@ struct wmi_ops tlv_ops = {
|
||||
#ifdef WIFI_POS_CONVERGED
|
||||
.extract_oem_response_param = extract_oem_response_param_tlv,
|
||||
#endif /* WIFI_POS_CONVERGED */
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
.extract_pasn_peer_create_req_event =
|
||||
extract_pasn_peer_create_req_event_tlv,
|
||||
.extract_pasn_peer_delete_req_event =
|
||||
extract_pasn_peer_delete_req_event_tlv,
|
||||
#endif
|
||||
#ifdef WLAN_MWS_INFO_DEBUGFS
|
||||
.send_mws_coex_status_req_cmd = send_mws_coex_status_req_cmd_tlv,
|
||||
#endif
|
||||
@@ -18391,6 +18521,12 @@ static void populate_tlv_events_id(uint32_t *event_ids)
|
||||
#ifdef MULTI_CLIENT_LL_SUPPORT
|
||||
event_ids[wmi_vdev_latency_event_id] = WMI_VDEV_LATENCY_LEVEL_EVENTID;
|
||||
#endif
|
||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||
event_ids[wmi_rtt_pasn_peer_create_req_eventid] =
|
||||
WMI_RTT_PASN_PEER_CREATE_REQ_EVENTID;
|
||||
event_ids[wmi_rtt_pasn_peer_delete_eventid] =
|
||||
WMI_RTT_PASN_PEER_DELETE_EVENTID;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_LINK_LAYER_STATS
|
||||
|
在新工单中引用
屏蔽一个用户