qcacld-3.0: wma to target_if migration of roam_scan_ch list_event
Currently, wmi_roam_scan_chan_list_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: I8f59f9ebfe1bbdc7ef37ccc1f10178fe8128e912 CRs-Fixed: 2990376
This commit is contained in:

committad av
Madan Koyyalamudi

förälder
a655f5e64e
incheckning
f39f703609
@@ -86,6 +86,18 @@ target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc);
|
||||
int
|
||||
target_if_cm_roam_vdev_disconnect_event_handler(ol_scn_t scn, uint8_t *event,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* target_if_cm_roam_scan_chan_list_event_handler - roam scan ch evt handler
|
||||
* @scn: target handle
|
||||
* @event: event buffer
|
||||
* @len: event buffer length
|
||||
*
|
||||
* Return: int for success or error code
|
||||
*/
|
||||
int
|
||||
target_if_cm_roam_scan_chan_list_event_handler(ol_scn_t scn, uint8_t *event,
|
||||
uint32_t len);
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
|
||||
/**
|
||||
@@ -124,6 +136,13 @@ target_if_cm_roam_vdev_disconnect_event_handler(ol_scn_t scn, uint8_t *event,
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int
|
||||
target_if_cm_roam_scan_chan_list_event_handler(ol_scn_t scn, uint8_t *event,
|
||||
uint32_t len)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif /* ROAM_TARGET_IF_CONVERGENCE */
|
||||
#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
|
||||
#endif
|
||||
|
@@ -59,6 +59,7 @@ target_if_cm_roam_register_rx_ops(struct wlan_cm_roam_rx_ops *rx_ops)
|
||||
rx_ops->roam_event_rx = cm_roam_event_handler;
|
||||
rx_ops->btm_blacklist_event = cm_btm_blacklist_event_handler;
|
||||
rx_ops->vdev_disconnect_event = cm_vdev_disconnect_event_handler;
|
||||
rx_ops->roam_scan_chan_list_event = cm_roam_scan_ch_list_event_handler;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -297,6 +298,49 @@ err:
|
||||
return status;
|
||||
}
|
||||
|
||||
int
|
||||
target_if_cm_roam_scan_chan_list_event_handler(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 cm_roam_scan_ch_resp *data = NULL;
|
||||
|
||||
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_scan_chan_list(wmi_handle, event, len,
|
||||
&data);
|
||||
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_scan_chan_list_event) {
|
||||
target_if_err("No valid roam rx ops");
|
||||
qdf_mem_free(data);
|
||||
return -EINVAL;
|
||||
}
|
||||
qdf_status = roam_rx_ops->roam_scan_chan_list_event(data);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status))
|
||||
status = -EINVAL;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
target_if_roam_offload_register_events(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
@@ -355,6 +399,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_scan_chan_list_id,
|
||||
target_if_cm_roam_scan_chan_list_event_handler,
|
||||
WMI_RX_SERIALIZER_CTX);
|
||||
if (QDF_IS_STATUS_ERROR(ret)) {
|
||||
target_if_err("wmi event(%u) registration failed, ret: %d",
|
||||
wmi_roam_scan_chan_list_id, ret);
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Referens i nytt ärende
Block a user