qcacld-3.0: Add TWT nudge support to componentization

In TWT component, add support for TWT nudge command
i.e when host wants to suspend the TWT session.

Change-Id: I176fdaf0f2ccc2d0656f9108484fc80b409268ef
CRs-Fixed: 3085999
这个提交包含在:
Srinivas Girigowda
2022-01-04 22:53:32 -08:00
提交者 Madan Koyyalamudi
父节点 82b323d139
当前提交 8d529074a0
修改 12 个文件,包含 558 行新增6 行删除

查看文件

@@ -88,7 +88,15 @@ QDF_STATUS
target_if_twt_nudge_req(struct wlan_objmgr_psoc *psoc,
struct twt_nudge_dialog_cmd_param *req)
{
return QDF_STATUS_SUCCESS;
struct wmi_unified *wmi_handle;
wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle) {
target_if_err("wmi_handle is null");
return QDF_STATUS_E_NULL_VALUE;
}
return wmi_unified_twt_nudge_dialog_cmd(wmi_handle, req);
}
QDF_STATUS

查看文件

@@ -248,11 +248,62 @@ done:
return qdf_status_to_os_return(qdf_status);
}
/**
* target_if_twt_nudge_dialog_complete_event_handler - TWT nudge dlg
* complete evt handler
* @scn: scn
* @event: buffer with event
* @len: buffer length
*
* Return: 0 on success, negative value on failure
*/
static int
target_if_twt_nudge_complete_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_nudge_dialog_complete_event_param *param;
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_nudge_comp_cb) {
target_if_err("No valid twt nudge complete rx ops");
return -EINVAL;
}
param = qdf_mem_malloc(sizeof(*param));
if (!param)
return -ENOMEM;
qdf_status = wmi_extract_twt_nudge_dialog_comp_event(wmi_handle,
event, param);
if (QDF_IS_STATUS_ERROR(qdf_status)) {
target_if_err("extract twt nudge event failed (status=%d)",
qdf_status);
goto done;
}
qdf_status = twt_rx_ops->twt_nudge_comp_cb(psoc, param);
done:
qdf_mem_free(param);
return qdf_status_to_os_return(qdf_status);
}
static int