diff --git a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_pdev_obj.h b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_pdev_obj.h index 82bc47d0647b..af52c1a599f7 100644 --- a/umac/cmn_services/obj_mgr/inc/wlan_objmgr_pdev_obj.h +++ b/umac/cmn_services/obj_mgr/inc/wlan_objmgr_pdev_obj.h @@ -86,6 +86,8 @@ #define WLAN_PDEV_F_MULTIVDEV_RESTART 0x10000000 /* MBSS IE enable */ #define WLAN_PDEV_F_MBSS_IE_ENABLE 0x20000000 +/* VDEV Peer delete all */ +#define WLAN_PDEV_F_DELETE_ALL_PEER 0x40000000 /* PDEV op flags */ /* Enable htrate for wep and tkip */ diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index f8d88144e0a8..12239a856966 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -571,6 +571,17 @@ wmi_unified_peer_flush_tids_send(wmi_unified_t wmi_handle, uint8_t peer_addr[QDF_MAC_ADDR_SIZE], struct peer_flush_params *param); +/** + * wmi_unified_peer_delete_all_send() - send PEER delete all command to fw + * @wmi_hdl: wmi handle + * @param: pointer to hold peer delete all parameters + * + * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure + */ +QDF_STATUS wmi_unified_peer_delete_all_send( + wmi_unified_t wmi_hdl, + struct peer_delete_all_params *param); + /** * wmi_set_peer_param() - set peer parameter in fw * @wmi_handle: wmi handle diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index d279493e561b..8bf94e83679c 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -945,6 +945,15 @@ struct peer_flush_params { uint32_t peer_tid_bitmap; uint8_t vdev_id; }; + +/** + * struct peer_delete_all_params - peer delete all request parameter + * @vdev_id: vdev id + */ +struct peer_delete_all_params { + uint8_t vdev_id; +}; + #endif /** @@ -4765,6 +4774,7 @@ typedef enum { wmi_pdev_check_cal_version_event_id, wmi_atf_peer_stats_event_id, wmi_peer_delete_response_event_id, + wmi_peer_delete_all_response_event_id, wmi_pdev_csa_switch_count_status_event_id, wmi_reg_chan_list_cc_event_id, wmi_offchan_data_tx_completion_event, @@ -5321,6 +5331,7 @@ typedef enum { wmi_service_adaptive_11r_support, wmi_service_data_stall_recovery_support, wmi_service_tx_compl_tsf64, + wmi_service_vdev_delete_all_peer, wmi_services_max, } wmi_conv_service_ids; #define WMI_SERVICE_UNAVAILABLE 0xFFFF @@ -7117,6 +7128,20 @@ struct wmi_host_peer_delete_response_event { struct qdf_mac_addr mac_address; }; +/** + * struct wmi_host_vdev_peer_delete_all_response_event - + * VDEV peer delete all response + * @vdev_id: vdev id + * @status: status of request + * 0 - OK; command successful + * 1 - EINVAL; Requested invalid vdev_id + * 2 - EFAILED; Delete all peer failed + */ +struct wmi_host_vdev_peer_delete_all_response_event { + uint32_t vdev_id; + uint32_t status; +}; + /** * @struct wmi_host_dcs_interference_param * @interference_type: Type of DCS Interference diff --git a/wmi/inc/wmi_unified_priv.h b/wmi/inc/wmi_unified_priv.h index 00cca7df118d..3eaed8fdab7a 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -302,6 +302,10 @@ QDF_STATUS (*send_peer_delete_cmd)(wmi_unified_t wmi, uint8_t peer_addr[QDF_MAC_ADDR_SIZE], uint8_t vdev_id); +QDF_STATUS (*send_peer_delete_all_cmd)( + wmi_unified_t wmi, + struct peer_delete_all_params *param); + QDF_STATUS (*send_peer_unmap_conf_cmd)(wmi_unified_t wmi, uint8_t vdev_id, @@ -1711,6 +1715,17 @@ QDF_STATUS (*extract_peer_delete_response_event)( void *evt_buf, struct wmi_host_peer_delete_response_event *param); +QDF_STATUS (*extract_vdev_peer_delete_all_resp)( + wmi_unified_t wmi_handle, + void *evt_buf, + struct wmi_host_vdev_peer_delete_all_response_event + *peer_delete_all_rsp); + +QDF_STATUS (*extract_vdev_peer_delete_all_response_event)( + wmi_unified_t wmi_handle, + void *evt_buf, + struct wmi_host_vdev_peer_delete_all_response_event *param); + bool (*is_management_record)(uint32_t cmd_id); bool (*is_diag_event)(uint32_t event_id); uint8_t *(*wmi_id_to_name)(uint32_t cmd_id); diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index 7b2b95910634..d653cc515e9f 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -214,6 +214,16 @@ QDF_STATUS wmi_unified_peer_delete_send(wmi_unified_t wmi_handle, return QDF_STATUS_E_FAILURE; } +QDF_STATUS wmi_unified_peer_delete_all_send( + wmi_unified_t wmi_hdl, + struct peer_delete_all_params *param) +{ + if (wmi_hdl->ops->send_peer_delete_all_cmd) + return wmi_hdl->ops->send_peer_delete_all_cmd(wmi_hdl, param); + + return QDF_STATUS_E_FAILURE; +} + QDF_STATUS wmi_set_peer_param_send(wmi_unified_t wmi_handle, uint8_t peer_addr[QDF_MAC_ADDR_SIZE], struct peer_set_params *param)