diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h index ee0cd757a7af..a51313b8aae0 100644 --- a/dp/inc/cdp_txrx_ops.h +++ b/dp/inc/cdp_txrx_ops.h @@ -489,8 +489,10 @@ struct ol_if_ops { int (*peer_rx_reorder_queue_remove)(void *ol_soc_handle, uint8_t vdev_id, uint8_t *peer_macaddr, uint32_t tid_mask); - int (*peer_unref_delete)(void *ol_soc_handle); + int (*peer_unref_delete)(void *ol_soc_handle, uint8_t vdev_id, + uint8_t *peer_macaddr); bool (*is_hw_dbs_2x2_capable)(void); + /* TODO: Add any other control path calls required to OL_IF/WMA layer */ }; diff --git a/dp/wifi3.0/dp_main.c b/dp/wifi3.0/dp_main.c index 1088c6d68680..df814144e16c 100644 --- a/dp/wifi3.0/dp_main.c +++ b/dp/wifi3.0/dp_main.c @@ -1683,8 +1683,10 @@ void dp_peer_unref_delete(void *peer_handle) qdf_mem_free(peer); #endif if (soc->cdp_soc.ol_ops->peer_unref_delete) { - soc->cdp_soc.ol_ops->peer_unref_delete(soc->osif_soc); + soc->cdp_soc.ol_ops->peer_unref_delete(soc->osif_soc, + vdev->vdev_id, peer->mac_addr.raw); } + } else { qdf_spin_unlock_bh(&soc->peer_ref_mutex); } diff --git a/wmi/inc/wmi_unified_api.h b/wmi/inc/wmi_unified_api.h index 6ef02519e0cc..aec58834a8e2 100644 --- a/wmi/inc/wmi_unified_api.h +++ b/wmi/inc/wmi_unified_api.h @@ -1375,7 +1375,12 @@ QDF_STATUS wmi_extract_reg_cap_service_ready_ext( void *wmi_hdl, uint8_t *evt_buf, uint8_t phy_idx, struct WMI_HOST_HAL_REG_CAPABILITIES_EXT *param); + QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, uint8_t *evt_buf, struct wmi_host_pdev_utf_event *param); + +QDF_STATUS wmi_extract_peer_delete_response_event(void *wmi_hdl, + uint8_t *evt_buf, + struct wmi_host_peer_delete_response_event *param); #endif /* _WMI_UNIFIED_API_H_ */ diff --git a/wmi/inc/wmi_unified_param.h b/wmi/inc/wmi_unified_param.h index b271950fbcff..59e0b5dcb83a 100644 --- a/wmi/inc/wmi_unified_param.h +++ b/wmi/inc/wmi_unified_param.h @@ -4947,6 +4947,7 @@ typedef enum { wmi_peer_gid_userpos_list_event_id, wmi_pdev_check_cal_version_event_id, wmi_atf_peer_stats_event_id, + wmi_peer_delete_response_event_id, wmi_events_max, } wmi_conv_event_id; @@ -7201,6 +7202,17 @@ struct wmi_host_pdev_utf_event { uint16_t datalen; }; +/** + * struct wmi_host_peer_delete_response_event - Peer Delete response event param + * @vdev_id: vdev id + * @mac_address: Peer Mac Address + * + */ +struct wmi_host_peer_delete_response_event { + uint32_t vdev_id; + struct qdf_mac_addr mac_address; +}; + /** * @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 e375d2bc82b4..58d6c127d1a8 100644 --- a/wmi/inc/wmi_unified_priv.h +++ b/wmi/inc/wmi_unified_priv.h @@ -1217,6 +1217,11 @@ QDF_STATUS (*extract_pdev_utf_event)(wmi_unified_t wmi_hdl, uint16_t (*wmi_set_htc_tx_tag)(wmi_unified_t wmi_handle, wmi_buf_t buf, uint32_t cmd_id); + +QDF_STATUS (*extract_peer_delete_response_event)( + wmi_unified_t wmi_handle, + void *evt_buf, + struct wmi_host_peer_delete_response_event *param); }; struct target_abi_version { diff --git a/wmi/src/wmi_unified_api.c b/wmi/src/wmi_unified_api.c index c8f516499b29..44d06e637e19 100644 --- a/wmi/src/wmi_unified_api.c +++ b/wmi/src/wmi_unified_api.c @@ -6506,6 +6506,7 @@ QDF_STATUS wmi_extract_mac_phy_cap_service_ready_ext( return QDF_STATUS_E_FAILURE; } + /** * wmi_extract_reg_cap_service_ready_ext() - * extract REG cap from service ready event @@ -6553,3 +6554,27 @@ QDF_STATUS wmi_extract_pdev_utf_event(void *wmi_hdl, return QDF_STATUS_E_FAILURE; } + +/** + * wmi_extract_peer_delete_response_event() - + * extract vdev id and peer mac addresse from peer delete response event + * @wmi_handle: wmi handle + * @param evt_buf: pointer to event buffer + * @param param: Pointer to hold evt buf + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +QDF_STATUS wmi_extract_peer_delete_response_event( + void *wmi_hdl, + uint8_t *evt_buf, + struct wmi_host_peer_delete_response_event *param) +{ + wmi_unified_t wmi_handle = (wmi_unified_t) wmi_hdl; + + if (wmi_handle->ops->extract_peer_delete_response_event) + return wmi_handle->ops->extract_peer_delete_response_event( + wmi_handle, + evt_buf, param); + + return QDF_STATUS_E_FAILURE; +} diff --git a/wmi/src/wmi_unified_tlv.c b/wmi/src/wmi_unified_tlv.c index cf3fec7045cf..1ec928a02630 100644 --- a/wmi/src/wmi_unified_tlv.c +++ b/wmi/src/wmi_unified_tlv.c @@ -172,6 +172,7 @@ QDF_STATUS send_vdev_stop_cmd_tlv(wmi_unified_t wmi, wmi_buf_free(buf); return QDF_STATUS_E_FAILURE; } + WMI_LOGD("%s:vdev id = %d", __func__, vdev_id); return 0; } @@ -13442,6 +13443,36 @@ static QDF_STATUS extract_fips_event_data_tlv(wmi_unified_t wmi_handle, return QDF_STATUS_SUCCESS; } +/* + * extract_peer_delete_response_event_tlv() - extract peer delete response event + * @wmi_handle: wmi handle + * @param evt_buf: pointer to event buffer + * @param vdev_id: Pointer to hold vdev_id + * @param mac_addr: Pointer to hold peer mac address + * + * Return: QDF_STATUS_SUCCESS for success or error code + */ +static QDF_STATUS extract_peer_delete_response_event_tlv(wmi_unified_t wmi_hdl, + void *evt_buf, struct wmi_host_peer_delete_response_event *param) +{ + WMI_PEER_DELETE_RESP_EVENTID_param_tlvs *param_buf; + wmi_peer_delete_resp_event_fixed_param *ev; + + param_buf = (WMI_PEER_DELETE_RESP_EVENTID_param_tlvs *)evt_buf; + + ev = (wmi_peer_delete_resp_event_fixed_param *) param_buf->fixed_param; + if (!ev) { + WMI_LOGE("%s: Invalid peer_delete response\n", __func__); + return QDF_STATUS_E_FAILURE; + } + + param->vdev_id = ev->vdev_id; + WMI_MAC_ADDR_TO_CHAR_ARRAY(&ev->peer_macaddr, + ¶m->mac_address.bytes[0]); + + return QDF_STATUS_SUCCESS; +} + #ifdef WMI_INTERFACE_EVENT_LOGGING static bool is_management_record_tlv(uint32_t cmd_id) { @@ -13838,6 +13869,8 @@ struct wmi_ops tlv_ops = { .extract_dcs_im_tgt_stats = extract_dcs_im_tgt_stats_tlv, .extract_fips_event_data = extract_fips_event_data_tlv, .send_pdev_fips_cmd = send_pdev_fips_cmd_tlv, + .extract_peer_delete_response_event = + extract_peer_delete_response_event_tlv, }; #ifndef CONFIG_MCL @@ -14013,6 +14046,8 @@ static void populate_tlv_events_id(uint32_t *event_ids) event_ids[wmi_peer_estimated_linkspeed_event_id] = WMI_PEER_ESTIMATED_LINKSPEED_EVENTID; event_ids[wmi_peer_state_event_id] = WMI_PEER_STATE_EVENTID; + event_ids[wmi_peer_delete_response_event_id] = + WMI_PEER_DELETE_RESP_EVENTID; event_ids[wmi_mgmt_rx_event_id] = WMI_MGMT_RX_EVENTID; event_ids[wmi_host_swba_event_id] = WMI_HOST_SWBA_EVENTID; event_ids[wmi_tbttoffset_update_event_id] =