qcacmn: Add supoprt to process WMI_MLO_LINK_REMOVAL_EVENTID

WMI_MLO_LINK_REMOVAL_EVENTID will be sent by FW to update the Host on the
progress of the link removal operation. Add support to process this event.

Change-Id: I0c4d5b047cf062b421380f85717fac5a9bdea9c2
CRs-Fixed: 3334950
Этот коммит содержится в:
Shiva Krishna Pittala
2022-12-07 04:32:48 +05:30
коммит произвёл Madan Koyyalamudi
родитель 11dccd8fac
Коммит 22be442546
4 изменённых файлов: 81 добавлений и 0 удалений

Просмотреть файл

@@ -79,6 +79,69 @@ target_if_mlo_link_set_active_resp_handler(ol_scn_t scn, uint8_t *data,
return qdf_status_to_os_return(status);
}
/**
* target_if_mlo_link_removal_event_handler() - Handler for MLO link removal
* event sent by the FW
* @scn: scn handle
* @data: data buffer for event
* @datalen: data length
*
* Return: 0 on success, else error on failure
*/
static int
target_if_mlo_link_removal_event_handler(ol_scn_t scn, uint8_t *data,
uint32_t datalen)
{
struct wlan_objmgr_psoc *psoc;
struct wmi_unified *wmi_handle;
struct wlan_lmac_if_mlo_rx_ops *mlo_rx_ops;
QDF_STATUS status;
struct mlo_link_removal_evt_params evt_params;
if (!scn || !data) {
target_if_err("scn: 0x%pK, data: 0x%pK", scn, data);
return -EINVAL;
}
psoc = target_if_get_psoc_from_scn_hdl(scn);
if (!psoc) {
target_if_err("null psoc");
return -EINVAL;
}
mlo_rx_ops = target_if_mlo_get_rx_ops(psoc);
if (!mlo_rx_ops || !mlo_rx_ops->mlo_link_removal_handler) {
target_if_err("callback not registered");
return -EINVAL;
}
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
target_if_err("wmi_handle is null");
return -EINVAL;
}
status = wmi_extract_mlo_link_removal_evt_fixed_param(wmi_handle, data,
&evt_params);
if (QDF_IS_STATUS_ERROR(status)) {
target_if_err("Unable to extract fixed param, ret = %d",
status);
goto exit;
}
status = wmi_extract_mlo_link_removal_tbtt_update(
wmi_handle, data, &evt_params.tbtt_info);
if (QDF_IS_STATUS_ERROR(status)) {
target_if_err("Unable to extract TBTT update TLV, ret = %d",
status);
goto exit;
}
status = mlo_rx_ops->mlo_link_removal_handler(psoc, &evt_params);
exit:
return qdf_status_to_os_return(status);
}
/**
* target_if_mlo_register_event_handler() - function to register handler for
* mlo related wmi event from firmware.
@@ -103,6 +166,14 @@ target_if_mlo_register_event_handler(struct wlan_objmgr_psoc *psoc)
return QDF_STATUS_E_INVAL;
}
status = wmi_unified_register_event(
wmi_handle,
wmi_mlo_link_removal_eventid,
target_if_mlo_link_removal_event_handler);
if (QDF_IS_STATUS_ERROR(status))
target_if_err("Couldn't register handler for Link removal WMI event %d",
status);
status = wmi_unified_register_event_handler(
wmi_handle,
wmi_mlo_link_set_active_resp_eventid,
@@ -144,6 +215,9 @@ target_if_mlo_unregister_event_handler(struct wlan_objmgr_psoc *psoc)
wmi_unified_unregister_event_handler(wmi_handle,
wmi_mlo_link_set_active_resp_eventid);
wmi_unified_unregister_event(wmi_handle,
wmi_mlo_link_removal_eventid);
return QDF_STATUS_SUCCESS;
}

Просмотреть файл

@@ -1409,6 +1409,7 @@ struct wlan_lmac_if_mlo_tx_ops {
* struct wlan_lmac_if_mlo_rx_ops - defines southbound rx callbacks for mlo
* @process_link_set_active_resp: function pointer to rx FW events
* @process_mlo_vdev_tid_to_link_map_event: function pointer to rx T2LM event
* @mlo_link_removal_handler: function pointer for MLO link removal handler
*/
struct wlan_lmac_if_mlo_rx_ops {
QDF_STATUS
@@ -1417,6 +1418,9 @@ struct wlan_lmac_if_mlo_rx_ops {
QDF_STATUS (*process_mlo_vdev_tid_to_link_map_event)(
struct wlan_objmgr_psoc *psoc,
struct mlo_vdev_host_tid_to_link_map_resp *event);
QDF_STATUS (*mlo_link_removal_handler)(
struct wlan_objmgr_psoc *psoc,
struct mlo_link_removal_evt_params *evt_params);
};
#endif

Просмотреть файл

@@ -5137,6 +5137,7 @@ typedef enum {
wmi_mlo_setup_complete_event_id,
wmi_mlo_teardown_complete_event_id,
wmi_mlo_link_set_active_resp_eventid,
wmi_mlo_link_removal_eventid,
#endif
wmi_pdev_fips_extend_event_id,
wmi_roam_frame_event_id,

Просмотреть файл

@@ -20144,6 +20144,8 @@ static void populate_tlv_events_id_mlo(uint32_t *event_ids)
WMI_QUIET_HANDLING_EVENTID;
event_ids[wmi_mlo_ap_vdev_tid_to_link_map_eventid] =
WMI_MLO_AP_VDEV_TID_TO_LINK_MAP_EVENTID;
event_ids[wmi_mlo_link_removal_eventid] =
WMI_MLO_LINK_REMOVAL_EVENTID;
}
#else /* WLAN_FEATURE_11BE_MLO */
static inline void populate_tlv_events_id_mlo(uint32_t *event_ids)