qcacld-3.0: wma to target_if migration of wmi_roam_event
Currently, wmi_roam_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. As the legacy CSR/LIM is not yet converged, have a wrapper from connection mgr to wma to call these legacy APIs. Change-Id: I0e22bbccfe21200b90771a01f9ee7454f4ecb119 CRs-Fixed: 2990355
This commit is contained in:

committed by
Madan Koyyalamudi

parent
a011a54fee
commit
78cb3008e6
@@ -56,6 +56,16 @@ target_if_cm_roam_sync_frame_event(ol_scn_t scn,
|
||||
uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_event() - Target IF handler for roam events
|
||||
* @scn: target handle
|
||||
* @event: event buffer
|
||||
* @len: event buffer length
|
||||
*
|
||||
* Return: int for success or error code
|
||||
*/
|
||||
int target_if_cm_roam_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
|
||||
@@ -90,6 +100,12 @@ target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
}
|
||||
|
||||
static inline int
|
||||
target_if_cm_roam_event(ol_scn_t scn, uint8_t *event, uint32_t len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#endif
|
||||
|
@@ -28,6 +28,7 @@
|
||||
#include "wlan_psoc_mlme_api.h"
|
||||
#include "wlan_mlme_main.h"
|
||||
#include <../../core/src/wlan_cm_roam_i.h>
|
||||
#include "wlan_cm_roam_api.h"
|
||||
|
||||
static inline struct wlan_cm_roam_rx_ops *
|
||||
target_if_cm_get_roam_rx_ops(struct wlan_objmgr_psoc *psoc)
|
||||
@@ -55,6 +56,7 @@ target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
|
||||
#ifdef ROAM_TARGET_IF_CONVERGENCE
|
||||
rx_ops->roam_sync_event = cm_roam_sync_event_handler;
|
||||
rx_ops->roam_sync_frame_event = cm_roam_sync_frame_event_handler;
|
||||
rx_ops->roam_event_rx = cm_roam_event_handler;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -165,6 +167,48 @@ err:
|
||||
return status;
|
||||
}
|
||||
|
||||
int target_if_cm_roam_event(ol_scn_t scn, uint8_t *event, uint32_t len)
|
||||
{
|
||||
QDF_STATUS qdf_status;
|
||||
int status = 0;
|
||||
struct wmi_unified *wmi_handle;
|
||||
struct roam_offload_roam_event roam_event = {0};
|
||||
struct wlan_objmgr_psoc *psoc;
|
||||
struct wlan_cm_roam_rx_ops *roam_rx_ops;
|
||||
|
||||
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_roam_event(wmi_handle, event, len,
|
||||
&roam_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_event_rx) {
|
||||
target_if_err("No valid roam rx ops");
|
||||
status = -EINVAL;
|
||||
goto err;
|
||||
}
|
||||
qdf_status = roam_rx_ops->roam_event_rx(roam_event);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
status = -EINVAL;
|
||||
|
||||
err:
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -195,6 +239,13 @@ target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
target_if_err("wmi event registration failed, ret: %d", ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
ret = wmi_unified_register_event_handler(handle, wmi_roam_event_id,
|
||||
target_if_cm_roam_event,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
target_if_err("wmi event registration failed, ret: %d", ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user