qcacld-3.0: Add TWT pause support to componentization
In TWT component, add support for TWT pause command i.e when host wants to suspend the TWT session. Change-Id: I8a60bb40fe9d37121d700f246b91e3211af66189 CRs-Fixed: 3085990
This commit is contained in:

committed by
Madan Koyyalamudi

orang tua
d7e3efed33
melakukan
0142156257
@@ -58,7 +58,15 @@ QDF_STATUS
|
||||
target_if_twt_pause_req(struct wlan_objmgr_psoc *psoc,
|
||||
struct twt_pause_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_pause_dialog_cmd(wmi_handle, req);
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
|
@@ -133,11 +133,61 @@ done:
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* target_if_twt_pause_complete_event_handler - TWT pause complete handler
|
||||
* @scn: scn
|
||||
* @event: buffer with event
|
||||
* @len: buffer length
|
||||
*
|
||||
* Return: 0 on success, negative value on failure
|
||||
*/
|
||||
static int
|
||||
target_if_twt_pause_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_pause_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_pause_comp_cb) {
|
||||
target_if_err("No valid twt pause complete rx ops");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
param = qdf_mem_malloc(sizeof(*param));
|
||||
if (!param)
|
||||
return -ENOMEM;
|
||||
|
||||
qdf_status = wmi_extract_twt_pause_dialog_comp_event(wmi_handle,
|
||||
event, param);
|
||||
if (QDF_IS_STATUS_ERROR(qdf_status)) {
|
||||
target_if_err("extract twt pause dialog event failed (status=%d)",
|
||||
qdf_status);
|
||||
goto done;
|
||||
}
|
||||
|
||||
qdf_status = twt_rx_ops->twt_pause_comp_cb(psoc, param);
|
||||
|
||||
done:
|
||||
qdf_mem_free(param);
|
||||
return qdf_status_to_os_return(qdf_status);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Reference in New Issue
Block a user