From 08c4d360142322491657d58d4ef600bc68abb9ef Mon Sep 17 00:00:00 2001 From: Deeksha Gupta Date: Tue, 13 Jul 2021 09:50:26 +0530 Subject: [PATCH] qcacld-3.0: Add support for twt get_status with dialog_id 0 Currently, if there is no twt session present as part of the twt get_status query with dialog_id = 0, host returns failure. Add support to include the session state, wake_duartion and wake_interval for TWT get_status command with dialog_id = 0. Change-Id: Ie59310dc07c9954da96cee6568de856be8f67652 CRs-Fixed: 2989788 --- core/hdd/src/wlan_hdd_twt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/hdd/src/wlan_hdd_twt.c b/core/hdd/src/wlan_hdd_twt.c index 57ba7e22a25b..6030c88ad02e 100644 --- a/core/hdd/src/wlan_hdd_twt.c +++ b/core/hdd/src/wlan_hdd_twt.c @@ -759,9 +759,13 @@ hdd_send_inactive_session_reply(struct hdd_adapter *adapter, struct wmi_host_twt_session_stats_info *params) { QDF_STATUS qdf_status; + int num_twt_session = 0; - params[0].event_type = HOST_TWT_SESSION_UPDATE; - qdf_status = hdd_twt_pack_get_params_resp(adapter->hdd_ctx, params, 0); + params[num_twt_session].event_type = HOST_TWT_SESSION_UPDATE; + num_twt_session++; + + qdf_status = hdd_twt_pack_get_params_resp(adapter->hdd_ctx, params, + num_twt_session); return qdf_status; } @@ -920,8 +924,7 @@ static int hdd_sta_twt_get_session_params(struct hdd_adapter *adapter, QDF_MAC_ADDR_SIZE); } - if (params[0].dialog_id != WLAN_ALL_SESSIONS_DIALOG_ID && - !ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc, + if (!ucfg_mlme_is_twt_setup_done(adapter->hdd_ctx->psoc, &hdd_sta_ctx->conn_info.bssid, params[0].dialog_id)) { hdd_debug("vdev%d: TWT session %d setup incomplete",