From aff64b034ef5a66348a13f0e6ef91c2021801c1f Mon Sep 17 00:00:00 2001 From: Rathees kumar Chinannan Date: Wed, 22 Nov 2017 17:03:57 +0530 Subject: [PATCH] qcacmn: Add wmi support to dump WDS table Request and print WDS table from FW using WMI command and event. WMI_PDEV_WDS_ENTRY_LIST_CMDID is used to request WDS table entries and WMI_PDEV_WDS_ENTRY_LIST_EVENTID is used to process received WDS entries. Change-Id: I452c8067d191d09826a38b751bb66f1bde587d9b CRs-Fixed: 2003377 --- wmi_unified_api.h | 25 +++++++++++++++++++++++++ wmi_unified_param.h | 13 +++++++++++++ wmi_unified_priv.h | 5 +++++ 3 files changed, 43 insertions(+) diff --git a/wmi_unified_api.h b/wmi_unified_api.h index d055626f54..924bae7ebe 100644 --- a/wmi_unified_api.h +++ b/wmi_unified_api.h @@ -1641,4 +1641,29 @@ QDF_STATUS wmi_unified_get_arp_stats_req(void *wmi_hdl, */ QDF_STATUS wmi_send_bcn_offload_control_cmd(void *wmi_hdl, struct bcn_offload_control *bcn_ctrl_param); +/** + * wmi_unified_send_wds_entry_list_cmd() - WMI function to get list of + * wds entries from FW + * @wmi_handle: wmi handle + * + * Send WMI_PDEV_WDS_ENTRY_LIST_CMDID parameters to fw. + * + * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error + */ + +QDF_STATUS wmi_unified_send_dump_wds_table_cmd(void *wmi_hdl); + +/** + * wmi_extract_wds_entry - api to extract wds entry + * @wmi_handle: wma handle + * @evt_buf: pointer to event buffer + * @wds_entry: wds entry + * @idx: index to point wds entry in event buffer + * + * Return: QDF_STATUS_SUCCESS for successful event parse + * else QDF_STATUS_E_INVAL or QDF_STATUS_E_FAILURE + */ + +QDF_STATUS wmi_extract_wds_entry(void *wmi_hdl, uint8_t *evt_buf, + struct wdsentry *wds_entry, u_int32_t idx); #endif /* _WMI_UNIFIED_API_H_ */ diff --git a/wmi_unified_param.h b/wmi_unified_param.h index 616f79ec1e..4172d1973d 100644 --- a/wmi_unified_param.h +++ b/wmi_unified_param.h @@ -5454,6 +5454,7 @@ typedef enum { wmi_get_arp_stats_req_id, wmi_service_available_event_id, wmi_update_rcpi_event_id, + wmi_pdev_wds_entry_list_event_id, wmi_events_max, } wmi_conv_event_id; @@ -7978,4 +7979,16 @@ struct bcn_offload_control { bool bcn_tx_enable; }; +/** + * struct wds_entry - WDS entry structure + * @peer_mac: peer mac + * @wds_mac: wds mac address + * @flags: flags + */ +struct wdsentry { + u_int8_t peer_mac[IEEE80211_ADDR_LEN]; + u_int8_t wds_mac[IEEE80211_ADDR_LEN]; + A_UINT32 flags; +}; + #endif /* _WMI_UNIFIED_PARAM_H_ */ diff --git a/wmi_unified_priv.h b/wmi_unified_priv.h index 3c20e9edfd..d05e53d45d 100644 --- a/wmi_unified_priv.h +++ b/wmi_unified_priv.h @@ -1406,6 +1406,11 @@ QDF_STATUS (*send_limit_off_chan_cmd)(wmi_unified_t wmi_handle, QDF_STATUS (*send_wow_timer_pattern_cmd)(wmi_unified_t wmi_handle, uint8_t vdev_id, uint32_t cookie, uint32_t time); +QDF_STATUS (*send_wds_entry_list_cmd)(wmi_unified_t wmi_handle); +QDF_STATUS (*extract_wds_entry)(wmi_unified_t wmi_handle, + uint8_t *evt_buf, + struct wdsentry *wds_entry, + u_int32_t idx); }; /* Forward declartion for psoc*/