diff --git a/wmi_unified_api.h b/wmi_unified_api.h index 59808cdf60..5bb294c643 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -1705,6 +1705,9 @@ QDF_STATUS wmi_extract_atf_token_info_ev(void *wmi_hdl, void *evt_buf, QDF_STATUS wmi_extract_vdev_stats(void *wmi_hdl, void *evt_buf, uint32_t index, wmi_host_vdev_stats *vdev_stats); +QDF_STATUS wmi_extract_per_chain_rssi_stats(void *wmi_hdl, void *evt_buf, + uint32_t index, struct wmi_host_per_chain_rssi_stats *rssi_stats); + QDF_STATUS wmi_extract_vdev_extd_stats(void *wmi_hdl, void *evt_buf, uint32_t index, wmi_host_vdev_extd_stats *vdev_extd_stats); diff --git a/wmi_unified_param.h b/wmi_unified_param.h index 6dc74be636..e77e5284bf 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -5162,6 +5162,12 @@ typedef struct { * */ #define WMI_HOST_WLAN_MAX_AC 4 +/* The WMI_HOST_MAX_CHAINS macro cannot be changed without breaking WMI + * compatibility. + * The maximum value of number of chains + */ +#define WMI_HOST_MAX_CHAINS 8 + /** * struct wmi_host_vdev_stats - vdev stats structure * @vdev_id: unique id identifying the VDEV, generated by the caller @@ -5263,6 +5269,21 @@ struct wmi_host_vdev_nac_rssi_event { uint32_t rssi_seq_num; }; + +/** + * struct wmi_host_per_chain_rssi_stats - VDEV nac rssi stats + * @vdev_id: unique id identifying the VDEV, generated by the caller + * @rssi_avg_beacon: per chain avg rssi for beacon + * @rssi_avg_data: per chain avg rssi for data + * @peer_macaddr: peer macaddr + */ +struct wmi_host_per_chain_rssi_stats { + uint32_t vdev_id; + int32_t rssi_avg_beacon[WMI_HOST_MAX_CHAINS]; + int32_t rssi_avg_data[WMI_HOST_MAX_CHAINS]; + wmi_host_mac_addr peer_macaddr; +}; + /** * struct wmi_host_peer_stats - peer stats * @peer_macaddr: peer MAC address diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index 56b9ae6dba..49fc4002ef 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -1290,6 +1290,10 @@ QDF_STATUS (*extract_pdev_ext_stats)(wmi_unified_t wmi_handle, void *evt_buf, QDF_STATUS (*extract_vdev_stats)(wmi_unified_t wmi_handle, void *evt_buf, uint32_t index, wmi_host_vdev_stats *vdev_stats); +QDF_STATUS (*extract_per_chain_rssi_stats)(wmi_unified_t wmi_handle, + void *evt_buf, uint32_t index, + struct wmi_host_per_chain_rssi_stats *rssi_stats); + QDF_STATUS (*extract_peer_stats)(wmi_unified_t wmi_handle, void *evt_buf, uint32_t index, wmi_host_peer_stats *peer_stats);