qcacld-3.0: Add TWT notify support to componentization

Add TWT notify support to componentization.

Change-Id: I44afb4a0d045916e9ca0f29924330de3a5d95859
CRs-Fixed: 3085549
This commit is contained in:
Srinivas Girigowda
2021-11-15 23:12:34 -08:00
committad av Madan Koyyalamudi
förälder fa14a0ad6b
incheckning 96132d1c52
4 ändrade filer med 152 tillägg och 3 borttagningar

Visa fil

@@ -158,7 +158,49 @@ static int
target_if_twt_notify_event_handler(ol_scn_t scn, uint8_t *event,
uint32_t len)
{
return 0;
QDF_STATUS qdf_status;
struct wmi_unified *wmi_handle;
struct wlan_objmgr_psoc *psoc;
struct twt_notify_event_param *data;
struct wlan_lmac_if_twt_rx_ops *twt_rx_ops;
TARGET_IF_ENTER();
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;
}
twt_rx_ops = wlan_twt_get_rx_ops(psoc);
if (!twt_rx_ops || !twt_rx_ops->twt_notify_comp_cb) {
target_if_err("No valid twt notify rx ops");
return -EINVAL;
}
data = qdf_mem_malloc(sizeof(*data));
if (!data)
return -ENOMEM;
qdf_status = wmi_extract_twt_notify_event(wmi_handle, event, data);
if (QDF_IS_STATUS_ERROR(qdf_status)) {
target_if_err("extract twt notify event failed (status=%d)",
qdf_status);
goto done;
}
qdf_status = twt_rx_ops->twt_notify_comp_cb(psoc, data);
done:
qdf_mem_free(data);
return qdf_status_to_os_return(qdf_status);
}
static int