diff --git a/components/mlme/core/inc/wlan_mlme_twt_api.h b/components/mlme/core/inc/wlan_mlme_twt_api.h index dca945a96c..bc5b8feb86 100644 --- a/components/mlme/core/inc/wlan_mlme_twt_api.h +++ b/components/mlme/core/inc/wlan_mlme_twt_api.h @@ -217,5 +217,13 @@ void mlme_set_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc, tDot11fIEhe_cap *he_cap, tDot11fIEhe_op *he_op) {} + +static inline +QDF_STATUS mlme_init_twt_context(struct wlan_objmgr_psoc *psoc, + struct qdf_mac_addr *peer_mac, + uint8_t dialog_id) +{ + return QDF_STATUS_E_NOSUPPORT; +} #endif /* WLAN_SUPPORT_TWT */ #endif /* _WLAN_MLME_TWT_API_H_ */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_twt_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_twt_public_struct.h index 35d126ef17..cadf03f66b 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_twt_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_twt_public_struct.h @@ -21,6 +21,8 @@ #ifndef _WLAN_MLME_TWT_STRUCT_H_ #define _WLAN_MLME_TWT_STRUCT_H_ +#define TWT_ALL_SESSIONS_DIALOG_ID 255 + /** * enum wlan_twt_commands - TWT commands * @WLAN_TWT_NONE: Indicates none of the TWT commands are active. diff --git a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c index b4a7c215bf..9b23977cac 100644 --- a/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c +++ b/components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c @@ -39,6 +39,7 @@ #include "wlan_pkt_capture_ucfg_api.h" #include "cds_utils.h" #include "wlan_roam_debug.h" +#include "wlan_mlme_twt_api.h" #ifdef FEATURE_CM_ENABLE #include "connection_mgr/core/src/wlan_cm_roam.h" #include "connection_mgr/core/src/wlan_cm_main.h" @@ -155,6 +156,9 @@ cm_fw_roam_sync_start_ind(struct wlan_objmgr_vdev *vdev, WLAN_ROAM_SYNCH_IN_PROG, REASON_ROAM_HANDOFF_DONE); + mlme_init_twt_context(wlan_pdev_get_psoc(pdev), &connected_bssid, + TWT_ALL_SESSIONS_DIALOG_ID); + mlme_cm_osif_roam_sync_ind(vdev); return status; diff --git a/core/hdd/src/wlan_hdd_twt.c b/core/hdd/src/wlan_hdd_twt.c index 475dd26e47..cfe7e9a28e 100644 --- a/core/hdd/src/wlan_hdd_twt.c +++ b/core/hdd/src/wlan_hdd_twt.c @@ -48,7 +48,6 @@ #define TWT_WAKE_INTVL_MULTIPLICATION_FACTOR 1024 #define TWT_WAKE_DURATION_MULTIPLICATION_FACTOR 256 #define TWT_MAX_NEXT_TWT_SIZE 3 -#define TWT_ALL_SESSIONS_DIALOG_ID 255 static const struct nla_policy qca_wlan_vendor_twt_add_dialog_policy[QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX + 1] = { diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 81cceba412..d92fa2e31e 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -81,6 +81,7 @@ #include "wlan_if_mgr_roam.h" #include "wlan_roam_debug.h" #include "wlan_cm_roam_public_struct.h" +#include "wlan_mlme_twt_api.h" #define RSN_AUTH_KEY_MGMT_SAE WLAN_RSN_SEL(WLAN_AKM_SAE) #define MAX_PWR_FCC_CHAN_12 8 @@ -16473,7 +16474,8 @@ csr_process_roam_sync_callback(struct mac_context *mac_ctx, if (QDF_IS_STATUS_ERROR(status)) goto end; - + mlme_init_twt_context(mac_ctx->psoc, &connected_bssid, + TWT_ALL_SESSIONS_DIALOG_ID); csr_roam_call_callback(mac_ctx, session_id, NULL, 0, eCSR_ROAM_FT_START, eCSR_ROAM_RESULT_SUCCESS); goto end;