qcacld-3.0: wma to target_if migration of roam_auth_offload_event
Currently, wmi_roam_auth_offload_event_id data is extracted and processing is also done in wma. This is not inline with component model where target_if takes care of data extraction and handover the extracted data to corresponding component(connection mgr in this case). Add changes to support the same. Change-Id: I128db23077d423c5e5ecf27636bc3af35cbbc58f CRs-Fixed: 3010419
Этот коммит содержится в:

коммит произвёл
Madan Koyyalamudi

родитель
4de129d045
Коммит
23999e417d
@@ -77,6 +77,18 @@ int target_if_cm_roam_event(ol_scn_t scn, uint8_t *event, uint32_t len);
|
||||
int
|
||||
target_if_cm_roam_stats_event(ol_scn_t scn, uint8_t *event, uint32_t len);
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_auth_offload_event - auth roam offload event handler
|
||||
* @scn: target handle
|
||||
* @event: event buffer
|
||||
* @len: event buffer length
|
||||
*
|
||||
* Return: int for success or error code
|
||||
*/
|
||||
int
|
||||
target_if_cm_roam_auth_offload_event(ol_scn_t scn, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* target_if_roam_offload_register_events() - register roam events
|
||||
* @psoc: pointer to psoc object
|
||||
|
@@ -61,6 +61,7 @@ target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
|
||||
rx_ops->vdev_disconnect_event = cm_vdev_disconnect_event_handler;
|
||||
rx_ops->roam_scan_chan_list_event = cm_roam_scan_ch_list_event_handler;
|
||||
rx_ops->roam_stats_event_rx = cm_roam_stats_event_handler;
|
||||
rx_ops->roam_auth_offload_event = cm_roam_auth_offload_event_handler;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -396,6 +397,47 @@ err:
|
||||
return status;
|
||||
}
|
||||
|
||||
int
|
||||
target_if_cm_roam_auth_offload_event(ol_scn_t scn, uint8_t *event, uint32_t len)
|
||||
{
|
||||
QDF_STATUS qdf_status;
|
||||
int status = 0;
|
||||
struct wmi_unified *wmi_handle;
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_cm_roam_rx_ops *roam_rx_ops;
|
||||
struct auth_offload_event auth_event = {0};
|
||||
|
||||
psoc = target_if_get_psoc_from_scn_hdl(scn);
|
||||
if (!psoc) {
|
||||
target_if_err("psoc is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
|
||||
if (!wmi_handle) {
|
||||
target_if_err("wmi_handle is null");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
qdf_status = wmi_extract_auth_offload_event(wmi_handle, event, len,
|
||||
&auth_event);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
target_if_err("parsing of event failed, %d", qdf_status);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
roam_rx_ops = target_if_cm_get_roam_rx_ops(psoc);
|
||||
if (!roam_rx_ops || !roam_rx_ops->roam_auth_offload_event) {
|
||||
target_if_err("No valid roam rx ops");
|
||||
return -EINVAL;
|
||||
}
|
||||
qdf_status = roam_rx_ops->roam_auth_offload_event(&auth_event);
|
||||
if (QDF_IS_STATUS_ERROR(status))
|
||||
status = -EINVAL;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -473,6 +515,16 @@ target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
ret = wmi_unified_register_event_handler(handle,
|
||||
wmi_roam_auth_offload_event_id,
|
||||
target_if_cm_roam_auth_offload_event,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
target_if_err("wmi event(%u) registration failed, ret: %d",
|
||||
wmi_roam_auth_offload_event_id, ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Ссылка в новой задаче
Block a user