소스 검색

Merge e0cbb3965cb2f422eb1507d22a9829ccc37d3bf6 on remote branch

Change-Id: If427d485970a3ac78414959e2871c5b924eb34d5
Linux Build Service Account 1 년 전
부모
커밋
a5f63a45ae
100개의 변경된 파일4893개의 추가작업 그리고 567개의 파일을 삭제
  1. 5 0
      Android.mk
  2. 38 4
      Kbuild
  3. 27 0
      Kconfig
  4. 0 3
      components/action_oui/core/src/wlan_action_oui_main.c
  5. 1 6
      components/action_oui/core/src/wlan_action_oui_parse.c
  6. 0 43
      components/action_oui/dispatcher/inc/wlan_action_oui_cfg.h
  7. 0 2
      components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h
  8. 4 4
      components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c
  9. 162 0
      components/cmn_services/logging/inc/wlan_connectivity_logging.h
  10. 293 11
      components/cmn_services/logging/src/wlan_connectivity_logging.c
  11. 36 13
      components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h
  12. 37 0
      components/cmn_services/policy_mgr/inc/wlan_policy_mgr_ll_sap.h
  13. 2 2
      components/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h
  14. 60 42
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c
  15. 20 22
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c
  16. 97 73
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c
  17. 15 2
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h
  18. 4 2
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c
  19. 50 0
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_ll_sap.c
  20. 74 12
      components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c
  21. 19 1
      components/coex/dispatcher/inc/wlan_coex_ucfg_api.h
  22. 37 1
      components/coex/dispatcher/src/wlan_coex_ucfg_api.c
  23. 20 0
      components/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h
  24. 182 29
      components/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c
  25. 8 1
      components/dp/core/src/wlan_dp_bus_bandwidth.c
  26. 8 0
      components/dp/core/src/wlan_dp_rx_fst.c
  27. 4 2
      components/fw_offload/dispatcher/inc/cfg_fwol_generic.h
  28. 25 0
      components/mlme/core/inc/wlan_mlme_main.h
  29. 23 0
      components/mlme/core/inc/wlan_mlme_twt_api.h
  30. 60 6
      components/mlme/core/src/wlan_mlme_main.c
  31. 14 1
      components/mlme/core/src/wlan_mlme_twt_api.c
  32. 63 56
      components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c
  33. 23 0
      components/mlme/dispatcher/inc/cfg_mlme_generic.h
  34. 1 1
      components/mlme/dispatcher/inc/cfg_mlme_sta.h
  35. 64 0
      components/mlme/dispatcher/inc/wlan_mlme_api.h
  36. 16 0
      components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
  37. 27 0
      components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
  38. 93 0
      components/mlme/dispatcher/src/wlan_mlme_api.c
  39. 6 0
      components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c
  40. 1 1
      components/nan/core/src/nan_api.c
  41. 16 7
      components/pmo/core/src/wlan_pmo_static_config.c
  42. 11 1
      components/pre_cac/core/src/wlan_pre_cac_main.c
  43. 130 26
      components/target_if/connection_mgr/src/target_if_cm_roam_offload.c
  44. 39 0
      components/target_if/mlme/inc/target_if_mlme.h
  45. 74 0
      components/target_if/mlme/src/target_if_mlme.c
  46. 44 0
      components/tdls/core/src/wlan_tdls_cmds_process.c
  47. 26 0
      components/tdls/core/src/wlan_tdls_ct.c
  48. 30 0
      components/tdls/core/src/wlan_tdls_main.c
  49. 8 0
      components/tdls/core/src/wlan_tdls_main.h
  50. 92 9
      components/tdls/core/src/wlan_tdls_mgmt.c
  51. 16 0
      components/tdls/core/src/wlan_tdls_mgmt.h
  52. 3 3
      components/tdls/core/src/wlan_tdls_peer.c
  53. 3 1
      components/tdls/dispatcher/inc/wlan_tdls_public_structs.h
  54. 1 0
      components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c
  55. 2 0
      components/umac/mlme/connection_mgr/core/src/wlan_cm_host_util.c
  56. 64 5
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c
  57. 47 21
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c
  58. 6 8
      components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h
  59. 2 32
      components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c
  60. 3 0
      components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h
  61. 11 3
      components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c
  62. 24 3
      components/umac/mlme/mlo_mgr/inc/wlan_mlo_mgr_roam.h
  63. 11 15
      components/umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c
  64. 77 31
      components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c
  65. 43 47
      components/umac/mlme/mlo_mgr/src/wlan_t2lm_api.c
  66. 362 0
      components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_bearer_switch.c
  67. 214 0
      components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_bearer_switch.h
  68. 65 0
      components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_main.c
  69. 20 0
      components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_main.h
  70. 131 3
      components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.c
  71. 31 0
      components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.h
  72. 45 0
      components/umac/mlme/sap/ll_sap/dispatcher/inc/wlan_ll_sap_api.h
  73. 61 0
      components/umac/mlme/sap/ll_sap/dispatcher/inc/wlan_ll_sap_public_structs.h
  74. 24 0
      components/umac/mlme/sap/ll_sap/dispatcher/src/wlan_ll_sap_api.c
  75. 22 0
      components/umac/twt/dispatcher/inc/cfg_twt.h
  76. 45 0
      components/wmi/inc/wmi_unified_mlme_api.h
  77. 35 0
      components/wmi/src/wmi_unified_mlme_api.c
  78. 68 0
      components/wmi/src/wmi_unified_mlme_tlv.c
  79. 9 6
      components/wmi/src/wmi_unified_roam_tlv.c
  80. 22 4
      configs/config_to_feature.h
  81. 3 0
      configs/default_defconfig
  82. 1 0
      configs/genoa.common
  83. 2 0
      configs/genoa.pci.debug_defconfig
  84. 34 0
      configs/niobe_consolidate_kiwi-v2_defconfig
  85. 390 0
      configs/niobe_gki_kiwi-v2_defconfig
  86. 3 0
      configs/peach_defconfig
  87. 2 0
      configs/pineapple_gki_kiwi-v2_defconfig
  88. 8 1
      configs/pineapple_gki_peach_defconfig
  89. 2 0
      configs/qca6174_defconfig
  90. 1 0
      configs/qca6390_defconfig
  91. 1 0
      configs/qcs40x.snoc.perf_defconfig
  92. 33 0
      configs/sun_consolidate_kiwi-v2_defconfig
  93. 34 0
      configs/sun_consolidate_peach_defconfig
  94. 387 0
      configs/sun_gki_kiwi-v2_defconfig
  95. 385 0
      configs/sun_gki_peach_defconfig
  96. 9 0
      configs/wcn6450_defconfig
  97. 1 0
      configs/wear_defconfig
  98. 2 0
      core/cds/inc/cds_config.h
  99. 18 0
      core/cds/src/cds_api.c
  100. 21 1
      core/hdd/inc/hdd_config.h

+ 5 - 0
Android.mk

@@ -25,6 +25,11 @@ LOCAL_MODULE_DDK_BUILD := true
 LOCAL_MODULE_DDK_ALLOW_UNSAFE_HEADERS := true
 endif
 
+ifeq ($(TARGET_BOARD_PLATFORM), niobe)
+LOCAL_MODULE_DDK_BUILD := true
+LOCAL_MODULE_DDK_ALLOW_UNSAFE_HEADERS := true
+endif
+
 LOCAL_PATH := $(call my-dir)
 $(call wlog,LOCAL_PATH=$(LOCAL_PATH))
 

+ 38 - 4
Kbuild

@@ -936,8 +936,14 @@ CLD_WMI_MC_CP_STATS_OBJS :=	$(WMI_DIR)/src/wmi_unified_mc_cp_stats_tlv.o \
 				$(WMI_DIR)/src/wmi_unified_mc_cp_stats_api.o
 endif
 
+ifeq ($(CONFIG_QCA_TARGET_IF_MLME), y)
+CLD_WMI_MLME_OBJS += $(WMI_DIR)/src/wmi_unified_mlme_tlv.o \
+		     $(WMI_DIR)/src/wmi_unified_mlme_api.o
+endif
+
 CLD_WMI_OBJS :=	$(CLD_WMI_ROAM_OBJS) \
-		$(CLD_WMI_MC_CP_STATS_OBJS)
+		$(CLD_WMI_MC_CP_STATS_OBJS) \
+		$(CLD_WMI_MLME_OBJS)
 
 $(call add-wlan-objs,cld_wmi,$(CLD_WMI_OBJS))
 
@@ -1637,8 +1643,10 @@ MLME_INC += $(LL_SAP_INC)
 
 ifeq ($(CONFIG_WLAN_FEATURE_LL_LT_SAP), y)
 MLME_OBJS += $(LL_SAP_DIR)/dispatcher/src/wlan_ll_sap_ucfg_api.o \
+		$(LL_SAP_DIR)/dispatcher/src/wlan_ll_sap_api.o \
 		$(LL_SAP_DIR)/core/src/wlan_ll_sap_main.o \
-		$(LL_SAP_DIR)/core/src/wlan_ll_lt_sap_main.o
+		$(LL_SAP_DIR)/core/src/wlan_ll_lt_sap_main.o \
+		$(LL_SAP_DIR)/core/src/wlan_ll_lt_sap_bearer_switch.o
 endif
 
 $(call add-wlan-objs,mlme,$(MLME_OBJS))
@@ -1744,9 +1752,14 @@ $(call add-wlan-objs,wlan_pre_cac,$(WLAN_PRE_CAC_OBJS))
 CLD_TARGET_IF_DIR := components/target_if
 
 CLD_TARGET_IF_INC := -I$(WLAN_ROOT)/$(CLD_TARGET_IF_DIR)/pmo/inc \
+		     -I$(WLAN_ROOT)/$(CLD_TARGET_IF_DIR)/mlme/inc \
+
+ifeq ($(CONFIG_QCA_TARGET_IF_MLME), y)
+CLD_TARGET_IF_OBJ := $(CLD_TARGET_IF_DIR)/mlme/src/target_if_mlme.o
+endif
 
 ifeq ($(CONFIG_POWER_MANAGEMENT_OFFLOAD), y)
-CLD_TARGET_IF_OBJ := $(CLD_TARGET_IF_DIR)/pmo/src/target_if_pmo_arp.o \
+CLD_TARGET_IF_OBJ += $(CLD_TARGET_IF_DIR)/pmo/src/target_if_pmo_arp.o \
 		$(CLD_TARGET_IF_DIR)/pmo/src/target_if_pmo_gtk.o \
 		$(CLD_TARGET_IF_DIR)/pmo/src/target_if_pmo_hw_filter.o \
 		$(CLD_TARGET_IF_DIR)/pmo/src/target_if_pmo_lphb.o \
@@ -1833,7 +1846,10 @@ POLICY_MGR_OBJS := $(POLICY_MGR_DIR)/src/wlan_policy_mgr_action.o \
 	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_get_set_utils.o \
 	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_init_deinit.o \
 	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_ucfg.o \
-	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_pcl.o \
+	$(POLICY_MGR_DIR)/src/wlan_policy_mgr_pcl.o
+ifeq ($(CONFIG_WLAN_FEATURE_LL_LT_SAP), y)
+POLICY_MGR_OBJS += $(POLICY_MGR_DIR)/src/wlan_policy_mgr_ll_sap.o
+endif
 
 $(call add-wlan-objs,policy_mgr,$(POLICY_MGR_OBJS))
 
@@ -3416,6 +3432,7 @@ ccflags-$(CONFIG_FEATURE_WLAN_SCAN_PNO) += -DFEATURE_WLAN_SCAN_PNO
 ccflags-$(CONFIG_WLAN_FEATURE_PACKET_FILTERING) += -DWLAN_FEATURE_PACKET_FILTERING
 ccflags-$(CONFIG_DHCP_SERVER_OFFLOAD) += -DDHCP_SERVER_OFFLOAD
 ccflags-$(CONFIG_WLAN_NS_OFFLOAD) += -DWLAN_NS_OFFLOAD
+ccflags-$(CONFIG_QCA_TARGET_IF_MLME) += -DQCA_TARGET_IF_MLME
 ccflags-$(CONFIG_WLAN_DYNAMIC_ARP_NS_OFFLOAD) += -DFEATURE_WLAN_DYNAMIC_ARP_NS_OFFLOAD
 ccflags-$(CONFIG_WLAN_FEATURE_ICMP_OFFLOAD) += -DWLAN_FEATURE_ICMP_OFFLOAD
 ccflags-$(CONFIG_FEATURE_WLAN_RA_FILTERING) += -DFEATURE_WLAN_RA_FILTERING
@@ -4130,6 +4147,12 @@ ccflags-y += -DWLAN_FEATURE_TSF_UPLINK_DELAY
 CONFIG_WLAN_TSF_AUTO_REPORT := y
 endif
 
+# Enable tx latency stats feature
+ifeq ($(CONFIG_WLAN_TX_LATENCY_STATS), y)
+ccflags-y += -DWLAN_FEATURE_TX_LATENCY_STATS
+CONFIG_WLAN_TSF_AUTO_REPORT := y
+endif
+
 # Enable TSF auto report feature
 ccflags-$(CONFIG_WLAN_TSF_AUTO_REPORT) += -DWLAN_FEATURE_TSF_AUTO_REPORT
 
@@ -4639,6 +4662,17 @@ CONFIG_WLAN_MAX_ML_DEFAULT_LINK  ?= 1
 endif
 ccflags-y += -DWLAN_MAX_ML_DEFAULT_LINK=$(CONFIG_WLAN_MAX_ML_DEFAULT_LINK)
 
+ifdef CONFIG_WLAN_FEATURE_11BE_MLO
+ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
+CONFIG_WLAN_DEFAULT_REC_LINK_VALUE  ?= 2
+endif
+else
+ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
+CONFIG_WLAN_DEFAULT_REC_LINK_VALUE  ?= 2
+endif
+endif
+ccflags-y += -DWLAN_DEFAULT_REC_LINK_VALUE=$(CONFIG_WLAN_DEFAULT_REC_LINK_VALUE)
+
 ifdef CONFIG_WLAN_FEATURE_11BE_MLO
 CONFIG_WLAN_MAX_ML_BSS_LINKS ?= 3
 else

+ 27 - 0
Kconfig

@@ -9,6 +9,22 @@ config QCA_CLD_WLAN
 
 if QCA_CLD_WLAN != n
 
+config WLAN_FEATURE_NO_STA_SAP_CONCURRENCY
+	bool "Enable WLAN_FEATURE_NO_STA_SAP_CONCURRENCY"
+	default n
+
+config WLAN_FEATURE_NO_STA_NAN_CONCURRENCY
+	bool "Enable WLAN_FEATURE_NO_STA_NAN_CONCURRENCY"
+	default n
+
+config WLAN_FEATURE_NO_SAP_NAN_CONCURRENCY
+	bool "Enable WLAN_FEATURE_NO_SAP_NAN_CONCURRENCY"
+	default n
+
+config WLAN_FEATURE_NO_P2P_CONCURRENCY
+	bool "Enable WLAN_FEATURE_NO_P2P_CONCURRENCY"
+	default n
+
 config 160MHZ_SUPPORT
 	bool "Enable 160MHZ_SUPPORT"
 	default n
@@ -131,6 +147,10 @@ config CP_STATS
 	bool "Enable CP_STATS"
 	default n
 
+config QCA_TARGET_IF_MLME
+	bool "Enable TARGET_IF MLME"
+	default n
+
 config DCS
 	bool "Enable DCS"
 	default n
@@ -1638,6 +1658,11 @@ config WLAN_TSF_UPLINK_DELAY
 	depends on WLAN_TSF_AUTO_REPORT
 	default n
 
+config WLAN_TX_LATENCY_STATS
+	bool "Enable WLAN_TX_LATENCY_STATS"
+	depends on WLAN_TSF_AUTO_REPORT
+	default n
+
 config WLAN_TWT_CONVERGED
 	bool "Enable WLAN_TWT_CONVERGED"
 	default n
@@ -1879,6 +1904,8 @@ config FEATURE_WLAN_CH_AVOID_EXT
 
 config WLAN_TRACE_HIDE_MAC_ADDRESS_DISABLE
 	bool "enable CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS_DISABLE"
+	default n
+
 config 4_BYTES_TLV_TAG
 	bool "enable 4_BYTES_TLV_TAG"
 	default n

+ 0 - 3
components/action_oui/core/src/wlan_action_oui_main.c

@@ -158,9 +158,6 @@ static void action_oui_load_config(struct action_oui_psoc_priv *psoc_priv)
 		      cfg_get(psoc,
 			      CFG_ACTION_OUI_DISABLE_AGGRESSIVE_TX),
 		      ACTION_OUI_MAX_STR_LEN);
-	qdf_str_lcopy(psoc_priv->action_oui_str[ACTION_OUI_FORCE_MAX_NSS],
-		      cfg_get(psoc, CFG_ACTION_OUI_FORCE_MAX_NSS),
-		      ACTION_OUI_MAX_STR_LEN);
 	qdf_str_lcopy(psoc_priv->action_oui_str
 					  [ACTION_OUI_DISABLE_AGGRESSIVE_EDCA],
 		      cfg_get(psoc,

+ 1 - 6
components/action_oui/core/src/wlan_action_oui_parse.c

@@ -952,18 +952,13 @@ action_oui_is_empty(struct action_oui_psoc_priv *psoc_priv,
 	qdf_list_t *extension_list;
 
 	oui_priv = psoc_priv->oui_priv[action_id];
-	if (!oui_priv) {
-		action_oui_debug("action oui for id %d is empty",
-				 action_id);
+	if (!oui_priv)
 		return true;
-	}
 
 	extension_list = &oui_priv->extension_list;
 	qdf_mutex_acquire(&oui_priv->extension_lock);
 	if (qdf_list_empty(extension_list)) {
 		qdf_mutex_release(&oui_priv->extension_lock);
-		action_oui_debug("action oui for id %d list is empty",
-				 action_id);
 		return true;
 	}
 	qdf_mutex_release(&oui_priv->extension_lock);

+ 0 - 43
components/action_oui/dispatcher/inc/wlan_action_oui_cfg.h

@@ -421,48 +421,6 @@
 	"FFFFFF 00 2A F85971000000 E0 50 FFFFFF 00 2A 14ABC5000000 E0 50", \
 	"Used to specify action OUIs to disable aggressive TX")
 
-/*
- * <ini>
- * gActionOUIForceMaxNss - Used to specify action OUIs for Max NSS connection
- * @Default:
- * Note: User should strictly add new action OUIs at the end of this
- * default value.
- *
- * Default OUIs: (All values in Hex)
- * OUI 1 :001018
- *   OUI data Len : 06
- *   OUI Data : 0201009c0000
- *   OUI data Mask: FC
- *   Info Mask : 01 - only OUI present in Info mask
- * OUI 2 :001018
- *   OUI data Len : 06
- *   OUI Data : 0201001c0000
- *   OUI data Mask: FC
- *   Info Mask : 01 - only OUI present in Info mask
- * OUI 3 :001018
- *   OUI data Len : 06
- *   OUI Data : 0200009c0000
- *   OUI data Mask: FC
- *   Info Mask : 01 - only OUI present in Info mask
- *
- * This ini is used to specify the AP OUIs with which max capability is
- * sent in association request even though AP advertises 1x1 capability.
- *
- * Related: None
- *
- * Supported Feature: Action OUIs
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_ACTION_OUI_FORCE_MAX_NSS CFG_INI_STRING( \
-			"gActionOUIForceMaxNss", \
-			0, \
-			ACTION_OUI_MAX_STR_LEN, \
-			"001018 06 0201009c0000 FC 01 001018 06 0201001c0000 FC 01 001018 06 0200009c0000 FC 01", \
-			"Used to specify action OUIs for forcing max NSS connection")
-
 /*
  * <ini>
  * gActionOUIDisableAggressiveEDCA - Used to specify action OUIs to control
@@ -841,7 +799,6 @@
 	CFG(CFG_ACTION_OUI_ITO_ALTERNATE) \
 	CFG(CFG_ACTION_OUI_ITO_EXTENSION) \
 	CFG(CFG_ACTION_OUI_DISABLE_AGGRESSIVE_TX) \
-	CFG(CFG_ACTION_OUI_FORCE_MAX_NSS) \
 	CFG(CFG_ACTION_OUI_DISABLE_AGGRESSIVE_EDCA) \
 	CFG(CFG_ACTION_OUI_EXTEND_WOW_ITO) \
 	CFG(CFG_ACTION_OUI_SWITCH_TO_11N_MODE) \

+ 0 - 2
components/action_oui/dispatcher/inc/wlan_action_oui_public_struct.h

@@ -103,7 +103,6 @@
  * @ACTION_OUI_SWITCH_TO_11N_MODE: connect in 11n
  * @ACTION_OUI_CONNECT_1X1_WITH_1_CHAIN: connect in 1x1 & disable diversity gain
  * @ACTION_OUI_DISABLE_AGGRESSIVE_TX: disable aggressive TX in firmware
- * @ACTION_OUI_FORCE_MAX_NSS: Force Max NSS connection with few IOT APs
  * @ACTION_OUI_DISABLE_AGGRESSIVE_EDCA: disable aggressive EDCA with the ap
  * @ACTION_OUI_DISABLE_TWT: disable TWT with the ap
  * @ACTION_OUI_EXTEND_WOW_ITO: extend ITO under WOW mode if vendor OUI is
@@ -148,7 +147,6 @@ enum action_oui_id {
 	ACTION_OUI_TAKE_ALL_BAND_INFO,
 	ACTION_OUI_AUTH_ASSOC_6MBPS_2GHZ,
 	ACTION_OUI_DISABLE_BFORMEE,
-	ACTION_OUI_FORCE_MAX_NSS,
 	ACTION_OUI_DISABLE_AGGRESSIVE_EDCA,
 	ACTION_OUI_MAXIMUM_ID
 };

+ 4 - 4
components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c

@@ -168,7 +168,10 @@ if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
 				       struct wlan_objmgr_vdev *vdev)
 {
 	struct wlan_objmgr_psoc *psoc;
-	uint8_t vdev_id;
+	uint8_t vdev_id = wlan_vdev_get_id(vdev);
+
+	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE)
+		return QDF_STATUS_E_FAILURE;
 
 	/*
 	 * When link switch is in progress, don't send RSO Enable before vdev
@@ -183,10 +186,7 @@ if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
 		return QDF_STATUS_E_FAILURE;
 
 	if (policy_mgr_is_sta_active_connection_exists(psoc) &&
-	    wlan_vdev_mlme_get_opmode(vdev) == QDF_STA_MODE &&
 	    mlo_is_enable_roaming_on_connected_sta_allowed(vdev)) {
-		vdev_id = wlan_vdev_get_id(vdev);
-		ifmgr_debug("Enable roaming on connected sta for vdev_id %d", vdev_id);
 		wlan_cm_enable_roaming_on_connected_sta(pdev, vdev_id);
 		policy_mgr_set_pcl_for_connected_vdev(psoc, vdev_id, true);
 	}

+ 162 - 0
components/cmn_services/logging/inc/wlan_connectivity_logging.h

@@ -1198,7 +1198,30 @@ void
 wlan_populate_vsie(struct wlan_objmgr_vdev *vdev,
 		   struct wlan_diag_packet_info *data, bool is_tx);
 
+/**
+ * wlan_cdp_set_peer_freq() - API to set frequency to dp peer
+ * @psoc: psoc pointer
+ * @peer_mac: Bssid of peer
+ * @freq: frequency(in MHz)
+ * @vdev_id: vdev id
+ *
+ * Return: None
+ */
+void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id);
+
 #ifdef WLAN_FEATURE_11BE_MLO
+
+/**
+ * wlan_connectivity_mlo_reconfig_event() -API to log MLO reconfig event
+ * @vdev: vdev pointer
+ *
+ * Return: None
+ */
+void
+wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev);
+
 /**
  * wlan_connectivity_mlo_setup_event() - Fill and send MLO setup data
  * @vdev: vdev pointer
@@ -1206,11 +1229,82 @@ wlan_populate_vsie(struct wlan_objmgr_vdev *vdev,
  * Return: None
  */
 void wlan_connectivity_mlo_setup_event(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * wlan_connectivity_t2lm_req_resp_event - API to send t2lm Req/resp
+ * event logs to userspace
+ * @vdev: vdev pointer
+ * @token: dialog Token
+ * @t2lm_status: T2LM response status code. Refer enum wlan_t2lm_resp_frm_type
+ * @tx_status: TX status
+ * @freq: Frame received/transmitted frequency
+ * @is_rx: Flag to inidcate packet being received
+ * @subtype: Determine whether the evnt sent is for t2lm request
+ * or t2lm response
+ *
+ * Return: None
+ */
+void
+wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
+				      uint8_t token,
+				      enum wlan_t2lm_resp_frm_type t2lm_status,
+				      enum qdf_dp_tx_rx_status tx_status,
+				      qdf_freq_t freq,
+				      bool is_rx, uint8_t subtype);
+/**
+ * wlan_connectivity_t2lm_status_event() - Fill and send T2LM data
+ * @vdev: vdev pointer
+ *
+ * Return: None
+ */
+void wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * wlan_populate_mlo_mgmt_event_param() - API to populate MLO management frame
+ * parameter
+ * @vdev: vdev pointer
+ * @data: Buffer to be filled with MLO parameter
+ * @tag: WLAN event tag. Refer enum wlan_main_tag
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
+				   struct wlan_diag_packet_info *data,
+				   enum wlan_main_tag tag);
+
 #else
+static inline void
+wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev)
+{
+}
+
 static inline void
 wlan_connectivity_mlo_setup_event(struct wlan_objmgr_vdev *vdev)
 {
 }
+
+static inline void
+wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
+				      uint8_t token,
+				      enum wlan_t2lm_resp_frm_type status,
+				      enum qdf_dp_tx_rx_status tx_status,
+				      qdf_freq_t freq,
+				      bool is_rx, uint8_t subtype)
+{}
+
+static inline void
+wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev)
+{
+}
+
+static inline QDF_STATUS
+wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
+				   struct wlan_diag_packet_info *data,
+				   enum wlan_main_tag tag)
+{
+	return QDF_STATUS_SUCCESS;
+}
 #endif
 
 /**
@@ -1246,6 +1340,14 @@ void
 wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id);
 
+/**
+ * wlan_connectivity_connecting_event() - API to log connecting event
+ * @vdev: vdev pointer
+ *
+ * Return: None
+ */
+void
+wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev);
 
 #elif defined(WLAN_FEATURE_CONNECTIVITY_LOGGING)
 /**
@@ -1316,6 +1418,15 @@ wlan_connectivity_mgmt_event(struct wlan_objmgr_psoc *psoc,
 			     uint8_t auth_seq, uint16_t aid,
 			     enum wlan_main_tag tag);
 
+/**
+ * wlan_connectivity_connecting_event() - API to log connecting event
+ * @vdev: vdev pointer
+ *
+ * Return: None
+ */
+void
+wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev);
+
 /**
  * wlan_populate_vsie() - Populate VSIE field for logging
  * @vdev: vdev pointer
@@ -1358,6 +1469,20 @@ wlan_convert_freq_to_diag_band(uint16_t ch_freq);
 void
 wlan_populate_vsie(struct wlan_objmgr_vdev *vdev,
 		   struct wlan_diag_packet_info *data, bool is_tx);
+
+/**
+ * wlan_cdp_set_peer_freq() - API to set frequency to dp peer
+ * @psoc: psoc pointer
+ * @peer_mac: Bssid of peer
+ * @freq: frequency(in MHz)
+ * @vdev_id: vdev id
+ *
+ * Return: None
+ */
+void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id);
+
 #else
 static inline
 void wlan_connectivity_logging_start(struct wlan_objmgr_psoc *psoc,
@@ -1402,10 +1527,47 @@ wlan_convert_freq_to_diag_band(uint16_t ch_freq)
 	return WLAN_INVALID_BAND;
 }
 
+static inline QDF_STATUS
+wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
+				   struct wlan_diag_packet_info *data,
+				   enum wlan_main_tag tag)
+{
+	return QDF_STATUS_SUCCESS;
+}
+
+static inline void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id)
+{}
+
+static inline void
+wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev)
+{
+}
+
 static inline void
 wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc,
 				 uint8_t vdev_id)
 {}
+
+static inline void
+wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
+				      uint8_t token,
+				      enum wlan_t2lm_resp_frm_type status,
+				      enum qdf_dp_tx_rx_status tx_status,
+				      qdf_freq_t freq,
+				      bool is_rx, uint8_t subtype)
+{}
+
+static inline void
+wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev)
+{
+}
+
+static inline void
+wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev)
+{
+}
 #endif
 
 #if defined(CONNECTIVITY_DIAG_EVENT) && defined(WLAN_FEATURE_11BE_MLO)

+ 293 - 11
components/cmn_services/logging/src/wlan_connectivity_logging.c

@@ -24,6 +24,9 @@
 #include "wlan_cm_api.h"
 #include "wlan_mlme_main.h"
 #include "wlan_mlo_mgr_sta.h"
+#include "wlan_mlme_api.h"
+#include "cdp_txrx_ctrl.h"
+#include "wlan_mlo_mgr_peer.h"
 
 #ifdef WLAN_FEATURE_CONNECTIVITY_LOGGING
 static struct wlan_connectivity_log_buf_data global_cl;
@@ -302,6 +305,73 @@ wlan_cache_connectivity_log(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 #ifdef CONNECTIVITY_DIAG_EVENT
 
 #ifdef WLAN_FEATURE_11BE_MLO
+void
+wlan_connectivity_t2lm_req_resp_event(struct wlan_objmgr_vdev *vdev,
+				      uint8_t token,
+				      enum wlan_t2lm_resp_frm_type t2lm_status,
+				      enum qdf_dp_tx_rx_status tx_status,
+				      qdf_freq_t freq,
+				      bool is_rx, uint8_t subtype)
+{
+	WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event,
+				 struct wlan_diag_mlo_t2lm_req_resp);
+
+	wlan_diag_event.diag_cmn.vdev_id = wlan_vdev_get_id(vdev);
+	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
+	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
+
+	wlan_diag_event.version = DIAG_MLO_T2LM_REQ_RESP_VERSION;
+
+	wlan_diag_event.token = token;
+	wlan_diag_event.subtype = subtype;
+
+	wlan_diag_event.status = t2lm_status;
+	wlan_diag_event.tx_status = wlan_get_diag_tx_status(tx_status);
+	wlan_diag_event.is_rx = is_rx;
+
+	wlan_diag_event.band = wlan_convert_freq_to_diag_band(freq);
+
+	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event,
+				    EVENT_WLAN_MLO_T2LM_REQ_RESP);
+}
+
+void
+wlan_connectivity_mlo_reconfig_event(struct wlan_objmgr_vdev *vdev)
+{
+	struct mlo_link_info *link_info = NULL;
+	struct wlan_channel *chan_info = NULL;
+	uint8_t link_id;
+
+	WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event,
+				 struct wlan_diag_mlo_reconfig);
+
+	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
+	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	wlan_diag_event.version = DIAG_MLO_RECONFIG_VERSION;
+
+	link_id = wlan_vdev_get_link_id(vdev);
+	wlan_diag_event.mlo_cmn_info.link_id = link_id;
+
+	if (!vdev->mlo_dev_ctx)
+		return;
+
+	link_info = mlo_mgr_get_ap_link_by_link_id(vdev->mlo_dev_ctx, link_id);
+	if (!link_info) {
+		mlme_err("linl: %d Link info not found", link_id);
+		return;
+	}
+	chan_info = link_info->link_chan_info;
+	if (!chan_info) {
+		mlme_err("link: %d Chan info not found", link_id);
+		return;
+	}
+
+	wlan_diag_event.mlo_cmn_info.band =
+			wlan_convert_freq_to_diag_band(chan_info->ch_freq);
+
+	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_MLO_RECONFIG);
+}
+
 static QDF_STATUS
 wlan_populate_link_addr(struct wlan_objmgr_vdev *vdev,
 			struct wlan_diag_sta_info *wlan_diag_event)
@@ -355,7 +425,7 @@ wlan_populate_band_bitmap(struct mlo_link_switch_context *link_ctx)
 	return band_bitmap;
 }
 
-static QDF_STATUS
+QDF_STATUS
 wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
 				   struct wlan_diag_packet_info *data,
 				   enum wlan_main_tag tag)
@@ -477,6 +547,114 @@ wlan_connectivity_mlo_setup_event(struct wlan_objmgr_vdev *vdev)
 	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_MLO_SETUP);
 }
 
+#define IS_LINK_SET(link_bitmap, link_id) ((link_bitmap) & (BIT(link_id)))
+
+static void
+wlan_populate_tid_link_id_bitmap(struct wlan_t2lm_info *t2lm,
+				 struct mlo_link_info *link_info,
+				 struct wlan_diag_mlo_t2lm_status *buf,
+				 uint8_t bss_link)
+{
+	uint8_t link_id;
+	uint8_t dir, i;
+	uint16_t freq;
+
+	link_id = link_info->link_id;
+	freq = link_info->link_chan_info->ch_freq;
+	buf->mlo_cmn_info[bss_link].band =
+		wlan_convert_freq_to_diag_band(freq);
+	buf->mlo_cmn_info[bss_link].vdev_id = link_info->vdev_id;
+
+	for (dir = 0; dir < WLAN_T2LM_MAX_DIRECTION; dir++) {
+		for (i = 0; i < T2LM_MAX_NUM_TIDS; i++) {
+			switch (t2lm[dir].direction) {
+			case WLAN_T2LM_DL_DIRECTION:
+				if (
+				IS_LINK_SET(
+				t2lm[dir].ieee_link_map_tid[i], link_id))
+					buf->mlo_cmn_info[bss_link].tid_dl |=
+									BIT(i);
+				break;
+			case WLAN_T2LM_UL_DIRECTION:
+				if (
+				IS_LINK_SET(
+				t2lm[dir].ieee_link_map_tid[i], link_id))
+					buf->mlo_cmn_info[bss_link].tid_ul |=
+									BIT(i);
+				break;
+			case WLAN_T2LM_BIDI_DIRECTION:
+				if (
+				IS_LINK_SET(
+				t2lm[dir].ieee_link_map_tid[i], link_id)) {
+					buf->mlo_cmn_info[bss_link].tid_dl |=
+									BIT(i);
+					buf->mlo_cmn_info[bss_link].tid_ul |=
+									BIT(i);
+				}
+				break;
+			default:
+				logging_debug("Invalid direction %d",
+					      t2lm[dir].direction);
+				break;
+			}
+		}
+	}
+}
+
+void
+wlan_connectivity_t2lm_status_event(struct wlan_objmgr_vdev *vdev)
+{
+	uint8_t i = 0, dir;
+	QDF_STATUS status;
+	struct mlo_link_info *link_info;
+	struct wlan_t2lm_info t2lm[WLAN_T2LM_MAX_DIRECTION] = {0};
+
+	WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event,
+				 struct wlan_diag_mlo_t2lm_status);
+
+	if (!mlo_is_mld_sta(vdev))
+		return;
+
+	if (!vdev->mlo_dev_ctx) {
+		logging_err("MLO dev ctx not found");
+		return;
+	}
+	link_info = mlo_mgr_get_ap_link(vdev);
+	if (!link_info) {
+		logging_err("link_info invalid");
+		return;
+	}
+
+	if (mlo_mgr_is_link_switch_in_progress(vdev))
+		return;
+
+	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
+	wlan_diag_event.version = DIAG_MLO_T2LM_STATUS_VERSION;
+
+	for (dir = 0; dir < WLAN_T2LM_MAX_DIRECTION; dir++)
+		t2lm[dir].direction = WLAN_T2LM_INVALID_DIRECTION;
+
+	status = wlan_get_t2lm_mapping_status(vdev, t2lm);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		logging_err("Unable to get t2lm_mapping");
+		return;
+	}
+
+	for (i = 0; i < WLAN_MAX_ML_BSS_LINKS && i < MAX_BANDS; i++) {
+		if (qdf_is_macaddr_zero(&link_info->ap_link_addr) &&
+		    link_info->vdev_id == WLAN_INVALID_VDEV_ID)
+			continue;
+
+		wlan_populate_tid_link_id_bitmap(t2lm, link_info,
+						 &wlan_diag_event, i);
+		link_info++;
+	}
+
+	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event,
+				    EVENT_WLAN_MLO_T2LM_STATUS);
+}
+
 #else
 static QDF_STATUS
 wlan_populate_link_addr(struct wlan_objmgr_vdev *vdev,
@@ -484,15 +662,21 @@ wlan_populate_link_addr(struct wlan_objmgr_vdev *vdev,
 {
 	return QDF_STATUS_SUCCESS;
 }
+#endif
 
-static QDF_STATUS
-wlan_populate_mlo_mgmt_event_param(struct wlan_objmgr_vdev *vdev,
-				   struct wlan_diag_packet_info *data,
-				   enum wlan_main_tag tag)
+void
+wlan_cdp_set_peer_freq(struct wlan_objmgr_psoc *psoc, uint8_t *peer_mac,
+		       uint32_t freq, uint8_t vdev_id)
 {
-	return QDF_STATUS_SUCCESS;
+	ol_txrx_soc_handle soc_txrx_handle;
+	cdp_config_param_type val = {0};
+
+	soc_txrx_handle = wlan_psoc_get_dp_handle(psoc);
+
+	val.cdp_peer_param_freq = freq;
+	cdp_txrx_set_peer_param(soc_txrx_handle, vdev_id, peer_mac,
+				CDP_CONFIG_PEER_FREQ, val);
 }
-#endif
 
 void
 wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
@@ -512,6 +696,9 @@ wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE)
 		goto out;
 
+	if (!wlan_cm_is_first_candidate_connect_attempt(vdev))
+		goto out;
+
 	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
 	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
 	wlan_diag_event.diag_cmn.vdev_id = vdev_id;
@@ -533,7 +720,7 @@ wlan_connectivity_sta_info_event(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id)
 	}
 
 	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_STA_INFO);
-
+	wlan_connectivity_connecting_event(vdev);
 out:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_OBJMGR_ID);
 }
@@ -648,7 +835,99 @@ out:
 
 }
 
+void
+wlan_connectivity_connecting_event(struct wlan_objmgr_vdev *vdev)
+{
+	QDF_STATUS status;
+	struct wlan_cm_connect_req req;
+
+	WLAN_HOST_DIAG_EVENT_DEF(wlan_diag_event, struct wlan_diag_connect);
+
+	status = wlan_cm_get_active_connect_req_param(vdev, &req);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		logging_err("vdev: %d failed to get active cmd request",
+			    wlan_vdev_get_id(vdev));
+		return;
+	}
+
+	wlan_diag_event.version = DIAG_CONN_VERSION;
+	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
+	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
+	wlan_diag_event.diag_cmn.vdev_id = wlan_vdev_get_id(vdev);
+	wlan_diag_event.subtype = WLAN_CONN_DIAG_CONNECTING_EVENT;
+
+	wlan_diag_event.ssid_len = req.ssid.length;
+
+	if (req.ssid.length > WLAN_SSID_MAX_LEN)
+		wlan_diag_event.ssid_len = WLAN_SSID_MAX_LEN;
+
+	qdf_mem_copy(wlan_diag_event.ssid, req.ssid.ssid,
+		     wlan_diag_event.ssid_len);
+
+	if (!qdf_is_macaddr_zero(&req.bssid))
+		qdf_mem_copy(wlan_diag_event.diag_cmn.bssid, req.bssid.bytes,
+			     QDF_MAC_ADDR_SIZE);
+	else if (!qdf_is_macaddr_zero(&req.bssid_hint))
+		qdf_mem_copy(wlan_diag_event.bssid_hint, req.bssid_hint.bytes,
+			     QDF_MAC_ADDR_SIZE);
+
+	if (req.chan_freq)
+		wlan_diag_event.freq = req.chan_freq;
+	else if (req.chan_freq_hint)
+		wlan_diag_event.freq_hint = req.chan_freq_hint;
+
+	wlan_diag_event.pairwise_cipher	= req.crypto.user_cipher_pairwise;
+	wlan_diag_event.grp_cipher = req.crypto.user_grp_cipher;
+	wlan_diag_event.akm = req.crypto.user_akm_suite;
+	wlan_diag_event.auth_algo = req.crypto.user_auth_type;
+
+	wlan_diag_event.bt_coex =
+		wlan_mlme_get_bt_profile_con(wlan_vdev_get_psoc(vdev));
+
+	WLAN_HOST_DIAG_EVENT_REPORT(&wlan_diag_event, EVENT_WLAN_CONN);
+}
+
 #ifdef WLAN_FEATURE_11BE_MLO
+
+#define BAND_TO_BITMAP(band) (band - 1)
+
+static uint8_t
+wlan_convert_link_id_to_diag_band(struct qdf_mac_addr *peer_mld,
+				  uint16_t link_bitmap)
+{
+	uint8_t i, band_bitmap = 0, band;
+	struct wlan_mlo_dev_context *mldev = NULL;
+	struct wlan_mlo_peer_context *mlpeer = NULL;
+	struct mlo_link_info *link_info = NULL;
+	uint32_t freq;
+
+	mlpeer = wlan_mlo_get_mlpeer_by_peer_mladdr(peer_mld, &mldev);
+	if (!mlpeer) {
+		logging_err("ml peer not found");
+		goto out;
+	}
+
+	for (i = 0; i < MAX_MLO_LINK_ID; i++) {
+		if (IS_LINK_SET(link_bitmap, i)) {
+			link_info = mlo_mgr_get_ap_link_by_link_id(mldev, i);
+			if (!link_info) {
+				logging_err("link: %d info does not exist", i);
+				continue;
+			}
+
+			freq = link_info->link_chan_info->ch_freq;
+			band = wlan_convert_freq_to_diag_band(freq);
+			if (band == WLAN_INVALID_BAND)
+				continue;
+
+			band_bitmap |= BIT(BAND_TO_BITMAP(band));
+		}
+	}
+
+out:
+	return band_bitmap;
+}
+
 void wlan_connectivity_mld_link_status_event(struct wlan_objmgr_psoc *psoc,
 					     struct mlo_link_switch_params *src)
 {
@@ -656,15 +935,18 @@ void wlan_connectivity_mld_link_status_event(struct wlan_objmgr_psoc *psoc,
 				 struct wlan_diag_mlo_link_status);
 
 	qdf_mem_zero(&wlan_diag_event,
-
 		     sizeof(struct wlan_diag_mlo_link_status));
 
 	wlan_diag_event.diag_cmn.timestamp_us = qdf_get_time_of_the_day_us();
 	wlan_diag_event.diag_cmn.ktime_us = qdf_ktime_to_us(qdf_ktime_get());
 	wlan_diag_event.version = DIAG_MLO_LINK_STATUS_VERSION;
 
-	wlan_diag_event.active_link = src->active_link_bitmap;
-	wlan_diag_event.prev_active_link = src->prev_link_bitmap;
+	wlan_diag_event.active_link =
+		wlan_convert_link_id_to_diag_band(&src->mld_addr,
+						  src->active_link_bitmap);
+	wlan_diag_event.prev_active_link =
+		wlan_convert_link_id_to_diag_band(&src->mld_addr,
+						  src->prev_link_bitmap);
 	wlan_diag_event.reason = src->reason_code;
 	wlan_diag_event.diag_cmn.fw_timestamp = src->fw_timestamp;
 

+ 36 - 13
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_api.h

@@ -2253,6 +2253,7 @@ struct policy_mgr_cdp_cbacks {
  * @hdd_ipa_set_mcc_mode_cb: Callback to set mcc mode for ipa module
  * @hdd_v2_flow_pool_map: Callback to create vdev flow pool
  * @hdd_v2_flow_pool_unmap: Callback to delete vdev flow pool
+ * @hdd_ipa_set_perf_level_bw: Callback to set ipa perf level based on BW
  */
 struct policy_mgr_dp_cbacks {
 	void (*hdd_disable_rx_ol_in_concurrency)(bool);
@@ -2260,6 +2261,7 @@ struct policy_mgr_dp_cbacks {
 	void (*hdd_ipa_set_mcc_mode_cb)(bool);
 	void (*hdd_v2_flow_pool_map)(int);
 	void (*hdd_v2_flow_pool_unmap)(int);
+	void (*hdd_ipa_set_perf_level_bw)(enum hw_mode_bandwidth bw);
 };
 
 /**
@@ -3070,6 +3072,23 @@ QDF_STATUS policy_mgr_check_conn_with_mode_and_vdev_id(
 		struct wlan_objmgr_psoc *psoc, enum policy_mgr_con_mode mode,
 		uint32_t vdev_id);
 
+/**
+ * policy_mgr_dump_freq_range_n_vdev_map() - Dump freq range of mac and vdev to
+ * mac mapping
+ * @num_vdev_mac_entries: Number of vdev-mac id mapping that follows
+ * @vdev_mac_map: vdev-mac id map. This memory will be freed by the caller.
+ * So, make local copy if needed.
+ * @num_mac_freq: Number of pdev freq mapping that follows
+ * @mac_freq_range: mac_freq_range mapping
+ *
+ * Return: None
+ */
+void
+policy_mgr_dump_freq_range_n_vdev_map(uint32_t num_vdev_mac_entries,
+			struct policy_mgr_vdev_mac_map *vdev_mac_map,
+			uint32_t num_mac_freq,
+			struct policy_mgr_pdev_mac_freq_map *mac_freq_range);
+
 /**
  * policy_mgr_hw_mode_transition_cb() - Callback for HW mode
  * transition from FW
@@ -4432,19 +4451,6 @@ bool policy_mgr_dual_beacon_on_single_mac_mcc_capable(
 bool policy_mgr_sta_sap_scc_on_lte_coex_chan(
 	struct wlan_objmgr_psoc *psoc);
 
-/**
- * policy_mgr_is_valid_for_channel_switch() - check for valid channel for
- * channel switch.
- * @psoc: pointer to psoc
- * @ch_freq: channel frequency to be validated.
- * This function validates whether the given channel is valid for channel
- * switch.
- *
- * Return: true or false
- */
-bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
-					    uint32_t ch_freq);
-
 /**
  * policy_mgr_get_user_config_sap_freq() - Get the user configured channel
  *
@@ -5626,4 +5632,21 @@ bool policy_mgr_get_vdev_diff_freq_new_conn(struct wlan_objmgr_psoc *psoc,
 					    uint32_t new_freq,
 					    uint8_t *vdev_id);
 
+/**
+ * policy_mgr_sap_on_non_psc_channel() - Check if STA operates in PSC or Non-PSC
+ *					 channel to restart SAP on Non-PSC
+ *					 channel
+ * @psoc: PSOC object information
+ * @intf_ch_freq: input/out interference channel frequency to sap
+ * @sap_vdev_id: SAP vdev id
+ *
+ * This function is to check if STA operates in PSC or Non-PSC channel
+ * to restart SAP on Non-PSC channel.
+ *
+ * Return: None
+ */
+void
+policy_mgr_sap_on_non_psc_channel(struct wlan_objmgr_psoc *psoc,
+				  qdf_freq_t *intf_ch_freq,
+				  uint8_t sap_vdev_id);
 #endif /* __WLAN_POLICY_MGR_API_H */

+ 37 - 0
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_ll_sap.h

@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: contains policy manager ll_sap definitions specific to the ll_sap module
+ */
+
+#include "wlan_objmgr_psoc_obj.h"
+
+/**
+ * wlan_policy_mgr_get_ll_lt_sap_vdev() - Get ll_lt_sap vdev
+ * @psoc: PSOC object
+ *
+ * API to find ll_lt_sap vdev pointer
+ *
+ * This API increments the ref count of the vdev object internally, the
+ * caller has to invoke the wlan_objmgr_vdev_release_ref() to decrement
+ * ref count
+ *
+ * Return: vdev pointer
+ *         NULL on FAILURE
+ */
+struct wlan_objmgr_vdev *
+wlan_policy_mgr_get_ll_lt_sap_vdev(struct wlan_objmgr_psoc *psoc);

+ 2 - 2
components/cmn_services/policy_mgr/inc/wlan_policy_mgr_public_struct.h

@@ -65,8 +65,8 @@
 #endif
 
 #ifdef WLAN_FEATURE_11BE_MLO
-/* Max MLO VDEVS - 1 as all vdevs cannot be disabled */
-#define MAX_NUMBER_OF_DISABLE_LINK WLAN_UMAC_MLO_MAX_VDEVS - 1
+/* Max MLO VDEVS for disabled link table */
+#define MAX_NUMBER_OF_DISABLE_LINK WLAN_UMAC_MLO_MAX_VDEVS
 #endif
 
 /* BIT 0 for low latency and BIT 1 for HIGH TPUT */

+ 60 - 42
components/cmn_services/policy_mgr/src/wlan_policy_mgr_action.c

@@ -48,6 +48,40 @@
 enum policy_mgr_conc_next_action (*policy_mgr_get_current_pref_hw_mode_ptr)
 	(struct wlan_objmgr_psoc *psoc);
 
+#define HW_MODE_DUMP_MAX_LEN 100
+void
+policy_mgr_dump_freq_range_n_vdev_map(uint32_t num_vdev_mac_entries,
+			struct policy_mgr_vdev_mac_map *vdev_mac_map,
+			uint32_t num_mac_freq,
+			struct policy_mgr_pdev_mac_freq_map *mac_freq_range)
+{
+	char log_str[HW_MODE_DUMP_MAX_LEN] = {0};
+	uint32_t str_len = HW_MODE_DUMP_MAX_LEN;
+	uint32_t len = 0;
+	uint32_t i;
+
+	if (mac_freq_range) {
+		for (i = 0, len = 0; i < num_mac_freq; i++)
+			len += qdf_scnprintf(log_str + len, str_len - len,
+					    "mac %d: %d => %d ",
+					    mac_freq_range[i].mac_id,
+					    mac_freq_range[i].start_freq,
+					    mac_freq_range[i].end_freq);
+		if (num_mac_freq)
+			policymgr_nofl_debug("Freq range:: %s", log_str);
+	}
+
+	if (!vdev_mac_map || !num_vdev_mac_entries)
+		return;
+
+	for (i = 0, len = 0; i < num_vdev_mac_entries; i++)
+		len += qdf_scnprintf(log_str + len, str_len - len,
+				     "vdev %d -> mac %d ",
+				     vdev_mac_map[i].vdev_id,
+				     vdev_mac_map[i].mac_id);
+	policymgr_nofl_debug("Vdev Map:: %s", log_str);
+}
+
 void policy_mgr_hw_mode_transition_cb(uint32_t old_hw_mode_index,
 			uint32_t new_hw_mode_index,
 			uint32_t num_vdev_mac_entries,
@@ -58,7 +92,6 @@ void policy_mgr_hw_mode_transition_cb(uint32_t old_hw_mode_index,
 {
 	QDF_STATUS status;
 	struct policy_mgr_hw_mode_params hw_mode;
-	uint32_t i;
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 
 	pm_ctx = policy_mgr_get_context(context);
@@ -72,37 +105,24 @@ void policy_mgr_hw_mode_transition_cb(uint32_t old_hw_mode_index,
 		return;
 	}
 
-	policy_mgr_debug("old_hw_mode_index=%d, new_hw_mode_index=%d",
-		old_hw_mode_index, new_hw_mode_index);
-
-	if (mac_freq_range)
-		for (i = 0; i < num_mac_freq; i++)
-			policy_mgr_debug("mac_id:%d start_freq:%d end_freq %d",
-					 mac_freq_range[i].mac_id,
-					 mac_freq_range[i].start_freq,
-					 mac_freq_range[i].end_freq);
-
-	for (i = 0; i < num_vdev_mac_entries; i++)
-		policy_mgr_debug("vdev_id:%d mac_id:%d",
-			vdev_mac_map[i].vdev_id,
-			vdev_mac_map[i].mac_id);
-
-	status = policy_mgr_get_hw_mode_from_idx(context,
-				new_hw_mode_index, &hw_mode);
-	if (status != QDF_STATUS_SUCCESS) {
-		policy_mgr_err("Get HW mode failed: %d", status);
+	status = policy_mgr_get_hw_mode_from_idx(context, new_hw_mode_index,
+						 &hw_mode);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		policy_mgr_err("Get HW mode for index %d reason: %d",
+			       new_hw_mode_index, status);
 		return;
 	}
 
-	policy_mgr_debug("MAC0: TxSS:%d, RxSS:%d, Bw:%d band_cap:%d",
+	policy_mgr_debug("HW mode: old %d new %d, DBS %d Agile %d SBS %d, MAC0:: SS:Tx %d Rx %d, BW %d band %d, MAC1:: SS:Tx %d Rx %d, BW %d",
+			 old_hw_mode_index, new_hw_mode_index, hw_mode.dbs_cap,
+			 hw_mode.agile_dfs_cap, hw_mode.sbs_cap,
 			 hw_mode.mac0_tx_ss, hw_mode.mac0_rx_ss,
-			 hw_mode.mac0_bw, hw_mode.mac0_band_cap);
-	policy_mgr_debug("MAC1: TxSS:%d, RxSS:%d, Bw:%d",
+			 hw_mode.mac0_bw, hw_mode.mac0_band_cap,
 			 hw_mode.mac1_tx_ss, hw_mode.mac1_rx_ss,
 			 hw_mode.mac1_bw);
-	policy_mgr_debug("DBS:%d, Agile DFS:%d, SBS:%d",
-			 hw_mode.dbs_cap, hw_mode.agile_dfs_cap,
-			 hw_mode.sbs_cap);
+	policy_mgr_dump_freq_range_n_vdev_map(num_vdev_mac_entries,
+					      vdev_mac_map, num_mac_freq,
+					      mac_freq_range);
 
 	/* update pm_conc_connection_list */
 	policy_mgr_update_hw_mode_conn_info(context, num_vdev_mac_entries,
@@ -294,7 +314,6 @@ enum policy_mgr_conc_next_action policy_mgr_need_opportunistic_upgrade(
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 
 	if (policy_mgr_is_hwmode_offload_enabled(psoc)) {
-		policy_mgr_debug("HW mode selection offload is enabled");
 		policy_mgr_get_sap_ch_width_update_action(psoc, 0, &upgrade);
 		return upgrade;
 	}
@@ -637,10 +656,8 @@ bool policy_mgr_is_hwmode_set_for_given_chnl(struct wlan_objmgr_psoc *psoc,
 	enum policy_mgr_band band;
 	bool is_hwmode_dbs, dbs_required_for_2g;
 
-	if (policy_mgr_is_hwmode_offload_enabled(psoc)) {
-		policy_mgr_debug("HW mode selection offload is enabled");
+	if (policy_mgr_is_hwmode_offload_enabled(psoc))
 		return true;
-	}
 
 	if (policy_mgr_is_hw_dbs_capable(psoc) == false)
 		return true;
@@ -948,7 +965,6 @@ policy_mgr_get_next_action(struct wlan_objmgr_psoc *psoc,
 	}
 
 	if (policy_mgr_is_hwmode_offload_enabled(psoc)) {
-		policy_mgr_debug("HW mode selection offload is enabled");
 		*next_action = PM_NOP;
 		policy_mgr_get_sap_ch_width_update_action(psoc, ch_freq,
 							  next_action);
@@ -1093,7 +1109,6 @@ policy_mgr_check_for_hw_mode_change(struct wlan_objmgr_psoc *psoc,
 	bool eht_capab =  false, check_sap_bw_downgrade = false;
 
 	if (policy_mgr_is_hwmode_offload_enabled(psoc)) {
-		policy_mgr_debug("HW mode selection offload is enabled");
 		wlan_psoc_mlme_get_11be_capab(psoc, &eht_capab);
 		if (eht_capab &&
 		    policy_mgr_mode_specific_connection_count(psoc,
@@ -1907,7 +1922,7 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
 		 * due to concurrency, then move SAP back to user configured
 		 * frequency.
 		 * if SCC to MCC switch mode is
-		 * QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL, the move SAP to
+		 * QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL, then move SAP to
 		 * user configured frequency whenever standalone SAP is
 		 * currently not on the user configured frequency.
 		 * else move the SAP only when SAP is on 2.4 GHz band and user
@@ -1915,10 +1930,12 @@ bool policy_mgr_is_sap_restart_required_after_sta_disconnect(
 		 */
 		if (!sta_gc_present && user_config_freq &&
 		    cc_mode == QDF_MCC_TO_SCC_SWITCH_WITH_FAVORITE_CHANNEL &&
-		    op_ch_freq_list[i] != user_config_freq) {
+		    !wlan_reg_is_same_band_freqs(user_config_freq,
+						 op_ch_freq_list[i])) {
 			curr_sap_freq = op_ch_freq_list[i];
 			policy_mgr_debug("Move sap to user configured freq: %d",
 					 user_config_freq);
+			break;
 		} else if (!sta_gc_present && user_config_freq &&
 			   WLAN_REG_IS_24GHZ_CH_FREQ(op_ch_freq_list[i]) &&
 			   !WLAN_REG_IS_24GHZ_CH_FREQ(user_config_freq)) {
@@ -2140,6 +2157,11 @@ policy_mgr_nan_sap_pre_enable_conc_check(struct wlan_objmgr_psoc *psoc,
 			policy_mgr_debug("NAN+SAP unsafe ch SCC disabled");
 			return false;
 		}
+		if (pm_ctx->hdd_cbacks.hdd_is_cac_in_progress &&
+		    pm_ctx->hdd_cbacks.hdd_is_cac_in_progress()) {
+			policy_mgr_debug("DFS CAC in progress, reject NAN enable");
+			return false;
+		}
 	} else if (policy_mgr_is_sap_mode(mode)) {
 		nan_2g_freq =
 			policy_mgr_mode_specific_get_channel(pm_ctx->psoc,
@@ -2976,8 +2998,8 @@ policy_mgr_valid_sap_conc_channel_check(struct wlan_objmgr_psoc *psoc,
 		policymgr_nofl_debug("sap not capable on 6GHZ con ch_freq %d",
 				     ch_freq);
 		find_alternate = true;
-	} else if (wlan_reg_is_etsi13_srd_chan_for_freq(pm_ctx->pdev,
-							ch_freq) &&
+	} else if (wlan_reg_is_etsi_srd_chan_for_freq(pm_ctx->pdev,
+						      ch_freq) &&
 		   !policy_mgr_get_srd_enable_for_vdev(psoc, sap_vdev_id)) {
 		find_alternate = true;
 		policymgr_nofl_debug("sap not capable on SRD con ch_freq %d",
@@ -3751,10 +3773,8 @@ QDF_STATUS policy_mgr_restart_opportunistic_timer(
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	struct policy_mgr_psoc_priv_obj *policy_mgr_ctx;
 
-	if (policy_mgr_is_hwmode_offload_enabled(psoc)) {
-		policy_mgr_debug("HW mode selection offload is enabled");
+	if (policy_mgr_is_hwmode_offload_enabled(psoc))
 		return QDF_STATUS_E_NOSUPPORT;
-	}
 
 	policy_mgr_ctx = policy_mgr_get_context(psoc);
 	if (!policy_mgr_ctx) {
@@ -3787,10 +3807,8 @@ QDF_STATUS policy_mgr_set_hw_mode_on_channel_switch(
 	QDF_STATUS status = QDF_STATUS_E_FAILURE, qdf_status;
 	enum policy_mgr_conc_next_action action;
 
-	if (policy_mgr_is_hwmode_offload_enabled(psoc)) {
-		policy_mgr_debug("HW mode selection offload is enabled");
+	if (policy_mgr_is_hwmode_offload_enabled(psoc))
 		return QDF_STATUS_E_NOSUPPORT;
-	}
 
 	if (!policy_mgr_is_hw_dbs_capable(psoc)) {
 		policy_mgr_rl_debug("PM/DBS is disabled");

+ 20 - 22
components/cmn_services/policy_mgr/src/wlan_policy_mgr_core.c

@@ -491,6 +491,7 @@ void policy_mgr_update_conc_list(struct wlan_objmgr_psoc *psoc,
 {
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 	bool mcc_mode;
+	enum hw_mode_bandwidth max_bw;
 
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
@@ -534,6 +535,13 @@ void policy_mgr_update_conc_list(struct wlan_objmgr_psoc *psoc,
 
 		if (pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb)
 			pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb(mcc_mode);
+
+		if (pm_ctx->dp_cbacks.hdd_ipa_set_perf_level_bw) {
+			max_bw = policy_mgr_get_connection_max_channel_width(
+					psoc);
+			policy_mgr_debug("max channel width %d", max_bw);
+			pm_ctx->dp_cbacks.hdd_ipa_set_perf_level_bw(max_bw);
+		}
 	}
 
 	if (pm_ctx->conc_cbacks.connection_info_update)
@@ -869,10 +877,6 @@ policy_mgr_fill_curr_freq_by_pdev_freq(int32_t num_mac_freq,
 			return QDF_STATUS_E_INVAL;
 		}
 
-		policy_mgr_debug("mac_id %d start freq %d end_freq %d",
-				 mac_id, freq[i].start_freq,
-				 freq[i].end_freq);
-
 		if (policy_mgr_is_freq_range_2ghz(freq[i].start_freq,
 						  freq[i].end_freq)) {
 			policy_mgr_fill_curr_mac_2ghz_freq(mac_id,
@@ -986,7 +990,6 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status,
 {
 	QDF_STATUS ret;
 	struct policy_mgr_hw_mode_params hw_mode;
-	uint32_t i;
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 
 	pm_ctx = policy_mgr_get_context(context);
@@ -1015,29 +1018,22 @@ void policy_mgr_pdev_set_hw_mode_cb(uint32_t status,
 		goto set_done_event;
 	}
 
-	policy_mgr_debug("cfgd_hw_mode_index=%d", cfgd_hw_mode_index);
-
-	for (i = 0; i < num_vdev_mac_entries; i++)
-		policy_mgr_debug("vdev_id:%d mac_id:%d",
-				vdev_mac_map[i].vdev_id,
-				vdev_mac_map[i].mac_id);
-
 	ret = policy_mgr_get_hw_mode_from_idx(context, cfgd_hw_mode_index,
-			&hw_mode);
-	if (ret != QDF_STATUS_SUCCESS) {
-		policy_mgr_err("Get HW mode failed: %d", ret);
+					      &hw_mode);
+	if (QDF_IS_STATUS_ERROR(ret)) {
+		policy_mgr_err("Get HW mode for index %d reason: %d",
+			       cfgd_hw_mode_index, ret);
 		goto set_done_event;
 	}
-
-	policy_mgr_debug("MAC0: TxSS:%d, RxSS:%d, Bw:%d, band_cap %d",
+	policy_mgr_debug("HW mode idx %d, DBS %d Agile %d SBS %d, MAC0:: SS:Tx %d Rx %d, BW %d band %d. MAC1:: SS:Tx %d Rx %d, BW %d",
+			 cfgd_hw_mode_index, hw_mode.dbs_cap,
+			 hw_mode.agile_dfs_cap, hw_mode.sbs_cap,
 			 hw_mode.mac0_tx_ss, hw_mode.mac0_rx_ss,
-			 hw_mode.mac0_bw, hw_mode.mac0_band_cap);
-	policy_mgr_debug("MAC1: TxSS:%d, RxSS:%d, Bw:%d",
+			 hw_mode.mac0_bw, hw_mode.mac0_band_cap,
 			 hw_mode.mac1_tx_ss, hw_mode.mac1_rx_ss,
 			 hw_mode.mac1_bw);
-	policy_mgr_debug("DBS:%d, Agile DFS:%d, SBS:%d",
-			 hw_mode.dbs_cap, hw_mode.agile_dfs_cap,
-			 hw_mode.sbs_cap);
+	policy_mgr_dump_freq_range_n_vdev_map(num_vdev_mac_entries,
+					      vdev_mac_map, 0, NULL);
 
 	/* update pm_conc_connection_list */
 	policy_mgr_update_hw_mode_conn_info(context,
@@ -4249,6 +4245,8 @@ void policy_mgr_check_scc_channel(struct wlan_objmgr_psoc *psoc,
 			return;
 		policy_mgr_debug("no mandatory channels (%d, %d)", sap_ch_freq,
 				 *intf_ch_freq);
+	} else if (sta_count && policy_mgr_is_hw_dbs_capable(psoc)) {
+		policy_mgr_sap_on_non_psc_channel(psoc, intf_ch_freq, vdev_id);
 	}
 
 	/* Get allow 6Gz before interface entry is temporary deleted */

+ 97 - 73
components/cmn_services/policy_mgr/src/wlan_policy_mgr_get_set_utils.c

@@ -46,6 +46,7 @@
 #include "wlan_mlme_ucfg_api.h"
 #include "wlan_p2p_ucfg_api.h"
 #include "wlan_mlo_link_force.h"
+#include "wlan_connectivity_logging.h"
 
 /* invalid channel id. */
 #define INVALID_CHANNEL_ID 0
@@ -1886,10 +1887,6 @@ bool policy_mgr_are_2_freq_on_same_mac(struct wlan_objmgr_psoc *psoc,
 	if (!policy_mgr_is_hw_dbs_capable(psoc))
 		return true;
 
-	policy_mgr_rl_debug("freq_1 %d freq_2 %d old_hw_mode_index=%d, new_hw_mode_index=%d",
-			    freq_1, freq_2, pm_ctx->old_hw_mode_index,
-			    pm_ctx->new_hw_mode_index);
-
 	/* HW is DBS/SBS capable */
 	status = policy_mgr_get_current_hw_mode(psoc, &hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -1900,14 +1897,16 @@ bool policy_mgr_are_2_freq_on_same_mac(struct wlan_objmgr_psoc *psoc,
 	if (hw_mode.dbs_cap || hw_mode.sbs_cap)
 		cur_range_sbs = policy_mgr_is_cur_freq_range_sbs(psoc);
 
-	policy_mgr_rl_debug("dbs_cap %d sbs_cap %d, cur range is sbs %d",
-			    hw_mode.dbs_cap, hw_mode.sbs_cap, cur_range_sbs);
 	freq_range = pm_ctx->hw_mode.cur_mac_freq_range;
 	/* current HW is DBS OR SBS check current DBS/SBS freq range */
-	if (hw_mode.dbs_cap || hw_mode.sbs_cap)
+	if (hw_mode.dbs_cap || hw_mode.sbs_cap) {
+		policy_mgr_rl_debug("freq1 %d freq2 %d dbs_cap %d sbs_cap %d, cur range is sbs %d",
+				    freq_1, freq_2, hw_mode.dbs_cap,
+				    hw_mode.sbs_cap, cur_range_sbs);
 		return policy_mgr_2_freq_same_mac_in_freq_range(pm_ctx,
 								freq_range,
 								freq_1, freq_2);
+	}
 
 	/*
 	 * If current HW mode is not DBS/SBS, check if in all supported mode
@@ -2034,9 +2033,6 @@ policy_mgr_are_3_freq_on_same_mac(struct wlan_objmgr_psoc *psoc,
 	if (!policy_mgr_is_hw_dbs_capable(psoc))
 		return true;
 
-	policy_mgr_rl_debug("freq_1 %d freq_2 %d freq_3 %d", freq_1, freq_2,
-			    freq_3);
-
 	/* HW is DBS/SBS capable, get current HW mode */
 	status = policy_mgr_get_current_hw_mode(psoc, &hw_mode);
 	if (!QDF_IS_STATUS_SUCCESS(status)) {
@@ -2046,15 +2042,17 @@ policy_mgr_are_3_freq_on_same_mac(struct wlan_objmgr_psoc *psoc,
 	if (hw_mode.dbs_cap || hw_mode.sbs_cap)
 		cur_range_sbs = policy_mgr_is_cur_freq_range_sbs(psoc);
 
-	policy_mgr_rl_debug("dbs_cap %d sbs_cap %d, cur range is sbs %d",
-			    hw_mode.dbs_cap, hw_mode.sbs_cap, cur_range_sbs);
 	freq_range = pm_ctx->hw_mode.cur_mac_freq_range;
 
 	/* current HW is DBS OR SBS check current DBS/SBS freq range */
-	if (hw_mode.dbs_cap || hw_mode.sbs_cap)
+	if (hw_mode.dbs_cap || hw_mode.sbs_cap) {
+		policy_mgr_rl_debug("freq1 %d freq2 %d freq3 %d dbs_cap %d sbs_cap %d, cur range is sbs %d",
+				     freq_1, freq_2, freq_3, hw_mode.dbs_cap,
+				     hw_mode.sbs_cap, cur_range_sbs);
 		return policy_mgr_3_freq_same_mac_in_freq_range(pm_ctx,
 							freq_range,
 							freq_1, freq_2, freq_3);
+	}
 	/*
 	 * If current HW mode is not DBS/SBS, check if in all supported mode
 	 * it they will be on same mac
@@ -2779,9 +2777,6 @@ bool policy_mgr_is_pcl_weightage_required(struct wlan_objmgr_psoc *psoc)
 	if (dual_sta_policy->concurrent_sta_policy  ==
 		QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY &&
 		dual_sta_policy->primary_vdev_id != WLAN_UMAC_VDEV_ID_MAX) {
-		policy_mgr_debug("dual_sta_policy : %d, primary_vdev_id:%d",
-			dual_sta_policy->concurrent_sta_policy,
-			dual_sta_policy->primary_vdev_id);
 		return false;
 	}
 
@@ -3572,6 +3567,8 @@ bool policy_mgr_current_concurrency_is_mcc(struct wlan_objmgr_psoc *psoc)
 	}
 
 	num_connections = policy_mgr_get_connection_count(psoc);
+	if (!num_connections)
+		return is_mcc;
 
 	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
 	switch (num_connections) {
@@ -4180,17 +4177,24 @@ policy_mgr_enable_disable_link_from_vdev_bitmask(struct wlan_objmgr_psoc *psoc,
 
 static void
 policy_mgr_set_link_in_progress(struct policy_mgr_psoc_priv_obj *pm_ctx,
-				bool value)
+				bool set_link_in_progress)
 {
 	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
-	pm_ctx->set_link_in_progress = value;
+	if (set_link_in_progress)
+		qdf_atomic_inc(&pm_ctx->link_in_progress);
+	else {
+		if (qdf_atomic_read(&pm_ctx->link_in_progress) > 0)
+			qdf_atomic_dec(&pm_ctx->link_in_progress);
+	}
+
 	/* if set link has started reset the event, else complete the event */
-	if (pm_ctx->set_link_in_progress)
+	if (qdf_atomic_read(&pm_ctx->link_in_progress))
 		qdf_event_reset(&pm_ctx->set_link_update_done_evt);
 	else
 		qdf_event_set(&pm_ctx->set_link_update_done_evt);
-	policy_mgr_debug("set_link_in_progress %d",
-			 pm_ctx->set_link_in_progress);
+
+	policy_mgr_debug("link_in_progress %d",
+			 qdf_atomic_read(&pm_ctx->link_in_progress));
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
 }
 
@@ -4200,7 +4204,7 @@ policy_mgr_get_link_in_progress(struct policy_mgr_psoc_priv_obj *pm_ctx)
 	bool value;
 
 	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
-	value = pm_ctx->set_link_in_progress;
+	value = qdf_atomic_read(&pm_ctx->link_in_progress);
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
 	if (value)
 		policy_mgr_debug("set_link_in_progress %d", value);
@@ -5011,6 +5015,7 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
 	QDF_STATUS qdf_status;
 	bool mcc_mode;
 	uint32_t session_count, cur_freq;
+	enum hw_mode_bandwidth max_bw;
 
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
@@ -5108,6 +5113,13 @@ QDF_STATUS policy_mgr_decr_active_session(struct wlan_objmgr_psoc *psoc,
 
 		if (pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb)
 			pm_ctx->dp_cbacks.hdd_ipa_set_mcc_mode_cb(mcc_mode);
+
+		if (pm_ctx->dp_cbacks.hdd_ipa_set_perf_level_bw) {
+			max_bw = policy_mgr_get_connection_max_channel_width(
+					psoc);
+			policy_mgr_debug("max channel width %d", max_bw);
+			pm_ctx->dp_cbacks.hdd_ipa_set_perf_level_bw(max_bw);
+		}
 	}
 
 	if (mode == QDF_SAP_MODE || mode == QDF_P2P_GO_MODE ||
@@ -5574,11 +5586,9 @@ static bool policy_mgr_is_concurrency_allowed_4_port(
 			return false;
 		}
 
-		if (!policy_mgr_is_dbs_enable(psoc) ||
-		    !pm_ctx->cfg.sta_sap_scc_on_dfs_chnl  ||
-		    !pm_ctx->cfg.sta_sap_scc_on_lte_coex_chnl) {
+		if (!policy_mgr_is_dbs_enable(psoc)) {
 			policy_mgr_err(
-				"Couldn't start 4th port for bad cfg of dual mac, dfs scc, lte coex scc");
+				"Couldn't start 4th port for bad cfg of dual mac");
 			return false;
 		}
 		for (i = 0; i < pcl.pcl_len; i++)
@@ -8135,6 +8145,9 @@ void policy_mgr_handle_link_removal_on_vdev(struct wlan_objmgr_vdev *vdev)
 				 vdev_id);
 		return;
 	}
+
+	wlan_connectivity_mlo_reconfig_event(vdev);
+
 	/* mark link removed for vdev */
 	wlan_set_vdev_link_removed_flag_by_vdev_id(psoc, vdev_id,
 						   true);
@@ -8862,6 +8875,31 @@ QDF_STATUS policy_mgr_update_active_mlo_num_links(struct wlan_objmgr_psoc *psoc,
 	}
 
 set_link:
+	/*
+	 * TODO: In all scenarios wherever host sends
+	 * MLO_LINK_FORCE_MODE_ACTIVE_NUM/MLO_LINK_FORCE_MODE_INACTIVE_NUM to
+	 * FW, Host need to send MLO_LINK_FORCE_MODE_NO_FORCE to FW.
+	 * So instead of two commands for serialization, take care of this in
+	 * single serialization active command.
+	 */
+
+	/*
+	 * send MLO_LINK_FORCE_MODE_NO_FORCE to FW to clear user mode setting
+	 * configured via QCA_WLAN_VENDOR_ATTR_LINK_STATE_CONTROL_MODE in FW
+	 */
+	status = policy_mgr_mlo_sta_set_link(psoc,
+				    MLO_LINK_FORCE_REASON_CONNECT,
+				    MLO_LINK_FORCE_MODE_NO_FORCE,
+				    num_ml_sta, ml_sta_vdev_lst);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		policy_mgr_debug("fail to send no force cmd for num_links:%d",
+				 num_ml_sta);
+		goto release_vdev_ref;
+	} else {
+		policy_mgr_debug("clear force mode setting for num_links:%d",
+				 num_ml_sta);
+	}
+
 	status = policy_mgr_process_mlo_sta_dynamic_force_num_link(psoc,
 					     MLO_LINK_FORCE_REASON_CONNECT,
 					     MLO_LINK_FORCE_MODE_ACTIVE_NUM,
@@ -10253,7 +10291,7 @@ void policy_mgr_dump_connection_status_info(struct wlan_objmgr_psoc *psoc)
 	}
 	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
 
-	policy_mgr_dump_freq_range(pm_ctx);
+	policy_mgr_dump_curr_freq_range(pm_ctx);
 	policy_mgr_validate_conn_info(psoc);
 }
 
@@ -10512,7 +10550,6 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
 			 * If operating channel in different band
 			 * (not DBS capable), return false.
 			 */
-			/* TODO: To be enhanced for SBS */
 			if (policy_mgr_is_dnsc_set(vdev)) {
 				if (op_ch_freq_list[i] == ch_freq) {
 					*ok = true;
@@ -10520,12 +10557,13 @@ QDF_STATUS policy_mgr_is_chan_ok_for_dnbs(struct wlan_objmgr_psoc *psoc,
 							vdev,
 							WLAN_POLICY_MGR_ID);
 					break;
-				} else if (WLAN_REG_IS_SAME_BAND_FREQS(
-					op_ch_freq_list[i], ch_freq)) {
+				} else if (policy_mgr_2_freq_always_on_same_mac(
+					   psoc,
+					   op_ch_freq_list[i], ch_freq)) {
 					*ok = false;
 					wlan_objmgr_vdev_release_ref(
-							vdev,
-							WLAN_POLICY_MGR_ID);
+					vdev,
+					WLAN_POLICY_MGR_ID);
 					break;
 				} else if (policy_mgr_is_hw_dbs_capable(psoc)) {
 					*ok = true;
@@ -11292,47 +11330,6 @@ bool policy_mgr_get_ap_6ghz_capable(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
-bool policy_mgr_is_valid_for_channel_switch(struct wlan_objmgr_psoc *psoc,
-					    uint32_t ch_freq)
-{
-	uint32_t sta_sap_scc_on_dfs_chan, sta_sap_scc_allowed_on_indoor_chan;
-	uint32_t sap_count;
-	enum channel_state state;
-	struct policy_mgr_psoc_priv_obj *pm_ctx;
-
-	pm_ctx = policy_mgr_get_context(psoc);
-	if (!pm_ctx) {
-		policy_mgr_err("Invalid Context");
-		return false;
-	}
-
-	sta_sap_scc_on_dfs_chan =
-			policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(psoc);
-	sta_sap_scc_allowed_on_indoor_chan =
-			policy_mgr_get_sta_sap_scc_allowed_on_indoor_chnl(psoc);
-
-	sap_count = policy_mgr_mode_specific_connection_count(psoc,
-							      PM_SAP_MODE,
-							      NULL);
-	state = wlan_reg_get_channel_state_for_pwrmode(pm_ctx->pdev, ch_freq,
-						       REG_CURRENT_PWR_MODE);
-
-	policy_mgr_debug("sta_sap_scc_on_dfs_chan %u, sap_count %u, ch freq %u, state %u",
-			 sta_sap_scc_on_dfs_chan, sap_count, ch_freq, state);
-
-	if ((state == CHANNEL_STATE_ENABLE) || (sap_count == 0) ||
-	    (wlan_reg_is_dfs_for_freq(pm_ctx->pdev, ch_freq) &&
-	     sta_sap_scc_on_dfs_chan) ||
-	    (sta_sap_scc_allowed_on_indoor_chan &&
-	     wlan_reg_is_freq_indoor(pm_ctx->pdev, ch_freq))) {
-		policy_mgr_debug("Valid channel for channel switch");
-		return true;
-	}
-
-	policy_mgr_debug("Invalid channel for channel switch");
-	return false;
-}
-
 bool policy_mgr_is_sta_sap_scc(struct wlan_objmgr_psoc *psoc,
 			       uint32_t sap_freq)
 {
@@ -12360,3 +12357,30 @@ bool policy_mgr_get_vdev_diff_freq_new_conn(struct wlan_objmgr_psoc *psoc,
 	return match;
 }
 
+enum hw_mode_bandwidth
+policy_mgr_get_connection_max_channel_width(struct wlan_objmgr_psoc *psoc)
+{
+	enum hw_mode_bandwidth bw = HW_MODE_20_MHZ;
+	struct policy_mgr_psoc_priv_obj *pm_ctx;
+	uint32_t conn_index = 0;
+
+	pm_ctx = policy_mgr_get_context(psoc);
+	if (!pm_ctx) {
+		policy_mgr_err("pm_ctx is NULL");
+		return HW_MODE_20_MHZ;
+	}
+
+	qdf_mutex_acquire(&pm_ctx->qdf_conc_list_lock);
+
+	for (conn_index = 0; conn_index < MAX_NUMBER_OF_CONC_CONNECTIONS;
+	     conn_index++) {
+		if (pm_conc_connection_list[conn_index].in_use &&
+		    pm_conc_connection_list[conn_index].bw > bw)
+			bw = pm_conc_connection_list[conn_index].bw;
+	}
+
+	qdf_mutex_release(&pm_ctx->qdf_conc_list_lock);
+
+	return bw;
+}
+

+ 15 - 2
components/cmn_services/policy_mgr/src/wlan_policy_mgr_i.h

@@ -377,7 +377,7 @@ struct policy_mgr_cfg {
  * @valid_ch_freq_list_count: number of valid frequencies
  * @dynamic_mcc_adaptive_sched: disable/enable mcc adaptive scheduler feature
  * @dynamic_dfs_master_disabled: current state of dynamic dfs master
- * @set_link_in_progress: To track if set link is in progress
+ * @link_in_progress: To track if set link is in progress
  * @set_link_update_done_evt: qdf event to synchronize set link
  * @active_vdev_bitmap: Active vdev id bitmap
  * @inactive_vdev_bitmap: Inactive vdev id bitmap
@@ -426,7 +426,7 @@ struct policy_mgr_psoc_priv_obj {
 	bool dynamic_mcc_adaptive_sched;
 	bool dynamic_dfs_master_disabled;
 #ifdef WLAN_FEATURE_11BE_MLO
-	bool set_link_in_progress;
+	qdf_atomic_t link_in_progress;
 	qdf_event_t set_link_update_done_evt;
 #endif
 	uint32_t active_vdev_bitmap;
@@ -1183,4 +1183,17 @@ policy_mgr_set_freq_restriction_mask(struct policy_mgr_psoc_priv_obj *pm_ctx,
 {
 }
 #endif
+
+/**
+ * policy_mgr_get_connection_max_channel_width() - Get max channel width
+ * among vdevs in use
+ * @psoc: PSOC object pointer
+ *
+ * This function returns max channel width among in-use vdevs
+ *
+ * Return: enum hw_mode_bandwidth
+ */
+enum hw_mode_bandwidth
+policy_mgr_get_connection_max_channel_width(struct wlan_objmgr_psoc *psoc);
+
 #endif

+ 4 - 2
components/cmn_services/policy_mgr/src/wlan_policy_mgr_init_deinit.c

@@ -492,7 +492,7 @@ policy_mgr_init_ml_link_update(struct policy_mgr_psoc_priv_obj *pm_ctx)
 {
 	QDF_STATUS qdf_status;
 
-	pm_ctx->set_link_in_progress = false;
+	qdf_atomic_init(&pm_ctx->link_in_progress);
 	qdf_status = qdf_event_create(&pm_ctx->set_link_update_done_evt);
 	if (QDF_IS_STATUS_ERROR(qdf_status)) {
 		policy_mgr_err("init event failed for for set_link_update_done_evt");
@@ -507,7 +507,7 @@ policy_mgr_deinit_ml_link_update(struct policy_mgr_psoc_priv_obj *pm_ctx)
 {
 	QDF_STATUS qdf_status;
 
-	pm_ctx->set_link_in_progress = false;
+	qdf_atomic_set(&pm_ctx->link_in_progress, 0);
 	qdf_status = qdf_event_destroy(&pm_ctx->set_link_update_done_evt);
 	if (QDF_IS_STATUS_ERROR(qdf_status)) {
 		policy_mgr_err("deinit event failed for set_link_update_done_evt");
@@ -929,6 +929,8 @@ QDF_STATUS policy_mgr_register_dp_cb(struct wlan_objmgr_psoc *psoc,
 		dp_cbacks->hdd_v2_flow_pool_map;
 	pm_ctx->dp_cbacks.hdd_v2_flow_pool_unmap =
 		dp_cbacks->hdd_v2_flow_pool_unmap;
+	pm_ctx->dp_cbacks.hdd_ipa_set_perf_level_bw =
+		dp_cbacks->hdd_ipa_set_perf_level_bw;
 
 	return QDF_STATUS_SUCCESS;
 }

+ 50 - 0
components/cmn_services/policy_mgr/src/wlan_policy_mgr_ll_sap.c

@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: contains policy manager ll_sap definitions specific to the ll_sap module
+ */
+
+#include "wlan_policy_mgr_ll_sap.h"
+#include "wlan_policy_mgr_public_struct.h"
+#include "wlan_policy_mgr_api.h"
+#include "wlan_policy_mgr_i.h"
+#include "wlan_cmn.h"
+
+struct wlan_objmgr_vdev *
+wlan_policy_mgr_get_ll_lt_sap_vdev(struct wlan_objmgr_psoc *psoc)
+{
+	uint8_t ll_lt_sap_cnt;
+	uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
+	struct wlan_objmgr_vdev *vdev;
+
+	ll_lt_sap_cnt = policy_mgr_get_mode_specific_conn_info(
+							psoc, NULL,
+							vdev_id_list,
+							PM_LL_LT_SAP_MODE);
+
+	/* Currently only 1 ll_lt_sap is supported */
+	if (ll_lt_sap_cnt != 1) {
+		policy_mgr_err("invalid number of ll_lt_sap %d", ll_lt_sap_cnt);
+		return NULL;
+	}
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id_list[0],
+						    WLAN_LL_SAP_ID);
+	if (!vdev)
+		policy_mgr_err("vdev is NULL");
+	return vdev;
+}

+ 74 - 12
components/cmn_services/policy_mgr/src/wlan_policy_mgr_pcl.c

@@ -626,10 +626,8 @@ void policy_mgr_update_with_safe_channel_list(struct wlan_objmgr_psoc *psoc,
 		return;
 	}
 
-	if (pm_ctx->unsafe_channel_count == 0) {
-		policy_mgr_debug("There are no unsafe channels");
+	if (!pm_ctx->unsafe_channel_count)
 		return;
-	}
 
 	qdf_mem_copy(current_channel_list, pcl_channels,
 		     current_channel_count * sizeof(*current_channel_list));
@@ -726,7 +724,6 @@ static QDF_STATUS policy_mgr_modify_pcl_based_on_enabled_channels(
 			pm_ctx->pdev, pcl_list_org[i],
 			REG_CURRENT_PWR_MODE)) ||
 		    (allow_go_scc_on_dfs_chn &&
-		     policy_mgr_is_sta_sap_scc(psoc, pcl_list_org[i]) &&
 		     wlan_reg_is_dfs_for_freq(pm_ctx->pdev, pcl_list_org[i]))) {
 			pcl_list_org[pcl_len] = pcl_list_org[i];
 			weight_list_org[pcl_len++] = weight_list_org[i];
@@ -891,10 +888,8 @@ static QDF_STATUS policy_mgr_modify_sap_pcl_based_on_dfs(
 		return status;
 	}
 
-	if (!skip_dfs_channel) {
-		policy_mgr_debug("No more operation on DFS channel");
+	if (!skip_dfs_channel)
 		return QDF_STATUS_SUCCESS;
-	}
 
 	for (i = 0; i < *pcl_len_org; i++) {
 		if (!wlan_reg_is_dfs_in_secondary_list_for_freq(
@@ -970,7 +965,7 @@ policy_mgr_modify_pcl_based_on_srd(struct wlan_objmgr_psoc *psoc,
 		return QDF_STATUS_E_FAILURE;
 	}
 	for (i = 0; i < *pcl_len_org; i++) {
-		if (wlan_reg_is_etsi13_srd_chan_for_freq(
+		if (wlan_reg_is_etsi_srd_chan_for_freq(
 		    pm_ctx->pdev, pcl_list_org[i]))
 			continue;
 		pcl_list[pcl_len] = pcl_list_org[i];
@@ -1582,7 +1577,8 @@ static QDF_STATUS policy_mgr_pcl_modification_for_ll_lt_sap(
 
 	for (i = 0; i < *len; i++) {
 		/* Remove passive/dfs/6G invalid channel for LL_LT_SAP */
-		if (wlan_reg_is_passive_for_freq(
+		if (wlan_reg_is_24ghz_ch_freq(pcl_channels[i]) ||
+		    wlan_reg_is_passive_for_freq(
 					pm_ctx->pdev,
 					pcl_channels[i]) ||
 		    wlan_reg_is_dfs_for_freq(
@@ -1726,6 +1722,8 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
 	enum policy_mgr_conc_priority_mode conc_system_pref = 0;
 	struct policy_mgr_psoc_priv_obj *pm_ctx;
 	enum QDF_OPMODE qdf_mode;
+	uint32_t orig_pcl_len;
+
 	pm_ctx = policy_mgr_get_context(psoc);
 	if (!pm_ctx) {
 		policy_mgr_err("context is NULL");
@@ -1822,7 +1820,11 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
 		return status;
 	}
 
-	policy_mgr_debug("PCL before modification");
+	if (!*len) {
+		policymgr_nofl_debug("Total PCL Chan %d", *len);
+		return QDF_STATUS_SUCCESS;
+	}
+	orig_pcl_len = *len;
 	policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);
 	policy_mgr_mode_specific_modification_on_pcl(
 		psoc, pcl_channels, pcl_weight, len, weight_len, mode);
@@ -1835,8 +1837,10 @@ QDF_STATUS policy_mgr_get_pcl(struct wlan_objmgr_psoc *psoc,
 		return status;
 	}
 
-	policy_mgr_debug("PCL after modification");
-	policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);
+	if (orig_pcl_len != *len) {
+		policy_mgr_debug("PCL after modification");
+		policy_mgr_dump_channel_list(*len, pcl_channels, pcl_weight);
+	}
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -3899,6 +3903,64 @@ update_pcl:
 	return QDF_STATUS_SUCCESS;
 }
 
+void
+policy_mgr_sap_on_non_psc_channel(struct wlan_objmgr_psoc *psoc,
+				  qdf_freq_t *intf_ch_freq, uint8_t vdev_id)
+{
+	struct policy_mgr_pcl_list pcl;
+	struct wlan_objmgr_vdev *vdev;
+	QDF_STATUS status;
+	uint32_t i;
+	uint32_t ap_pwr_type_6g = 0;
+
+	if (!WLAN_REG_IS_6GHZ_CHAN_FREQ(*intf_ch_freq))
+		return;
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
+						    WLAN_POLICY_MGR_ID);
+
+	if (!vdev) {
+		policy_mgr_err("vdev %d is not present", vdev_id);
+		return;
+	}
+
+	ap_pwr_type_6g = wlan_mlme_get_6g_ap_power_type(vdev);
+	qdf_mem_zero(&pcl, sizeof(pcl));
+
+	/* PCL list is filtered with Non-PSC channels during
+	 * policy_mgr_pcl_modification_for_sap, Reuse same list to check
+	 * if STA is in PSC channel for STA + SAP concurrency during SAP restart
+	 */
+	status = policy_mgr_get_pcl_for_existing_conn(
+			psoc, PM_SAP_MODE, pcl.pcl_list, &pcl.pcl_len,
+			pcl.weight_list, QDF_ARRAY_SIZE(pcl.weight_list),
+			false, vdev_id);
+
+	if (QDF_IS_STATUS_ERROR(status)) {
+		policy_mgr_err("Unable to get PCL for SAP");
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
+		return;
+	}
+
+	for (i = 0; i < pcl.pcl_len; i++) {
+		if ((WLAN_REG_IS_6GHZ_CHAN_FREQ(pcl.pcl_list[i])) &&
+		    pcl.pcl_list[i] == *intf_ch_freq &&
+		    ap_pwr_type_6g == REG_VERY_LOW_POWER_AP) {
+			policy_mgr_debug("STA is in PSC channel %d in VLP mode, Hence SAP + STA allowed in PSC",
+					 *intf_ch_freq);
+			*intf_ch_freq = 0;
+			wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
+			return;
+		}
+	}
+
+	/* if STA is in Non-PSC Channel + VLP or in non-VLP mode then move
+	 * SAP to 2 GHz from PCL list channels
+	 */
+	*intf_ch_freq = pcl.pcl_list[0];
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_POLICY_MGR_ID);
+}
+
 QDF_STATUS
 policy_mgr_get_sap_mandatory_channel(struct wlan_objmgr_psoc *psoc,
 				     uint32_t sap_ch_freq,

+ 19 - 1
components/coex/dispatcher/inc/wlan_coex_ucfg_api.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -109,6 +109,17 @@ ucfg_coex_psoc_get_btc_chain_mode(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS
 ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev,
 			      enum coex_btc_chain_mode mode);
+/**
+ * ucfg_coex_send_logging_config() - API to send BT coex logging config to
+ * target if
+ * @psoc: pointer to psoc object
+ * @apps_args: pointer to argument
+ *
+ * Return : status of operation
+ */
+QDF_STATUS
+ucfg_coex_send_logging_config(struct wlan_objmgr_psoc *psoc,
+			      uint32_t *apps_args);
 #else
 static inline QDF_STATUS
 ucfg_coex_register_cfg_updated_handler(struct wlan_objmgr_psoc *psoc,
@@ -134,6 +145,13 @@ ucfg_coex_send_btc_chain_mode(struct wlan_objmgr_vdev *vdev,
 {
 	return QDF_STATUS_SUCCESS;
 }
+
+static inline QDF_STATUS
+ucfg_coex_send_logging_config(struct wlan_objmgr_psoc *psoc,
+			      uint32_t *apps_args)
+{
+	return QDF_STATUS_E_NOSUPPORT;
+}
 #endif
 #ifdef WLAN_FEATURE_DBAM_CONFIG
 /**

+ 37 - 1
components/coex/dispatcher/src/wlan_coex_ucfg_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2020, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -116,3 +116,39 @@ ucfg_coex_send_dbam_config(struct wlan_objmgr_vdev *vdev,
 	return wlan_dbam_config_send(vdev, param);
 }
 #endif
+
+#define COEX_CONFIG_ENABLE_CONT_INFO 12
+
+QDF_STATUS
+ucfg_coex_send_logging_config(struct wlan_objmgr_psoc *psoc,
+			      uint32_t *apps_args)
+{
+	struct coex_config_params param = {0};
+	struct wlan_objmgr_vdev *vdev;
+	QDF_STATUS status;
+
+	if (apps_args[0] != COEX_CONFIG_ENABLE_CONT_INFO) {
+		coex_err("invalid cmd %d", apps_args);
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	vdev = wlan_objmgr_get_vdev_by_opmode_from_psoc(psoc, QDF_STA_MODE,
+							WLAN_COEX_ID);
+
+	param.vdev_id = wlan_vdev_get_id(vdev);
+	param.config_type = WMI_COEX_CONFIG_ENABLE_CONT_INFO;
+	param.config_arg1 = apps_args[1];
+	param.config_arg2 = apps_args[2];
+	param.config_arg3 = apps_args[3];
+	param.config_arg4 = apps_args[4];
+	param.config_arg5 = apps_args[5];
+	param.config_arg6 = apps_args[6];
+
+	coex_debug("send logging_config arg: %d for vdev %d", apps_args,
+		   param.vdev_id);
+
+	status = wlan_coex_config_send(vdev, &param);
+	wlan_objmgr_vdev_release_ref(vdev, WLAN_COEX_ID);
+
+	return status;
+}

+ 20 - 0
components/cp_stats/dispatcher/inc/wlan_cp_stats_mc_defs.h

@@ -332,6 +332,24 @@ struct pdev_mc_cp_extd_stats {
 	uint32_t rx_other_11ax_msdu_cnt;
 };
 
+/* Max supported bandwidth is 320Mhz, so max 16 subbands for 20Mhz */
+#define MAX_WIDE_BAND_SCAN_CHAN 16
+
+/**
+ * struct wide_band_scan_chan_info - wide band scan channel info
+ * @vdev_id: vdev id
+ * @num_chan: number of channels (for each subbands fo 20Mhz)
+ * @is_wide_band_scan: wide band scan or not
+ * @cca_busy_subband_info: CCA busy for each possible 20Mhz subbands
+ * of the wideband scan channel
+ */
+struct wide_band_scan_chan_info {
+	uint32_t vdev_id;
+	uint8_t num_chan;
+	bool is_wide_band_scan;
+	uint32_t cca_busy_subband_info[MAX_WIDE_BAND_SCAN_CHAN];
+};
+
 /**
  * struct channel_status
  * @channel_freq: Channel freq
@@ -347,6 +365,7 @@ struct pdev_mc_cp_extd_stats {
  * @mac_clk_mhz: sample frequency
  * @channel_id: channel index
  * @cmd_flags: indicate which stat event is this status coming from
+ * @subband_info: wide band scan channel info
  */
 struct channel_status {
 	uint32_t    channel_freq;
@@ -362,6 +381,7 @@ struct channel_status {
 	uint32_t    mac_clk_mhz;
 	uint32_t    channel_id;
 	uint32_t    cmd_flags;
+	struct wide_band_scan_chan_info subband_info;
 };
 
 /**

+ 182 - 29
components/cp_stats/dispatcher/src/wlan_cp_stats_mc_ucfg_api.c

@@ -1060,8 +1060,7 @@ void wlan_cp_stats_get_rx_clear_count(struct wlan_objmgr_psoc *psoc,
 	struct channel_status *channel_status_list;
 	uint8_t total_channel;
 	uint8_t i;
-	uint32_t rx_clear_count = 0, cycle_count = 0, mac_clk_mhz = 0;
-	uint64_t clock_freq, time, time_busy;
+	uint32_t rx_clear_count = 0, cycle_count = 0;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
 						    WLAN_CP_STATS_ID);
@@ -1088,7 +1087,6 @@ void wlan_cp_stats_get_rx_clear_count(struct wlan_objmgr_psoc *psoc,
 		if (channel_status_list[i].channel_id == channel) {
 			rx_clear_count = channel_status_list[i].rx_clear_count;
 			cycle_count = channel_status_list[i].cycle_count;
-			mac_clk_mhz = channel_status_list[i].mac_clk_mhz;
 			break;
 		}
 	}
@@ -1098,25 +1096,16 @@ void wlan_cp_stats_get_rx_clear_count(struct wlan_objmgr_psoc *psoc,
 		goto release_ref;
 	}
 
-	clock_freq = mac_clk_mhz * 1000;
-	if (clock_freq == 0) {
-		cp_stats_debug("clock_freq is zero");
+	if (cycle_count == 0) {
+		cp_stats_debug("cycle_count is zero");
 		goto release_ref;
 	}
 
-	time = qdf_do_div(cycle_count, clock_freq);
-	if (time == 0) {
-		cp_stats_debug("time is zero");
-		goto release_ref;
-	}
-
-	time_busy = qdf_do_div(rx_clear_count, clock_freq);
+	*chan_load = ((rx_clear_count * 255) / cycle_count);
 
-	*chan_load = ((time_busy * 255) / time);
-
-	cp_stats_debug("t_chan:%d, chan:%d, rcc:%u, cc:%u, cf:%u, time:%u, time_busy:%u, chan_load:%d",
+	cp_stats_debug("t_chan:%d, chan:%d, rcc:%u, cc:%u, chan_load:%d",
 		       total_channel, channel, rx_clear_count, cycle_count,
-		       clock_freq, time, time_busy, *chan_load);
+		       *chan_load);
 
 release_ref:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_CP_STATS_ID);
@@ -1186,8 +1175,162 @@ void ucfg_mc_cp_stats_register_pmo_handler(void)
 				    ucfg_mc_cp_stats_resume_handler, NULL);
 }
 
+/**
+ * wlan_cp_stats_get_ch_width_from_chan_info - get ch_width as per num channel
+ * present in scan event
+ * @channel_stat: struct scan_chan_info
+ *
+ * Return: phy_ch_width.
+ */
+static enum phy_ch_width
+wlan_cp_stats_get_ch_width_from_chan_info(struct channel_status *channel_stat)
+{
+	enum phy_ch_width scanned_ch_width;
+
+	switch (channel_stat->subband_info.num_chan) {
+	case 1:
+		scanned_ch_width = CH_WIDTH_20MHZ;
+		break;
+	case 2:
+		scanned_ch_width = CH_WIDTH_40MHZ;
+		break;
+	case 4:
+		scanned_ch_width = CH_WIDTH_80MHZ;
+		break;
+	case 8:
+		scanned_ch_width = CH_WIDTH_160MHZ;
+		break;
+	default:
+		scanned_ch_width = CH_WIDTH_INVALID;
+		break;
+	}
+
+	return scanned_ch_width;
+}
+
+/**
+ * wlan_cp_stats_update_per_channel_stats - update per channel stats as per
+ * data present in scan event
+ * @channel_stats: per channel stats
+ * @ev_channel_stat: channel stats per scan event
+ * @freq: freq to update channel stats
+ * @rx_clear_count: rx clear count for a freq
+ *
+ * Return: none.
+ */
+static void
+wlan_cp_stats_update_per_channel_stats(struct per_channel_stats *channel_stats,
+				       struct channel_status *ev_channel_stat,
+				       uint32_t freq, uint32_t rx_clear_count)
+{
+	struct channel_status *channel_status_list;
+	uint8_t total_channel, i;
+	bool found = false;
+
+	channel_status_list = channel_stats->channel_status_list;
+	total_channel = channel_stats->total_channel;
+
+	for (i = 0; i < total_channel; i++) {
+		if (channel_status_list[i].channel_freq == freq) {
+			cp_stats_debug("update rcc: %d, cc:%d at index: %d, freq: %d",
+				       ev_channel_stat->rx_clear_count,
+				       ev_channel_stat->cycle_count, i, freq);
+
+			channel_status_list[i].rx_clear_count = rx_clear_count;
+			channel_status_list[i].cycle_count =
+					ev_channel_stat->cycle_count;
+			found = true;
+			break;
+		}
+	}
+
+	if (!found) {
+		if (total_channel < NUM_CHANNELS) {
+			ev_channel_stat->rx_clear_count = rx_clear_count;
+			ev_channel_stat->channel_freq = freq;
+
+			cp_stats_debug("Add rcc: %d cc: %d, at index: %d, freq: %d",
+				       ev_channel_stat->rx_clear_count,
+				       ev_channel_stat->rx_clear_count,
+				       total_channel, freq);
+
+			qdf_mem_copy(&channel_status_list[total_channel++],
+				     ev_channel_stat,
+				     sizeof(*channel_status_list));
+			channel_stats->total_channel = total_channel;
+		} else {
+			cp_stats_debug("Chan cnt exceed, channel_id: %d",
+				       ev_channel_stat->channel_id);
+		}
+	}
+}
+
+/**
+ * wlan_cp_stats_update_channel_stats - wrapper api to update per channel stats
+ * as per data present in scan event
+ * @channel_stats: per channel stats
+ * @ev_channel_stat: channel stats per scan event
+ *
+ * Return: none.
+ */
+static void
+wlan_cp_stats_update_channel_stats(struct per_channel_stats *channel_stats,
+				   struct channel_status *ev_channel_stat)
+{
+	uint8_t index, freq_info_num;
+	enum phy_ch_width scanned_ch_width;
+	const struct bonded_channel_freq *range = NULL;
+	uint16_t start_freq, end_freq;
+	uint32_t rx_clear_count;
+
+	scanned_ch_width =
+		wlan_cp_stats_get_ch_width_from_chan_info(ev_channel_stat);
+	if (scanned_ch_width == CH_WIDTH_INVALID) {
+		cp_stats_debug("Invalid scanned_ch_width");
+		return;
+	}
+
+	if (scanned_ch_width == CH_WIDTH_20MHZ) {
+		start_freq = ev_channel_stat->channel_freq;
+		end_freq = ev_channel_stat->channel_freq;
+	} else {
+		range =
+		   wlan_reg_get_bonded_chan_entry(ev_channel_stat->channel_freq,
+						  scanned_ch_width, 0);
+		if (!range) {
+			cp_stats_debug("range is NULL for freq %d, ch_width %d",
+				       ev_channel_stat->channel_freq,
+				       scanned_ch_width);
+			return;
+		}
+		start_freq = range->start_freq;
+		end_freq = range->end_freq;
+	}
+
+	freq_info_num = ev_channel_stat->subband_info.num_chan;
+	index = 0;
+
+	cp_stats_debug("freq :%d bw %d, range [%d-%d], num_freq:%d",
+		       ev_channel_stat->channel_freq, scanned_ch_width,
+		       start_freq, end_freq, freq_info_num);
+
+	for (; start_freq <= end_freq;) {
+		if (index >= freq_info_num || index >= MAX_WIDE_BAND_SCAN_CHAN)
+			break;
+		rx_clear_count =
+		    ev_channel_stat->subband_info.cca_busy_subband_info[index];
+		wlan_cp_stats_update_per_channel_stats(channel_stats,
+						       ev_channel_stat,
+						       start_freq,
+						       rx_clear_count);
+
+		start_freq += BW_20_MHZ;
+		index++;
+	}
+}
+
 void wlan_cp_stats_update_chan_info(struct wlan_objmgr_psoc *psoc,
-				    struct channel_status *channel_stat,
+				    struct channel_status *ev_channel_stat,
 				    uint8_t vdev_id)
 {
 	struct wlan_objmgr_pdev *pdev;
@@ -1205,8 +1348,11 @@ void wlan_cp_stats_update_chan_info(struct wlan_objmgr_psoc *psoc,
 		return;
 
 	pdev = wlan_vdev_get_pdev(vdev);
-	if (!pdev)
+	if (!pdev) {
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_CP_STATS_ID);
+		cp_stats_err("pdev object is null");
 		return;
+	}
 
 	pdev_cp_stats_priv = wlan_cp_stats_get_pdev_stats_obj(pdev);
 	if (!pdev_cp_stats_priv) {
@@ -1219,26 +1365,33 @@ void wlan_cp_stats_update_chan_info(struct wlan_objmgr_psoc *psoc,
 	channel_status_list = channel_stats->channel_status_list;
 	total_channel = channel_stats->total_channel;
 
+	if (ev_channel_stat->subband_info.is_wide_band_scan) {
+		wlan_cp_stats_update_channel_stats(channel_stats,
+						   ev_channel_stat);
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_CP_STATS_ID);
+		return;
+	}
+
 	for (i = 0; i < total_channel; i++) {
 		if (channel_status_list[i].channel_id ==
-		    channel_stat->channel_id) {
-			if (channel_stat->cmd_flags ==
+		    ev_channel_stat->channel_id) {
+			if (ev_channel_stat->cmd_flags ==
 			    WMI_CHAN_InFO_END_RESP &&
 			    channel_status_list[i].cmd_flags ==
 			    WMI_CHAN_InFO_START_RESP) {
 				/* adjust to delta value for counts */
-				channel_stat->rx_clear_count -=
+				ev_channel_stat->rx_clear_count -=
 				    channel_status_list[i].rx_clear_count;
-				channel_stat->cycle_count -=
+				ev_channel_stat->cycle_count -=
 				    channel_status_list[i].cycle_count;
-				channel_stat->rx_frame_count -=
+				ev_channel_stat->rx_frame_count -=
 				    channel_status_list[i].rx_frame_count;
-				channel_stat->tx_frame_count -=
+				ev_channel_stat->tx_frame_count -=
 				    channel_status_list[i].tx_frame_count;
-				channel_stat->bss_rx_cycle_count -=
+				ev_channel_stat->bss_rx_cycle_count -=
 				    channel_status_list[i].bss_rx_cycle_count;
 			}
-			qdf_mem_copy(&channel_status_list[i], channel_stat,
+			qdf_mem_copy(&channel_status_list[i], ev_channel_stat,
 				     sizeof(*channel_status_list));
 			found = true;
 			break;
@@ -1248,12 +1401,12 @@ void wlan_cp_stats_update_chan_info(struct wlan_objmgr_psoc *psoc,
 	if (!found) {
 		if (total_channel < NUM_CHANNELS) {
 			qdf_mem_copy(&channel_status_list[total_channel++],
-				     channel_stat,
+				     ev_channel_stat,
 				     sizeof(*channel_status_list));
 			channel_stats->total_channel = total_channel;
 		} else {
 			cp_stats_err("Chan cnt exceed, channel_id=%d",
-				     channel_stat->channel_id);
+				     ev_channel_stat->channel_id);
 		}
 	}
 

+ 8 - 1
components/dp/core/src/wlan_dp_bus_bandwidth.c

@@ -225,13 +225,20 @@ bbm_get_bus_bw_level_vote(struct wlan_dp_intf *dp_intf,
 			break;
 
 		/*
+		 * If the tput levels are between mid to high range, then
+		 * apply next SNOC voting level BUS_BW_LEVEL_5 which maps
+		 * to PLD_BUS_WIDTH_LOW_LATENCY.
+		 *
 		 * NDI dot11mode is currently hardcoded to 11AC in driver and
 		 * since the bus bw levels in table do not differ between 11AC
 		 * and 11AX, using max supported mode instead. Dot11mode of the
 		 * peers are not saved in driver and legacy modes are not
 		 * supported in NAN.
 		 */
-		return (*lkp_table)[QCA_WLAN_802_11_MODE_11AX][tput_level];
+		if (tput_level <= TPUT_LEVEL_HIGH)
+			return BUS_BW_LEVEL_5;
+		else
+			return (*lkp_table)[QCA_WLAN_802_11_MODE_11AX][tput_level];
 	default:
 		break;
 	}

+ 8 - 0
components/dp/core/src/wlan_dp_rx_fst.c

@@ -29,6 +29,7 @@
 #include <wlan_dp_main.h>
 #include <wlan_dp_fisa_rx.h>
 #include <cdp_txrx_ctrl.h>
+#include "qdf_ssr_driver_dump.h"
 
 /* Timeout in milliseconds to wait for CMEM FST HTT response */
 #define DP_RX_FST_CMEM_RESP_TIMEOUT 2000
@@ -500,6 +501,11 @@ QDF_STATUS dp_rx_fst_attach(struct wlan_dp_psoc_context *dp_ctx)
 		  "Rx FST attach successful, #entries:%d\n",
 		  fst->max_entries);
 
+	qdf_ssr_driver_dump_register_region("dp_fisa", fst, sizeof(*fst));
+	qdf_ssr_driver_dump_register_region("dp_fisa_sw_fse_table", fst->base,
+					    DP_RX_GET_SW_FT_ENTRY_SIZE *
+						   fst->max_entries);
+
 	return QDF_STATUS_SUCCESS;
 
 timer_init_fail:
@@ -614,6 +620,8 @@ void dp_rx_fst_detach(struct wlan_dp_psoc_context *dp_ctx)
 
 	dp_fst = dp_ctx->rx_fst;
 	if (qdf_likely(dp_fst)) {
+		qdf_ssr_driver_dump_unregister_region("dp_fisa_sw_fse_table");
+		qdf_ssr_driver_dump_unregister_region("dp_fisa");
 		qdf_timer_sync_cancel(&dp_fst->fse_cache_flush_timer);
 		if (dp_fst->fst_in_cmem)
 			dp_rx_fst_cmem_deinit(dp_fst);

+ 4 - 2
components/fw_offload/dispatcher/inc/cfg_fwol_generic.h

@@ -935,7 +935,7 @@
  * <ini>
  * pcie_config - Ini to control pcie gen and lane params
  * @Min: 0
- * @Max: 3
+ * @Max: 4
  * @Default: 0
  *
  * This ini is used to control to pcie gen and lane params
@@ -943,6 +943,8 @@
  * 1 - Force PCIe Gen and lane to max supported value
  * 2 - Configure PCIE Gen and Lane based on MCS and BW
  * 3 - Configure PCIE Gen and Lane based on TXRX tput using traffic monitor
+ * 4 - Allow PCIE Gen Speed and Lane width to be configured by host via
+ *     OEM data commands.
  *
  * Related: g_enable_pci_gen
  *
@@ -955,7 +957,7 @@
 #define CFG_PCIE_CONFIG CFG_INI_UINT( \
 				"pcie_config", \
 				0, \
-				3, \
+				4, \
 				0, \
 				CFG_VALUE_OR_DEFAULT, \
 				"to control pcie gen and lane")

+ 25 - 0
components/mlme/core/inc/wlan_mlme_main.h

@@ -129,12 +129,24 @@ struct wlan_mlme_rx_ops {
 					     struct peer_oper_mode_event *data);
 };
 
+/**
+ * struct wlan_mlme_tx_ops - structure of mlme tx function pointers
+ * @send_csa_event_status_ind: Tx ops function to send csa event indication
+ *
+ */
+struct wlan_mlme_tx_ops {
+	QDF_STATUS
+		(*send_csa_event_status_ind)(struct wlan_objmgr_vdev *vdev,
+					     uint8_t csa_status);
+};
+
 /**
  * struct wlan_mlme_psoc_ext_obj -MLME ext psoc priv object
  * @cfg:     cfg items
  * @rso_tx_ops: Roam Tx ops to send roam offload commands to firmware
  * @rso_rx_ops: Roam Rx ops to receive roam offload events from firmware
  * @mlme_rx_ops: mlme Rx ops to receive events from firmware
+ * @mlme_tx_ops: mlme tx ops
  * @wfa_testcmd: WFA config tx ops to send to FW
  * @disconnect_stats_param: Peer disconnect stats related params for SAP case
  * @scan_requester_id: mlme scan requester id
@@ -144,6 +156,7 @@ struct wlan_mlme_psoc_ext_obj {
 	struct wlan_cm_roam_tx_ops rso_tx_ops;
 	struct wlan_cm_roam_rx_ops rso_rx_ops;
 	struct wlan_mlme_rx_ops mlme_rx_ops;
+	struct wlan_mlme_tx_ops mlme_tx_ops;
 	struct wlan_mlme_wfa_cmd wfa_testcmd;
 	struct peer_disconnect_stats_param disconnect_stats_param;
 	wlan_scan_requester scan_requester_id;
@@ -1919,4 +1932,16 @@ wlan_mlme_register_common_events(struct wlan_objmgr_psoc *psoc)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
+
+/**
+ * wlan_mlme_send_csa_event_status_ind_cmd() - send csa event status indication
+ * @vdev: vdev obj
+ * @csa_status: csa status
+ *
+ *  Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_send_csa_event_status_ind_cmd(struct wlan_objmgr_vdev *vdev,
+					uint8_t csa_status);
+
 #endif

+ 23 - 0
components/mlme/core/inc/wlan_mlme_twt_api.h

@@ -308,6 +308,22 @@ bool mlme_is_max_twt_sessions_reached(struct wlan_objmgr_psoc *psoc,
  */
 bool mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc);
 
+#ifdef WLAN_TWT_CONV_SUPPORTED
+/**
+ * mlme_is_twt_disable_info_frame() - Get if TWT info frame enabled/disabled
+ * @psoc: Pointer to psoc object
+ *
+ * Return: True if TWT info frame is disabled.
+ */
+bool mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc);
+#else
+static inline bool
+mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
+
+#endif
 #else
 static inline
 void mlme_set_twt_peer_capabilities(struct wlan_objmgr_psoc *psoc,
@@ -334,5 +350,12 @@ mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
 {
 	return false;
 }
+
+static inline bool
+mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
+
 #endif /* WLAN_SUPPORT_TWT */
 #endif /* _WLAN_MLME_TWT_API_H_ */

+ 60 - 6
components/mlme/core/src/wlan_mlme_main.c

@@ -579,7 +579,8 @@ mlme_fill_freq_in_mlo_wide_band_scan_start_req(struct wlan_objmgr_vdev *vdev,
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
-	for (i = 0; i < WLAN_MAX_ML_BSS_LINKS; i++) {
+	for (i = 0; i < WLAN_MAX_ML_BSS_LINKS  &&
+	     link_ctx->links_info[i].link_id != WLAN_INVALID_LINK_ID; i++) {
 		status = mlme_update_freq_from_link_ctx(
 						&link_ctx->links_info[i], req);
 		if (QDF_IS_STATUS_ERROR(status)) {
@@ -618,10 +619,6 @@ mlme_fill_freq_in_wide_scan_start_request(struct wlan_objmgr_vdev *vdev,
 	enum phy_ch_width associated_ch_width;
 	QDF_STATUS status;
 
-	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
-	if (!mlme_priv)
-		return QDF_STATUS_E_FAILURE;
-
 	req->scan_req.chan_list.num_chan = 0;
 
 	if (wlan_vdev_mlme_is_mlo_vdev(vdev)) {
@@ -632,6 +629,10 @@ mlme_fill_freq_in_wide_scan_start_request(struct wlan_objmgr_vdev *vdev,
 		goto update_param;
 	}
 
+	mlme_priv = wlan_vdev_mlme_get_ext_hdl(vdev);
+	if (!mlme_priv)
+		return QDF_STATUS_E_FAILURE;
+
 	associated_ch_width =
 		mlme_priv->connect_info.assoc_chan_info.assoc_ch_width;
 	if (associated_ch_width == CH_WIDTH_INVALID) {
@@ -2164,6 +2165,28 @@ static void mlme_init_he_cap_in_cfg(struct wlan_objmgr_psoc *psoc,
 }
 #endif
 
+#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
+/**
+ * mlme_init_disable_twt_info() - initialize disable twt info
+ * @psoc: Pointer to PSOC
+ * @twt_cfg: Pointer to twt_cfg
+ *
+ * Return: None
+ */
+static void mlme_init_disable_twt_info(struct wlan_objmgr_psoc *psoc,
+				       struct wlan_mlme_cfg_twt *twt_cfg)
+{
+	twt_cfg->disable_twt_info_frame = cfg_get(psoc,
+						  CFG_DISABLE_TWT_INFO_FRAME);
+}
+#elif defined(WLAN_SUPPORT_TWT)
+static void mlme_init_disable_twt_info(struct wlan_objmgr_psoc *psoc,
+				       struct wlan_mlme_cfg_twt *twt_cfg)
+{
+}
+
+#endif
+
 #ifdef WLAN_SUPPORT_TWT
 static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
 			      struct wlan_mlme_cfg_twt *twt_cfg)
@@ -2175,6 +2198,7 @@ static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
 	twt_cfg->enable_twt_24ghz = cfg_get(psoc, CFG_ENABLE_TWT_24GHZ);
 	twt_cfg->is_bcast_requestor_enabled = CFG_TWT_GET_BCAST_REQ(bcast_conf);
 	twt_cfg->is_bcast_responder_enabled = CFG_TWT_GET_BCAST_RES(bcast_conf);
+	mlme_init_disable_twt_info(psoc, twt_cfg);
 }
 #else
 static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
@@ -2647,7 +2671,7 @@ static void mlme_init_sta_cfg(struct wlan_objmgr_psoc *psoc,
 	sta->sta_keep_alive_period =
 		cfg_get(psoc, CFG_INFRA_STA_KEEP_ALIVE_PERIOD);
 	sta->bss_max_idle_period =
-		(uint32_t)cfg_default(CFG_STA_BSS_MAX_IDLE_PERIOD);
+		cfg_get(psoc, CFG_STA_BSS_MAX_IDLE_PERIOD);
 	sta->tgt_gtx_usr_cfg =
 		cfg_get(psoc, CFG_TGT_GTX_USR_CFG);
 	sta->pmkid_modes =
@@ -5506,3 +5530,33 @@ QDF_STATUS wlan_mlme_register_common_events(struct wlan_objmgr_psoc *psoc)
 	return QDF_STATUS_SUCCESS;
 }
 #endif
+
+QDF_STATUS
+wlan_mlme_send_csa_event_status_ind_cmd(struct wlan_objmgr_vdev *vdev,
+					uint8_t csa_status)
+{
+	struct wlan_objmgr_psoc *psoc;
+	struct  wlan_mlme_tx_ops *tx_ops;
+	mlme_psoc_ext_t *mlme_priv;
+
+	psoc = wlan_vdev_get_psoc(vdev);
+	if (!psoc) {
+		mlme_err("vdev_id %d psoc object is NULL",
+			 wlan_vdev_get_id(vdev));
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	mlme_priv = wlan_psoc_mlme_get_ext_hdl(psoc);
+	if (!mlme_priv)
+		return QDF_STATUS_E_FAILURE;
+
+	tx_ops = &mlme_priv->mlme_tx_ops;
+
+	if (!tx_ops || !tx_ops->send_csa_event_status_ind) {
+		mlme_err("CSA no op defined");
+		return QDF_STATUS_E_FAILURE;
+	}
+
+	return tx_ops->send_csa_event_status_ind(vdev, csa_status);
+}
+

+ 14 - 1
components/mlme/core/src/wlan_mlme_twt_api.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -853,3 +853,16 @@ bool mlme_is_24ghz_twt_enabled(struct wlan_objmgr_psoc *psoc)
 
 	return mlme_obj->cfg.twt_cfg.enable_twt_24ghz;
 }
+
+#if defined(WLAN_SUPPORT_TWT) && defined(WLAN_TWT_CONV_SUPPORTED)
+bool mlme_is_twt_disable_info_frame(struct wlan_objmgr_psoc *psoc)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj)
+		return cfg_default(CFG_DISABLE_TWT_INFO_FRAME);
+
+	return mlme_obj->cfg.twt_cfg.disable_twt_info_frame;
+}
+#endif

+ 63 - 56
components/mlme/core/src/wlan_mlme_vdev_mgr_interface.c

@@ -45,6 +45,7 @@
 #include "wlan_mlo_mgr_sta.h"
 #endif
 #include <wlan_lmac_if_def.h>
+#include "target_if_mlme.h"
 
 static struct vdev_mlme_ops sta_mlme_ops;
 static struct vdev_mlme_ops ap_mlme_ops;
@@ -1359,6 +1360,8 @@ QDF_STATUS mlme_set_mbssid_info(struct wlan_objmgr_vdev *vdev,
 	mbss_11ax->profile_num = mbssid_info->profile_count;
 	qdf_mem_copy(mbss_11ax->trans_bssid,
 		     mbssid_info->trans_bssid, QDF_MAC_ADDR_SIZE);
+	qdf_mem_copy(mbss_11ax->non_trans_bssid,
+		     mbssid_info->non_trans_bssid, QDF_MAC_ADDR_SIZE);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -1595,62 +1598,6 @@ static void mlme_ext_handler_destroy(struct vdev_mlme_obj *vdev_mlme)
 	qdf_mem_free(vdev_mlme->ext_vdev_ptr);
 	vdev_mlme->ext_vdev_ptr = NULL;
 }
-/**
- * vdevmgr_mlme_ext_hdl_create () - Create mlme legacy priv object
- * @vdev_mlme: vdev mlme object
- *
- * Return: QDF_STATUS
- */
-static
-QDF_STATUS vdevmgr_mlme_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme)
-{
-	QDF_STATUS status;
-
-	mlme_legacy_debug("vdev id = %d ",
-			  vdev_mlme->vdev->vdev_objmgr.vdev_id);
-	vdev_mlme->ext_vdev_ptr =
-		qdf_mem_malloc(sizeof(struct mlme_legacy_priv));
-	if (!vdev_mlme->ext_vdev_ptr)
-		return QDF_STATUS_E_NOMEM;
-
-	mlme_init_rate_config(vdev_mlme);
-	mlme_init_connect_chan_info_config(vdev_mlme);
-	mlme_cm_alloc_roam_stats_info(vdev_mlme);
-	vdev_mlme->ext_vdev_ptr->connect_info.fils_con_info = NULL;
-	mlme_init_wait_for_key_timer(vdev_mlme->vdev,
-				     &vdev_mlme->ext_vdev_ptr->wait_key_timer);
-
-	qdf_wake_lock_create(
-			&vdev_mlme->ext_vdev_ptr->bss_color_change_wakelock,
-			"bss_color_change_wakelock");
-	qdf_runtime_lock_init(
-		&vdev_mlme->ext_vdev_ptr->bss_color_change_runtime_lock);
-	qdf_runtime_lock_init(
-		&vdev_mlme->ext_vdev_ptr->disconnect_runtime_lock);
-
-	sme_get_vdev_type_nss(wlan_vdev_mlme_get_opmode(vdev_mlme->vdev),
-			      &vdev_mlme->proto.generic.nss_2g,
-			      &vdev_mlme->proto.generic.nss_5g);
-
-	status = mlme_get_vdev_types(wlan_vdev_mlme_get_opmode(vdev_mlme->vdev),
-				     &vdev_mlme->mgmt.generic.type,
-				     &vdev_mlme->mgmt.generic.subtype);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		mlme_err("Get vdev type failed; status:%d", status);
-		mlme_ext_handler_destroy(vdev_mlme);
-		return status;
-	}
-
-	status = vdev_mgr_create_send(vdev_mlme);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		mlme_err("Failed to create vdev for vdev id %d",
-			 wlan_vdev_get_id(vdev_mlme->vdev));
-		mlme_ext_handler_destroy(vdev_mlme);
-		return status;
-	}
-
-	return status;
-}
 
 static QDF_STATUS
 mlme_wma_vdev_detach_post_cb(struct scheduler_msg *msg)
@@ -1715,6 +1662,63 @@ QDF_STATUS vdevmgr_mlme_ext_hdl_destroy(struct vdev_mlme_obj *vdev_mlme)
 	return QDF_STATUS_SUCCESS;
 }
 
+/**
+ * vdevmgr_mlme_ext_hdl_create () - Create mlme legacy priv object
+ * @vdev_mlme: vdev mlme object
+ *
+ * Return: QDF_STATUS
+ */
+static
+QDF_STATUS vdevmgr_mlme_ext_hdl_create(struct vdev_mlme_obj *vdev_mlme)
+{
+	QDF_STATUS status;
+
+	mlme_legacy_debug("vdev id = %d ",
+			  vdev_mlme->vdev->vdev_objmgr.vdev_id);
+	vdev_mlme->ext_vdev_ptr =
+		qdf_mem_malloc(sizeof(struct mlme_legacy_priv));
+	if (!vdev_mlme->ext_vdev_ptr)
+		return QDF_STATUS_E_NOMEM;
+
+	mlme_init_rate_config(vdev_mlme);
+	mlme_init_connect_chan_info_config(vdev_mlme);
+	mlme_cm_alloc_roam_stats_info(vdev_mlme);
+	vdev_mlme->ext_vdev_ptr->connect_info.fils_con_info = NULL;
+	mlme_init_wait_for_key_timer(vdev_mlme->vdev,
+				     &vdev_mlme->ext_vdev_ptr->wait_key_timer);
+
+	qdf_wake_lock_create(
+			&vdev_mlme->ext_vdev_ptr->bss_color_change_wakelock,
+			"bss_color_change_wakelock");
+	qdf_runtime_lock_init(
+		&vdev_mlme->ext_vdev_ptr->bss_color_change_runtime_lock);
+	qdf_runtime_lock_init(
+		&vdev_mlme->ext_vdev_ptr->disconnect_runtime_lock);
+
+	sme_get_vdev_type_nss(wlan_vdev_mlme_get_opmode(vdev_mlme->vdev),
+			      &vdev_mlme->proto.generic.nss_2g,
+			      &vdev_mlme->proto.generic.nss_5g);
+
+	status = mlme_get_vdev_types(wlan_vdev_mlme_get_opmode(vdev_mlme->vdev),
+				     &vdev_mlme->mgmt.generic.type,
+				     &vdev_mlme->mgmt.generic.subtype);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mlme_err("Get vdev type failed; status:%d", status);
+		mlme_ext_handler_destroy(vdev_mlme);
+		return status;
+	}
+
+	status = vdev_mgr_create_send(vdev_mlme);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		mlme_err("Failed to create vdev for vdev id %d",
+			 wlan_vdev_get_id(vdev_mlme->vdev));
+		vdevmgr_mlme_ext_hdl_destroy(vdev_mlme);
+		return status;
+	}
+
+	return status;
+}
+
 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
 static
 QDF_STATUS vdevmgr_mlme_vdev_send_set_mac_addr(struct qdf_mac_addr mac_addr,
@@ -1960,6 +1964,9 @@ QDF_STATUS psoc_mlme_ext_hdl_create(struct psoc_mlme_obj *psoc_mlme)
 			&psoc_mlme->ext_psoc_ptr->rso_rx_ops);
 	wlan_mlme_register_rx_ops(&psoc_mlme->ext_psoc_ptr->mlme_rx_ops);
 
+	target_if_mlme_register_tx_ops(
+			&psoc_mlme->ext_psoc_ptr->mlme_tx_ops);
+
 	return QDF_STATUS_SUCCESS;
 }
 

+ 23 - 0
components/mlme/dispatcher/inc/cfg_mlme_generic.h

@@ -99,6 +99,29 @@ enum wlan_emlsr_action_mode {
 	WLAN_EMLSR_MODE_MAX = WLAN_EMLSR_MODE_LAST - 1,
 };
 
+/**
+ * enum wlan_t2lm_negotiation_support - TID-to-link mapping negotiation support
+ * @WLAN_T2LM_DISABLE: T2LM support is disabled
+ * @WLAN_T2LM_SAME_LINK_SET: Mapping of all TIDs to the same link set, both DL
+ * and UL
+ * @WLAN_T2LM_RESERVED: This value is Reserved
+ * @WLAN_T2LM_SAME_DIFF_LINK_SET: Mapping of each TID to the same or different
+ * link set
+ * @WLAN_T2LM_SUPPORT_LAST: last value in enum
+ * @WLAN_T2LM_SUPPORT_MAX: max value supported
+ *
+ * This is used for 'type' values in T2LM support
+ */
+enum wlan_t2lm_negotiation_support {
+	WLAN_T2LM_DISABLE            = 0,
+	WLAN_T2LM_SAME_LINK_SET      = 1,
+	WLAN_T2LM_RESERVED           = 2,
+	WLAN_T2LM_SAME_DIFF_LINK_SET = 3,
+	/* keep this last */
+	WLAN_T2LM_SUPPORT_LAST,
+	WLAN_T2LM_SUPPORT_MAX = WLAN_T2LM_SUPPORT_LAST - 1,
+};
+
 /**
  * enum debug_packet_log_type - Debug packet log type
  * @DEBUG_PKTLOG_TYPE_NONE: Debug packet log is disabled

+ 1 - 1
components/mlme/dispatcher/inc/cfg_mlme_sta.h

@@ -99,7 +99,7 @@
  * Usage: Internal
  *
  */
-#define CFG_STA_BSS_MAX_IDLE_PERIOD CFG_UINT( \
+#define CFG_STA_BSS_MAX_IDLE_PERIOD CFG_INI_UINT( \
 	"bss_max_idle_period", \
 	0, \
 	100, \

+ 64 - 0
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -1063,6 +1063,39 @@ bool wlan_mlme_cfg_get_aux_supported_modes(
 		enum wlan_mlme_hw_mode_config_type hw_mode_id,
 		uint32_t *supported_modes_bitmap);
 
+/**
+ * wlan_mlme_is_aux_scan_support() - check whether aux scan is supported.
+ * @psoc: pointer to psoc object
+ * @hw_mode_id: hw mode id
+ *
+ * Return: true if supporting, else false
+ */
+bool
+wlan_mlme_is_aux_scan_support(struct wlan_objmgr_psoc *psoc,
+			      enum wlan_mlme_hw_mode_config_type hw_mode_id);
+
+/**
+ * wlan_mlme_is_aux_listen_support() - check whether aux listen is supported.
+ * @psoc: pointer to psoc object
+ * @hw_mode_id: hw mode id
+ *
+ * Return: true if supporting, else false
+ */
+bool
+wlan_mlme_is_aux_listen_support(struct wlan_objmgr_psoc *psoc,
+				enum wlan_mlme_hw_mode_config_type hw_mode_id);
+
+/**
+ * wlan_mlme_is_aux_emlsr_support() - check whether aux emlsr is supported.
+ * @psoc: pointer to psoc object
+ * @hw_mode_id: hw mode id
+ *
+ * Return: true if supporting, else false
+ */
+bool
+wlan_mlme_is_aux_emlsr_support(struct wlan_objmgr_psoc *psoc,
+			       enum wlan_mlme_hw_mode_config_type hw_mode_id);
+
 #ifdef WLAN_FEATURE_11AX
 /**
  * wlan_mlme_cfg_get_he_ul_mumimo() - Get the HE Ul Mumio
@@ -4162,6 +4195,26 @@ wlan_mlme_is_data_stall_recovery_fw_supported(struct wlan_objmgr_psoc *psoc);
 QDF_STATUS mlme_cfg_get_eht_caps(struct wlan_objmgr_psoc *psoc,
 				 tDot11fIEeht_cap *eht_cap);
 
+/**
+ * wlan_mlme_set_bt_profile_con() - Set bluetooth connection profile
+ * @psoc: pointer to psoc object
+ * @bt_profile_con: Bluetooth connection profile bit
+ *
+ * Return: None
+ */
+void
+wlan_mlme_set_bt_profile_con(struct wlan_objmgr_psoc *psoc,
+			     bool bt_profile_con);
+
+/**
+ * wlan_mlme_get_bt_profile_con() - Get Bluetooth connection profile
+ * @psoc: pointer to psoc object
+ *
+ * Return: Bluetooth connection profile
+ */
+bool
+wlan_mlme_get_bt_profile_con(struct wlan_objmgr_psoc *psoc);
+
 #ifdef WLAN_FEATURE_11BE_MLO
 /**
  * wlan_mlme_get_sta_mlo_conn_max_num() - get max number of links that sta mlo
@@ -4772,4 +4825,15 @@ wlan_mlme_set_ap_oper_ch_width(struct wlan_objmgr_vdev *vdev,
  */
 enum phy_ch_width
 wlan_mlme_get_ap_oper_ch_width(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * wlan_mlme_send_csa_event_status_ind() - send csa event status ind
+ * @vdev: vdev obj
+ * @csa_status: csa status
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_send_csa_event_status_ind(struct wlan_objmgr_vdev *vdev,
+				    uint8_t csa_status);
 #endif /* _WLAN_MLME_API_H_ */

+ 16 - 0
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -1387,6 +1387,18 @@ enum wlan_mlme_hw_mode_config_type {
 	WLAN_MLME_HW_MODE_MAX,
 };
 
+/**
+ * wlan_mlme_aux_caps_bit - Bit mapping for aux capability
+ * WLAN_MLME_AUX_MODE_SCAN_BIT: if set, aux scan is supported
+ * WLAN_MLME_AUX_MODE_LISTEN_BIT: if set, aux listen is supported
+ * WLAN_MLME_AUX_MODE_EMLSR_BIT: if set, aux emlsr is supported
+ */
+enum wlan_mlme_aux_caps_bit {
+	WLAN_MLME_AUX_MODE_SCAN_BIT = 0,
+	WLAN_MLME_AUX_MODE_LISTEN_BIT = 1,
+	WLAN_MLME_AUX_MODE_EMLSR_BIT = 2,
+};
+
 /* struct wlan_mlme_aux_dev_caps - wlan mlme aux dev capability
  *
  * @supported_modes_bitmap: indicate which mode this AUX supports for the
@@ -1463,6 +1475,7 @@ struct wlan_mlme_aux_dev_caps {
  * connection, bypass strict power levels
  * @sr_enable_modes: modes for which SR(Spatial Reuse) is enabled
  * @wlan_mlme_aux0_dev_caps: capability for aux0
+ * @bt_profile_con: Bluetooth connection profile
  */
 struct wlan_mlme_generic {
 	uint32_t band_capability;
@@ -1530,6 +1543,7 @@ struct wlan_mlme_generic {
 #endif
 	struct wlan_mlme_aux_dev_caps
 		wlan_mlme_aux0_dev_caps[WLAN_MLME_HW_MODE_MAX];
+	bool bt_profile_con;
 };
 
 /**
@@ -1620,6 +1634,7 @@ struct wlan_mlme_acs {
  * @disable_btwt_usr_cfg: User config param to enable/disable the BTWT support
  * @enable_twt_24ghz: Enable/disable host TWT when STA is connected in
  * 2.4Ghz
+ * @disable_twt_info_frame: Enable/disable TWT info frame
  * @req_flag: requestor flag enable/disable
  * @res_flag: responder flag enable/disable
  * @twt_res_svc_cap: responder service capability
@@ -1637,6 +1652,7 @@ struct wlan_mlme_cfg_twt {
 	uint32_t twt_congestion_timeout;
 	bool disable_btwt_usr_cfg;
 	bool enable_twt_24ghz;
+	bool disable_twt_info_frame;
 	bool req_flag;
 	bool res_flag;
 	bool twt_res_svc_cap;

+ 27 - 0
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -94,6 +94,15 @@ QDF_STATUS ucfg_mlme_pdev_open(struct wlan_objmgr_pdev *pdev);
 void ucfg_mlme_set_ml_link_control_mode(struct wlan_objmgr_psoc *psoc,
 					uint8_t vdev_id, uint8_t value);
 
+/**
+ * ucfg_mlme_set_bt_profile_con() - set Bluetooth connection profile
+ * @psoc: Pointer to psoc object
+ * @bt_profile_con: Bluetooth connection profile indicator
+ *
+ * Return: None
+ */
+void ucfg_mlme_set_bt_profile_con(struct wlan_objmgr_psoc *psoc,
+				  bool bt_profile_con);
 /**
  * ucfg_mlme_get_ml_link_control_mode() - get ml_link_control_mode
  * @psoc: pointer to psoc object
@@ -3180,6 +3189,24 @@ ucfg_mlme_get_emlsr_mode_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
 	return wlan_mlme_get_emlsr_mode_enabled(psoc, value);
 }
 
+/**
+ * ucfg_mlme_set_t2lm_negotiation_supported() - Enables/disables t2lm
+ * negotiation support value
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to set the
+ * t2lm negotiation supported value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_set_t2lm_negotiation_supported(struct wlan_objmgr_psoc *psoc,
+					 bool value)
+{
+	return wlan_mlme_set_t2lm_negotiation_supported(psoc, value);
+}
+
 /**
  * ucfg_mlme_get_opr_rate() - Get operational rate set
  * @vdev: pointer to vdev object

+ 93 - 0
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -737,6 +737,67 @@ bool wlan_mlme_cfg_get_aux_supported_modes(
 	return true;
 }
 
+/**
+ * wlan_mlme_is_aux_cap_support() - checking the corresponding capability
+ * @psoc: wlan_objmgr_psoc pointer
+ * @bit: the corresponding bit
+ * @hw_mode_id: hw mode id
+ *
+ * Return: true if corresponding capability supporting
+ */
+static bool
+wlan_mlme_is_aux_cap_support(struct wlan_objmgr_psoc *psoc,
+			     enum wlan_mlme_aux_caps_bit bit,
+			     enum wlan_mlme_hw_mode_config_type hw_mode_id)
+{
+	uint32_t supported_modes_bitmap = 0;
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+	struct wlan_mlme_aux_dev_caps *wlan_mlme_aux0_dev_caps;
+	int idx;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj) {
+		mlme_err("MLME obj is NULL");
+		return false;
+	}
+
+	wlan_mlme_aux0_dev_caps = mlme_obj->cfg.gen.wlan_mlme_aux0_dev_caps;
+	if (hw_mode_id >= WLAN_MLME_HW_MODE_MAX) {
+		for (idx = 0; idx < WLAN_MLME_HW_MODE_MAX; idx++)
+			supported_modes_bitmap |=
+			    wlan_mlme_aux0_dev_caps[idx].supported_modes_bitmap;
+	} else {
+		supported_modes_bitmap =
+		     wlan_mlme_aux0_dev_caps[hw_mode_id].supported_modes_bitmap;
+	}
+
+	return (supported_modes_bitmap & (0x1 << bit)) ? true : false;
+}
+
+bool
+wlan_mlme_is_aux_scan_support(struct wlan_objmgr_psoc *psoc,
+			      enum wlan_mlme_hw_mode_config_type hw_mode_id)
+{
+	return wlan_mlme_is_aux_cap_support(psoc, WLAN_MLME_AUX_MODE_SCAN_BIT,
+					    hw_mode_id);
+}
+
+bool
+wlan_mlme_is_aux_listen_support(struct wlan_objmgr_psoc *psoc,
+				enum wlan_mlme_hw_mode_config_type hw_mode_id)
+{
+	return wlan_mlme_is_aux_cap_support(psoc, WLAN_MLME_AUX_MODE_LISTEN_BIT,
+					    hw_mode_id);
+}
+
+bool
+wlan_mlme_is_aux_emlsr_support(struct wlan_objmgr_psoc *psoc,
+			       enum wlan_mlme_hw_mode_config_type hw_mode_id)
+{
+	return wlan_mlme_is_aux_cap_support(psoc, WLAN_MLME_AUX_MODE_EMLSR_BIT,
+					    hw_mode_id);
+}
+
 #ifdef WLAN_FEATURE_11AX
 QDF_STATUS wlan_mlme_cfg_get_he_ul_mumimo(struct wlan_objmgr_psoc *psoc,
 					  uint32_t *value)
@@ -1413,6 +1474,31 @@ QDF_STATUS wlan_mlme_get_sta_ch_width(struct wlan_objmgr_vdev *vdev,
 	return  status;
 }
 
+void
+wlan_mlme_set_bt_profile_con(struct wlan_objmgr_psoc *psoc,
+			     bool bt_profile_con)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj)
+		return;
+
+	mlme_obj->cfg.gen.bt_profile_con = bt_profile_con;
+}
+
+bool
+wlan_mlme_get_bt_profile_con(struct wlan_objmgr_psoc *psoc)
+{
+	struct wlan_mlme_psoc_ext_obj *mlme_obj;
+
+	mlme_obj = mlme_get_psoc_ext_obj(psoc);
+	if (!mlme_obj)
+		return false;
+
+	return mlme_obj->cfg.gen.bt_profile_con;
+}
+
 #ifdef WLAN_FEATURE_11BE_MLO
 uint8_t wlan_mlme_get_sta_mlo_simultaneous_links(struct wlan_objmgr_psoc *psoc)
 {
@@ -7897,3 +7983,10 @@ wlan_mlme_get_ap_oper_ch_width(struct wlan_objmgr_vdev *vdev)
 
 	return mlme_priv->mlme_ap.oper_ch_width;
 }
+
+QDF_STATUS
+wlan_mlme_send_csa_event_status_ind(struct wlan_objmgr_vdev *vdev,
+				    uint8_t csa_status)
+{
+	return wlan_mlme_send_csa_event_status_ind_cmd(vdev, csa_status);
+}

+ 6 - 0
components/mlme/dispatcher/src/wlan_mlme_ucfg_api.c

@@ -134,6 +134,12 @@ void ucfg_mlme_set_ml_link_control_mode(struct wlan_objmgr_psoc *psoc,
 	wlan_mlme_set_ml_link_control_mode(psoc, vdev_id, value);
 }
 
+void ucfg_mlme_set_bt_profile_con(struct wlan_objmgr_psoc *psoc,
+				  bool bt_profile_con)
+{
+	wlan_mlme_set_bt_profile_con(psoc, bt_profile_con);
+}
+
 uint8_t ucfg_mlme_get_ml_link_control_mode(struct wlan_objmgr_psoc *psoc,
 					   uint8_t vdev_id)
 {

+ 1 - 1
components/nan/core/src/nan_api.c

@@ -453,7 +453,7 @@ bool wlan_is_nan_allowed_on_freq(struct wlan_objmgr_pdev *pdev, uint32_t freq)
 	}
 
 	/* Check for SRD channels */
-	if (wlan_reg_is_etsi13_srd_chan_for_freq(pdev, freq))
+	if (wlan_reg_is_etsi_srd_chan_for_freq(pdev, freq))
 		wlan_mlme_get_srd_master_mode_for_vdev(wlan_pdev_get_psoc(pdev),
 						       QDF_NAN_DISC_MODE,
 						       &nan_allowed);

+ 16 - 7
components/pmo/core/src/wlan_pmo_static_config.c

@@ -31,6 +31,7 @@ static const uint8_t arp_mask[] = {0xff, 0xff};
 static const uint8_t ns_ptrn[] = {0x86, 0xDD};
 static const uint8_t discvr_ptrn[] = {0xe0, 0x00, 0x00, 0xf8};
 static const uint8_t discvr_mask[] = {0xf0, 0x00, 0x00, 0xf8};
+static const uint8_t arp_offset = 12;
 
 void pmo_register_wow_wakeup_events(struct wlan_objmgr_vdev *vdev)
 {
@@ -139,16 +140,25 @@ static QDF_STATUS pmo_configure_wow_ap(struct wlan_objmgr_vdev *vdev)
 
 	/* Setup Bridge MAC address */
 	pmo_get_vdev_bridge_addr(vdev, &bridgeaddr);
-	if (qdf_is_macaddr_zero(&bridgeaddr))
-		return ret;
-
-	ret = pmo_tgt_send_wow_patterns_to_fw(vdev,
+	if (!qdf_is_macaddr_zero(&bridgeaddr)) {
+		ret = pmo_tgt_send_wow_patterns_to_fw(vdev,
 			pmo_get_and_increment_wow_default_ptrn(vdev_ctx),
 			bridgeaddr.bytes, QDF_MAC_ADDR_SIZE, 0, mac_mask,
 			QDF_MAC_ADDR_SIZE, false);
+		if (ret != QDF_STATUS_SUCCESS) {
+			pmo_err("Failed to add Bridge MAC address");
+			return ret;
+		}
+	}
+
+	/* Setup ARP pkt pattern */
+	ret = pmo_tgt_send_wow_patterns_to_fw(vdev,
+			pmo_get_and_increment_wow_default_ptrn(vdev_ctx),
+			arp_ptrn, sizeof(arp_ptrn), arp_offset, arp_mask,
+			sizeof(arp_mask), false);
 	if (ret != QDF_STATUS_SUCCESS) {
-		pmo_err("Failed to add Bridge MAC address");
-		return ret;
+		pmo_err("Failed to add WOW ARP pattern");
+			return ret;
 	}
 
 	return ret;
@@ -255,7 +265,6 @@ static QDF_STATUS pmo_configure_ssdp(struct wlan_objmgr_vdev *vdev)
  */
 static QDF_STATUS pmo_configure_wow_sta(struct wlan_objmgr_vdev *vdev)
 {
-	uint8_t arp_offset = 12;
 	uint8_t mac_mask[QDF_MAC_ADDR_SIZE];
 	QDF_STATUS ret = QDF_STATUS_SUCCESS;
 	struct pmo_vdev_priv_obj *vdev_ctx;

+ 11 - 1
components/pre_cac/core/src/wlan_pre_cac_main.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -224,6 +224,11 @@ void pre_cac_handle_radar_ind(struct wlan_objmgr_vdev *vdev)
 	struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
 	struct pre_cac_psoc_priv *psoc_priv = pre_cac_psoc_get_priv(psoc);
 
+	if (!psoc_priv) {
+		pre_cac_err("invalid psoc");
+		return;
+	}
+
 	pre_cac_conditional_csa_ind(psoc, wlan_vdev_get_id(vdev), false);
 
 	pre_cac_debug("schedue pre_cac_work vdev %d", wlan_vdev_get_id(vdev));
@@ -239,6 +244,11 @@ void pre_cac_handle_cac_end(struct wlan_objmgr_vdev *vdev)
 	struct wlan_objmgr_psoc *psoc = wlan_vdev_get_psoc(vdev);
 	struct pre_cac_psoc_priv *psoc_priv = pre_cac_psoc_get_priv(psoc);
 
+	if (!psoc_priv) {
+		pre_cac_err("invalid psoc");
+		return;
+	}
+
 	pre_cac_conditional_csa_ind(psoc, wlan_vdev_get_id(vdev), true);
 
 	pre_cac_debug("schedue pre_cac_work vdev %d", wlan_vdev_get_id(vdev));

+ 130 - 26
components/target_if/connection_mgr/src/target_if_cm_roam_offload.c

@@ -1621,21 +1621,123 @@ target_if_start_rso_stop_timer(struct wlan_objmgr_vdev *vdev)
 						  RSO_STOP_RESPONSE_BIT);
 }
 
+static bool
+target_if_is_vdev_rsp_valid(struct wlan_objmgr_psoc *psoc,
+			    struct vdev_response_timer **vdev_rsp,
+			    struct wlan_lmac_if_mlme_rx_ops *rx_ops,
+			    uint8_t vdev_id)
+{
+	*vdev_rsp = rx_ops->psoc_get_vdev_response_timer_info(psoc, vdev_id);
+	if (!*vdev_rsp) {
+		mlme_err("MLO_ROAM: vdev rsp not found for vdev:%d", vdev_id);
+		return false;
+	}
+
+	if (qdf_atomic_test_bit(RSO_STOP_RESPONSE_BIT,
+				&((*vdev_rsp)->rsp_status))) {
+		mlme_debug("MLO_ROAM: RSO bit set on vdev id %d",
+			   (*vdev_rsp)->vdev_id);
+		return true;
+	}
+
+	/* Failure case vdev_rsp is set to NULL */
+	*vdev_rsp = NULL;
+
+	return false;
+}
+
+/**
+ * target_if_find_active_rso_stop_rsp() - Iterate through ml vdevs to find
+ * the vdev rsp for which RSO_STOP_RESPONSE_BIT is set.
+ * @roam_event: Roam event data
+ *
+ * This is needed when for e.g.: host sends rso stop on vdev id 0, fw response
+ * is received on vdev 1.
+ * Since the timer is vdev specific, this function will iterate through ml vdevs
+ * to find the vdev_rsp on which RSO_STOP_RESPONSE_BIT is set.
+ *
+ * Return: struct vdev_response_timer for success, NULL for failure
+ */
+static struct vdev_response_timer *
+target_if_find_active_rso_stop_rsp(struct roam_offload_roam_event *roam_event)
+{
+	struct vdev_response_timer *vdev_rsp = NULL;
+	struct wlan_lmac_if_mlme_rx_ops *rx_ops;
+	struct wlan_objmgr_vdev *vdev;
+	struct wlan_mlo_dev_context *mlo_dev_ctx;
+	uint8_t i;
+	QDF_STATUS status;
+
+	rx_ops = target_if_vdev_mgr_get_rx_ops(roam_event->psoc);
+	if (!rx_ops || !rx_ops->psoc_get_vdev_response_timer_info) {
+		mlme_err("No Rx Ops");
+		return NULL;
+	}
+
+	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(roam_event->psoc,
+						    roam_event->vdev_id,
+						    WLAN_MLME_SB_ID);
+	if (!vdev)
+		return NULL;
+
+	/* For legacy case use the incoming vdev */
+	if (target_if_is_vdev_rsp_valid(roam_event->psoc, &vdev_rsp,
+					rx_ops, roam_event->vdev_id))
+		goto end;
+
+	mlo_dev_ctx = vdev->mlo_dev_ctx;
+	if (!mlo_dev_ctx)
+		goto end;
+
+	/*
+	 * if vdev_rsp with RSO_STOP_RESPONSE bit is not set then check for
+	 * the same on other ML vdevs
+	 */
+	for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
+		if (!mlo_dev_ctx->wlan_vdev_list[i])
+			continue;
+
+		status = wlan_objmgr_vdev_try_get_ref(mlo_dev_ctx->wlan_vdev_list[i],
+						      WLAN_MLO_MGR_ID);
+		if (QDF_IS_STATUS_ERROR(status))
+			continue;
+
+		if (target_if_is_vdev_rsp_valid(roam_event->psoc, &vdev_rsp,
+						rx_ops,
+						wlan_vdev_get_id(mlo_dev_ctx->wlan_vdev_list[i]))) {
+			mlo_release_vdev_ref(mlo_dev_ctx->wlan_vdev_list[i]);
+			goto end;
+		}
+
+		mlo_release_vdev_ref(mlo_dev_ctx->wlan_vdev_list[i]);
+	}
+
+	if (i == WLAN_UMAC_MLO_MAX_VDEVS) {
+		mlme_err("RSO bit not set on any mlo vdev");
+		goto end;
+	}
+
+end:
+	if (vdev)
+		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_SB_ID);
+
+	return vdev_rsp;
+}
+
 QDF_STATUS
 target_if_stop_rso_stop_timer(struct roam_offload_roam_event *roam_event)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct vdev_response_timer *vdev_rsp;
-	struct wlan_lmac_if_mlme_rx_ops *rx_ops;
 
 	roam_event->rso_timer_stopped = false;
-	rx_ops = target_if_vdev_mgr_get_rx_ops(roam_event->psoc);
-	if (!rx_ops || !rx_ops->vdev_mgr_start_response) {
-		mlme_err("No Rx Ops");
-		return QDF_STATUS_E_INVAL;
+	if (roam_event->reason == ROAM_REASON_RSO_STATUS &&
+	    roam_event->notif == CM_ROAM_NOTIF_HO_FAIL) {
+		mlme_debug("HO_FAIL happened, wait for HO_FAIL event vdev_id: %u",
+			   roam_event->vdev_id);
 	}
-	vdev_rsp = rx_ops->psoc_get_vdev_response_timer_info(roam_event->psoc,
-							roam_event->vdev_id);
+
+	vdev_rsp = target_if_find_active_rso_stop_rsp(roam_event);
 	if (!vdev_rsp) {
 		mlme_err("vdev response timer is null VDEV_%d PSOC_%d",
 			 roam_event->vdev_id,
@@ -1643,33 +1745,35 @@ target_if_stop_rso_stop_timer(struct roam_offload_roam_event *roam_event)
 		return QDF_STATUS_E_INVAL;
 	}
 
-	if (!qdf_atomic_test_bit(RSO_STOP_RESPONSE_BIT,
-				 &vdev_rsp->rsp_status)) {
-		mlme_debug("rso stop timer is not started");
-		return QDF_STATUS_SUCCESS;
-	}
+	switch (roam_event->reason) {
+	case ROAM_REASON_RSO_STATUS:
+		if (roam_event->notif != CM_ROAM_NOTIF_SCAN_MODE_SUCCESS &&
+		    roam_event->notif != CM_ROAM_NOTIF_SCAN_MODE_FAIL)
+			break;
 
-	if ((roam_event->reason == ROAM_REASON_RSO_STATUS &&
-	     (roam_event->notif == CM_ROAM_NOTIF_SCAN_MODE_SUCCESS ||
-	      roam_event->notif == CM_ROAM_NOTIF_SCAN_MODE_FAIL)) ||
-	    roam_event->reason == ROAM_REASON_HO_FAILED) {
+		/*
+		 * fallthrough if notif == CM_ROAM_NOTIF_SCAN_MODE_SUCCESS or
+		 * notif == CM_ROAM_NOTIF_SCAN_MODE_FAIL
+		 */
+		fallthrough;
+	case ROAM_REASON_HO_FAILED:
 		status = target_if_vdev_mgr_rsp_timer_stop(roam_event->psoc,
-					vdev_rsp, RSO_STOP_RESPONSE_BIT);
-		if (QDF_IS_STATUS_SUCCESS(status))
-			roam_event->rso_timer_stopped = true;
-		else
-			mlme_err("PSOC_%d VDEV_%d: VDE MGR RSP Timer stop failed",
+							   vdev_rsp,
+							   RSO_STOP_RESPONSE_BIT);
+		roam_event->rso_timer_stopped = true;
+		if (QDF_IS_STATUS_ERROR(status)) {
+			roam_event->rso_timer_stopped = false;
+			mlme_err("PSOC_%d VDEV_%d: VDEV MGR RSO Stop RSP Timer stop failed",
 				 roam_event->psoc->soc_objmgr.psoc_id,
 				 roam_event->vdev_id);
-	} else if (roam_event->reason == ROAM_REASON_RSO_STATUS &&
-		   roam_event->notif == CM_ROAM_NOTIF_HO_FAIL) {
-		mlme_debug("HO_FAIL happened, wait for HO_FAIL event vdev_id: %u",
-			   roam_event->vdev_id);
+		}
+		break;
+	default:
+		return status;
 	}
 
 	return status;
 }
-
 #else
 static inline QDF_STATUS
 target_if_start_rso_stop_timer(struct wlan_objmgr_vdev *vdev)

+ 39 - 0
components/target_if/mlme/inc/target_if_mlme.h

@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/**
+ * DOC: contains mlme target if declarations
+ */
+
+#ifndef _WLAN_MLME_TGT_IF_H_
+#define _WLAN_MLME_TGT_IF_H_
+
+#include "qdf_types.h"
+#include "wlan_mlme_dbg.h"
+#include "wlan_mlme_api.h"
+#include "wlan_mlme_main.h"
+#include "target_if.h"
+
+/**
+ * target_if_mlme_register_tx_ops() - registers mlme tx ops
+ * @tx_ops: tx ops
+ *
+ * Return: none
+ */
+void target_if_mlme_register_tx_ops(struct wlan_mlme_tx_ops *tx_ops);
+
+#endif

+ 74 - 0
components/target_if/mlme/src/target_if_mlme.c

@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/**
+ * DOC: contains mlme target if declarations
+ */
+
+#include "target_if_mlme.h"
+#include <wmi_unified_mlme_api.h>
+
+static struct wmi_unified
+*target_if_mlme_get_wmi_handle_from_vdev(struct wlan_objmgr_vdev *vdev)
+{
+	struct wlan_objmgr_pdev *pdev;
+	struct wmi_unified *wmi_handle;
+
+	pdev = wlan_vdev_get_pdev(vdev);
+	if (!pdev) {
+		target_if_err("PDEV is NULL");
+		return NULL;
+	}
+
+	wmi_handle = get_wmi_unified_hdl_from_pdev(pdev);
+	if (!wmi_handle) {
+		target_if_err("wmi_handle is null");
+		return NULL;
+	}
+
+	return wmi_handle;
+}
+
+static QDF_STATUS
+target_if_mlme_send_csa_event_status_ind(struct wlan_objmgr_vdev *vdev,
+					 uint8_t csa_status)
+{
+	wmi_unified_t wmi_handle;
+	struct csa_event_status_ind params = {0};
+
+	params.vdev_id = wlan_vdev_get_id(vdev);
+	params.status = csa_status;
+
+	wmi_handle = target_if_mlme_get_wmi_handle_from_vdev(vdev);
+	if (!wmi_handle)
+		return QDF_STATUS_E_FAILURE;
+
+	return wmi_send_csa_event_status_ind(wmi_handle, params);
+}
+
+void
+target_if_mlme_register_tx_ops(struct wlan_mlme_tx_ops *tx_ops)
+{
+	if (!tx_ops) {
+		target_if_err("target if tx ops is NULL!");
+		return;
+	}
+
+	tx_ops->send_csa_event_status_ind =
+		target_if_mlme_send_csa_event_status_ind;
+}
+

+ 44 - 0
components/tdls/core/src/wlan_tdls_cmds_process.c

@@ -1661,6 +1661,48 @@ QDF_STATUS tdls_process_add_peer_rsp(struct tdls_add_sta_rsp *rsp)
 	return QDF_STATUS_E_INVAL;
 }
 
+static void tdls_process_unforce_link_mode(struct wlan_objmgr_vdev *vdev)
+{
+	struct tdls_vdev_priv_obj *tdls_vdev;
+	struct tdls_peer *peer;
+	qdf_list_t *head;
+	qdf_list_node_t *p_node;
+	QDF_STATUS status;
+	bool unforce = true;
+	int i;
+
+	tdls_vdev = wlan_vdev_get_tdls_vdev_obj(vdev);
+	if (!tdls_vdev)
+		return;
+
+	for (i = 0; i < WLAN_TDLS_PEER_LIST_SIZE; i++) {
+		head = &tdls_vdev->peer_list[i];
+		status = qdf_list_peek_front(head, &p_node);
+		while (QDF_IS_STATUS_SUCCESS(status)) {
+			peer = qdf_container_of(p_node, struct tdls_peer, node);
+
+			tdls_debug("Peer: " QDF_MAC_ADDR_FMT "link status %d, vdev id %d",
+				   QDF_MAC_ADDR_REF(peer->peer_mac.bytes),
+				   peer->link_status, wlan_vdev_get_id(vdev));
+
+			if (peer->link_status == TDLS_LINK_CONNECTED ||
+			    peer->link_status == TDLS_LINK_CONNECTING) {
+				unforce = false;
+				goto unforce_exit;
+			}
+
+			status = qdf_list_peek_next(head, p_node, &p_node);
+		}
+	}
+
+unforce_exit:
+	if (unforce) {
+		tdls_debug("try to set vdev %d to unforce",
+			   wlan_vdev_get_id(vdev));
+		tdls_set_link_unforce(vdev);
+	}
+}
+
 QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp)
 {
 	uint8_t sta_idx, id;
@@ -1734,6 +1776,8 @@ QDF_STATUS tdls_process_del_peer_rsp(struct tdls_del_sta_rsp *rsp)
 						  TDLS_LINK_DROPPED_BY_REMOTE);
 	}
 
+	tdls_process_unforce_link_mode(vdev);
+
 cmddone:
 	tdls_release_serialization_command(vdev, WLAN_SER_CMD_TDLS_DEL_PEER);
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_TDLS_SB_ID);

+ 26 - 0
components/tdls/core/src/wlan_tdls_ct.c

@@ -97,6 +97,7 @@ void tdls_discovery_timeout_peer_cb(void *user_data)
 	struct wlan_objmgr_vdev *tdls_link_vdev;
 	struct tdls_rx_mgmt_frame *rx_mgmt;
 	uint8_t *mac;
+	bool unforce = true;
 
 	if (!user_data) {
 		tdls_err("discovery time out data is null");
@@ -132,6 +133,8 @@ void tdls_discovery_timeout_peer_cb(void *user_data)
 				tdls_notice("[TDLS] TDLS Discovery Response,"
 					    "QDF_MAC_ADDR_FMT RSSI[%d]<---OTA",
 					    rx_mgmt->rx_rssi);
+				tdls_debug("discovery resp on vdev %d",
+					   wlan_vdev_get_id(tdls_vdev->vdev));
 				tdls_recv_discovery_resp(tdls_vdev, mac);
 				tdls_set_rssi(tdls_vdev->vdev, mac,
 					      rx_mgmt->rx_rssi);
@@ -161,6 +164,15 @@ void tdls_discovery_timeout_peer_cb(void *user_data)
 		while (QDF_IS_STATUS_SUCCESS(status)) {
 			peer = qdf_container_of(p_node, struct tdls_peer,
 						node);
+
+			tdls_debug("Peer: " QDF_MAC_ADDR_FMT "link status %d, vdev id %d",
+				   QDF_MAC_ADDR_REF(peer->peer_mac.bytes),
+				   peer->link_status, wlan_vdev_get_id(vdev));
+
+			if (peer->link_status != TDLS_LINK_DISCOVERING &&
+			    peer->link_status != TDLS_LINK_IDLE)
+				unforce = false;
+
 			if (TDLS_LINK_DISCOVERING != peer->link_status) {
 				status = qdf_list_peek_next(head, p_node,
 							    &p_node);
@@ -174,6 +186,12 @@ void tdls_discovery_timeout_peer_cb(void *user_data)
 		}
 	}
 
+	if (wlan_vdev_mlme_is_mlo_vdev(vdev) && unforce) {
+		tdls_debug("try to set vdev %d to unforce",
+			   wlan_vdev_get_id(vdev));
+		tdls_set_link_unforce(vdev);
+	}
+
 	tdls_vdev->discovery_sent_cnt = 0;
 	/* add tdls power save prohibited */
 
@@ -1456,6 +1474,14 @@ void tdls_disable_offchan_and_teardown_links(
 	QDF_STATUS status;
 	uint8_t vdev_id;
 	bool tdls_in_progress = false;
+	bool is_mlo_vdev;
+
+	is_mlo_vdev = wlan_vdev_mlme_is_mlo_vdev(vdev);
+	if (is_mlo_vdev) {
+		tdls_debug("try to set vdev %d to unforce",
+			   wlan_vdev_get_id(vdev));
+		tdls_set_link_unforce(vdev);
+	}
 
 	status = tdls_get_vdev_objects(vdev, &tdls_vdev, &tdls_soc);
 	if (QDF_STATUS_SUCCESS != status) {

+ 30 - 0
components/tdls/core/src/wlan_tdls_main.c

@@ -80,6 +80,7 @@ static char *tdls_get_cmd_type_str(enum tdls_command_type cmd_type)
 	CASE_RETURN_STRING(TDLS_CMD_SET_SECOFFCHANOFFSET);
 	CASE_RETURN_STRING(TDLS_DELETE_ALL_PEERS_INDICATION);
 	CASE_RETURN_STRING(TDLS_CMD_START_BSS);
+	CASE_RETURN_STRING(TDLS_CMD_SET_LINK_UNFORCE);
 	default:
 		return "Invalid TDLS command";
 	}
@@ -582,6 +583,17 @@ QDF_STATUS tdls_handle_start_bss(struct wlan_objmgr_psoc *psoc)
 }
 #endif
 
+static void tdls_handle_link_unforce(struct wlan_objmgr_vdev *vdev)
+{
+	struct tdls_action_frame_request req = {0};
+
+	req.vdev = vdev;
+	req.tdls_mgmt.frame_type = TDLS_MAX_ACTION_CODE;
+
+	tdls_debug("set vdev %d unforce", wlan_vdev_get_id(vdev));
+	tdls_set_link_mode(&req);
+}
+
 QDF_STATUS tdls_process_cmd(struct scheduler_msg *msg)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -668,6 +680,9 @@ QDF_STATUS tdls_process_cmd(struct scheduler_msg *msg)
 	case TDLS_CMD_START_BSS:
 		tdls_handle_start_bss(msg->bodyptr);
 		break;
+	case TDLS_CMD_SET_LINK_UNFORCE:
+		tdls_handle_link_unforce(msg->bodyptr);
+		break;
 	default:
 		break;
 	}
@@ -2039,6 +2054,21 @@ void tdls_scan_complete_event_handler(struct wlan_objmgr_vdev *vdev,
 	tdls_post_scan_done_msg(tdls_soc);
 }
 
+void tdls_set_link_unforce(struct wlan_objmgr_vdev *vdev)
+{
+	QDF_STATUS status;
+	struct scheduler_msg msg = {0};
+
+	msg.callback = tdls_process_cmd;
+	msg.type = TDLS_CMD_SET_LINK_UNFORCE;
+	msg.bodyptr = vdev;
+	status = scheduler_post_message(QDF_MODULE_ID_TDLS,
+					QDF_MODULE_ID_TDLS,
+					QDF_MODULE_ID_OS_IF, &msg);
+	if (QDF_IS_STATUS_ERROR(status))
+		tdls_err("failed to set tdls link mode");
+}
+
 /**
  * tdls_check_peer_buf_capable() - Check buffer sta capable of tdls peers
  * @tdls_vdev: TDLS vdev object

+ 8 - 0
components/tdls/core/src/wlan_tdls_main.h

@@ -811,6 +811,14 @@ void tdls_scan_complete_event_handler(struct wlan_objmgr_vdev *vdev,
 			struct scan_event *event,
 			void *arg);
 
+/**
+ * tdls_set_link_unforce() - set link unforce
+ * @vdev: vdev object
+ *
+ * Return: void
+ */
+void tdls_set_link_unforce(struct wlan_objmgr_vdev *vdev);
+
 /**
  * tdls_scan_callback() - callback for TDLS scan operation
  * @tdls_soc: tdls soc pvt object

+ 92 - 9
components/tdls/core/src/wlan_tdls_mgmt.c

@@ -87,6 +87,26 @@ tdls_mlo_get_tdls_link_vdev(struct wlan_objmgr_vdev *vdev)
 	return wlan_mlo_get_tdls_link_vdev(vdev);
 }
 
+void
+tdls_set_remain_links_unforce(struct wlan_objmgr_vdev *vdev)
+{
+	struct wlan_mlo_dev_context *mlo_dev_ctx;
+	struct wlan_objmgr_vdev *mlo_vdev;
+	int i;
+
+	/* TDLS link is selected, unforce link for other vdevs */
+	mlo_dev_ctx = vdev->mlo_dev_ctx;
+	for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
+		mlo_vdev = mlo_dev_ctx->wlan_vdev_list[i];
+		if (!mlo_vdev || mlo_vdev == vdev)
+			continue;
+
+		tdls_debug("try to set vdev %d to unforce",
+			   wlan_vdev_get_id(mlo_vdev));
+		tdls_set_link_unforce(mlo_vdev);
+	}
+}
+
 QDF_STATUS
 tdls_process_mlo_cal_tdls_link_score(struct wlan_objmgr_vdev *vdev)
 {
@@ -134,6 +154,47 @@ tdls_process_mlo_cal_tdls_link_score(struct wlan_objmgr_vdev *vdev)
 	return status;
 }
 
+/**
+ * tdls_check_wait_more() - wait until the timer timeout if necessary
+ * @vdev: vdev object
+ *
+ * Return: true if need to wait else false
+ */
+static bool tdls_check_wait_more(struct wlan_objmgr_vdev *vdev)
+{
+	struct wlan_mlo_dev_context *mlo_dev_ctx;
+	struct wlan_objmgr_vdev *mlo_vdev;
+	struct tdls_vdev_priv_obj *tdls_vdev;
+	/* expect response number */
+	int expect_num;
+	/* received response number */
+	int receive_num;
+	int i;
+
+	expect_num = 0;
+	receive_num = 0;
+	mlo_dev_ctx = vdev->mlo_dev_ctx;
+	for (i =  0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
+		mlo_vdev = mlo_dev_ctx->wlan_vdev_list[i];
+		if (!mlo_vdev)
+			continue;
+
+		expect_num++;
+
+		tdls_vdev =
+		     wlan_objmgr_vdev_get_comp_private_obj(mlo_vdev,
+							   WLAN_UMAC_COMP_TDLS);
+		if (tdls_vdev->rx_mgmt)
+			receive_num++;
+	}
+
+	/* +1 means the one received last has not been recorded */
+	if (expect_num > receive_num + 1)
+		return true;
+	else
+		return false;
+}
+
 struct wlan_objmgr_vdev *
 tdls_process_mlo_choice_tdls_vdev(struct wlan_objmgr_vdev *vdev)
 {
@@ -260,6 +321,7 @@ tdls_process_mlo_rx_mgmt_sync(struct tdls_soc_priv_obj *tdls_soc,
 	struct wlan_objmgr_vdev *mlo_vdev;
 	struct wlan_mlo_dev_context *mlo_dev_ctx;
 	bool peer_mlo;
+	bool waitmore = false;
 	uint8_t i;
 
 	vdev = tdls_vdev->vdev;
@@ -303,9 +365,17 @@ tdls_process_mlo_rx_mgmt_sync(struct tdls_soc_priv_obj *tdls_soc,
 			goto exit;
 		}
 
-		tdls_vdev->discovery_sent_cnt = 0;
-		qdf_mc_timer_stop(&tdls_vdev->peer_discovery_timer);
-		qdf_atomic_dec(&tdls_soc->timer_cnt);
+		if (qdf_atomic_read(&tdls_soc->timer_cnt) == 1)
+			waitmore = tdls_check_wait_more(vdev);
+
+		if (waitmore) {
+			/* do not stop the timer */
+			tdls_debug("wait more tdls response");
+		} else {
+			tdls_vdev->discovery_sent_cnt = 0;
+			qdf_mc_timer_stop(&tdls_vdev->peer_discovery_timer);
+			qdf_atomic_dec(&tdls_soc->timer_cnt);
+		}
 
 		tdls_vdev->rx_mgmt = qdf_mem_malloc_atomic(sizeof(*rx_mgmt) +
 							   rx_mgmt->frame_len);
@@ -375,6 +445,11 @@ tdls_mlo_get_tdls_link_vdev(struct wlan_objmgr_vdev *vdev)
 	return NULL;
 }
 
+void
+tdls_set_remain_links_unforce(struct wlan_objmgr_vdev *vdev)
+{
+}
+
 QDF_STATUS
 tdls_process_mlo_cal_tdls_link_score(struct wlan_objmgr_vdev *vdev)
 {
@@ -802,7 +877,7 @@ tdls_send_mgmt_serialize_callback(struct wlan_serialization_command *cmd,
 }
 
 #ifdef WLAN_FEATURE_11BE_MLO
-static QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
+QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
 {
 	uint8_t mlo_vdev_lst[WLAN_UMAC_MLO_MAX_VDEVS] = {-1};
 	struct wlan_objmgr_psoc *psoc;
@@ -815,10 +890,6 @@ static QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
 	if (!is_mlo_vdev)
 		return status;
 
-	mlo_tdls_vdev = wlan_mlo_get_tdls_link_vdev(req->vdev);
-	if (mlo_tdls_vdev)
-		return status;
-
 	psoc = wlan_vdev_get_psoc(req->vdev);
 	if (!psoc) {
 		tdls_err("psoc is NULL");
@@ -827,6 +898,10 @@ static QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
 
 	if (req->tdls_mgmt.frame_type == TDLS_DISCOVERY_RESPONSE ||
 	    req->tdls_mgmt.frame_type == TDLS_DISCOVERY_REQUEST) {
+		mlo_tdls_vdev = wlan_mlo_get_tdls_link_vdev(req->vdev);
+		if (mlo_tdls_vdev)
+			return status;
+
 		mlo_vdev_lst[0] = wlan_vdev_get_id(req->vdev);
 		vdev_count = 1;
 
@@ -836,12 +911,20 @@ static QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
 						     vdev_count, mlo_vdev_lst);
 		if (status == QDF_STATUS_SUCCESS)
 			req->link_active = true;
+	} else if (req->tdls_mgmt.frame_type == TDLS_MAX_ACTION_CODE) {
+		mlo_vdev_lst[0] = wlan_vdev_get_id(req->vdev);
+		vdev_count = 1;
+		status =
+		    policy_mgr_mlo_sta_set_link(psoc,
+						MLO_LINK_FORCE_REASON_TDLS,
+						MLO_LINK_FORCE_MODE_NO_FORCE,
+						vdev_count, mlo_vdev_lst);
 	}
 
 	return status;
 }
 #else
-static QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
+QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req)
 {
 	return QDF_STATUS_SUCCESS;
 }

+ 16 - 0
components/tdls/core/src/wlan_tdls_mgmt.h

@@ -99,6 +99,14 @@ tdls_process_mlo_cal_tdls_link_score(struct wlan_objmgr_vdev *vdev);
 struct wlan_objmgr_vdev *
 tdls_mlo_get_tdls_link_vdev(struct wlan_objmgr_vdev *vdev);
 
+/**
+ * tdls_set_remain_links_unforce() - unforce links
+ * @vdev: vdev object
+ *
+ * Return: void
+ */
+void tdls_set_remain_links_unforce(struct wlan_objmgr_vdev *vdev);
+
 /**
  * tdls_mgmt_rx_ops() - register or unregister rx callback
  * @psoc: psoc object
@@ -150,5 +158,13 @@ tdls_process_mlo_choice_tdls_vdev(struct wlan_objmgr_vdev *vdev);
  * Return: void
  */
 void tdls_set_no_force_vdev(struct wlan_objmgr_vdev *vdev, bool flag);
+
+/**
+ * tdls_set_link_mode() - force active or unfore link for MLO case
+ * @req: the pointer of tdls_action_frame_request
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS tdls_set_link_mode(struct tdls_action_frame_request *req);
 #endif
 

+ 3 - 3
components/tdls/core/src/wlan_tdls_peer.c

@@ -886,11 +886,11 @@ void tdls_set_peer_link_status(struct tdls_peer *peer,
 	struct tdls_vdev_priv_obj *vdev_obj;
 	enum tdls_link_state old_status;
 
-	tdls_debug("state %d reason %d peer:" QDF_MAC_ADDR_FMT,
-		   link_status, link_reason,
+	vdev_obj = peer->vdev_priv;
+	tdls_debug("vdev %d state %d reason %d peer:" QDF_MAC_ADDR_FMT,
+		   wlan_vdev_get_id(vdev_obj->vdev), link_status, link_reason,
 		   QDF_MAC_ADDR_REF(peer->peer_mac.bytes));
 
-	vdev_obj = peer->vdev_priv;
 	old_status = peer->link_status;
 	peer->link_status = link_status;
 	tdls_update_pmo_status(vdev_obj, old_status, link_status);

+ 3 - 1
components/tdls/dispatcher/inc/wlan_tdls_public_structs.h

@@ -241,6 +241,7 @@ enum tdls_feature_mode {
  * @TDLS_CMD_SET_SECOFFCHANOFFSET: tdls secondary offchannel offset
  * @TDLS_DELETE_ALL_PEERS_INDICATION: tdls delete all peers indication
  * @TDLS_CMD_START_BSS: SAP start indication to tdls module
+ * @TDLS_CMD_SET_LINK_UNFORCE: tdls to unforce link for MLO case
  */
 enum tdls_command_type {
 	TDLS_CMD_TX_ACTION = 1,
@@ -267,7 +268,8 @@ enum tdls_command_type {
 	TDLS_CMD_SET_OFFCHANMODE,
 	TDLS_CMD_SET_SECOFFCHANOFFSET,
 	TDLS_DELETE_ALL_PEERS_INDICATION,
-	TDLS_CMD_START_BSS
+	TDLS_CMD_START_BSS,
+	TDLS_CMD_SET_LINK_UNFORCE
 };
 
 /**

+ 1 - 0
components/tdls/dispatcher/src/wlan_tdls_ucfg_api.c

@@ -528,6 +528,7 @@ bool ucfg_tdls_link_vdev_is_matching(struct wlan_objmgr_vdev *vdev)
 	if (!tdls_link_vdev) {
 		wlan_vdev_mlme_feat_ext2_cap_set(vdev,
 						 WLAN_VDEV_FEXT2_MLO_STA_TDLS);
+		tdls_set_remain_links_unforce(vdev);
 		return true;
 	}
 

+ 2 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_host_util.c

@@ -80,6 +80,8 @@ QDF_STATUS cm_update_advance_roam_scan_filter(
 		return QDF_STATUS_E_FAILURE;
 
 	rso_usr_cfg = wlan_cm_get_rso_user_config(vdev);
+	if (!rso_usr_cfg)
+		return QDF_STATUS_E_INVAL;
 
 	mlme_debug("No of Allowed SSID List:%d",
 		   rso_usr_cfg->num_ssid_allowed_list);

+ 64 - 5
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -1382,6 +1382,7 @@ QDF_STATUS cm_fw_roam_invoke_fail(struct wlan_objmgr_psoc *psoc,
 	struct wlan_objmgr_vdev *vdev;
 	wlan_cm_id cm_id = CM_ID_INVALID;
 	struct cnx_mgr *cm_ctx;
+	struct cm_roam_req *roam_req = NULL;
 
 	vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc,
 						    vdev_id,
@@ -1397,6 +1398,10 @@ QDF_STATUS cm_fw_roam_invoke_fail(struct wlan_objmgr_psoc *psoc,
 		goto error;
 	}
 
+	roam_req = cm_get_first_roam_command(vdev);
+	if (roam_req)
+		cm_id = roam_req->cm_id;
+
 	status = cm_sm_deliver_event(vdev, WLAN_CM_SM_EV_ROAM_INVOKE_FAIL,
 				     sizeof(wlan_cm_id), &cm_id);
 	if (QDF_IS_STATUS_ERROR(status))
@@ -1424,6 +1429,58 @@ static void cm_ho_fail_diag_event(void)
 static inline void cm_ho_fail_diag_event(void) {}
 #endif
 
+#ifdef WLAN_FEATURE_11BE_MLO
+static bool
+cm_ho_fail_is_avoid_list_candidate(struct wlan_objmgr_vdev *vdev,
+				   struct cm_ho_fail_ind *ho_fail_ind)
+{
+	uint8_t link_info_iter = 0;
+	struct qdf_mac_addr peer_macaddr = {0};
+	struct mlo_link_info *mlo_link_info;
+	uint32_t akm;
+
+	if (!wlan_vdev_mlme_is_mlo_vdev(vdev)) {
+		wlan_vdev_get_bss_peer_mac(vdev, &peer_macaddr);
+		akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
+		if (WLAN_CRYPTO_IS_WPA_WPA2(akm))
+			return true;
+
+		if (qdf_is_macaddr_equal(&peer_macaddr, &ho_fail_ind->bssid))
+			return false;
+		else
+			return true;
+	}
+
+	mlo_link_info = &vdev->mlo_dev_ctx->link_ctx->links_info[0];
+	for (link_info_iter = 0; link_info_iter < WLAN_MAX_ML_BSS_LINKS;
+	     link_info_iter++, mlo_link_info++) {
+		if (qdf_is_macaddr_equal(&mlo_link_info->ap_link_addr,
+					 &ho_fail_ind->bssid))
+			return false;
+	}
+
+	return true;
+}
+#else
+static bool
+cm_ho_fail_is_avoid_list_candidate(struct wlan_objmgr_vdev *vdev,
+				   struct cm_ho_fail_ind *ho_fail_ind)
+{
+	struct qdf_mac_addr peer_macaddr = {0};
+	uint32_t akm;
+
+	akm = wlan_crypto_get_param(vdev, WLAN_CRYPTO_PARAM_KEY_MGMT);
+	if (WLAN_CRYPTO_IS_WPA_WPA2(akm))
+		return true;
+
+	wlan_vdev_get_bss_peer_mac(vdev, &peer_macaddr);
+	if (qdf_is_macaddr_equal(&peer_macaddr, &ho_fail_ind->bssid))
+		return false;
+	else
+		return true;
+}
+#endif
+
 static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 {
 	QDF_STATUS status;
@@ -1490,11 +1547,13 @@ static QDF_STATUS cm_handle_ho_fail(struct scheduler_msg *msg)
 			    sizeof(wlan_cm_id), &cm_id);
 
 	qdf_mem_zero(&ap_info, sizeof(struct reject_ap_info));
-	ap_info.bssid = ind->bssid;
-	ap_info.reject_ap_type = DRIVER_AVOID_TYPE;
-	ap_info.reject_reason = REASON_ROAM_HO_FAILURE;
-	ap_info.source = ADDED_BY_DRIVER;
-	wlan_dlm_add_bssid_to_reject_list(pdev, &ap_info);
+	if (cm_ho_fail_is_avoid_list_candidate(vdev, ind)) {
+		ap_info.bssid = ind->bssid;
+		ap_info.reject_ap_type = DRIVER_AVOID_TYPE;
+		ap_info.reject_reason = REASON_ROAM_HO_FAILURE;
+		ap_info.source = ADDED_BY_DRIVER;
+		wlan_dlm_add_bssid_to_reject_list(pdev, &ap_info);
+	}
 
 	cm_ho_fail_diag_event();
 	wlan_roam_debug_log(ind->vdev_id,

+ 47 - 21
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -3986,7 +3986,6 @@ cm_roam_switch_to_rso_stop(struct wlan_objmgr_pdev *pdev,
 	 * nothing to do here
 	 */
 	default:
-
 		return QDF_STATUS_SUCCESS;
 	}
 	mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_RSO_STOPPED);
@@ -4151,6 +4150,20 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 			break;
 		}
 
+		/*
+		 * If dual sta roaming is not supported, do not enable
+		 * the RSO on the second STA interface, even if the
+		 * primary interface config is present via dual sta policy
+		 */
+		temp_vdev_id = policy_mgr_get_roam_enabled_sta_session_id(
+								psoc, vdev_id);
+		if (!dual_sta_roam_active &&
+		    temp_vdev_id != WLAN_UMAC_VDEV_ID_MAX) {
+			mlme_debug("Do not enable RSO on %d, RSO is enabled on %d",
+				   vdev_id, temp_vdev_id);
+			return QDF_STATUS_E_FAILURE;
+		}
+
 		/*
 		 * set_primary_vdev usecase is to use that
 		 * interface(e.g. wlan0) over the other
@@ -4171,8 +4184,6 @@ cm_roam_switch_to_init(struct wlan_objmgr_pdev *pdev,
 		 * Disable roaming on the enabled sta if supplicant wants to
 		 * enable roaming on this vdev id
 		 */
-		temp_vdev_id = policy_mgr_get_roam_enabled_sta_session_id(
-								psoc, vdev_id);
 		if (temp_vdev_id != WLAN_UMAC_VDEV_ID_MAX) {
 			/*
 			 * Roam init state can be requested as part of
@@ -4296,7 +4307,9 @@ cm_roam_switch_to_rso_enable(struct wlan_objmgr_pdev *pdev,
 	control_bitmap = mlme_get_operations_bitmap(psoc, vdev_id);
 
 	cur_state = mlme_get_roam_state(psoc, vdev_id);
-	mlme_debug("CM_RSO: vdev%d: cur_state : %d", vdev_id, cur_state);
+	mlme_debug("CM_RSO: vdev%d: cur_state : %d reason:%d control_bmap:0x%x sup_disabled_roam:%d",
+		   vdev_id, cur_state, reason, control_bitmap,
+		   sup_disabled_roaming);
 
 	switch (cur_state) {
 	case WLAN_ROAM_INIT:
@@ -4370,7 +4383,7 @@ cm_roam_switch_to_rso_enable(struct wlan_objmgr_pdev *pdev,
 
 	status = cm_roam_send_rso_cmd(psoc, vdev_id, rso_command, reason);
 	if (QDF_IS_STATUS_ERROR(status)) {
-		mlme_debug("ROAM: RSO start failed");
+		mlme_err("ROAM: vdev:%d RSO start failed", vdev_id);
 		return status;
 	}
 	mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_RSO_ENABLED);
@@ -4684,8 +4697,7 @@ cm_record_state_change(struct wlan_objmgr_pdev *pdev,
  */
 static QDF_STATUS
 cm_mlo_roam_switch_for_link(struct wlan_objmgr_pdev *pdev,
-			    uint8_t vdev_id,
-			    uint8_t reason)
+			    uint8_t vdev_id, uint8_t reason)
 {
 	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
 	enum roam_offload_state cur_state = mlme_get_roam_state(psoc, vdev_id);
@@ -4726,6 +4738,7 @@ cm_mlo_roam_switch_for_link(struct wlan_objmgr_pdev *pdev,
 
 QDF_STATUS
 cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev, uint8_t *vdev_id,
+			       enum roam_offload_state requested_state,
 			       uint8_t reason, bool *is_rso_skip)
 {
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
@@ -4745,8 +4758,8 @@ cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev, uint8_t *vdev_id,
 	 */
 	if (wlan_vdev_mlme_get_is_mlo_vdev(psoc, *vdev_id) &&
 	    mlo_mgr_is_link_switch_in_progress(vdev)) {
-		mlme_debug("MLO ROAM: Link switch in prog! skip RSO cmd on vdev %d",
-			   *vdev_id);
+		mlme_debug("MLO ROAM: Link switch in prog! skip RSO cmd:%d on vdev %d",
+			   requested_state, *vdev_id);
 		*is_rso_skip = true;
 		goto end;
 	}
@@ -4762,12 +4775,12 @@ cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev, uint8_t *vdev_id,
 		 */
 		if (!wlan_vdev_mlme_get_is_mlo_link(psoc, *vdev_id) &&
 		    wlan_is_roaming_enabled(pdev, *vdev_id)) {
-			mlme_debug("MLO ROAM: Process RSO stop on assoc vdev : %d",
-				   *vdev_id);
+			mlme_debug("MLO ROAM: Process RSO cmd:%d on assoc vdev : %d",
+				   requested_state, *vdev_id);
 			*is_rso_skip = false;
 		} else {
-			mlme_debug("MLO ROAM: skip RSO cmd on assoc vdev %d",
-				   *vdev_id);
+			mlme_debug("MLO ROAM: skip RSO cmd:%d on assoc vdev %d",
+				   requested_state, *vdev_id);
 			*is_rso_skip = true;
 		}
 	}
@@ -4834,14 +4847,13 @@ cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
 		is_up = QDF_IS_STATUS_SUCCESS(wlan_vdev_is_up(vdev));
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
 
-	cur_state = mlme_get_roam_state(psoc, vdev_id);
-
 	if (requested_state != WLAN_ROAM_DEINIT && !is_up) {
-		mlme_debug("ROAM: roam state change requested in non-connected state");
+		mlme_debug("ROAM: roam state(%d) change requested in non-connected state",
+			   requested_state);
 		goto end;
 	}
 
-	status = cm_handle_mlo_rso_state_change(pdev, &vdev_id,
+	status = cm_handle_mlo_rso_state_change(pdev, &vdev_id, requested_state,
 						reason, &is_rso_skip);
 	if (is_rso_skip)
 		return status;
@@ -4849,7 +4861,7 @@ cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
 	vdev = wlan_objmgr_get_vdev_by_id_from_pdev(pdev, vdev_id,
 						    WLAN_MLME_CM_ID);
 	if (!vdev) {
-		mlme_err("Invalid vdev");
+		mlme_err("Invalid vdev:%d", vdev_id);
 		goto end;
 	}
 
@@ -4889,6 +4901,7 @@ cm_roam_state_change(struct wlan_objmgr_pdev *pdev,
 release_ref:
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_CM_ID);
 end:
+	cur_state = mlme_get_roam_state(psoc, vdev_id);
 	cm_record_state_change(pdev, vdev_id, cur_state, requested_state,
 			       reason, is_up, status);
 
@@ -5885,7 +5898,7 @@ QDF_STATUS cm_start_roam_invoke(struct wlan_objmgr_psoc *psoc,
 		}
 
 		cm_req->roam_req.req.forced_roaming = true;
-		if (source == CM_ROAMING_HOST)
+		if (source == CM_ROAMING_HOST || source == CM_ROAMING_USER)
 			rso_cfg->is_forced_roaming = true;
 		source = CM_ROAMING_NUD_FAILURE;
 		goto send_evt;
@@ -5924,7 +5937,8 @@ send_evt:
 	 */
 	if (source == CM_ROAMING_HOST ||
 	    source == CM_ROAMING_NUD_FAILURE ||
-	    source == CM_ROAMING_LINK_REMOVAL)
+	    source == CM_ROAMING_LINK_REMOVAL ||
+	    source == CM_ROAMING_USER)
 		rso_cfg->roam_invoke_source = source;
 
 	cm_req->roam_req.req.vdev_id = vdev_id;
@@ -6131,7 +6145,7 @@ void cm_roam_scan_info_event(struct wlan_objmgr_psoc *psoc,
 	}
 
 	populate_diag_cmn(&wlan_diag_event->diag_cmn, vdev_id,
-			  (uint64_t)scan->ap->timestamp, &ap->bssid);
+			  (uint64_t)scan->scan_complete_timestamp, &ap->bssid);
 
 	wlan_diag_event->version = DIAG_SCAN_DONE_VERSION;
 
@@ -6924,6 +6938,8 @@ cm_roam_mgmt_frame_event(struct wlan_objmgr_vdev *vdev,
 		}
 	}
 
+	wlan_diag_event.supported_links = frame_data->band;
+
 	if (frame_data->type == ROAM_FRAME_INFO_FRAME_TYPE_EXT) {
 		wlan_diag_event.subtype =
 			(uint8_t)cm_roam_get_eapol_tag(frame_data->subtype);
@@ -6933,6 +6949,16 @@ cm_roam_mgmt_frame_event(struct wlan_objmgr_vdev *vdev,
 		(uint8_t)cm_roam_get_tag(frame_data->subtype,
 					 !frame_data->is_rsp);
 		diag_event = EVENT_WLAN_MGMT;
+
+		status =
+			wlan_populate_mlo_mgmt_event_param(vdev,
+							   &wlan_diag_event,
+							   wlan_diag_event.subtype);
+		if (QDF_IS_STATUS_ERROR(status)) {
+			mlme_err("vdev: %d Unable to populate MLO parameter",
+				 wlan_vdev_get_id(vdev));
+			return status;
+		}
 	}
 
 	if (wlan_diag_event.subtype > WLAN_CONN_DIAG_REASSOC_RESP_EVENT &&

+ 6 - 8
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.h

@@ -555,16 +555,14 @@ void cm_update_owe_info(struct wlan_objmgr_vdev *vdev,
 
 #ifdef WLAN_FEATURE_11BE_MLO
 QDF_STATUS
-cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev,
-			       uint8_t *vdev_id,
-			       uint8_t reason,
-			       bool *is_rso_skip);
+cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev, uint8_t *vdev_id,
+			       enum roam_offload_state requested_state,
+			       uint8_t reason, bool *is_rso_skip);
 #else
 static inline QDF_STATUS
-cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev,
-			       uint8_t *vdev_id,
-			       uint8_t reason,
-			       bool *is_rso_skip)
+cm_handle_mlo_rso_state_change(struct wlan_objmgr_pdev *pdev, uint8_t *vdev_id,
+			       enum roam_offload_state requested_state,
+			       uint8_t reason, bool *is_rso_skip)
 {
 	return QDF_STATUS_E_NOSUPPORT;
 }

+ 2 - 32
components/umac/mlme/connection_mgr/core/src/wlan_cm_vdev_connect.c

@@ -1149,9 +1149,6 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 	uint8_t i, j = 0;
 	uint8_t mlo_support_link_num;
 	struct wlan_objmgr_psoc *psoc;
-	struct scan_cache_entry *part_scan_entry = NULL;
-	bool is_security_allowed;
-	struct qdf_mac_addr *link_mac;
 
 	/* If ML IE is not present then return failure*/
 	if (!scan_entry->ie_list.multi_link_bv)
@@ -1188,34 +1185,6 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 			break;
 
 		if (scan_entry->ml_info.link_info[i].is_valid_link) {
-			link_mac = &scan_entry->ml_info.link_info[i].link_addr;
-			part_scan_entry = wlan_scan_get_scan_entry_by_mac_freq(
-					pdev,
-					link_mac,
-					scan_entry->ml_info.link_info[i].freq);
-			if (!part_scan_entry) {
-				scm_debug("scan entry not found for link addr: "
-					  QDF_MAC_ADDR_FMT,
-					  QDF_MAC_ADDR_REF(link_mac->bytes));
-				continue;
-			}
-
-			/*
-			 * Reject the partner link that doesn’t pass the
-			 * security check and validate the next available
-			 * partner link. If none of the partner link passes
-			 * the security check, proceed connection with
-			 * single link.
-			 */
-			is_security_allowed =
-				wlan_cm_is_eht_allowed_for_current_security(
-							part_scan_entry);
-			util_scan_free_cache_entry(part_scan_entry);
-			if (!is_security_allowed) {
-				mlme_debug("current security is not valid for partner link");
-				continue;
-			}
-
 			partner_info->partner_link_info[j].link_addr =
 				scan_entry->ml_info.link_info[i].link_addr;
 			partner_info->partner_link_info[j].link_id =
@@ -1230,7 +1199,7 @@ cm_get_ml_partner_info(struct wlan_objmgr_pdev *pdev,
 	}
 
 	partner_info->num_partner_links = j;
-	mlme_debug("sta and ap integrate link num: %d", j);
+	mlme_debug("sta and ap intersect num of partner link: %d", j);
 
 	return QDF_STATUS_SUCCESS;
 }
@@ -1659,6 +1628,7 @@ cm_update_tid_mapping(struct wlan_objmgr_vdev *vdev)
 	if (QDF_IS_STATUS_ERROR(status)) {
 		mlme_err("T2LM IE beacon process failed");
 	}
+	wlan_connectivity_t2lm_status_event(vdev);
 
 	return status;
 }

+ 3 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -2222,6 +2222,8 @@ enum roam_rt_stats_type {
  * @retry_count: Frame retry count
  * @assoc_id: Association id received in the association response/
  * reassociation response frame
+ * @band: Band on which the packet is transmitted or received. Refer
+ * enum wlan_diag_wifi_band
  */
 struct roam_frame_info {
 	bool present;
@@ -2237,6 +2239,7 @@ struct roam_frame_info {
 	int32_t rssi;
 	uint16_t retry_count;
 	uint16_t assoc_id;
+	uint8_t band;
 };
 
 /**

+ 11 - 3
components/umac/mlme/connection_mgr/dispatcher/src/wlan_cm_roam_api.c

@@ -50,8 +50,7 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
 	uint32_t op_ch_freq_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS];
 	uint32_t sta_vdev_id = WLAN_INVALID_VDEV_ID;
-	uint32_t count;
-	uint32_t idx;
+	uint32_t count, idx;
 	struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
 
 	sta_vdev_id = policy_mgr_get_roam_enabled_sta_session_id(psoc, vdev_id);
@@ -62,7 +61,6 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
 						       op_ch_freq_list,
 						       vdev_id_list,
 						       PM_STA_MODE);
-
 	if (!count)
 		return QDF_STATUS_E_FAILURE;
 
@@ -82,6 +80,13 @@ wlan_cm_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
 	if (sta_vdev_id == WLAN_INVALID_VDEV_ID)
 		return QDF_STATUS_E_FAILURE;
 
+	if (mlo_check_is_given_vdevs_on_same_mld(psoc, sta_vdev_id, vdev_id)) {
+		mlme_debug("RSO_CFG: vdev:%d , vdev:%d are on same MLD skip RSO enable",
+			   sta_vdev_id, vdev_id);
+
+		return QDF_STATUS_E_FAILURE;
+	}
+
 	mlme_debug("ROAM: Enabling roaming on vdev[%d]", sta_vdev_id);
 
 	return cm_roam_state_change(pdev,
@@ -1710,6 +1715,9 @@ wlan_cm_roam_invoke(struct wlan_objmgr_pdev *pdev, uint8_t vdev_id,
 		return QDF_STATUS_E_NULL_VALUE;
 	}
 
+	mlme_debug("vdev: %d source: %d freq: %d bssid: " QDF_MAC_ADDR_FMT,
+		   vdev_id, source, chan_freq, QDF_MAC_ADDR_REF(bssid->bytes));
+
 	status = cm_start_roam_invoke(psoc, vdev, bssid, chan_freq, source);
 	wlan_objmgr_vdev_release_ref(vdev, WLAN_MLME_NB_ID);
 

+ 24 - 3
components/umac/mlme/mlo_mgr/inc/wlan_mlo_mgr_roam.h

@@ -453,14 +453,27 @@ mlo_add_all_link_probe_rsp_to_scan_db(struct wlan_objmgr_psoc *psoc,
 
 /**
  * mlo_is_enable_roaming_on_connected_sta_allowed() - whether connected STA is
- *                                                    allowed to enable roaming
- *                                                    if link vdev disconnects
+ * allowed to enable roaming if link vdev disconnects
  * @vdev: vdev object
  *
- * Return true if connected STA is allowed to enable roaming, false otherwise.
+ * Return: true if connected STA is allowed to enable roaming, false otherwise.
  */
 bool
 mlo_is_enable_roaming_on_connected_sta_allowed(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * mlo_check_is_given_vdevs_on_same_mld() - check if the 2 given vdev's are on
+ * same MLD
+ * @psoc: PSOC object
+ * @vdev_id_1: Current connected station vdev id on which roaming is to be
+ * enabled
+ * @vdev_id_2: vdev id on which disconnection is happening
+ *
+ * Return: true if both vdev ids are on same MLD, false otherwise.
+ */
+bool
+mlo_check_is_given_vdevs_on_same_mld(struct wlan_objmgr_psoc *psoc,
+				     uint8_t vdev_id_1, uint8_t vdev_id_2);
 #else /* WLAN_FEATURE_11BE_MLO */
 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
 static inline
@@ -657,5 +670,13 @@ mlo_is_enable_roaming_on_connected_sta_allowed(struct wlan_objmgr_vdev *vdev)
 {
 	return true;
 }
+
+static inline bool
+mlo_check_is_given_vdevs_on_same_mld(struct wlan_objmgr_psoc *psoc,
+				     uint8_t vdev_id_1, uint8_t vdev_id_2)
+{
+	return false;
+}
+
 #endif /* WLAN_FEATURE_11BE_MLO */
 #endif

+ 11 - 15
components/umac/mlme/mlo_mgr/src/wlan_mlo_link_force.c

@@ -209,10 +209,8 @@ ml_nlink_clr_force_state(struct wlan_objmgr_psoc *psoc,
 	struct ml_link_force_state *force_state;
 
 	mlo_dev_ctx = wlan_vdev_get_mlo_dev_ctx(vdev);
-	if (!mlo_dev_ctx || !mlo_dev_ctx->sta_ctx) {
-		mlo_err("mlo_ctx or sta_ctx null");
+	if (!mlo_dev_ctx || !mlo_dev_ctx->sta_ctx)
 		return;
-	}
 
 	mlo_dev_lock_acquire(mlo_dev_ctx);
 	force_state = &mlo_dev_ctx->sta_ctx->link_force_ctx.force_state;
@@ -406,10 +404,9 @@ ml_nlink_get_affect_ml_sta(struct wlan_objmgr_psoc *psoc)
 					&num_disabled_ml_sta,
 					ml_sta_vdev_lst, ml_freq_lst, NULL,
 					NULL, NULL);
-	if (!num_ml_sta || num_ml_sta > MAX_NUMBER_OF_CONC_CONNECTIONS) {
-		mlo_debug("ml sta num is %d", num_ml_sta);
+	if (!num_ml_sta || num_ml_sta > MAX_NUMBER_OF_CONC_CONNECTIONS)
 		return NULL;
-	}
+
 	if (num_ml_sta > MAX_NUMBER_OF_CONC_CONNECTIONS) {
 		mlo_debug("unexpected num_ml_sta %d", num_ml_sta);
 		return NULL;
@@ -1851,8 +1848,6 @@ static QDF_STATUS ml_nlink_state_change(struct wlan_objmgr_psoc *psoc,
 	struct wlan_objmgr_vdev *vdev = NULL;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
-	mlo_debug("enter evaluate force state change");
-
 	/*
 	 * eMLSR is allowed in MCC mode also. So, don't disable any links
 	 * if current connection happens in eMLSR mode.
@@ -1926,15 +1921,16 @@ static QDF_STATUS ml_nlink_state_change(struct wlan_objmgr_psoc *psoc,
 						  &force_state,
 						  reason);
 end:
-	if (vdev)
+	if (vdev) {
 		wlan_objmgr_vdev_release_ref(vdev, WLAN_MLO_MGR_ID);
 
-	if (status == QDF_STATUS_SUCCESS)
-		mlo_debug("exit no force state change");
-	else if (status == QDF_STATUS_E_PENDING)
-		mlo_debug("exit pending force state change");
-	else
-		mlo_err("exit err %d state change", status);
+		if (status == QDF_STATUS_SUCCESS)
+			mlo_debug("exit no force state change");
+		else if (status == QDF_STATUS_E_PENDING)
+			mlo_debug("exit pending force state change");
+		else
+			mlo_err("exit err %d state change", status);
+	}
 
 	return status;
 }

+ 77 - 31
components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

@@ -1186,9 +1186,6 @@ mlo_roam_prepare_and_send_link_connect_req(struct wlan_objmgr_vdev *assoc_vdev,
 	struct rso_config *rso_cfg;
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 
-	if (!assoc_vdev || !link_vdev || !rsp)
-		return QDF_STATUS_E_FAILURE;
-
 	if (!assoc_vdev->mlo_dev_ctx || !assoc_vdev->mlo_dev_ctx->sta_ctx)
 		return QDF_STATUS_E_FAILURE;
 
@@ -1197,68 +1194,80 @@ mlo_roam_prepare_and_send_link_connect_req(struct wlan_objmgr_vdev *assoc_vdev,
 	wlan_vdev_mlme_get_ssid(assoc_vdev, ssid.ssid,
 				&ssid.length);
 
-	rso_cfg = wlan_cm_get_rso_config(assoc_vdev);
 	req.vdev_id = wlan_vdev_get_id(link_vdev);
 	req.source = CM_MLO_LINK_VDEV_CONNECT;
-	qdf_mem_copy(&req.bssid.bytes,
-		     link_addr->bytes,
-		     QDF_MAC_ADDR_SIZE);
+	req.chan_freq = chan_freq;
+	qdf_mem_copy(&req.bssid.bytes, link_addr->bytes, QDF_MAC_ADDR_SIZE);
+
 	req.ssid.length = ssid.length;
 	qdf_mem_copy(&req.ssid.ssid, &ssid.ssid, ssid.length);
-	req.chan_freq = chan_freq;
 
 	req.ml_parnter_info = rsp->ml_parnter_info;
+
+	rso_cfg = wlan_cm_get_rso_config(assoc_vdev);
 	if (rso_cfg) {
 		req.crypto.rsn_caps = rso_cfg->orig_sec_info.rsn_caps;
 		req.crypto.auth_type = rso_cfg->orig_sec_info.authmodeset;
-		req.crypto.ciphers_pairwise = rso_cfg->orig_sec_info.ucastcipherset;
+		req.crypto.ciphers_pairwise =
+				rso_cfg->orig_sec_info.ucastcipherset;
 		req.crypto.group_cipher = rso_cfg->orig_sec_info.mcastcipherset;
+		req.crypto.mgmt_ciphers = rso_cfg->orig_sec_info.mgmtcipherset;
 		req.crypto.akm_suites = rso_cfg->orig_sec_info.key_mgmt;
 		req.assoc_ie.len = rso_cfg->assoc_ie.len;
+
+		req.assoc_ie.ptr = qdf_mem_malloc(req.assoc_ie.len);
+		if (!req.assoc_ie.ptr)
+			return QDF_STATUS_E_NOMEM;
+
 		if (rso_cfg->assoc_ie.len)
-			qdf_mem_copy(&req.assoc_ie.ptr, &rso_cfg->assoc_ie.ptr,
+			qdf_mem_copy(req.assoc_ie.ptr, rso_cfg->assoc_ie.ptr,
 				     rso_cfg->assoc_ie.len);
 	}
 
-	mlo_debug("vdev_id %d, chan_freq %d, mac_addr " QDF_MAC_ADDR_FMT,
-		  req.vdev_id, req.chan_freq,
-		  QDF_MAC_ADDR_REF(link_addr->bytes));
-
 	mlme_cm_osif_roam_get_scan_params(assoc_vdev, &req.scan_ie,
 					  &req.dot11mode_filter);
 
+	mlme_info("vdev:%d Connecting to " QDF_SSID_FMT " link_addr: " QDF_MAC_ADDR_FMT " freq %d rsn_caps:0x%x auth_type:0x%x pairwise:0x%x grp:0x%x mcast:0x%x akms:0x%x assoc_ie_len:%d f_rsne:%d is_wps:%d dot11_filter:%d",
+		  req.vdev_id, QDF_SSID_REF(req.ssid.length, req.ssid.ssid),
+		  QDF_MAC_ADDR_REF(link_addr->bytes),
+		  req.chan_freq, req.crypto.rsn_caps, req.crypto.auth_type,
+		  req.crypto.ciphers_pairwise, req.crypto.group_cipher,
+		  req.crypto.mgmt_ciphers, req.crypto.akm_suites,
+		  req.assoc_ie.len, req.force_rsne_override,
+		  req.is_wps_connection, req.dot11mode_filter);
+
 	copied_conn_req_lock_acquire(sta_ctx);
 	if (!sta_ctx->copied_conn_req)
-		sta_ctx->copied_conn_req = qdf_mem_malloc(
-				sizeof(struct wlan_cm_connect_req));
+		sta_ctx->copied_conn_req =
+			qdf_mem_malloc(sizeof(struct wlan_cm_connect_req));
 	else
 		wlan_cm_free_connect_req_param(sta_ctx->copied_conn_req);
 
-	mlo_debug("MLO_ROAM: storing from roam connect rsp to connect req");
-	if (sta_ctx->copied_conn_req) {
-		qdf_mem_copy(sta_ctx->copied_conn_req, &req,
-			     sizeof(struct wlan_cm_connect_req));
-		mlo_allocate_and_copy_ies(sta_ctx->copied_conn_req,
-					  &req);
+	if (!sta_ctx->copied_conn_req) {
+		mlo_err("MLO_ROAM: vdev:%d Failed to allocate connect req",
+			req.vdev_id);
 		copied_conn_req_lock_release(sta_ctx);
-	} else {
-		mlo_err("MLO_ROAM: Failed to allocate connect req");
-		copied_conn_req_lock_release(sta_ctx);
-		return QDF_STATUS_E_NOMEM;
+		status = QDF_STATUS_E_NOMEM;
+		goto err;
 	}
 
+	qdf_mem_copy(sta_ctx->copied_conn_req, &req,
+		     sizeof(struct wlan_cm_connect_req));
+	mlo_allocate_and_copy_ies(sta_ctx->copied_conn_req, &req);
+	copied_conn_req_lock_release(sta_ctx);
+
 	status = mlo_roam_validate_req(assoc_vdev, link_vdev, rsp);
 	if (QDF_IS_STATUS_ERROR(status))
-		return status;
+		goto err;
 
-	mlo_debug("MLO_ROAM: Partner link connect mac:" QDF_MAC_ADDR_FMT " vdev_id:%d",
-		  QDF_MAC_ADDR_REF(req.bssid.bytes),
-		  req.vdev_id);
 	status = wlan_cm_start_connect(link_vdev, &req);
 	if (QDF_IS_STATUS_ERROR(status))
-		return status;
+		goto err;
 
 	mlo_update_connected_links(link_vdev, 1);
+err:
+	qdf_mem_free(req.assoc_ie.ptr);
+
 	return status;
 }
 
@@ -1584,3 +1593,40 @@ mlo_is_enable_roaming_on_connected_sta_allowed(struct wlan_objmgr_vdev *vdev)
 	/* Roamed to MLO AP, do nothing if link vdev is disconnected */
 	return false;
 }
+
+bool
+mlo_check_is_given_vdevs_on_same_mld(struct wlan_objmgr_psoc *psoc,
+				     uint8_t vdev_id_1, uint8_t vdev_id_2)
+{
+	struct wlan_objmgr_vdev *vdev1;
+	struct wlan_mlo_dev_context *ml_dev_ctx1;
+	struct wlan_objmgr_vdev **vdev_list;
+	bool is_same_mld = false;
+	uint8_t i;
+
+	vdev1 = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id_1,
+						     WLAN_MLME_CM_ID);
+	if (!vdev1)
+		return false;
+
+	ml_dev_ctx1 = vdev1->mlo_dev_ctx;
+	if (!ml_dev_ctx1)
+		goto end;
+
+	vdev_list = ml_dev_ctx1->wlan_vdev_list;
+	for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
+		if (!vdev_list[i])
+			continue;
+
+		if (wlan_vdev_get_id(vdev_list[i]) == vdev_id_2) {
+			is_same_mld = true;
+			goto end;
+		}
+	}
+
+end:
+	if (vdev1)
+		wlan_objmgr_vdev_release_ref(vdev1, WLAN_MLME_CM_ID);
+
+	return is_same_mld;
+}

+ 43 - 47
components/umac/mlme/mlo_mgr/src/wlan_t2lm_api.c

@@ -23,6 +23,7 @@
 #include <wlan_mlo_t2lm.h>
 #include "wlan_cm_api.h"
 #include "wlan_mlo_mgr_roam.h"
+#include "wlan_connectivity_logging.h"
 
 #define T2LM_MIN_DIALOG_TOKEN         1
 #define T2LM_MAX_DIALOG_TOKEN         0xFF
@@ -186,6 +187,10 @@ QDF_STATUS t2lm_handle_rx_req(struct wlan_objmgr_vdev *vdev,
 	}
 
 	*token = t2lm_req.dialog_token;
+	wlan_connectivity_t2lm_req_resp_event(
+			vdev, *token, 0, 0,
+			wlan_vdev_mlme_get_bss_chan(vdev)->ch_freq,
+			true, WLAN_CONN_DIAG_MLO_T2LM_REQ_EVENT);
 
 	return status;
 }
@@ -445,61 +450,52 @@ wlan_t2lm_validate_candidate(struct cnx_mgr *cm_ctx,
 	uint16_t established_tid_mapped_link_id = 0;
 	uint16_t upcoming_tid_mapped_link_id = 0;
 
-	if (!scan_entry)
-		return QDF_STATUS_E_NULL_VALUE;
-
-	if (!cm_ctx || !cm_ctx->vdev)
+	if (!scan_entry || !cm_ctx || !cm_ctx->vdev)
 		return QDF_STATUS_E_NULL_VALUE;
 
 	vdev = cm_ctx->vdev;
 
-	if (wlan_vdev_mlme_is_mlo_link_vdev(vdev)) {
-		mlme_debug("Skip t2lm validation for link vdev");
+	/*
+	 * Skip T2LM validation for following cases:
+	 *  - Is link VDEV
+	 *  - Is not STA VDEV
+	 *  - T2LM IE not present in scan entry
+	 */
+	if (wlan_vdev_mlme_is_mlo_link_vdev(vdev) ||
+	    wlan_vdev_mlme_get_opmode(vdev) != QDF_STA_MODE ||
+	    !scan_entry->ie_list.t2lm[0]) {
 		return QDF_STATUS_SUCCESS;
 	}
 
-	if ((wlan_vdev_mlme_get_opmode(vdev) == QDF_STA_MODE) &&
-	    scan_entry->ie_list.t2lm[0]) {
-		status = wlan_mlo_parse_bcn_prbresp_t2lm_ie(&t2lm_ctx,
-						scan_entry->ie_list.t2lm[0]);
-		if (QDF_IS_STATUS_ERROR(status))
-			goto end;
-
-		status =
-		   t2lm_find_tid_mapped_link_id(&t2lm_ctx.established_t2lm.t2lm,
-					       &established_tid_mapped_link_id);
-		if (QDF_IS_STATUS_ERROR(status))
-			goto end;
-
-		status =
-		      t2lm_find_tid_mapped_link_id(&t2lm_ctx.upcoming_t2lm.t2lm,
-						  &upcoming_tid_mapped_link_id);
-		if (QDF_IS_STATUS_ERROR(status))
-			goto end;
-		t2lm_debug("established_tid_mapped_link_id %x, upcoming_tid_mapped_link_id %x",
-			   established_tid_mapped_link_id,
-			   upcoming_tid_mapped_link_id);
-
-		tid_map_link_id =
-		   established_tid_mapped_link_id & upcoming_tid_mapped_link_id;
-		if (!tid_map_link_id)
-			tid_map_link_id = established_tid_mapped_link_id;
-
-		if (tid_map_link_id == scan_entry->ml_info.self_link_id) {
-			t2lm_debug("self link id %d, tid map link id %d match",
-				   scan_entry->ml_info.self_link_id,
-				   tid_map_link_id);
-			status = QDF_STATUS_SUCCESS;
-		} else {
-			t2lm_debug("self link id %d, tid map link id %d do not match",
-				   scan_entry->ml_info.self_link_id,
-				   tid_map_link_id);
-			status = QDF_STATUS_E_FAILURE;
-		}
-	} else {
-		t2lm_debug("T2LM IE is not present in scan entry");
+	status = wlan_mlo_parse_bcn_prbresp_t2lm_ie(&t2lm_ctx,
+						    scan_entry->ie_list.t2lm[0]);
+	if (QDF_IS_STATUS_ERROR(status))
+		goto end;
+
+	status = t2lm_find_tid_mapped_link_id(&t2lm_ctx.established_t2lm.t2lm,
+					      &established_tid_mapped_link_id);
+	if (QDF_IS_STATUS_ERROR(status))
+		goto end;
+
+	status = t2lm_find_tid_mapped_link_id(&t2lm_ctx.upcoming_t2lm.t2lm,
+					      &upcoming_tid_mapped_link_id);
+	if (QDF_IS_STATUS_ERROR(status))
+		goto end;
+
+	t2lm_debug("self link id %d established_tid_mapped_link_id %x upcoming_tid_mapped_link_id %x",
+		   scan_entry->ml_info.self_link_id,
+		   established_tid_mapped_link_id, upcoming_tid_mapped_link_id);
+
+	tid_map_link_id =
+		established_tid_mapped_link_id & upcoming_tid_mapped_link_id;
+
+	if (!tid_map_link_id)
+		tid_map_link_id = established_tid_mapped_link_id;
+
+	if (tid_map_link_id == scan_entry->ml_info.self_link_id)
 		status = QDF_STATUS_SUCCESS;
-	}
+	else
+		status = QDF_STATUS_E_FAILURE;
 
 end:
 	return status;

+ 362 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_bearer_switch.c

@@ -0,0 +1,362 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "wlan_ll_sap_main.h"
+#include "wlan_ll_lt_sap_bearer_switch.h"
+#include "wlan_sm_engine.h"
+
+uint32_t ll_lt_sap_bearer_switch_get_id(struct wlan_objmgr_vdev *vdev)
+{
+	uint32_t request_id;
+	struct ll_sap_vdev_priv_obj *ll_sap_obj;
+
+	ll_sap_obj = ll_sap_get_vdev_priv_obj(vdev);
+
+	if (!ll_sap_obj) {
+		ll_sap_err("vdev %d ll_sap obj null",
+			   wlan_vdev_get_id(vdev));
+		return QDF_STATUS_E_INVAL;
+	}
+
+	request_id = qdf_atomic_inc_return(
+				&ll_sap_obj->bearer_switch_ctx->request_id);
+
+	ll_sap_debug("bearer_switch request_id %d", request_id);
+	return request_id;
+}
+
+/**
+ * bs_state_non_wlan_entry() - Entry API for non wlan state for bearer switch
+ * state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on moving to non-wlan state
+ *
+ * Return: void
+ */
+static void bs_state_non_wlan_entry(void *ctx)
+{
+}
+
+/**
+ * bs_state_non_wlan_exit() - Exit API for non wlan state for bearer switch
+ * state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on exiting from non-wlan state
+ *
+ * Return: void
+ */
+static void bs_state_non_wlan_exit(void *ctx)
+{
+}
+
+/**
+ * bs_state_non_wlan_event() - Non-wlan State event handler for bearer switch
+ * state machine
+ * @ctx: Bearer switch context
+ * @event: event
+ * @data_len: length of @data
+ * @data: event data
+ *
+ * API to handle events in Non-wlan state
+ *
+ * Return: bool
+ */
+static bool bs_state_non_wlan_event(void *ctx, uint16_t event,
+				    uint16_t data_len, void *data)
+{
+	bool event_handled = false;
+
+	switch (event) {
+	case WLAN_BS_SM_EV_SWITCH_TO_WLAN:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN:
+		event_handled = true;
+		break;
+	default:
+		break;
+	}
+
+	return event_handled;
+}
+
+/**
+ * bs_state_non_wlan_req_entry() - Entry API for non wlan requested state for
+ *bearer switch state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on moving to non-wlan requested state
+ *
+ * Return: void
+ */
+static void bs_state_non_wlan_req_entry(void *ctx)
+{
+}
+
+/**
+ * bs_state_non_wlan_req_exit() - Exit API for non wlan requested state for
+ * bearer switch state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on exiting from non-wlan requested state
+ *
+ * Return: void
+ */
+static void bs_state_non_wlan_req_exit(void *ctx)
+{
+}
+
+/**
+ * bs_state_non_wlan_req_event() - Non-wlan requested State event handler for
+ * bearer switch state machine
+ * @ctx: Bearer switch context
+ * @event: event
+ * @data_len: length of @data
+ * @data: event data
+ *
+ * API to handle events in Non-wlan state
+ *
+ * Return: bool
+ */
+static bool bs_state_non_wlan_req_event(void *ctx, uint16_t event,
+					uint16_t data_len, void *data)
+{
+	bool event_handled = false;
+
+	switch (event) {
+	case WLAN_BS_SM_EV_SWITCH_TO_WLAN:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_TIMEOUT:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_COMPLETED:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_FAILURE:
+		event_handled = true;
+		break;
+	default:
+		break;
+	}
+
+	return event_handled;
+}
+
+/**
+ * bs_state_wlan_entry() - Entry API for wlan state for bearer switch
+ * state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on moving to wlan state
+ *
+ * Return: void
+ */
+static void bs_state_wlan_entry(void *ctx)
+{
+}
+
+/**
+ * bs_state_wlan_exit() - Exit API for wlan state for bearer switch
+ * state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on exiting from wlan state
+ *
+ * Return: void
+ */
+static void bs_state_wlan_exit(void *ctx)
+{
+}
+
+/**
+ * bs_state_wlan_event() - Wlan State event handler for bearer switch
+ * state machine
+ * @ctx: Bearer switch context
+ * @event: event
+ * @data_len: length of @data
+ * @data: event data
+ *
+ * API to handle events in Wlan state
+ *
+ * Return: bool
+ */
+static bool bs_state_wlan_event(void *ctx, uint16_t event,
+				uint16_t data_len, void *data)
+{
+	bool event_handled = false;
+
+	switch (event) {
+	case WLAN_BS_SM_EV_SWITCH_TO_WLAN:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN:
+		event_handled = true;
+		break;
+	default:
+		break;
+	}
+
+	return event_handled;
+}
+
+/**
+ * bs_state_wlan_req_entry() - Entry API for Wlan requested state for
+ *bearer switch state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on moving to Wlan requested state
+ *
+ * Return: void
+ */
+static void bs_state_wlan_req_entry(void *ctx)
+{
+}
+
+/**
+ * bs_state_wlan_req_exit() - Exit API for Wlan requested state for
+ * bearer switch state machine
+ * @ctx: Bearer switch context
+ *
+ * API to perform operations on exiting from Wlan requested state
+ *
+ * Return: void
+ */
+static void bs_state_wlan_req_exit(void *ctx)
+{
+}
+
+/**
+ * bs_state_wlan_req_event() - Wlan requested State event handler for
+ * bearer switch state machine
+ * @ctx: Bearer switch context
+ * @event: event
+ * @data_len: length of @data
+ * @data: event data
+ *
+ * API to handle events in Wlan state
+ *
+ * Return: bool
+ */
+static bool bs_state_wlan_req_event(void *ctx, uint16_t event,
+				    uint16_t data_len, void *data)
+{
+	bool event_handled = false;
+
+	switch (event) {
+	case WLAN_BS_SM_EV_SWITCH_TO_WLAN:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN:
+	case WLAN_BS_SM_EV_SWITCH_TO_WLAN_TIMEOUT:
+	case WLAN_BS_SM_EV_SWITCH_TO_WLAN_FAILURE:
+	case WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_FAILURE:
+		event_handled = true;
+		break;
+	default:
+		break;
+	}
+
+	return event_handled;
+}
+
+struct wlan_sm_state_info bs_sm_info[] = {
+	{
+		(uint8_t)BEARER_NON_WLAN,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		false,
+		"NON_WLAN",
+		bs_state_non_wlan_entry,
+		bs_state_non_wlan_exit,
+		bs_state_non_wlan_event
+	},
+	{
+		(uint8_t)BEARER_NON_WLAN_REQUESTED,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		false,
+		"NON_WLAN_REQUESTED",
+		bs_state_non_wlan_req_entry,
+		bs_state_non_wlan_req_exit,
+		bs_state_non_wlan_req_event
+	},
+	{
+		(uint8_t)BEARER_WLAN_REQUESTED,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		false,
+		"WLAN_REQUESTED",
+		bs_state_wlan_req_entry,
+		bs_state_wlan_req_exit,
+		bs_state_wlan_req_event
+	},
+	{
+		(uint8_t)BEARER_WLAN,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		false,
+		"WLAN",
+		bs_state_wlan_entry,
+		bs_state_wlan_exit,
+		bs_state_wlan_event
+	},
+	{
+		(uint8_t)BEARER_SWITCH_MAX,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		(uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+		false,
+		"INVALID",
+		NULL,
+		NULL,
+		NULL
+	},
+};
+
+static const char *bs_sm_event_names[] = {
+	"EV_SW_TO_WLAN",
+	"EV_SW_TO_NON_WLAN",
+	"EV_SW_TO_WLAN_TIMEOUT",
+	"EV_SW_TO_NON_WLAN_TIMEOUT",
+	"EV_SW_TO_WLAN_COMPLETED",
+	"EV_SW_TO_NON_WLAN_COMPLETED",
+	"EV_SW_TO_WLAN_FAILURE",
+	"EV_SW_TO_NON_WLAN_FAILURE",
+};
+
+QDF_STATUS bs_sm_create(struct bearer_switch_info *bs_ctx)
+{
+	struct wlan_sm *sm;
+	uint8_t name[WLAN_SM_ENGINE_MAX_NAME];
+
+	qdf_scnprintf(name, sizeof(name), "BS_%d",
+		      wlan_vdev_get_id(bs_ctx->vdev));
+	sm = wlan_sm_create(name, bs_ctx,
+			    BEARER_NON_WLAN,
+			    bs_sm_info,
+			    QDF_ARRAY_SIZE(bs_sm_info),
+			    bs_sm_event_names,
+			    QDF_ARRAY_SIZE(bs_sm_event_names));
+	if (!sm) {
+		ll_sap_err("Bearer switch State Machine creation failed");
+		return QDF_STATUS_E_NOMEM;
+	}
+	bs_ctx->sm.sm_hdl = sm;
+
+	bs_lock_create(bs_ctx);
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS bs_sm_destroy(struct bearer_switch_info *bs_ctx)
+{
+	bs_lock_destroy(bs_ctx);
+	wlan_sm_delete(bs_ctx->sm.sm_hdl);
+
+	return QDF_STATUS_SUCCESS;
+}
+

+ 214 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_bearer_switch.h

@@ -0,0 +1,214 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: contains ll_lt_sap declarations specific to the bearer
+ * switch functionalities
+ */
+
+#ifndef _WLAN_LL_LT_SAP_BEARER_SWITCH_H_
+#define _WLAN_LL_LT_SAP_BEARER_SWITCH_H_
+
+#include "wlan_ll_sap_public_structs.h"
+#include <qdf_atomic.h>
+#include "wlan_cmn.h"
+#include "wlan_ll_sap_main.h"
+
+/**
+ * enum bearer_switch_status: Bearer switch request status
+ * @XPAN_BLE_SWITCH_INIT: Init status
+ * @XPAN_BLE_SWITCH_SUCCESS: Bearer switch success
+ * @XPAN_BLE_SWITCH_REJECTED: Bearer switch is rejected
+ * @XPAN_BLE_SWITCH_TIMEOUT: Bearer switch request timed out
+ */
+enum bearer_switch_status {
+	XPAN_BLE_SWITCH_INIT,
+	XPAN_BLE_SWITCH_SUCCESS,
+	XPAN_BLE_SWITCH_REJECTED,
+	XPAN_BLE_SWITCH_TIMEOUT,
+};
+
+/**
+ * enum wlan_bearer_switch_sm_state - Bearer switch states
+ * @BEARER_NON_WLAN: Default state, Bearer non wlan state
+ * @BEARER_NON_WLAN_REQUESTED: State when bearer switch requested to non-wlan
+ * @BEARER_WLAN_REQUESTED: State when bearer switch requested to wlan
+ * @BEARER_WLAN: Bearer non wlan state
+ * @BEARER_SWITCH_MAX: Max state
+ */
+enum wlan_bearer_switch_sm_state {
+	BEARER_NON_WLAN = 0,
+	BEARER_NON_WLAN_REQUESTED = 1,
+	BEARER_WLAN_REQUESTED = 2,
+	BEARER_WLAN = 3,
+	BEARER_SWITCH_MAX = 4,
+};
+
+/**
+ * enum wlan_bearer_switch_sm_evt - Bearer switch related events, if any new
+ * enum is added to this enum, then please update bs_sm_event_names
+ * @WLAN_BS_SM_EV_SWITCH_TO_WLAN: Bearer switch request to WLAN
+ * @WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN: Bearer switch request to NON WLAN
+ * @WLAN_BS_SM_EV_SWITCH_TO_WLAN_TIMEOUT: Bearer switch request to WLA
+ * timeout
+ * @WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_TIMEOUT: Bearer switch request to NON-WLAN
+ * timeout
+ * @WLAN_BS_SM_EV_SWITCH_TO_WLAN_COMPLETED: Bearer switch request to WLAN
+ * completed
+ * @WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_COMPLETED: Bearer switch request to
+ * NON-WLAN completed
+ * @WLAN_BS_SM_EV_SWITCH_TO_WLAN_FAILURE: Bearer switch request to WLAN
+ * failure
+ * @WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_FAILURE: Bearer switch request to NON-WLAN
+ * failure
+ */
+enum wlan_bearer_switch_sm_evt {
+	WLAN_BS_SM_EV_SWITCH_TO_WLAN = 0,
+	WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN = 1,
+	WLAN_BS_SM_EV_SWITCH_TO_WLAN_TIMEOUT = 2,
+	WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_TIMEOUT = 3,
+	WLAN_BS_SM_EV_SWITCH_TO_WLAN_COMPLETED = 4,
+	WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_COMPLETED = 5,
+	WLAN_BS_SM_EV_SWITCH_TO_WLAN_FAILURE = 6,
+	WLAN_BS_SM_EV_SWITCH_TO_NON_WLAN_FAILURE = 7,
+};
+
+/**
+ * struct bs_state_sm - Bearer switch state machine
+ * @bs_sm_lock: sm lock
+ * @sm_hdl: sm handlers
+ * @bs_state: bearer switch state
+ */
+struct bs_state_sm {
+	qdf_mutex_t bs_sm_lock;
+	struct wlan_sm *sm_hdl;
+	enum wlan_bearer_switch_sm_state bs_state;
+};
+
+/**
+ * struct bearer_switch_request - Data structure to store the bearer switch
+ * request
+ * @requester_cb: Callback which needs to be invoked to indicate the status of
+ * the request to the requester, this callback will be passed by the requester
+ * when requester will send the request.
+ * @arg: Argument passed by requester, this will be returned back in the
+ * callback
+ * @request_id: Unique value to identify the request
+ */
+
+struct bearer_switch_request {
+	requester_callback requester_cb;
+	void *arg;
+	uint32_t request_id;
+};
+
+/**
+ * struct bearer_switch_info - Data structure to store the bearer switch
+ * requests and related information
+ * @vdev: Pointer to the ll lt sap vdev
+ * @request_id: Last allocated request id
+ * @sm: state machine context
+ * @ref_count: Reference count corresponding to each vdev and requester
+ * @last_status: last status of the bearer switch request
+ * @requests: Array of bearer_switch_requests to cache the request information
+ */
+struct bearer_switch_info {
+	struct wlan_objmgr_vdev *vdev;
+	qdf_atomic_t request_id;
+	struct bs_state_sm sm;
+	uint8_t ref_count[WLAN_UMAC_PSOC_MAX_VDEVS][XPAN_BLE_SWITCH_REQUESTER_MAX];
+	enum bearer_switch_status last_status;
+	struct bearer_switch_request requests[MAX_BEARER_SWITCH_REQUESTERS];
+};
+
+/**
+ * ll_lt_sap_bearer_switch_get_id() - Get the request id for bearer switch
+ * request
+ * @vdev: Pointer to vdev
+ * Return: Bearer switch request id
+ */
+uint32_t ll_lt_sap_bearer_switch_get_id(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * bs_sm_create() - Invoke SM creation for bearer switch
+ * @bs_ctx:  Bearer switch context
+ *
+ * Return: SUCCESS on successful creation
+ *         FAILURE, if creation fails
+ */
+QDF_STATUS bs_sm_create(struct bearer_switch_info *bs_ctx);
+
+/**
+ * bs_sm_destroy() - Invoke SM deletion for bearer switch
+ * @bs_ctx:  Bearer switch context
+ *
+ * Return: SUCCESS on successful deletion
+ *         FAILURE, if deletion fails
+ */
+QDF_STATUS bs_sm_destroy(struct bearer_switch_info *bs_ctx);
+
+/**
+ * bs_lock_create() - Create BS SM mutex
+ * @bs_ctx:  Bearer switch ctx
+ *
+ * Creates Bearer switch state machine mutex
+ *
+ * Return: void
+ */
+static inline void bs_lock_create(struct bearer_switch_info *bs_ctx)
+{
+	qdf_mutex_create(&bs_ctx->sm.bs_sm_lock);
+}
+
+/**
+ * bs_lock_destroy() - Create BS SM mutex
+ * @bs_ctx:  Bearer switch ctx
+ *
+ * Deatroys Bearer switch state machine mutex
+ *
+ * Return: void
+ */
+static inline void bs_lock_destroy(struct bearer_switch_info *bs_ctx)
+{
+	qdf_mutex_destroy(&bs_ctx->sm.bs_sm_lock);
+}
+
+/**
+ * bs_lock_acquire() - Acquires BS SM mutex
+ * @bs_ctx:  Bearer switch ctx
+ *
+ * Acquire Bearer switch state machine mutex
+ *
+ * Return: void
+ */
+static inline void bs_lock_acquire(struct bearer_switch_info *bs_ctx)
+{
+	qdf_mutex_acquire(&bs_ctx->sm.bs_sm_lock);
+}
+
+/**
+ * bs_lock_release() - Release BS SM mutex
+ * @bs_ctx:  Bearer switch ctx
+ *
+ * Releases Bearer switch state machine mutex
+ *
+ * Return: void
+ */
+static inline void bs_lock_release(struct bearer_switch_info *bs_ctx)
+{
+	qdf_mutex_release(&bs_ctx->sm.bs_sm_lock);
+}
+#endif /* _WLAN_LL_LT_SAP_BEARER_SWITCH_H_ */

+ 65 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_main.c

@@ -17,6 +17,8 @@
 #include "wlan_ll_lt_sap_main.h"
 #include "wlan_scan_ucfg_api.h"
 #include "wlan_mlme_vdev_mgr_interface.h"
+#include "wlan_ll_sap_main.h"
+#include "wlan_ll_lt_sap_bearer_switch.h"
 
 bool ll_lt_sap_is_supported(void)
 {
@@ -69,3 +71,66 @@ rel_ref:
 
 	return status;
 }
+
+QDF_STATUS ll_lt_sap_init(struct wlan_objmgr_vdev *vdev)
+{
+	struct ll_sap_vdev_priv_obj *ll_sap_obj;
+	QDF_STATUS status;
+
+	ll_sap_obj = ll_sap_get_vdev_priv_obj(vdev);
+
+	if (!ll_sap_obj) {
+		ll_sap_err("vdev %d ll_sap obj null",
+			   wlan_vdev_get_id(vdev));
+		return QDF_STATUS_E_INVAL;
+	}
+
+	ll_sap_obj->bearer_switch_ctx =
+			qdf_mem_malloc(sizeof(struct bearer_switch_info));
+	if (!ll_sap_obj->bearer_switch_ctx)
+		return QDF_STATUS_E_NOMEM;
+
+	qdf_atomic_init(&ll_sap_obj->bearer_switch_ctx->request_id);
+
+	ll_sap_obj->bearer_switch_ctx->vdev = vdev;
+
+	status = bs_sm_create(ll_sap_obj->bearer_switch_ctx);
+
+	if (QDF_IS_STATUS_ERROR(status))
+		goto bs_sm_failed;
+
+	ll_sap_debug("vdev %d", wlan_vdev_get_id(vdev));
+
+	return QDF_STATUS_SUCCESS;
+
+bs_sm_failed:
+	qdf_mem_free(ll_sap_obj->bearer_switch_ctx);
+	return status;
+}
+
+QDF_STATUS ll_lt_sap_deinit(struct wlan_objmgr_vdev *vdev)
+{
+	struct ll_sap_vdev_priv_obj *ll_sap_obj;
+
+	ll_sap_obj = ll_sap_get_vdev_priv_obj(vdev);
+
+	if (!ll_sap_obj) {
+		ll_sap_err("vdev %d ll_sap obj null",
+			   wlan_vdev_get_id(vdev));
+		return QDF_STATUS_E_INVAL;
+	}
+
+	if (!ll_sap_obj->bearer_switch_ctx) {
+		ll_sap_debug("vdev %d Bearer switch context is NULL",
+			     wlan_vdev_get_id(vdev));
+		return QDF_STATUS_E_INVAL;
+	}
+
+	bs_sm_destroy(ll_sap_obj->bearer_switch_ctx);
+	qdf_mem_free(ll_sap_obj->bearer_switch_ctx);
+	ll_sap_obj->bearer_switch_ctx = NULL;
+
+	ll_sap_debug("vdev %d", wlan_vdev_get_id(vdev));
+
+	return QDF_STATUS_SUCCESS;
+}

+ 20 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_lt_sap_main.h

@@ -23,6 +23,9 @@
 
 #include "wlan_ll_sap_main.h"
 #include "wlan_mlme_public_struct.h"
+#include <i_qdf_types.h>
+#include <qdf_types.h>
+#include "wlan_ll_sap_main.h"
 
 /**
  * ll_lt_sap_is_supported() - Check if ll_lt_sap is supported or not
@@ -44,4 +47,21 @@ QDF_STATUS ll_lt_sap_get_sorted_user_config_acs_ch_list(
 					struct wlan_objmgr_psoc *psoc,
 					uint8_t vdev_id,
 					struct sap_sel_ch_info *ch_info);
+/*
+ * ll_lt_sap_init() - Initialize ll_lt_sap infrastructure
+ * @vdev: Pointer to vdev
+ *
+ * Return: QDF_STATUS_SUCCESS if ll_lt_sap infra initialized successfully else
+ * error code
+ */
+QDF_STATUS ll_lt_sap_init(struct wlan_objmgr_vdev *vdev);
+
+/**
+ * ll_lt_sap_deinit() - De-initialize ll_lt_sap infrastructure
+ * @vdev: Pointer to vdev
+ *
+ * Return: QDF_STATUS_SUCCESS if ll_lt_sap infra de-initialized successfully
+ * else error code
+ */
+QDF_STATUS ll_lt_sap_deinit(struct wlan_objmgr_vdev *vdev);
 #endif /* _WLAN_LL_SAP_MAIN_H_ */

+ 131 - 3
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.c

@@ -17,6 +17,7 @@
 #include "wlan_ll_sap_main.h"
 #include <wlan_objmgr_global_obj.h>
 #include "qca_vendor.h"
+#include "wlan_ll_lt_sap_main.h"
 
 static QDF_STATUS ll_sap_psoc_obj_created_notification(struct wlan_objmgr_psoc *psoc, void *arg_list)
 {
@@ -39,6 +40,75 @@ static QDF_STATUS ll_sap_psoc_obj_destroyed_notification(struct wlan_objmgr_psoc
 	/* detach ll_sap_psoc object which will contain cfg items,
 	 * tx and rx ops
 	 */
+	return status;
+}
+
+static QDF_STATUS ll_sap_vdev_obj_created_notification(
+				struct wlan_objmgr_vdev *vdev, void *arg_list)
+{
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	struct ll_sap_vdev_priv_obj *ll_sap_obj;
+
+	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_SAP_MODE)
+		return QDF_STATUS_SUCCESS;
+
+	ll_sap_obj = qdf_mem_malloc(sizeof(*ll_sap_obj));
+	if (!ll_sap_obj)
+		return QDF_STATUS_E_NOMEM;
+
+	status = wlan_objmgr_vdev_component_obj_attach(
+						vdev,
+						WLAN_UMAC_COMP_LL_SAP,
+						(void *)ll_sap_obj,
+						QDF_STATUS_SUCCESS);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		ll_sap_err("vdev %d obj attach failed", wlan_vdev_get_id(vdev));
+		goto ll_sap_vdev_attach_failed;
+	}
+
+	status = ll_lt_sap_init(vdev);
+	if (QDF_IS_STATUS_ERROR(status))
+		goto ll_sap_init_failed;
+
+	return status;
+
+ll_sap_init_failed:
+	wlan_objmgr_vdev_component_obj_detach(vdev,
+					      WLAN_UMAC_COMP_LL_SAP,
+					      ll_sap_obj);
+
+ll_sap_vdev_attach_failed:
+	qdf_mem_free(ll_sap_obj);
+	return status;
+}
+
+static QDF_STATUS ll_sap_vdev_obj_destroyed_notification(
+				struct wlan_objmgr_vdev *vdev, void *arg_list)
+{
+	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	struct ll_sap_vdev_priv_obj *ll_sap_obj;
+
+	if (wlan_vdev_mlme_get_opmode(vdev) != QDF_SAP_MODE)
+		return QDF_STATUS_SUCCESS;
+
+	ll_lt_sap_deinit(vdev);
+
+	ll_sap_obj = ll_sap_get_vdev_priv_obj(vdev);
+
+	if (!ll_sap_obj) {
+		ll_sap_err("vdev %d ll sap obj null",
+			   wlan_vdev_get_id(vdev));
+		return QDF_STATUS_E_INVAL;
+	}
+
+	status = wlan_objmgr_vdev_component_obj_detach(vdev,
+						       WLAN_UMAC_COMP_LL_SAP,
+						       ll_sap_obj);
+	if (QDF_IS_STATUS_ERROR(status))
+		ll_sap_err("vdev %d ll sap obj detach failed, status %d",
+			   wlan_vdev_get_id(vdev), status);
+
+	qdf_mem_free(ll_sap_obj);
 
 	return status;
 }
@@ -62,10 +132,48 @@ QDF_STATUS ll_sap_init(void)
 							   NULL);
 	if (QDF_IS_STATUS_ERROR(status)) {
 		ll_sap_err("objmgr_register_psoc_destroy_handler failed");
-		wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_LL_SAP,
-							   ll_sap_psoc_obj_created_notification,
-							   NULL);
+		goto err_psoc_destroy_reg;
+	}
+
+	/* register vdev create handler functions. */
+	status = wlan_objmgr_register_vdev_create_handler(
+		WLAN_UMAC_COMP_LL_SAP,
+		ll_sap_vdev_obj_created_notification,
+		NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		ll_sap_err("objmgr_register_vdev_create_handler failed");
+		goto err_vdev_create_reg;
+	}
+
+	/* register vdev delete handler functions. */
+	status = wlan_objmgr_register_vdev_destroy_handler(
+		WLAN_UMAC_COMP_LL_SAP,
+		ll_sap_vdev_obj_destroyed_notification,
+		NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		ll_sap_err("objmgr_register_vdev_destroy_handler failed");
+		goto err_vdev_destroy_reg;
 	}
+
+	return status;
+err_vdev_destroy_reg:
+	wlan_objmgr_unregister_vdev_create_handler(
+					WLAN_UMAC_COMP_LL_SAP,
+					ll_sap_vdev_obj_created_notification,
+					NULL);
+
+err_vdev_create_reg:
+	wlan_objmgr_unregister_psoc_destroy_handler(
+					WLAN_UMAC_COMP_LL_SAP,
+					ll_sap_psoc_obj_destroyed_notification,
+					NULL);
+
+err_psoc_destroy_reg:
+	wlan_objmgr_unregister_psoc_create_handler(
+					WLAN_UMAC_COMP_LL_SAP,
+					ll_sap_psoc_obj_created_notification,
+					NULL);
+
 	return status;
 }
 
@@ -73,6 +181,26 @@ QDF_STATUS ll_sap_deinit(void)
 {
 	QDF_STATUS ret = QDF_STATUS_SUCCESS, status;
 
+	/* de-register vdev delete handler functions. */
+	status = wlan_objmgr_unregister_vdev_destroy_handler(
+					WLAN_UMAC_COMP_LL_SAP,
+					ll_sap_vdev_obj_destroyed_notification,
+					NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		ll_sap_err("objmgr_unregister_vdev_destroy_handler failed");
+		ret = status;
+	}
+
+	/* de-register vdev create handler functions. */
+	status = wlan_objmgr_unregister_vdev_create_handler(
+					WLAN_UMAC_COMP_LL_SAP,
+					ll_sap_vdev_obj_created_notification,
+					NULL);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		ll_sap_err("objmgr_unregister_vdev_create_handler failed");
+		ret = status;
+	}
+
 	/* unregister psoc destroy handler functions. */
 	status = wlan_objmgr_unregister_psoc_destroy_handler(WLAN_UMAC_COMP_LL_SAP,
 							     ll_sap_psoc_obj_destroyed_notification,

+ 31 - 0
components/umac/mlme/sap/ll_sap/core/src/wlan_ll_sap_main.h

@@ -22,6 +22,7 @@
 #define _WLAN_LL_SAP_MAIN_H_
 
 #include "wlan_objmgr_psoc_obj.h"
+#include "wlan_objmgr_vdev_obj.h"
 
 #define ll_sap_err(params...) QDF_TRACE_ERROR(QDF_MODULE_ID_LL_SAP, params)
 #define ll_sap_info(params...) QDF_TRACE_INFO(QDF_MODULE_ID_LL_SAP, params)
@@ -34,6 +35,36 @@
 #define ll_sap_nofl_debug(params...) \
 	QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_LL_SAP, params)
 
+/**
+ * struct ll_sap_vdev_priv_obj - ll sap private vdev obj
+ * @bearer_switch_ctx: Bearer switch context
+ */
+struct ll_sap_vdev_priv_obj {
+	struct bearer_switch_info *bearer_switch_ctx;
+};
+
+/**
+ * ll_sap_get_vdev_priv_obj: get ll_sap priv object from vdev object
+ * @vdev: pointer to vdev object
+ *
+ * Return: pointer to ll_sap vdev private object
+ */
+static inline
+struct ll_sap_vdev_priv_obj *ll_sap_get_vdev_priv_obj(
+						struct wlan_objmgr_vdev *vdev)
+{
+	struct ll_sap_vdev_priv_obj *obj;
+
+	if (!vdev) {
+		ll_sap_err("vdev is null");
+		return NULL;
+	}
+	obj = wlan_objmgr_vdev_get_comp_private_obj(vdev,
+						    WLAN_UMAC_COMP_LL_SAP);
+
+	return obj;
+}
+
 /**
  * ll_sap_init() - initializes ll_sap component
  *

+ 45 - 0
components/umac/mlme/sap/ll_sap/dispatcher/inc/wlan_ll_sap_api.h

@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: contains ll_lt_sap API definitions specific to the bearer
+ * switch functionalities
+ */
+
+#ifndef _WLAN_LL_LT_SAP_API_H_
+#define _WLAN_LL_LT_SAP_API_H_
+
+#include <wlan_cmn.h>
+#include <wlan_objmgr_vdev_obj.h>
+
+#ifdef WLAN_FEATURE_LL_LT_SAP
+
+/**
+ * wlan_ll_lt_sap_bearer_switch_get_id() - Get the request id for bearer switch
+ * request
+ * @vdev: Pointer to vdev
+ * Return: Bearer switch request id
+ */
+uint32_t wlan_ll_lt_sap_bearer_switch_get_id(struct wlan_objmgr_vdev *vdev);
+#else
+
+static inline uint32_t
+wlan_ll_lt_sap_bearer_switch_get_id(struct wlan_objmgr_vdev *vdev)
+{
+	return 0;
+}
+#endif /* WLAN_FEATURE_LL_LT_SAP */
+#endif /* _WLAN_LL_LT_SAP_API_H_ */

+ 61 - 0
components/umac/mlme/sap/ll_sap/dispatcher/inc/wlan_ll_sap_public_structs.h

@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/**
+ * DOC: contains ll_lt_sap structure definitions specific to the bearer
+ * switch functionalities
+ */
+
+#ifndef _WLAN_LL_LT_SAP_BEARER_SWITCH_PUBLIC_STRUCTS_H_
+#define _WLAN_LL_LT_SAP_BEARER_SWITCH_PUBLIC_STRUCTS_H_
+
+#include "wlan_objmgr_psoc_obj.h"
+#include <qdf_status.h>
+
+/* Indicates MAX bearer switch requesters at a time */
+#define MAX_BEARER_SWITCH_REQUESTERS 5
+
+/**
+ * enum bearer_switch_requester_source: Bearer switch requester source
+ * @XPAN_BLE_SWITCH_REQUESTER_CONNECT: Bearer switch requester is connect
+ * @XPAN_BLE_SWITCH_REQUESTER_CSA: Bearer switch requester is CSA
+ * @XPAN_BLE_SWITCH_REQUESTER_FW: Bearer switch requester is FW
+ * @XPAN_BLE_SWITCH_REQUESTER_MAX: Indicates MAX bearer switch requester
+ */
+enum bearer_switch_requester_source {
+	XPAN_BLE_SWITCH_REQUESTER_CONNECT,
+	XPAN_BLE_SWITCH_REQUESTER_CSA,
+	XPAN_BLE_SWITCH_REQUESTER_FW,
+	XPAN_BLE_SWITCH_REQUESTER_MAX,
+};
+
+ /**
+  * typedef requester_callback() - Callback function, which will be invoked with
+  * the bearer switch request status.
+  * @psoc: Psoc pointer
+  * @request_id: Request ID
+  * @status: Status of the bearer switch request
+  * @request_params: Request params for the bearer switch request
+  *
+  * Return: None
+  */
+
+typedef void (*requester_callback)(struct wlan_objmgr_psoc *psoc,
+				    uint8_t vdev_id, uint32_t request_id,
+				    QDF_STATUS status,
+				    void *request_params);
+
+#endif /* _WLAN_LL_LT_SAP_BEARER_SWITCH_PUBLIC_STRUCTS_H_ */

+ 24 - 0
components/umac/mlme/sap/ll_sap/dispatcher/src/wlan_ll_sap_api.c

@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "wlan_ll_sap_api.h"
+#include <../../core/src/wlan_ll_lt_sap_bearer_switch.h>
+#include <../../core/src/wlan_ll_lt_sap_main.h>
+
+uint32_t wlan_ll_lt_sap_bearer_switch_get_id(struct wlan_objmgr_vdev *vdev)
+{
+	return ll_lt_sap_bearer_switch_get_id(vdev);
+}

+ 22 - 0
components/umac/twt/dispatcher/inc/cfg_twt.h

@@ -234,6 +234,27 @@
 		"enable_twt_24ghz", \
 		true, \
 		"enable twt in 2.4Ghz band")
+/*
+ * <ini>
+ * twt_disable_info - Enable/Disable TWT info frame.
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini is used to enable/disable TWT Info frame
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AX
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_DISABLE_TWT_INFO_FRAME CFG_INI_BOOL( \
+		"twt_disable_info", \
+		false, \
+		"disable twt info frame")
 
 #define CFG_HE_FLEX_TWT_SCHED CFG_BOOL( \
 				"he_flex_twt_sched", \
@@ -270,6 +291,7 @@
 	CFG(CFG_TWT_CONGESTION_TIMEOUT) \
 	CFG(CFG_BCAST_TWT_REQ_RESP) \
 	CFG(CFG_ENABLE_TWT_24GHZ) \
+	CFG(CFG_DISABLE_TWT_INFO_FRAME) \
 	CFG(CFG_TWT_ENABLE_IN_11N) \
 	CFG(CFG_RTWT_REQ_RESP)
 #elif !defined(WLAN_SUPPORT_TWT) && !defined(WLAN_TWT_CONV_SUPPORTED)

+ 45 - 0
components/wmi/inc/wmi_unified_mlme_api.h

@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/**
+ * DOC: contains wmi mlme declarations
+ */
+
+#ifndef _WLAN_UNIFIED_MLME_API_H_
+#define _WLAN_UNIFIED_MLME_API_H_
+
+/*
+ * struct csa_event_status_ind - structure for csa event status ind
+ * @vdev_id: vdev id
+ * @status: accept: 1 reject : 0
+ */
+struct csa_event_status_ind {
+	uint8_t vdev_id;
+	uint8_t status;
+};
+
+/**
+ * wmi_send_csa_event_status_ind
+ * @wmi_hdl: wmi handle
+ * @params: csa params
+ *
+ * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
+ */
+QDF_STATUS wmi_send_csa_event_status_ind(
+					wmi_unified_t wmi_hdl,
+					struct csa_event_status_ind params);
+#endif

+ 35 - 0
components/wmi/src/wmi_unified_mlme_api.c

@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/**
+ * DOC: contains wmi mlme declarations
+ */
+
+#include <osdep.h>
+#include <wmi.h>
+#include <wmi_unified_priv.h>
+#include <wmi_unified_mlme_api.h>
+
+QDF_STATUS wmi_send_csa_event_status_ind(
+					wmi_unified_t wmi_hdl,
+					struct csa_event_status_ind params)
+{
+	if (wmi_hdl->ops->send_csa_event_status_ind)
+		return wmi_hdl->ops->send_csa_event_status_ind(wmi_hdl, params);
+
+	return QDF_STATUS_E_FAILURE;
+}

+ 68 - 0
components/wmi/src/wmi_unified_mlme_tlv.c

@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ *
+ * Permission to use, copy, modify, and/or distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ */
+
+/**
+ * DOC: contains wmi mlme declarations
+ */
+
+#include <wmi_unified_priv.h>
+#include "wmi.h"
+#include "wlan_mlme_api.h"
+
+static QDF_STATUS csa_event_status_ind_tlv(wmi_unified_t wmi_handle,
+					   struct csa_event_status_ind params)
+{
+	wmi_csa_event_status_ind_fixed_param *cmd;
+	wmi_buf_t buf;
+	QDF_STATUS status;
+
+	buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
+	if (!buf)
+		return QDF_STATUS_E_FAILURE;
+
+	cmd = (wmi_csa_event_status_ind_fixed_param *)wmi_buf_data(buf);
+	WMITLV_SET_HDR(&cmd->tlv_header,
+		       WMITLV_TAG_STRUC_wmi_csa_event_status_ind_fixed_param,
+		       WMITLV_GET_STRUCT_TLVLEN
+		       (wmi_csa_event_status_ind_fixed_param));
+
+	cmd->vdev_id = params.vdev_id;
+	cmd->status = params.status;
+
+	wmi_debug("vdev_id: %d status: %d ", cmd->vdev_id, cmd->status);
+
+	status = wmi_unified_cmd_send(wmi_handle, buf, sizeof(*cmd),
+				      WMI_CSA_EVENT_STATUS_INDICATION_CMDID);
+	if (QDF_IS_STATUS_ERROR(status))
+		wmi_buf_free(buf);
+
+	return status;
+}
+
+/**
+ * wmi_mlme_attach_tlv() - attach MLME tlv handlers
+ * @wmi_handle: wmi handle
+ *
+ * Return: void
+ */
+void wmi_mlme_attach_tlv(wmi_unified_t wmi_handle)
+{
+	struct wmi_ops *ops = wmi_handle->ops;
+
+	ops->send_csa_event_status_ind = csa_event_status_ind_tlv;
+}
+

+ 9 - 6
components/wmi/src/wmi_unified_roam_tlv.c

@@ -2078,6 +2078,9 @@ extract_roam_frame_info_tlv(wmi_unified_t wmi_handle, void *evt_buf,
 		dst_buf->assoc_id =
 			WMI_GET_ASSOC_ID(src_data->frame_info_ext);
 
+		dst_buf->band =
+			WMI_GET_MLO_BITMAP_BAND_INFO(src_data->frame_info_ext);
+
 		dst_buf++;
 		src_data++;
 	}
@@ -2275,7 +2278,7 @@ wmi_fill_roam_mlo_info(wmi_unified_t wmi_handle,
 						   link->link_addr.bytes);
 			WMI_MAC_ADDR_TO_CHAR_ARRAY(&setup_links->self_link_addr,
 						   link->self_link_addr.bytes);
-			wmi_debug("link_id: %u vdev_id: %u flags: 0x%x addr:" QDF_MAC_ADDR_FMT "self_addr:" QDF_MAC_ADDR_FMT,
+			wmi_debug("link_id: %u vdev_id: %u flags: 0x%x addr: " QDF_MAC_ADDR_FMT " self_addr:" QDF_MAC_ADDR_FMT,
 				  link->link_id, link->vdev_id,
 				  link->flags,
 				  QDF_MAC_ADDR_REF(link->link_addr.bytes),
@@ -3015,6 +3018,11 @@ extract_roam_stats_with_single_tlv(wmi_unified_t wmi_handle, uint8_t *evt_buf,
 	uint8_t vdev_id = stats_info->vdev_id;
 	uint8_t band;
 
+	status = wmi_unified_extract_roam_scan_stats(
+			wmi_handle, evt_buf, &stats_info->scan[0], 0, 0, 0);
+	if (QDF_IS_STATUS_ERROR(status))
+		wmi_debug("Roam scan stats extract failed vdev %d", vdev_id);
+
 	band = stats_info->scan[0].band;
 
 	status = wmi_unified_extract_roam_11kv_stats(
@@ -3029,11 +3037,6 @@ extract_roam_stats_with_single_tlv(wmi_unified_t wmi_handle, uint8_t *evt_buf,
 		wmi_debug("Extract roamtrigger stats failed vdev %d",
 			  vdev_id);
 
-	status = wmi_unified_extract_roam_scan_stats(
-			wmi_handle, evt_buf, &stats_info->scan[0], 0, 0, 0);
-	if (QDF_IS_STATUS_ERROR(status))
-		wmi_debug("Roam scan stats extract failed vdev %d", vdev_id);
-
 	status = wmi_unified_extract_roam_btm_response(
 			wmi_handle, evt_buf, &stats_info->btm_rsp[0], 0);
 	if (QDF_IS_STATUS_ERROR(status))

+ 22 - 4
configs/config_to_feature.h

@@ -356,6 +356,10 @@
 #define WLAN_SUPPORT_INFRA_CTRL_PATH_STATS (1)
 #endif
 
+#ifdef CONFIG_QCA_TARGET_IF_MLME
+#define QCA_TARGET_IF_MLME
+#endif
+
 #ifdef CONFIG_CP_STATS
 #define QCA_SUPPORT_CP_STATS (1)
 #endif
@@ -1336,6 +1340,10 @@
 #define WLAN_FEATURE_TSF_AUTO_REPORT (1)
 #endif
 
+#ifdef CONFIG_WLAN_TX_LATENCY_STATS
+#define WLAN_FEATURE_TX_LATENCY_STATS (1)
+#endif
+
 #ifdef CONFIG_WLAN_TSF_UPLINK_DELAY
 #define WLAN_FEATURE_TSF_UPLINK_DELAY (1)
 #endif
@@ -1814,10 +1822,6 @@
 #define DELIVERY_TO_STACK_STATUS_CHECK (1)
 #endif
 
-#ifdef CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS
-#define WLAN_TRACE_HIDE_MAC_ADDRESS (1)
-#endif
-
 #ifdef CONFIG_WLAN_TRACE_HIDE_SSID
 #define WLAN_TRACE_HIDE_SSID (1)
 #endif
@@ -2887,6 +2891,20 @@
 #define WLAN_MAX_ML_DEFAULT_LINK CONFIG_WLAN_MAX_ML_DEFAULT_LINK
 #endif
 
+#ifdef CONFIG_WLAN_FEATURE_11BE_MLO
+#ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
+#define CONFIG_WLAN_DEFAULT_REC_LINK_VALUE (2)
+#endif
+#else
+#ifndef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
+#define CONFIG_WLAN_DEFAULT_REC_LINK_VALUE (2)
+#endif
+#endif
+
+#ifdef CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
+#define WLAN_DEFAULT_REC_LINK_VALUE CONFIG_WLAN_DEFAULT_REC_LINK_VALUE
+#endif
+
 #ifdef CONFIG_WLAN_FEATURE_11BE_MLO
 #ifndef CONFIG_WLAN_MAX_ML_BSS_LINKS
 #define CONFIG_WLAN_MAX_ML_BSS_LINKS (3)

+ 3 - 0
configs/default_defconfig

@@ -81,6 +81,7 @@ ifeq ($(CONFIG_CNSS_QCA6750), y)
 	CONFIG_WLAN_FEATURE_DFS_OFFLOAD := y
 	CONFIG_DIRECT_BUF_RX_ENABLE := y
 	CONFIG_WLAN_CFR_ENABLE := y
+	CONFIG_WLAN_FEATURE_SR := y
 	CONFIG_WMI_DBR_SUPPORT := y
 	CONFIG_WLAN_ENH_CFR_ENABLE := y
 	CONFIG_SCALE_INCLUDES := y
@@ -1247,6 +1248,8 @@ ifneq ($(CONFIG_WIFI_POS_CONVERGED), y)
 CONFIG_WIFI_POS_LEGACY := y
 endif
 
+CONFIG_QCA_TARGET_IF_MLME := y
+
 CONFIG_CP_STATS := y
 CONFIG_FEATURE_INTEROP_ISSUES_AP := y
 

+ 1 - 0
configs/genoa.common

@@ -67,6 +67,7 @@ CONFIG_FEATURE_HTC_CREDIT_HISTORY := y
 CONFIG_TRACE_RECORD_FEATURE := y
 CONFIG_WLAN_NUD_TRACKING := n
 CONFIG_CP_STATS := y
+CONFIG_QCA_TARGET_IF_MLME := y
 CONFIG_FEATURE_FW_LOG_PARSING := y
 CONFIG_PTT_SOCK_SVC_ENABLE := y
 CONFIG_WMI_INTERFACE_EVENT_LOGGING := y

+ 2 - 0
configs/genoa.pci.debug_defconfig

@@ -65,6 +65,8 @@ CONFIG_DEBUG_RX_RING_BUFFER := y
 CONFIG_WLAN_OBJMGR_DEBUG:= y
 CONFIG_FEATURE_UNIT_TEST_SUSPEND := y
 CONFIG_LEAK_DETECTION := y
+CONFIG_HIF_DEBUG := y
+CONFIG_HIF_LARGE_CE_RING_HISTORY := 8192
 endif
 CONFIG_RX_PERFORMANCE := y
 

+ 34 - 0
configs/niobe_consolidate_kiwi-v2_defconfig

@@ -0,0 +1,34 @@
+CONFIG_ALLOW_PKT_DROPPING=y
+CONFIG_ATH_DIAG_EXT_DIRECT=y
+CONFIG_DESC_TIMESTAMP_DEBUG_INFO=y
+CONFIG_DP_RX_REFILL_CPU_PERF_AFFINE_MASK=y
+CONFIG_DP_TX_COMP_RING_DESC_SANITY_CHECK=y
+CONFIG_DP_TX_HW_DESC_HISTORY=y
+CONFIG_DSC_DEBUG=y
+CONFIG_DSC_TEST=y
+CONFIG_ENABLE_QDF_PTR_HASH_DEBUG=y
+CONFIG_FEATURE_HIF_LATENCY_PROFILE_ENABLE=y
+CONFIG_FEATURE_UNIT_TEST_SUSPEND=y
+CONFIG_HAL_DEBUG=y
+CONFIG_HIF_CE_DEBUG_DATA_BUF=y
+CONFIG_HIF_CPU_PERF_AFFINE_MASK=y
+CONFIG_LEAK_DETECTION=y
+CONFIG_MAX_LOGS_PER_SEC=500
+CONFIG_ENABLE_MAX_LOGS_PER_SEC=y
+CONFIG_QDF_NBUF_HISTORY_SIZE=16384
+CONFIG_REGISTER_OP_DEBUG=y
+CONFIG_REO_QDESC_HISTORY=y
+CONFIG_RX_DESC_DEBUG_CHECK=y
+CONFIG_SCHED_HISTORY_SIZE=256
+CONFIG_ENABLE_SCHED_HISTORY_SIZE=y
+CONFIG_TALLOC_DEBUG=y
+CONFIG_UNIT_TEST=y
+CONFIG_WLAN_FEATURE_DP_CFG_EVENT_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_MON_STATUS_RING_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_RX_RING_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_TX_DESC_HISTORY=y
+CONFIG_WLAN_RECORD_RX_PADDR=y
+CONFIG_QDF_TEST=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_FEATURE_WLM_STATS=y
+CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS_DISABLE=y

+ 390 - 0
configs/niobe_gki_kiwi-v2_defconfig

@@ -0,0 +1,390 @@
+CONFIG_QCA_CLD_WLAN=y
+CONFIG_160MHZ_SUPPORT=y
+CONFIG_6G_SCAN_CHAN_SORT_ALGO=y
+CONFIG_ADAPTIVE_11R=y
+CONFIG_ANI_LEVEL_REQUEST=y
+CONFIG_AR900B=y
+CONFIG_ATH_11AC_TXCOMPACT=y
+CONFIG_ATH_BUS_PM=y
+CONFIG_ATH_PERF_PWR_OFFLOAD=y
+CONFIG_BAND_6GHZ=y
+CONFIG_BERYLLIUM=y
+CONFIG_CE_DISABLE_SRNG_TIMER_IRQ=y
+CONFIG_CFG_BMISS_OFFLOAD_MAX_VDEV=4
+CONFIG_CFG_MAX_STA_VDEVS=4
+CONFIG_CHECKSUM_OFFLOAD=y
+CONFIG_CHIP_VERSION=2
+CONFIG_CNSS_GENL_MODULE=y
+CONFIG_CNSS_KIWI=y
+CONFIG_CNSS_KIWI_V2=y
+CONFIG_CNSS_UTILS_MODULE=y
+CONFIG_CNSS_UTILS=y
+CONFIG_CONNECTIVITY_PKTLOG=y
+CONFIG_CONVERGED_P2P_ENABLE=y
+CONFIG_CP_STATS=y
+CONFIG_QCA_TARGET_IF_MLME=y
+CONFIG_DCS=y
+CONFIG_DDP_MON_RSSI_IN_DBM=y
+CONFIG_DEBUG_RX_RING_BUFFER=y
+CONFIG_DELIVERY_TO_STACK_STATUS_CHECK=y
+CONFIG_DESC_DUP_DETECT_DEBUG=y
+CONFIG_DEVICE_FORCE_WAKE_ENABLE=y
+CONFIG_DIRECT_BUF_RX_ENABLE=y
+CONFIG_DISABLE_CHANNEL_LIST=y
+CONFIG_DISABLE_EAPOL_INTRABSS_FWD=y
+CONFIG_DISABLE_STATUS_RING_TIMER_WAR=y
+CONFIG_DP_BE_WAR=y
+CONFIG_DP_CON_MON_MSI_ENABLED=y
+CONFIG_DP_CON_MON_MSI_SKIP_SET=y
+CONFIG_DP_FEATURE_HW_COOKIE_CONVERSION=y
+CONFIG_DP_HW_COOKIE_CONVERT_EXCEPTION=y
+CONFIG_DP_HW_TX_DELAY_STATS_ENABLE=y
+CONFIG_DP_INTR_POLL_BASED=y
+CONFIG_DP_LFR=y
+CONFIG_DP_MEM_PRE_ALLOC=y
+CONFIG_DP_PKT_ADD_TIMESTAMP=y
+CONFIG_DP_PKT_STATS_PER_LMAC=y
+CONFIG_DP_RX_BUFFER_POOL_ALLOC_THRES=5
+CONFIG_DP_RX_BUFFER_POOL_SIZE=128
+CONFIG_DP_RX_DROP_RAW_FRM=y
+CONFIG_DP_RX_PKT_NO_PEER_DELIVER=y
+CONFIG_DP_RX_SPECIAL_FRAME_NEED=y
+CONFIG_DP_TRACE=y
+CONFIG_DP_TRAFFIC_END_INDICATION=y
+CONFIG_DP_TXRX_SOC_ATTACH=y
+CONFIG_DP_USE_REDUCED_PEER_ID_FIELD_WIDTH=y
+CONFIG_DP_WAR_INVALID_FIRST_MSDU_FLAG=y
+CONFIG_DUP_RX_DESC_WAR=y
+CONFIG_DYNAMIC_RX_AGGREGATION=y
+CONFIG_EMULATION_2_0=y
+CONFIG_ENABLE_HAL_REG_WR_HISTORY=y
+CONFIG_ENABLE_HAL_SOC_STATS=y
+CONFIG_ENABLE_MTRACE_LOG=y
+CONFIG_ENABLE_SMMU_S1_TRANSLATION=y
+CONFIG_FEATURE_ACTIVE_TOS=y
+CONFIG_FEATURE_ALIGN_STATS_FROM_DP=y
+CONFIG_FEATURE_BECN_STATS=y
+CONFIG_FEATURE_BSS_TRANSITION=y
+CONFIG_FEATURE_BUS_BANDWIDTH_MGR=y
+CONFIG_FEATURE_CLUB_LL_STATS_AND_GET_STATION=y
+CONFIG_FEATURE_COEX=y
+CONFIG_FEATURE_CONCURRENCY_MATRIX=y
+CONFIG_FEATURE_DELAYED_PEER_OBJ_DESTROY=y
+CONFIG_FEATURE_DENYLIST_MGR=y
+CONFIG_FEATURE_EPPING=y
+CONFIG_FEATURE_FORCE_WAKE=y
+CONFIG_FEATURE_FW_LOG_PARSING=y
+CONFIG_FEATURE_GPIO_CFG=y
+CONFIG_FEATURE_HAL_DELAYED_REG_WRITE=y
+CONFIG_FEATURE_HTC_CREDIT_HISTORY=y
+CONFIG_FEATURE_INTEROP_ISSUES_AP=y
+CONFIG_FEATURE_MEMDUMP_ENABLE=y
+CONFIG_FEATURE_MONITOR_MODE_SUPPORT=y
+CONFIG_FEATURE_MSCS=y
+CONFIG_FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT=y
+CONFIG_FEATURE_OEM_DATA=y
+CONFIG_FEATURE_OTA_TEST=y
+CONFIG_FEATURE_P2P_LISTEN_OFFLOAD=y
+CONFIG_FEATURE_RADAR_HISTORY=y
+CONFIG_FEATURE_ROAM_DEBUG=y
+CONFIG_FEATURE_RSSI_MONITOR=y
+CONFIG_FEATURE_RX_LINKSPEED_ROAM_TRIGGER=y
+CONFIG_FEATURE_SAP_COND_CHAN_SWITCH=y
+CONFIG_FEATURE_SAR_LIMITS=y
+CONFIG_FEATURE_SET=y
+CONFIG_FEATURE_STATION_INFO=y
+CONFIG_FEATURE_STATS_EXT=y
+CONFIG_FEATURE_STATS_EXT_V2=y
+CONFIG_FEATURE_TSO=y
+CONFIG_FEATURE_TSO_STATS=y
+CONFIG_FEATURE_TX_POWER=y
+CONFIG_FEATURE_VDEV_OPS_WAKELOCK=y
+CONFIG_FEATURE_WLAN_LPHB=y
+CONFIG_FEATURE_WLAN_PRE_CAC=y
+CONFIG_FEATURE_WLAN_RA_FILTERING=y
+CONFIG_FEATURE_WLAN_SCAN_PNO=y
+CONFIG_FEATURE_WLAN_WAPI=y
+CONFIG_FIX_TXDMA_LIMITATION=y
+CONFIG_FOURTH_CONNECTION=y
+CONFIG_FW_THERMAL_THROTTLE=y
+CONFIG_GET_DRIVER_MODE=y
+CONFIG_GTK_OFFLOAD=y
+CONFIG_HAL_DISABLE_NON_BA_2K_JUMP_ERROR=y
+CONFIG_HANDLE_BC_EAP_TX_FRM=y
+CONFIG_HANDLE_RX_REROUTE_ERR=y
+CONFIG_HASTINGS_BT_WAR=y
+CONFIG_HDD_INIT_WITH_RTNL_LOCK=y
+CONFIG_HIF_PCI=y
+CONFIG_HIF_REG_WINDOW_SUPPORT=y
+CONFIG_HOST_OPCLASS=y
+CONFIG_HTT_PADDR64=y
+CONFIG_IPA_OPT_WIFI_DP=y
+CONFIG_IPA_SET_RESET_TX_DB_PA=y
+CONFIG_KIWI_HEADERS_DEF=y
+CONFIG_LFR_SUBNET_DETECTION=y
+CONFIG_LINUX_QCMBR=y
+CONFIG_LITTLE_ENDIAN=y
+CONFIG_LL_DP_SUPPORT=y
+CONFIG_LTE_COEX=y
+CONFIG_MARK_ICMP_REQ_TO_FW=y
+CONFIG_MAX_ALLOC_PAGE_SIZE=y
+CONFIG_MCC_TO_SCC_SWITCH=y
+CONFIG_MON_ENABLE_DROP_FOR_MAC=y
+CONFIG_MON_ENABLE_DROP_FOR_NON_MON_PMAC=y
+CONFIG_MORE_TX_DESC=y
+CONFIG_MULTI_CLIENT_LL_SUPPORT=y
+CONFIG_NO_RX_PKT_HDR_TLV=y
+CONFIG_OBSS_PD=y
+CONFIG_OFDM_SCRAMBLER_SEED=y
+CONFIG_PCI_LINK_STATUS_SANITY=y
+CONFIG_PCIE_GEN_SWITCH=y
+CONFIG_PEER_PROTECTED_ACCESS=y
+CONFIG_PKTLOG_HAS_SPECIFIC_DATA=y
+CONFIG_PLD_PCIE_CNSS_FLAG=y
+CONFIG_PLD_PCIE_INIT_FLAG=y
+CONFIG_POWER_MANAGEMENT_OFFLOAD=y
+CONFIG_PTT_SOCK_SVC_ENABLE=y
+CONFIG_QCA_DFS_BW_PUNCTURE=y
+CONFIG_QCA_GET_TSF_VIA_REG=y
+CONFIG_QCA_MONITOR_PKT_SUPPORT=y
+CONFIG_QCA_SUPPORT_TX_MIN_RATES_FOR_SPECIAL_FRAMES=y
+CONFIG_QCA_SUPPORT_TX_THROTTLE=y
+CONFIG_QCA_WIFI_FTM=y
+CONFIG_QCA_WIFI_KIWI=y
+CONFIG_QCA_WIFI_MONITOR_MODE_NO_MSDU_START_TLV_SUPPORT=y
+CONFIG_QCA_WIFI_QCA8074=y
+CONFIG_QCA_WIFI_QCA8074_VP=y
+CONFIG_QCACLD_FEATURE_APF=y
+CONFIG_QCACLD_FEATURE_FW_STATE=y
+CONFIG_QCACLD_FEATURE_GAP_LL_PS_MODE=y
+CONFIG_QCACLD_FEATURE_GREEN_AP=y
+CONFIG_QCACLD_FEATURE_NAN=y
+CONFIG_QCACLD_RX_DESC_MULTI_PAGE_ALLOC=y
+CONFIG_QCACLD_WLAN_CONNECTIVITY_DIAG_EVENT=y
+CONFIG_QCACLD_WLAN_LFR3=y
+CONFIG_QCOM_ESE=y
+CONFIG_QCOM_LTE_COEX=y
+CONFIG_QCOM_TDLS=y
+CONFIG_QCOM_VOWIFI_11R=y
+CONFIG_QMI_SUPPORT=y
+CONFIG_REG_CLIENT=y
+CONFIG_REMOVE_PKT_LOG=y
+CONFIG_REO_DESC_DEFER_FREE=y
+CONFIG_RX_DEFRAG_DO_NOT_REINJECT=y
+CONFIG_RX_DESC_SANITY_WAR=y
+CONFIG_RX_FISA=y
+CONFIG_RX_HASH_DEBUG=y
+CONFIG_RX_OL=y
+CONFIG_RXDMA_ERR_PKT_DROP=y
+CONFIG_SAE_SINGLE_PMK=y
+CONFIG_SAP_AVOID_ACS_FREQ_LIST=y
+CONFIG_SAP_DHCP_FW_IND=y
+CONFIG_SAR_SAFETY_FEATURE=y
+CONFIG_SCALE_INCLUDES=y
+CONFIG_SERIALIZE_QUEUE_SETUP=y
+CONFIG_SHADOW_V3=y
+CONFIG_SMMU_S1_UNMAP=y
+CONFIG_SOFTAP_CHANNEL_RANGE=y
+CONFIG_SUPPORT_11AX=y
+CONFIG_SYSTEM_PM_CHECK=y
+CONFIG_TARGET_11D_SCAN=y
+CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC=y
+CONFIG_THERMAL_STATS_SUPPORT=y
+CONFIG_TRACE_RECORD_FEATURE=y
+CONFIG_TSO_DEBUG_LOG_ENABLE=y
+CONFIG_TX_ADDR_INDEX_SEARCH=y
+CONFIG_TX_MULTI_TCL=y
+CONFIG_TX_MULTIQ_PER_AC=y
+CONFIG_TX_PER_PDEV_DESC_POOL=y
+CONFIG_TX_TID_OVERRIDE=y
+CONFIG_VERBOSE_DEBUG=y
+CONFIG_WAPI_BIG_ENDIAN=y
+CONFIG_WCNSS_MEM_PRE_ALLOC_MODULE=y
+CONFIG_WCNSS_MEM_PRE_ALLOC=y
+CONFIG_WDI_EVENT_ENABLE=y
+CONFIG_WDI3_IPA_OVER_GSI=y
+CONFIG_WIFI_MONITOR_SUPPORT=y
+CONFIG_WIFI_POS_CONVERGED=y
+CONFIG_WIFI_POS_PASN=y
+CONFIG_WINDOW_REG_PLD_LOCK_ENABLE=y
+CONFIG_WLAN_BCN_RECV_FEATURE=y
+CONFIG_WLAN_BMISS=y
+CONFIG_WLAN_CE_INTERRUPT_THRESHOLD_CONFIG=y
+CONFIG_WLAN_CFR_ENABLE=y
+CONFIG_WLAN_CLD_DEV_PM_QOS=y
+CONFIG_WLAN_CLD_PM_QOS=y
+CONFIG_WLAN_CONV_SPECTRAL_ENABLE=y
+CONFIG_WLAN_CUSTOM_DSCP_UP_MAP=y
+CONFIG_WLAN_DEBUG_CRASH_INJECT=y
+CONFIG_WLAN_DEBUG_LINK_VOTE=y
+CONFIG_WLAN_DEBUG_VERSION=y
+CONFIG_WLAN_DEBUGFS=y
+CONFIG_WLAN_DFS_MASTER_ENABLE=y
+CONFIG_WLAN_DFS_STATIC_MEM_ALLOC=y
+CONFIG_WLAN_DIAG_VERSION=y
+CONFIG_WLAN_DL_MODES=y
+CONFIG_WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG=y
+CONFIG_WLAN_DP_DISABLE_TCL_STATUS_SRNG=y
+CONFIG_WLAN_DP_PENDING_MEM_FLUSH=y
+CONFIG_WLAN_DP_PER_RING_TYPE_CONFIG=y
+CONFIG_WLAN_DP_SRNG_USAGE_WM_TRACKING=y
+CONFIG_WLAN_DYNAMIC_CVM=y
+CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY=y
+CONFIG_WLAN_ENH_CFR_ENABLE=y
+CONFIG_WLAN_FEATURE_11AX=y
+CONFIG_WLAN_FEATURE_11BE=y
+CONFIG_WLAN_FEATURE_11BE_MLO=y
+CONFIG_WLAN_HDD_MULTI_VDEV_SINGLE_NDEV=y
+CONFIG_WLAN_FEATURE_ACTION_OUI=y
+CONFIG_WLAN_FEATURE_BIG_DATA_STATS=y
+CONFIG_WLAN_FEATURE_CAL_FAILURE_TRIGGER=y
+CONFIG_WLAN_FEATURE_COAP=y
+CONFIG_WLAN_FEATURE_COEX_DBAM=y
+CONFIG_WLAN_FEATURE_DFS_OFFLOAD=y
+CONFIG_WLAN_FEATURE_DISA=y
+CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH=y
+CONFIG_WLAN_FEATURE_DP_EVENT_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_RX_THREADS=y
+CONFIG_WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE=y
+CONFIG_WLAN_FEATURE_ELNA=y
+CONFIG_WLAN_FEATURE_FILS=y
+CONFIG_WLAN_FEATURE_FIPS=y
+CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST=y
+CONFIG_WLAN_FEATURE_ICMP_OFFLOAD=y
+CONFIG_WLAN_FEATURE_IGMP_OFFLOAD=y
+CONFIG_WLAN_FEATURE_LINK_LAYER_STATS=y
+CONFIG_WLAN_FEATURE_LPSS=y
+CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB=y
+CONFIG_WLAN_FEATURE_MBSSID=y
+CONFIG_WLAN_FEATURE_MCC_QUOTA=y
+CONFIG_WLAN_FEATURE_MDNS_OFFLOAD=y
+CONFIG_WLAN_FEATURE_MEDIUM_ASSESS=y
+CONFIG_WLAN_FEATURE_MIB_STATS=y
+CONFIG_WLAN_FEATURE_NEAR_FULL_IRQ=y
+CONFIG_WLAN_FEATURE_P2P_DEBUG=y
+CONFIG_WLAN_FEATURE_P2P_P2P_STA=y
+CONFIG_WLAN_FEATURE_PACKET_FILTERING=y
+CONFIG_WLAN_FEATURE_PEER_TXQ_FLUSH_CONF=y
+CONFIG_WLAN_FEATURE_ROAM_INFO_STATS=y
+CONFIG_WLAN_FEATURE_RX_BUFFER_POOL=y
+CONFIG_WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT=y
+CONFIG_WLAN_FEATURE_SAE=y
+CONFIG_WLAN_FEATURE_SAP_ACS_OPTIMIZE=y
+CONFIG_WLAN_FEATURE_SARV1_TO_SARV2=y
+CONFIG_WLAN_FEATURE_SR=y
+CONFIG_WLAN_FEATURE_TWT=y
+CONFIG_WLAN_FEATURE_WMI_DIAG_OVER_CE7=y
+CONFIG_WLAN_FREQ_LIST=y
+CONFIG_WLAN_FW_OFFLOAD=y
+CONFIG_WLAN_GTX_BW_MASK=y
+CONFIG_WLAN_HANG_EVENT=y
+CONFIG_WLAN_LOG_DEBUG=y
+CONFIG_WLAN_LOG_ENTER=y
+CONFIG_WLAN_LOG_ERROR=y
+CONFIG_WLAN_LOG_EXIT=y
+CONFIG_WLAN_LOG_FATAL=y
+CONFIG_WLAN_LOG_INFO=y
+CONFIG_WLAN_LOG_WARN=y
+CONFIG_WLAN_LOGGING_SOCK_SVC=y
+CONFIG_WLAN_MWS_INFO_DEBUGFS=y
+CONFIG_WLAN_NAPI=y
+CONFIG_WLAN_NS_OFFLOAD=y
+CONFIG_WLAN_NUD_TRACKING=y
+CONFIG_WLAN_OFFLOAD_PACKETS=y
+CONFIG_WLAN_OPEN_P2P_INTERFACE=y
+CONFIG_WLAN_PDEV_VDEV_SEND_MULTI_PARAM=y
+CONFIG_WLAN_PMO_ENABLE=y
+CONFIG_WLAN_POLICY_MGR_ENABLE=y
+CONFIG_WLAN_POWER_DEBUG=y
+CONFIG_WLAN_REASSOC=y
+CONFIG_WLAN_RX_MON_PARSE_CMN_USER_INFO=y
+CONFIG_WLAN_SCAN_DISABLE=y
+CONFIG_WLAN_SKIP_BAR_UPDATE=y
+CONFIG_WLAN_SUPPORT_DATA_STALL=y
+CONFIG_WLAN_SYNC_TSF=y
+CONFIG_WLAN_SYNC_TSF_PLUS=y
+CONFIG_WLAN_SYNC_TSF_TIMER=y
+CONFIG_WLAN_SYSFS=y
+CONFIG_WLAN_SYSFS_CHANNEL=y
+CONFIG_WLAN_SYSFS_CONNECT_INFO=y
+CONFIG_WLAN_SYSFS_DCM=y
+CONFIG_WLAN_SYSFS_DFSNOL=y
+CONFIG_WLAN_SYSFS_DP_STATS=y
+CONFIG_WLAN_SYSFS_DP_TRACE=y
+CONFIG_WLAN_SYSFS_EHT_RATE=y
+CONFIG_WLAN_SYSFS_FW_MODE_CFG=y
+CONFIG_WLAN_SYSFS_HE_BSS_COLOR=y
+CONFIG_WLAN_SYSFS_LOG_BUFFER=y
+CONFIG_WLAN_SYSFS_MEM_STATS=y
+CONFIG_WLAN_SYSFS_MONITOR_MODE_CHANNEL=y
+CONFIG_WLAN_SYSFS_RADAR=y
+CONFIG_WLAN_SYSFS_RANGE_EXT=y
+CONFIG_WLAN_SYSFS_RTS_CTS=y
+CONFIG_WLAN_SYSFS_SCAN_CFG=y
+CONFIG_WLAN_SYSFS_STA_INFO=y
+CONFIG_WLAN_SYSFS_STATS=y
+CONFIG_WLAN_SYSFS_TDLS_PEERS=y
+CONFIG_WLAN_SYSFS_TEMPERATURE=y
+CONFIG_WLAN_SYSFS_TX_STBC=y
+CONFIG_WLAN_SYSFS_WLAN_DBG=y
+CONFIG_WLAN_SYSFS_BITRATES=y
+CONFIG_WLAN_THERMAL_CFG=y
+CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT=y
+CONFIG_WLAN_TRACEPOINTS=y
+CONFIG_WLAN_TSF_AUTO_REPORT=y
+CONFIG_WLAN_TSF_UPLINK_DELAY=y
+CONFIG_WLAN_TWT_CONVERGED=y
+CONFIG_WLAN_TWT_SAP_PDEV_COUNT=y
+CONFIG_WLAN_TWT_SAP_STA_COUNT=y
+CONFIG_WLAN_TX_FLOW_CONTROL_V2=y
+CONFIG_WLAN_TXRX_FW_ST_RST=y
+CONFIG_WLAN_TXRX_FW_STATS=y
+CONFIG_WLAN_TXRX_STATS=y
+CONFIG_WLAN_UMAC_MLO_MAX_DEV=3
+CONFIG_WLAN_VENDOR_HANDOFF_CONTROL=y
+CONFIG_WLAN_WBUFF=y
+CONFIG_WLAN_WOW_ITO=y
+CONFIG_WLAN_WOWL_ADD_PTRN=y
+CONFIG_WLAN_WOWL_DEL_PTRN=y
+CONFIG_WMI_BCN_OFFLOAD=y
+CONFIG_WMI_CMD_STRINGS=y
+CONFIG_WMI_CONCURRENCY_SUPPORT=y
+CONFIG_WMI_DBR_SUPPORT=y
+CONFIG_WMI_INTERFACE_EVENT_LOGGING=y
+CONFIG_WMI_ROAM_SUPPORT=y
+CONFIG_WMI_SEND_RECV_QMI=y
+CONFIG_WMI_STA_SUPPORT=y
+CONFIG_CFG80211_EXTERNAL_AUTH_MLO_SUPPORT=y
+CONFIG_CFG80211_EXT_FEATURE_SECURE_NAN=y
+CONFIG_WLAN_CTRL_NAME="wlan"
+CONFIG_MULTI_IF_NAME="kiwi_v2"
+CONFIG_NL80211_TESTMODE=y
+CONFIG_ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST=y
+CONFIG_WLAN_HOST_ARCH_ARM=y
+CONFIG_ARCH_MSM=y
+CONFIG_WLAN_TX_MON_2_0_Y_WLAN_DP_LOCAL_PKT_CAPTURE=y
+CONFIG_WLAN_DP_LOCAL_PKT_CAPTURE=y
+CONFIG_DP_TX_PACKET_INSPECT_FOR_ILP=y
+CONFIG_NUM_SOC_PERF_CLUSTER=2
+CONFIG_WIFI_MONITOR_SUPPORT_Y_WLAN_TX_MON_2_0=y
+CONFIG_WLAN_OPEN_SOURCE=y
+CONFIG_QCA_WIFI_FTM_NL80211=y
+CONFIG_CFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT=y
+CONFIG_DP_MULTIPASS_SUPPORT=y
+CONFIG_WLAN_DP_VDEV_NO_SELF_PEER=y
+CONFIG_WLAN_FEATURE_AFFINITY_MGR=y
+CONFIG_WALT_GET_CPU_TAKEN_SUPPORT=y
+CONFIG_DP_MLO_LINK_STATS_SUPPORT=y
+CONFIG_HIF_DEBUG=y
+CONFIG_WLAN_OBJMGR_DEBUG=y
+CONFIG_WLAN_OBJMGR_REF_ID_TRACE=y
+CONFIG_WLAN_WARN_ON_ASSERT=y
+CONFIG_WLAN_DP_FEATURE_DEFERRED_REO_QDESC_DESTROY=y
+CONFIG_PANIC_ON_BUG=y
+CONFIG_FEATURE_WLAN_CH_AVOID_EXT=y
+CONFIG_CNSS2_SSR_DRIVER_DUMP=y
+CONFIG_BUS_AUTO_SUSPEND=y
+CONFIG_CNSS_OUT_OF_TREE=y
+CONFIG_SMP=y
+CONFIG_RPS=y
+CONFIG_BCN_RATECODE_ENABLE=y

+ 3 - 0
configs/peach_defconfig

@@ -928,3 +928,6 @@ endif
 
 CONFIG_WLAN_FEATURE_SAP_ACS_OPTIMIZE := y
 CONFIG_4_BYTES_TLV_TAG := y
+
+#Enable Single NDEV Multi VDEV
+CONFIG_WLAN_HDD_MULTI_VDEV_SINGLE_NDEV := y

+ 2 - 0
configs/pineapple_gki_kiwi-v2_defconfig

@@ -22,6 +22,7 @@ CONFIG_CNSS_UTILS=y
 CONFIG_CONNECTIVITY_PKTLOG=y
 CONFIG_CONVERGED_P2P_ENABLE=y
 CONFIG_CP_STATS=y
+CONFIG_QCA_TARGET_IF_MLME=y
 CONFIG_DCS=y
 CONFIG_DDP_MON_RSSI_IN_DBM=y
 CONFIG_DEBUG_RX_RING_BUFFER=y
@@ -336,6 +337,7 @@ CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT=y
 CONFIG_WLAN_TRACEPOINTS=y
 CONFIG_WLAN_TSF_AUTO_REPORT=y
 CONFIG_WLAN_TSF_UPLINK_DELAY=y
+CONFIG_WLAN_TX_LATENCY_STATS=y
 CONFIG_WLAN_TWT_CONVERGED=y
 CONFIG_WLAN_TWT_SAP_PDEV_COUNT=y
 CONFIG_WLAN_TWT_SAP_STA_COUNT=y

+ 8 - 1
configs/pineapple_gki_peach_defconfig

@@ -23,6 +23,7 @@ CONFIG_CNSS_UTILS=y
 CONFIG_CONNECTIVITY_PKTLOG=y
 CONFIG_CONVERGED_P2P_ENABLE=y
 CONFIG_CP_STATS=y
+CONFIG_QCA_TARGET_IF_MLME=y
 CONFIG_DCS=y
 CONFIG_DDP_MON_RSSI_IN_DBM=y
 CONFIG_DEBUG_RX_RING_BUFFER=y
@@ -46,6 +47,8 @@ CONFIG_DP_PKT_ADD_TIMESTAMP=y
 CONFIG_DP_PKT_STATS_PER_LMAC=y
 CONFIG_DP_RX_BUFFER_POOL_ALLOC_THRES=5
 CONFIG_DP_RX_BUFFER_POOL_SIZE=128
+CONFIG_DP_RX_REFILL_BUFF_POOL_SIZE=2048
+CONFIG_DP_RX_REFILL_THRD_THRESHOLD=512
 CONFIG_DP_RX_DROP_RAW_FRM=y
 CONFIG_DP_RX_PKT_NO_PEER_DELIVER=y
 CONFIG_DP_RX_SPECIAL_FRAME_NEED=y
@@ -223,7 +226,6 @@ CONFIG_WLAN_DEBUGFS=y
 CONFIG_WLAN_DFS_MASTER_ENABLE=y
 CONFIG_WLAN_DFS_STATIC_MEM_ALLOC=y
 CONFIG_WLAN_DIAG_VERSION=y
-CONFIG_WLAN_DISABLE_EXPORT_SYMBOL=y
 CONFIG_WLAN_DL_MODES=y
 CONFIG_WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG=y
 CONFIG_WLAN_DP_DISABLE_TCL_STATUS_SRNG=y
@@ -329,11 +331,14 @@ CONFIG_WLAN_SYSFS_TDLS_PEERS=y
 CONFIG_WLAN_SYSFS_TEMPERATURE=y
 CONFIG_WLAN_SYSFS_TX_STBC=y
 CONFIG_WLAN_SYSFS_WLAN_DBG=y
+CONFIG_WLAN_SYSFS_BITRATES=y
+CONFIG_WLAN_SYSFS_RF_TEST_MODE=y
 CONFIG_WLAN_THERMAL_CFG=y
 CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT=y
 CONFIG_WLAN_TRACEPOINTS=y
 CONFIG_WLAN_TSF_AUTO_REPORT=y
 CONFIG_WLAN_TSF_UPLINK_DELAY=y
+CONFIG_WLAN_TX_LATENCY_STATS=y
 CONFIG_WLAN_TWT_CONVERGED=y
 CONFIG_WLAN_TWT_SAP_PDEV_COUNT=y
 CONFIG_WLAN_TWT_SAP_STA_COUNT=y
@@ -385,3 +390,5 @@ CONFIG_BUS_AUTO_SUSPEND=y
 CONFIG_CNSS_OUT_OF_TREE=y
 CONFIG_SMP=y
 CONFIG_RPS=y
+CONFIG_BCN_RATECODE_ENABLE=y
+CONFIG_4_BYTES_TLV_TAG=y

+ 2 - 0
configs/qca6174_defconfig

@@ -569,6 +569,8 @@ endif
 
 CONFIG_CP_STATS := y
 
+CONFIG_QCA_TARGET_IF_MLME := y
+
 CONFIG_FEATURE_WLAN_WAPI := y
 
 CONFIG_AGEIE_ON_SCAN_RESULTS := y

+ 1 - 0
configs/qca6390_defconfig

@@ -631,6 +631,7 @@ CONFIG_WIFI_POS_LEGACY := y
 endif
 
 CONFIG_CP_STATS := y
+CONFIG_QCA_TARGET_IF_MLME := y
 
 #Flag to enable compilation of DCS module
 CONFIG_DCS := y

+ 1 - 0
configs/qcs40x.snoc.perf_defconfig

@@ -94,6 +94,7 @@ CONFIG_TRACE_RECORD_FEATURE := y
 CONFIG_WLAN_FEATURE_P2P_DEBUG := n
 CONFIG_WLAN_NUD_TRACKING := n
 CONFIG_CP_STATS := n
+CONFIG_QCA_TARGET_IF_MLME := y
 CONFIG_FEATURE_FW_LOG_PARSING := y
 CONFIG_PTT_SOCK_SVC_ENABLE := y
 CONFIG_WMI_INTERFACE_EVENT_LOGGING := y

+ 33 - 0
configs/sun_consolidate_kiwi-v2_defconfig

@@ -0,0 +1,33 @@
+CONFIG_ALLOW_PKT_DROPPING=y
+CONFIG_ATH_DIAG_EXT_DIRECT=y
+CONFIG_DESC_TIMESTAMP_DEBUG_INFO=y
+CONFIG_DP_RX_REFILL_CPU_PERF_AFFINE_MASK=y
+CONFIG_DP_TX_COMP_RING_DESC_SANITY_CHECK=y
+CONFIG_DP_TX_HW_DESC_HISTORY=y
+CONFIG_DSC_DEBUG=y
+CONFIG_DSC_TEST=y
+CONFIG_ENABLE_QDF_PTR_HASH_DEBUG=y
+CONFIG_FEATURE_HIF_LATENCY_PROFILE_ENABLE=y
+CONFIG_FEATURE_UNIT_TEST_SUSPEND=y
+CONFIG_HAL_DEBUG=y
+CONFIG_HIF_CE_DEBUG_DATA_BUF=y
+CONFIG_HIF_CPU_PERF_AFFINE_MASK=y
+CONFIG_LEAK_DETECTION=y
+CONFIG_MAX_LOGS_PER_SEC=500
+CONFIG_ENABLE_MAX_LOGS_PER_SEC=y
+CONFIG_QDF_NBUF_HISTORY_SIZE=16384
+CONFIG_REGISTER_OP_DEBUG=y
+CONFIG_REO_QDESC_HISTORY=y
+CONFIG_RX_DESC_DEBUG_CHECK=y
+CONFIG_SCHED_HISTORY_SIZE=256
+CONFIG_ENABLE_SCHED_HISTORY_SIZE=y
+CONFIG_TALLOC_DEBUG=y
+CONFIG_UNIT_TEST=y
+CONFIG_WLAN_FEATURE_DP_CFG_EVENT_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_MON_STATUS_RING_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_RX_RING_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_TX_DESC_HISTORY=y
+CONFIG_WLAN_RECORD_RX_PADDR=y
+CONFIG_QDF_TEST=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_FEATURE_WLM_STATS=y

+ 34 - 0
configs/sun_consolidate_peach_defconfig

@@ -0,0 +1,34 @@
+CONFIG_ALLOW_PKT_DROPPING=y
+CONFIG_ATH_DIAG_EXT_DIRECT=y
+CONFIG_DESC_TIMESTAMP_DEBUG_INFO=y
+CONFIG_DP_RX_REFILL_CPU_PERF_AFFINE_MASK=y
+CONFIG_DP_TX_COMP_RING_DESC_SANITY_CHECK=y
+CONFIG_DP_TX_HW_DESC_HISTORY=y
+CONFIG_DSC_DEBUG=y
+CONFIG_DSC_TEST=y
+CONFIG_ENABLE_QDF_PTR_HASH_DEBUG=y
+CONFIG_FEATURE_HIF_LATENCY_PROFILE_ENABLE=y
+CONFIG_FEATURE_UNIT_TEST_SUSPEND=y
+CONFIG_HAL_DEBUG=y
+CONFIG_HIF_CE_DEBUG_DATA_BUF=y
+CONFIG_HIF_CPU_PERF_AFFINE_MASK=y
+CONFIG_LEAK_DETECTION=y
+CONFIG_MAX_LOGS_PER_SEC=500
+CONFIG_ENABLE_MAX_LOGS_PER_SEC=y
+CONFIG_QDF_NBUF_HISTORY_SIZE=16384
+CONFIG_REGISTER_OP_DEBUG=y
+CONFIG_REO_QDESC_HISTORY=y
+CONFIG_RX_DESC_DEBUG_CHECK=y
+CONFIG_SCHED_HISTORY_SIZE=256
+CONFIG_ENABLE_SCHED_HISTORY_SIZE=y
+CONFIG_TALLOC_DEBUG=y
+CONFIG_UNIT_TEST=y
+CONFIG_WLAN_FEATURE_DP_CFG_EVENT_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_MON_STATUS_RING_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_RX_RING_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_TX_DESC_HISTORY=y
+CONFIG_WLAN_RECORD_RX_PADDR=y
+CONFIG_QDF_TEST=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_FEATURE_WLM_STATS=y
+CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS_DISABLE=y

+ 387 - 0
configs/sun_gki_kiwi-v2_defconfig

@@ -0,0 +1,387 @@
+CONFIG_QCA_CLD_WLAN=y
+CONFIG_160MHZ_SUPPORT=y
+CONFIG_6G_SCAN_CHAN_SORT_ALGO=y
+CONFIG_ADAPTIVE_11R=y
+CONFIG_ANI_LEVEL_REQUEST=y
+CONFIG_AR900B=y
+CONFIG_ATH_11AC_TXCOMPACT=y
+CONFIG_ATH_BUS_PM=y
+CONFIG_ATH_PERF_PWR_OFFLOAD=y
+CONFIG_BAND_6GHZ=y
+CONFIG_BERYLLIUM=y
+CONFIG_CE_DISABLE_SRNG_TIMER_IRQ=y
+CONFIG_CFG_BMISS_OFFLOAD_MAX_VDEV=4
+CONFIG_CFG_MAX_STA_VDEVS=4
+CONFIG_CHECKSUM_OFFLOAD=y
+CONFIG_CHIP_VERSION=2
+CONFIG_CNSS_GENL_MODULE=y
+CONFIG_CNSS_KIWI=y
+CONFIG_CNSS_KIWI_V2=y
+CONFIG_CNSS_UTILS_MODULE=y
+CONFIG_CNSS_UTILS=y
+CONFIG_CONNECTIVITY_PKTLOG=y
+CONFIG_CONVERGED_P2P_ENABLE=y
+CONFIG_CP_STATS=y
+CONFIG_QCA_TARGET_IF_MLME=y
+CONFIG_DCS=y
+CONFIG_DDP_MON_RSSI_IN_DBM=y
+CONFIG_DEBUG_RX_RING_BUFFER=y
+CONFIG_DELIVERY_TO_STACK_STATUS_CHECK=y
+CONFIG_DESC_DUP_DETECT_DEBUG=y
+CONFIG_DEVICE_FORCE_WAKE_ENABLE=y
+CONFIG_DIRECT_BUF_RX_ENABLE=y
+CONFIG_DISABLE_CHANNEL_LIST=y
+CONFIG_DISABLE_EAPOL_INTRABSS_FWD=y
+CONFIG_DISABLE_STATUS_RING_TIMER_WAR=y
+CONFIG_DP_BE_WAR=y
+CONFIG_DP_CON_MON_MSI_ENABLED=y
+CONFIG_DP_CON_MON_MSI_SKIP_SET=y
+CONFIG_DP_FEATURE_HW_COOKIE_CONVERSION=y
+CONFIG_DP_HW_COOKIE_CONVERT_EXCEPTION=y
+CONFIG_DP_HW_TX_DELAY_STATS_ENABLE=y
+CONFIG_DP_INTR_POLL_BASED=y
+CONFIG_DP_LFR=y
+CONFIG_DP_MEM_PRE_ALLOC=y
+CONFIG_DP_PKT_ADD_TIMESTAMP=y
+CONFIG_DP_PKT_STATS_PER_LMAC=y
+CONFIG_DP_RX_BUFFER_POOL_ALLOC_THRES=5
+CONFIG_DP_RX_BUFFER_POOL_SIZE=128
+CONFIG_DP_RX_DROP_RAW_FRM=y
+CONFIG_DP_RX_PKT_NO_PEER_DELIVER=y
+CONFIG_DP_RX_SPECIAL_FRAME_NEED=y
+CONFIG_DP_TRACE=y
+CONFIG_DP_TRAFFIC_END_INDICATION=y
+CONFIG_DP_TXRX_SOC_ATTACH=y
+CONFIG_DP_USE_REDUCED_PEER_ID_FIELD_WIDTH=y
+CONFIG_DP_WAR_INVALID_FIRST_MSDU_FLAG=y
+CONFIG_DUP_RX_DESC_WAR=y
+CONFIG_DYNAMIC_RX_AGGREGATION=y
+CONFIG_EMULATION_2_0=y
+CONFIG_ENABLE_HAL_REG_WR_HISTORY=y
+CONFIG_ENABLE_HAL_SOC_STATS=y
+CONFIG_ENABLE_MTRACE_LOG=y
+CONFIG_ENABLE_SMMU_S1_TRANSLATION=y
+CONFIG_FEATURE_ACTIVE_TOS=y
+CONFIG_FEATURE_ALIGN_STATS_FROM_DP=y
+CONFIG_FEATURE_BECN_STATS=y
+CONFIG_FEATURE_BSS_TRANSITION=y
+CONFIG_FEATURE_BUS_BANDWIDTH_MGR=y
+CONFIG_FEATURE_CLUB_LL_STATS_AND_GET_STATION=y
+CONFIG_FEATURE_COEX=y
+CONFIG_FEATURE_CONCURRENCY_MATRIX=y
+CONFIG_FEATURE_DELAYED_PEER_OBJ_DESTROY=y
+CONFIG_FEATURE_DENYLIST_MGR=y
+CONFIG_FEATURE_EPPING=y
+CONFIG_FEATURE_FORCE_WAKE=y
+CONFIG_FEATURE_FW_LOG_PARSING=y
+CONFIG_FEATURE_GPIO_CFG=y
+CONFIG_FEATURE_HAL_DELAYED_REG_WRITE=y
+CONFIG_FEATURE_HTC_CREDIT_HISTORY=y
+CONFIG_FEATURE_INTEROP_ISSUES_AP=y
+CONFIG_FEATURE_MEMDUMP_ENABLE=y
+CONFIG_FEATURE_MONITOR_MODE_SUPPORT=y
+CONFIG_FEATURE_MSCS=y
+CONFIG_FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT=y
+CONFIG_FEATURE_OEM_DATA=y
+CONFIG_FEATURE_OTA_TEST=y
+CONFIG_FEATURE_P2P_LISTEN_OFFLOAD=y
+CONFIG_FEATURE_RADAR_HISTORY=y
+CONFIG_FEATURE_ROAM_DEBUG=y
+CONFIG_FEATURE_RSSI_MONITOR=y
+CONFIG_FEATURE_RX_LINKSPEED_ROAM_TRIGGER=y
+CONFIG_FEATURE_SAP_COND_CHAN_SWITCH=y
+CONFIG_FEATURE_SAR_LIMITS=y
+CONFIG_FEATURE_SET=y
+CONFIG_FEATURE_STATION_INFO=y
+CONFIG_FEATURE_STATS_EXT=y
+CONFIG_FEATURE_STATS_EXT_V2=y
+CONFIG_FEATURE_TSO=y
+CONFIG_FEATURE_TSO_STATS=y
+CONFIG_FEATURE_TX_POWER=y
+CONFIG_FEATURE_VDEV_OPS_WAKELOCK=y
+CONFIG_FEATURE_WLAN_LPHB=y
+CONFIG_FEATURE_WLAN_PRE_CAC=y
+CONFIG_FEATURE_WLAN_RA_FILTERING=y
+CONFIG_FEATURE_WLAN_SCAN_PNO=y
+CONFIG_FEATURE_WLAN_WAPI=y
+CONFIG_FIX_TXDMA_LIMITATION=y
+CONFIG_FOURTH_CONNECTION=y
+CONFIG_FW_THERMAL_THROTTLE=y
+CONFIG_GET_DRIVER_MODE=y
+CONFIG_GTK_OFFLOAD=y
+CONFIG_HAL_DISABLE_NON_BA_2K_JUMP_ERROR=y
+CONFIG_HANDLE_BC_EAP_TX_FRM=y
+CONFIG_HANDLE_RX_REROUTE_ERR=y
+CONFIG_HASTINGS_BT_WAR=y
+CONFIG_HDD_INIT_WITH_RTNL_LOCK=y
+CONFIG_HIF_PCI=y
+CONFIG_HIF_REG_WINDOW_SUPPORT=y
+CONFIG_HOST_OPCLASS=y
+CONFIG_HTT_PADDR64=y
+CONFIG_IPA_OPT_WIFI_DP=y
+CONFIG_IPA_SET_RESET_TX_DB_PA=y
+CONFIG_KIWI_HEADERS_DEF=y
+CONFIG_LFR_SUBNET_DETECTION=y
+CONFIG_LINUX_QCMBR=y
+CONFIG_LITTLE_ENDIAN=y
+CONFIG_LL_DP_SUPPORT=y
+CONFIG_LTE_COEX=y
+CONFIG_MARK_ICMP_REQ_TO_FW=y
+CONFIG_MAX_ALLOC_PAGE_SIZE=y
+CONFIG_MCC_TO_SCC_SWITCH=y
+CONFIG_MON_ENABLE_DROP_FOR_MAC=y
+CONFIG_MON_ENABLE_DROP_FOR_NON_MON_PMAC=y
+CONFIG_MORE_TX_DESC=y
+CONFIG_MULTI_CLIENT_LL_SUPPORT=y
+CONFIG_NO_RX_PKT_HDR_TLV=y
+CONFIG_OBSS_PD=y
+CONFIG_OFDM_SCRAMBLER_SEED=y
+CONFIG_PCI_LINK_STATUS_SANITY=y
+CONFIG_PCIE_GEN_SWITCH=y
+CONFIG_PEER_PROTECTED_ACCESS=y
+CONFIG_PKTLOG_HAS_SPECIFIC_DATA=y
+CONFIG_PLD_PCIE_CNSS_FLAG=y
+CONFIG_PLD_PCIE_INIT_FLAG=y
+CONFIG_POWER_MANAGEMENT_OFFLOAD=y
+CONFIG_PTT_SOCK_SVC_ENABLE=y
+CONFIG_QCA_DFS_BW_PUNCTURE=y
+CONFIG_QCA_GET_TSF_VIA_REG=y
+CONFIG_QCA_MONITOR_PKT_SUPPORT=y
+CONFIG_QCA_SUPPORT_TX_MIN_RATES_FOR_SPECIAL_FRAMES=y
+CONFIG_QCA_SUPPORT_TX_THROTTLE=y
+CONFIG_QCA_WIFI_FTM=y
+CONFIG_QCA_WIFI_KIWI=y
+CONFIG_QCA_WIFI_MONITOR_MODE_NO_MSDU_START_TLV_SUPPORT=y
+CONFIG_QCA_WIFI_QCA8074=y
+CONFIG_QCA_WIFI_QCA8074_VP=y
+CONFIG_QCACLD_FEATURE_APF=y
+CONFIG_QCACLD_FEATURE_FW_STATE=y
+CONFIG_QCACLD_FEATURE_GAP_LL_PS_MODE=y
+CONFIG_QCACLD_FEATURE_GREEN_AP=y
+CONFIG_QCACLD_FEATURE_NAN=y
+CONFIG_QCACLD_RX_DESC_MULTI_PAGE_ALLOC=y
+CONFIG_QCACLD_WLAN_CONNECTIVITY_DIAG_EVENT=y
+CONFIG_QCACLD_WLAN_LFR3=y
+CONFIG_QCOM_ESE=y
+CONFIG_QCOM_LTE_COEX=y
+CONFIG_QCOM_TDLS=y
+CONFIG_QCOM_VOWIFI_11R=y
+CONFIG_QMI_SUPPORT=y
+CONFIG_REG_CLIENT=y
+CONFIG_REMOVE_PKT_LOG=y
+CONFIG_REO_DESC_DEFER_FREE=y
+CONFIG_RX_DEFRAG_DO_NOT_REINJECT=y
+CONFIG_RX_DESC_SANITY_WAR=y
+CONFIG_RX_FISA=y
+CONFIG_RX_HASH_DEBUG=y
+CONFIG_RX_OL=y
+CONFIG_RXDMA_ERR_PKT_DROP=y
+CONFIG_SAE_SINGLE_PMK=y
+CONFIG_SAP_AVOID_ACS_FREQ_LIST=y
+CONFIG_SAP_DHCP_FW_IND=y
+CONFIG_SAR_SAFETY_FEATURE=y
+CONFIG_SCALE_INCLUDES=y
+CONFIG_SERIALIZE_QUEUE_SETUP=y
+CONFIG_SHADOW_V3=y
+CONFIG_SMMU_S1_UNMAP=y
+CONFIG_SOFTAP_CHANNEL_RANGE=y
+CONFIG_SUPPORT_11AX=y
+CONFIG_SYSTEM_PM_CHECK=y
+CONFIG_TARGET_11D_SCAN=y
+CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC=y
+CONFIG_THERMAL_STATS_SUPPORT=y
+CONFIG_TRACE_RECORD_FEATURE=y
+CONFIG_TSO_DEBUG_LOG_ENABLE=y
+CONFIG_TX_ADDR_INDEX_SEARCH=y
+CONFIG_TX_MULTI_TCL=y
+CONFIG_TX_MULTIQ_PER_AC=y
+CONFIG_TX_PER_PDEV_DESC_POOL=y
+CONFIG_TX_TID_OVERRIDE=y
+CONFIG_VERBOSE_DEBUG=y
+CONFIG_WAPI_BIG_ENDIAN=y
+CONFIG_WCNSS_MEM_PRE_ALLOC_MODULE=y
+CONFIG_WCNSS_MEM_PRE_ALLOC=y
+CONFIG_WDI_EVENT_ENABLE=y
+CONFIG_WDI3_IPA_OVER_GSI=y
+CONFIG_WIFI_MONITOR_SUPPORT=y
+CONFIG_WIFI_POS_CONVERGED=y
+CONFIG_WIFI_POS_PASN=y
+CONFIG_WINDOW_REG_PLD_LOCK_ENABLE=y
+CONFIG_WLAN_BCN_RECV_FEATURE=y
+CONFIG_WLAN_BMISS=y
+CONFIG_WLAN_CE_INTERRUPT_THRESHOLD_CONFIG=y
+CONFIG_WLAN_CFR_ENABLE=y
+CONFIG_WLAN_CLD_DEV_PM_QOS=y
+CONFIG_WLAN_CLD_PM_QOS=y
+CONFIG_WLAN_CONV_SPECTRAL_ENABLE=y
+CONFIG_WLAN_CUSTOM_DSCP_UP_MAP=y
+CONFIG_WLAN_DEBUG_CRASH_INJECT=y
+CONFIG_WLAN_DEBUG_LINK_VOTE=y
+CONFIG_WLAN_DEBUG_VERSION=y
+CONFIG_WLAN_DEBUGFS=y
+CONFIG_WLAN_DFS_MASTER_ENABLE=y
+CONFIG_WLAN_DFS_STATIC_MEM_ALLOC=y
+CONFIG_WLAN_DIAG_VERSION=y
+CONFIG_WLAN_DISABLE_EXPORT_SYMBOL=y
+CONFIG_WLAN_DL_MODES=y
+CONFIG_WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG=y
+CONFIG_WLAN_DP_DISABLE_TCL_STATUS_SRNG=y
+CONFIG_WLAN_DP_PENDING_MEM_FLUSH=y
+CONFIG_WLAN_DP_PER_RING_TYPE_CONFIG=y
+CONFIG_WLAN_DP_SRNG_USAGE_WM_TRACKING=y
+CONFIG_WLAN_DYNAMIC_CVM=y
+CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY=y
+CONFIG_WLAN_ENH_CFR_ENABLE=y
+CONFIG_WLAN_FEATURE_11AX=y
+CONFIG_WLAN_FEATURE_11BE=y
+CONFIG_WLAN_FEATURE_11BE_MLO=y
+CONFIG_WLAN_HDD_MULTI_VDEV_SINGLE_NDEV=y
+CONFIG_WLAN_FEATURE_ACTION_OUI=y
+CONFIG_WLAN_FEATURE_BIG_DATA_STATS=y
+CONFIG_WLAN_FEATURE_CAL_FAILURE_TRIGGER=y
+CONFIG_WLAN_FEATURE_COAP=y
+CONFIG_WLAN_FEATURE_COEX_DBAM=y
+CONFIG_WLAN_FEATURE_DFS_OFFLOAD=y
+CONFIG_WLAN_FEATURE_DISA=y
+CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH=y
+CONFIG_WLAN_FEATURE_DP_EVENT_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_RX_THREADS=y
+CONFIG_WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE=y
+CONFIG_WLAN_FEATURE_ELNA=y
+CONFIG_WLAN_FEATURE_FILS=y
+CONFIG_WLAN_FEATURE_FIPS=y
+CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST=y
+CONFIG_WLAN_FEATURE_ICMP_OFFLOAD=y
+CONFIG_WLAN_FEATURE_IGMP_OFFLOAD=y
+CONFIG_WLAN_FEATURE_LINK_LAYER_STATS=y
+CONFIG_WLAN_FEATURE_LPSS=y
+CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB=y
+CONFIG_WLAN_FEATURE_MBSSID=y
+CONFIG_WLAN_FEATURE_MCC_QUOTA=y
+CONFIG_WLAN_FEATURE_MDNS_OFFLOAD=y
+CONFIG_WLAN_FEATURE_MEDIUM_ASSESS=y
+CONFIG_WLAN_FEATURE_MIB_STATS=y
+CONFIG_WLAN_FEATURE_NEAR_FULL_IRQ=y
+CONFIG_WLAN_FEATURE_P2P_DEBUG=y
+CONFIG_WLAN_FEATURE_P2P_P2P_STA=y
+CONFIG_WLAN_FEATURE_PACKET_FILTERING=y
+CONFIG_WLAN_FEATURE_PEER_TXQ_FLUSH_CONF=y
+CONFIG_WLAN_FEATURE_ROAM_INFO_STATS=y
+CONFIG_WLAN_FEATURE_RX_BUFFER_POOL=y
+CONFIG_WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT=y
+CONFIG_WLAN_FEATURE_SAE=y
+CONFIG_WLAN_FEATURE_SAP_ACS_OPTIMIZE=y
+CONFIG_WLAN_FEATURE_SARV1_TO_SARV2=y
+CONFIG_WLAN_FEATURE_SR=y
+CONFIG_WLAN_FEATURE_TWT=y
+CONFIG_WLAN_FEATURE_WMI_DIAG_OVER_CE7=y
+CONFIG_WLAN_FREQ_LIST=y
+CONFIG_WLAN_FW_OFFLOAD=y
+CONFIG_WLAN_GTX_BW_MASK=y
+CONFIG_WLAN_HANG_EVENT=y
+CONFIG_WLAN_LOG_DEBUG=y
+CONFIG_WLAN_LOG_ENTER=y
+CONFIG_WLAN_LOG_ERROR=y
+CONFIG_WLAN_LOG_EXIT=y
+CONFIG_WLAN_LOG_FATAL=y
+CONFIG_WLAN_LOG_INFO=y
+CONFIG_WLAN_LOG_WARN=y
+CONFIG_WLAN_LOGGING_SOCK_SVC=y
+CONFIG_WLAN_MWS_INFO_DEBUGFS=y
+CONFIG_WLAN_NAPI=y
+CONFIG_WLAN_NS_OFFLOAD=y
+CONFIG_WLAN_NUD_TRACKING=y
+CONFIG_WLAN_OFFLOAD_PACKETS=y
+CONFIG_WLAN_OPEN_P2P_INTERFACE=y
+CONFIG_WLAN_PDEV_VDEV_SEND_MULTI_PARAM=y
+CONFIG_WLAN_PMO_ENABLE=y
+CONFIG_WLAN_POLICY_MGR_ENABLE=y
+CONFIG_WLAN_POWER_DEBUG=y
+CONFIG_WLAN_REASSOC=y
+CONFIG_WLAN_RX_MON_PARSE_CMN_USER_INFO=y
+CONFIG_WLAN_SCAN_DISABLE=y
+CONFIG_WLAN_SKIP_BAR_UPDATE=y
+CONFIG_WLAN_SUPPORT_DATA_STALL=y
+CONFIG_WLAN_SYNC_TSF=y
+CONFIG_WLAN_SYNC_TSF_PLUS=y
+CONFIG_WLAN_SYNC_TSF_TIMER=y
+CONFIG_WLAN_SYSFS=y
+CONFIG_WLAN_SYSFS_CHANNEL=y
+CONFIG_WLAN_SYSFS_CONNECT_INFO=y
+CONFIG_WLAN_SYSFS_DCM=y
+CONFIG_WLAN_SYSFS_DFSNOL=y
+CONFIG_WLAN_SYSFS_DP_STATS=y
+CONFIG_WLAN_SYSFS_DP_TRACE=y
+CONFIG_WLAN_SYSFS_EHT_RATE=y
+CONFIG_WLAN_SYSFS_FW_MODE_CFG=y
+CONFIG_WLAN_SYSFS_HE_BSS_COLOR=y
+CONFIG_WLAN_SYSFS_LOG_BUFFER=y
+CONFIG_WLAN_SYSFS_MEM_STATS=y
+CONFIG_WLAN_SYSFS_MONITOR_MODE_CHANNEL=y
+CONFIG_WLAN_SYSFS_RADAR=y
+CONFIG_WLAN_SYSFS_RANGE_EXT=y
+CONFIG_WLAN_SYSFS_RTS_CTS=y
+CONFIG_WLAN_SYSFS_SCAN_CFG=y
+CONFIG_WLAN_SYSFS_STA_INFO=y
+CONFIG_WLAN_SYSFS_STATS=y
+CONFIG_WLAN_SYSFS_TDLS_PEERS=y
+CONFIG_WLAN_SYSFS_TEMPERATURE=y
+CONFIG_WLAN_SYSFS_TX_STBC=y
+CONFIG_WLAN_SYSFS_WLAN_DBG=y
+CONFIG_WLAN_THERMAL_CFG=y
+CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT=y
+CONFIG_WLAN_TRACEPOINTS=y
+CONFIG_WLAN_TSF_UPLINK_DELAY=y
+CONFIG_WLAN_TWT_CONVERGED=y
+CONFIG_WLAN_TWT_SAP_PDEV_COUNT=y
+CONFIG_WLAN_TWT_SAP_STA_COUNT=y
+CONFIG_WLAN_TX_FLOW_CONTROL_V2=y
+CONFIG_WLAN_TXRX_FW_ST_RST=y
+CONFIG_WLAN_TXRX_FW_STATS=y
+CONFIG_WLAN_TXRX_STATS=y
+CONFIG_WLAN_UMAC_MLO_MAX_DEV=3
+CONFIG_WLAN_VENDOR_HANDOFF_CONTROL=y
+CONFIG_WLAN_WBUFF=y
+CONFIG_WLAN_WOW_ITO=y
+CONFIG_WLAN_WOWL_ADD_PTRN=y
+CONFIG_WLAN_WOWL_DEL_PTRN=y
+CONFIG_WMI_BCN_OFFLOAD=y
+CONFIG_WMI_CMD_STRINGS=y
+CONFIG_WMI_CONCURRENCY_SUPPORT=y
+CONFIG_WMI_DBR_SUPPORT=y
+CONFIG_WMI_INTERFACE_EVENT_LOGGING=y
+CONFIG_WMI_ROAM_SUPPORT=y
+CONFIG_WMI_SEND_RECV_QMI=y
+CONFIG_WMI_STA_SUPPORT=y
+CONFIG_CFG80211_EXTERNAL_AUTH_MLO_SUPPORT=y
+CONFIG_CFG80211_EXT_FEATURE_SECURE_NAN=y
+CONFIG_WLAN_CTRL_NAME="wlan"
+CONFIG_MULTI_IF_NAME="kiwi_v2"
+CONFIG_NL80211_TESTMODE=y
+CONFIG_ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST=y
+CONFIG_WLAN_HOST_ARCH_ARM=y
+CONFIG_ARCH_MSM=y
+CONFIG_WLAN_TX_MON_2_0_Y_WLAN_DP_LOCAL_PKT_CAPTURE=y
+CONFIG_WLAN_DP_LOCAL_PKT_CAPTURE=y
+CONFIG_DP_TX_PACKET_INSPECT_FOR_ILP=y
+CONFIG_NUM_SOC_PERF_CLUSTER=2
+CONFIG_WIFI_MONITOR_SUPPORT_Y_WLAN_TX_MON_2_0=y
+CONFIG_WLAN_OPEN_SOURCE=y
+CONFIG_QCA_WIFI_FTM_NL80211=y
+CONFIG_CFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT=y
+CONFIG_DP_MULTIPASS_SUPPORT=y
+CONFIG_WLAN_DP_VDEV_NO_SELF_PEER=y
+CONFIG_WLAN_FEATURE_AFFINITY_MGR=y
+CONFIG_DP_MLO_LINK_STATS_SUPPORT=y
+CONFIG_HIF_DEBUG=y
+CONFIG_WLAN_OBJMGR_DEBUG=y
+CONFIG_WLAN_OBJMGR_REF_ID_TRACE=y
+CONFIG_WLAN_WARN_ON_ASSERT=y
+CONFIG_WLAN_DP_FEATURE_DEFERRED_REO_QDESC_DESTROY=y
+CONFIG_PANIC_ON_BUG=y
+CONFIG_FEATURE_WLAN_CH_AVOID_EXT=y
+CONFIG_CNSS2_SSR_DRIVER_DUMP=y
+CONFIG_BUS_AUTO_SUSPEND=y
+CONFIG_CNSS_OUT_OF_TREE=y
+CONFIG_SMP=y
+CONFIG_RPS=y

+ 385 - 0
configs/sun_gki_peach_defconfig

@@ -0,0 +1,385 @@
+CONFIG_QCA_CLD_WLAN=y
+CONFIG_160MHZ_SUPPORT=y
+CONFIG_6G_SCAN_CHAN_SORT_ALGO=y
+CONFIG_ADAPTIVE_11R=y
+CONFIG_ANI_LEVEL_REQUEST=y
+CONFIG_AR900B=y
+CONFIG_ATH_11AC_TXCOMPACT=y
+CONFIG_ATH_BUS_PM=y
+CONFIG_ATH_PERF_PWR_OFFLOAD=y
+CONFIG_BAND_6GHZ=y
+CONFIG_BERYLLIUM=y
+CONFIG_CE_DISABLE_SRNG_TIMER_IRQ=y
+CONFIG_CFG_BMISS_OFFLOAD_MAX_VDEV=4
+CONFIG_CFG_MAX_STA_VDEVS=4
+CONFIG_CHECKSUM_OFFLOAD=y
+CONFIG_CHIP_VERSION=1
+CONFIG_CNSS_GENL_MODULE=y
+CONFIG_CNSS_KIWI=y
+CONFIG_CNSS_KIWI_V2=y
+CONFIG_CNSS_PEACH=y
+CONFIG_CNSS_UTILS_MODULE=y
+CONFIG_CNSS_UTILS=y
+CONFIG_CONNECTIVITY_PKTLOG=y
+CONFIG_CONVERGED_P2P_ENABLE=y
+CONFIG_CP_STATS=y
+CONFIG_QCA_TARGET_IF_MLME=y
+CONFIG_DCS=y
+CONFIG_DDP_MON_RSSI_IN_DBM=y
+CONFIG_DEBUG_RX_RING_BUFFER=y
+CONFIG_DELIVERY_TO_STACK_STATUS_CHECK=y
+CONFIG_DESC_DUP_DETECT_DEBUG=y
+CONFIG_DEVICE_FORCE_WAKE_ENABLE=y
+CONFIG_DIRECT_BUF_RX_ENABLE=y
+CONFIG_DISABLE_CHANNEL_LIST=y
+CONFIG_DISABLE_EAPOL_INTRABSS_FWD=y
+CONFIG_DISABLE_STATUS_RING_TIMER_WAR=y
+CONFIG_DP_BE_WAR=y
+CONFIG_DP_CON_MON_MSI_ENABLED=y
+CONFIG_DP_CON_MON_MSI_SKIP_SET=y
+CONFIG_DP_FEATURE_HW_COOKIE_CONVERSION=y
+CONFIG_DP_HW_COOKIE_CONVERT_EXCEPTION=y
+CONFIG_DP_HW_TX_DELAY_STATS_ENABLE=y
+CONFIG_DP_INTR_POLL_BASED=y
+CONFIG_DP_LFR=y
+CONFIG_DP_MEM_PRE_ALLOC=y
+CONFIG_DP_PKT_ADD_TIMESTAMP=y
+CONFIG_DP_PKT_STATS_PER_LMAC=y
+CONFIG_DP_RX_BUFFER_POOL_ALLOC_THRES=5
+CONFIG_DP_RX_BUFFER_POOL_SIZE=128
+CONFIG_DP_RX_DROP_RAW_FRM=y
+CONFIG_DP_RX_PKT_NO_PEER_DELIVER=y
+CONFIG_DP_RX_SPECIAL_FRAME_NEED=y
+CONFIG_DP_TRACE=y
+CONFIG_DP_TRAFFIC_END_INDICATION=y
+CONFIG_DP_TXRX_SOC_ATTACH=y
+CONFIG_DP_USE_REDUCED_PEER_ID_FIELD_WIDTH=y
+CONFIG_DP_WAR_INVALID_FIRST_MSDU_FLAG=y
+CONFIG_DUP_RX_DESC_WAR=y
+CONFIG_DYNAMIC_RX_AGGREGATION=y
+CONFIG_EMULATION_2_0=y
+CONFIG_ENABLE_HAL_REG_WR_HISTORY=y
+CONFIG_ENABLE_HAL_SOC_STATS=y
+CONFIG_ENABLE_MTRACE_LOG=y
+CONFIG_ENABLE_SMMU_S1_TRANSLATION=y
+CONFIG_FEATURE_ACTIVE_TOS=y
+CONFIG_FEATURE_ALIGN_STATS_FROM_DP=y
+CONFIG_FEATURE_BECN_STATS=y
+CONFIG_FEATURE_BSS_TRANSITION=y
+CONFIG_FEATURE_BUS_BANDWIDTH_MGR=y
+CONFIG_FEATURE_CLUB_LL_STATS_AND_GET_STATION=y
+CONFIG_FEATURE_COEX=y
+CONFIG_FEATURE_CONCURRENCY_MATRIX=y
+CONFIG_FEATURE_DELAYED_PEER_OBJ_DESTROY=y
+CONFIG_FEATURE_DENYLIST_MGR=y
+CONFIG_FEATURE_EPPING=y
+CONFIG_FEATURE_FORCE_WAKE=y
+CONFIG_FEATURE_FW_LOG_PARSING=y
+CONFIG_FEATURE_GPIO_CFG=y
+CONFIG_FEATURE_HAL_DELAYED_REG_WRITE=y
+CONFIG_FEATURE_HTC_CREDIT_HISTORY=y
+CONFIG_FEATURE_INTEROP_ISSUES_AP=y
+CONFIG_FEATURE_MEMDUMP_ENABLE=y
+CONFIG_FEATURE_MONITOR_MODE_SUPPORT=y
+CONFIG_FEATURE_MSCS=y
+CONFIG_FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT=y
+CONFIG_FEATURE_OEM_DATA=y
+CONFIG_FEATURE_OTA_TEST=y
+CONFIG_FEATURE_P2P_LISTEN_OFFLOAD=y
+CONFIG_FEATURE_RADAR_HISTORY=y
+CONFIG_FEATURE_ROAM_DEBUG=y
+CONFIG_FEATURE_RSSI_MONITOR=y
+CONFIG_FEATURE_RX_LINKSPEED_ROAM_TRIGGER=y
+CONFIG_FEATURE_SAP_COND_CHAN_SWITCH=y
+CONFIG_FEATURE_SAR_LIMITS=y
+CONFIG_FEATURE_SET=y
+CONFIG_FEATURE_STATION_INFO=y
+CONFIG_FEATURE_STATS_EXT=y
+CONFIG_FEATURE_STATS_EXT_V2=y
+CONFIG_FEATURE_TSO=y
+CONFIG_FEATURE_TSO_STATS=y
+CONFIG_FEATURE_TX_POWER=y
+CONFIG_FEATURE_VDEV_OPS_WAKELOCK=y
+CONFIG_FEATURE_WLAN_LPHB=y
+CONFIG_FEATURE_WLAN_PRE_CAC=y
+CONFIG_FEATURE_WLAN_RA_FILTERING=y
+CONFIG_FEATURE_WLAN_SCAN_PNO=y
+CONFIG_FEATURE_WLAN_WAPI=y
+CONFIG_FIX_TXDMA_LIMITATION=y
+CONFIG_FOURTH_CONNECTION=y
+CONFIG_FW_THERMAL_THROTTLE=y
+CONFIG_GET_DRIVER_MODE=y
+CONFIG_GTK_OFFLOAD=y
+CONFIG_HAL_DISABLE_NON_BA_2K_JUMP_ERROR=y
+CONFIG_HANDLE_BC_EAP_TX_FRM=y
+CONFIG_HANDLE_RX_REROUTE_ERR=y
+CONFIG_HASTINGS_BT_WAR=y
+CONFIG_HDD_INIT_WITH_RTNL_LOCK=y
+CONFIG_HIF_PCI=y
+CONFIG_HIF_REG_WINDOW_SUPPORT=y
+CONFIG_HOST_OPCLASS=y
+CONFIG_HTT_PADDR64=y
+CONFIG_IPA_OPT_WIFI_DP=y
+CONFIG_IPA_SET_RESET_TX_DB_PA=y
+CONFIG_KIWI_HEADERS_DEF=y
+CONFIG_LFR_SUBNET_DETECTION=y
+CONFIG_LINUX_QCMBR=y
+CONFIG_LITTLE_ENDIAN=y
+CONFIG_LL_DP_SUPPORT=y
+CONFIG_LTE_COEX=y
+CONFIG_MARK_ICMP_REQ_TO_FW=y
+CONFIG_MAX_ALLOC_PAGE_SIZE=y
+CONFIG_MCC_TO_SCC_SWITCH=y
+CONFIG_MON_ENABLE_DROP_FOR_MAC=y
+CONFIG_MON_ENABLE_DROP_FOR_NON_MON_PMAC=y
+CONFIG_MORE_TX_DESC=y
+CONFIG_MULTI_CLIENT_LL_SUPPORT=y
+CONFIG_NO_RX_PKT_HDR_TLV=y
+CONFIG_OBSS_PD=y
+CONFIG_OFDM_SCRAMBLER_SEED=y
+CONFIG_PCI_LINK_STATUS_SANITY=y
+CONFIG_PCIE_GEN_SWITCH=y
+CONFIG_PEER_PROTECTED_ACCESS=y
+CONFIG_PKTLOG_HAS_SPECIFIC_DATA=y
+CONFIG_PLD_PCIE_CNSS_FLAG=y
+CONFIG_PLD_PCIE_INIT_FLAG=y
+CONFIG_POWER_MANAGEMENT_OFFLOAD=y
+CONFIG_PTT_SOCK_SVC_ENABLE=y
+CONFIG_QCA_DFS_BW_PUNCTURE=y
+CONFIG_QCA_GET_TSF_VIA_REG=y
+CONFIG_QCA_MONITOR_PKT_SUPPORT=y
+CONFIG_QCA_SUPPORT_TX_MIN_RATES_FOR_SPECIAL_FRAMES=y
+CONFIG_QCA_SUPPORT_TX_THROTTLE=y
+CONFIG_QCA_WIFI_FTM=y
+CONFIG_QCA_WIFI_KIWI=y
+CONFIG_QCA_WIFI_MONITOR_MODE_NO_MSDU_START_TLV_SUPPORT=y
+CONFIG_QCA_WIFI_QCA8074=y
+CONFIG_QCA_WIFI_QCA8074_VP=y
+CONFIG_QCACLD_FEATURE_APF=y
+CONFIG_QCACLD_FEATURE_FW_STATE=y
+CONFIG_QCACLD_FEATURE_GAP_LL_PS_MODE=y
+CONFIG_QCACLD_FEATURE_GREEN_AP=y
+CONFIG_QCACLD_FEATURE_NAN=y
+CONFIG_QCACLD_RX_DESC_MULTI_PAGE_ALLOC=y
+CONFIG_QCACLD_WLAN_CONNECTIVITY_DIAG_EVENT=y
+CONFIG_QCACLD_WLAN_LFR3=y
+CONFIG_QCOM_ESE=y
+CONFIG_QCOM_LTE_COEX=y
+CONFIG_QCOM_TDLS=y
+CONFIG_QCOM_VOWIFI_11R=y
+CONFIG_QMI_SUPPORT=y
+CONFIG_REG_CLIENT=y
+CONFIG_REMOVE_PKT_LOG=y
+CONFIG_REO_DESC_DEFER_FREE=y
+CONFIG_RX_DEFRAG_DO_NOT_REINJECT=y
+CONFIG_RX_DESC_SANITY_WAR=y
+CONFIG_RX_FISA=y
+CONFIG_RX_HASH_DEBUG=y
+CONFIG_RX_OL=y
+CONFIG_RXDMA_ERR_PKT_DROP=y
+CONFIG_SAE_SINGLE_PMK=y
+CONFIG_SAP_AVOID_ACS_FREQ_LIST=y
+CONFIG_SAP_DHCP_FW_IND=y
+CONFIG_SAR_SAFETY_FEATURE=y
+CONFIG_SCALE_INCLUDES=y
+CONFIG_SERIALIZE_QUEUE_SETUP=y
+CONFIG_SHADOW_V3=y
+CONFIG_SMMU_S1_UNMAP=y
+CONFIG_SOFTAP_CHANNEL_RANGE=y
+CONFIG_SUPPORT_11AX=y
+CONFIG_SYSTEM_PM_CHECK=y
+CONFIG_TARGET_11D_SCAN=y
+CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC=y
+CONFIG_THERMAL_STATS_SUPPORT=y
+CONFIG_TRACE_RECORD_FEATURE=y
+CONFIG_TSO_DEBUG_LOG_ENABLE=y
+CONFIG_TX_ADDR_INDEX_SEARCH=y
+CONFIG_TX_MULTI_TCL=y
+CONFIG_TX_MULTIQ_PER_AC=y
+CONFIG_TX_PER_PDEV_DESC_POOL=y
+CONFIG_TX_TID_OVERRIDE=y
+CONFIG_VERBOSE_DEBUG=y
+CONFIG_WAPI_BIG_ENDIAN=y
+CONFIG_WCNSS_MEM_PRE_ALLOC_MODULE=y
+CONFIG_WCNSS_MEM_PRE_ALLOC=y
+CONFIG_WDI_EVENT_ENABLE=y
+CONFIG_WDI3_IPA_OVER_GSI=y
+CONFIG_WIFI_MONITOR_SUPPORT=y
+CONFIG_WIFI_POS_CONVERGED=y
+CONFIG_WIFI_POS_PASN=y
+CONFIG_WINDOW_REG_PLD_LOCK_ENABLE=y
+CONFIG_WLAN_BCN_RECV_FEATURE=y
+CONFIG_WLAN_BMISS=y
+CONFIG_WLAN_CE_INTERRUPT_THRESHOLD_CONFIG=y
+CONFIG_WLAN_CFR_ENABLE=y
+CONFIG_WLAN_CLD_DEV_PM_QOS=y
+CONFIG_WLAN_CLD_PM_QOS=y
+CONFIG_WLAN_CONV_SPECTRAL_ENABLE=y
+CONFIG_WLAN_CUSTOM_DSCP_UP_MAP=y
+CONFIG_WLAN_DEBUG_CRASH_INJECT=y
+CONFIG_WLAN_DEBUG_LINK_VOTE=y
+CONFIG_WLAN_DEBUG_VERSION=y
+CONFIG_WLAN_DEBUGFS=y
+CONFIG_WLAN_DFS_MASTER_ENABLE=y
+CONFIG_WLAN_DFS_STATIC_MEM_ALLOC=y
+CONFIG_WLAN_DIAG_VERSION=y
+CONFIG_WLAN_DISABLE_EXPORT_SYMBOL=y
+CONFIG_WLAN_DL_MODES=y
+CONFIG_WLAN_DP_DISABLE_TCL_CMD_CRED_SRNG=y
+CONFIG_WLAN_DP_DISABLE_TCL_STATUS_SRNG=y
+CONFIG_WLAN_DP_PENDING_MEM_FLUSH=y
+CONFIG_WLAN_DP_PER_RING_TYPE_CONFIG=y
+CONFIG_WLAN_DP_SRNG_USAGE_WM_TRACKING=y
+CONFIG_WLAN_DYNAMIC_CVM=y
+CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY=y
+CONFIG_WLAN_ENH_CFR_ENABLE=y
+CONFIG_WLAN_FEATURE_11AX=y
+CONFIG_WLAN_FEATURE_11BE=y
+CONFIG_WLAN_FEATURE_11BE_MLO=y
+CONFIG_WLAN_HDD_MULTI_VDEV_SINGLE_NDEV=y
+CONFIG_WLAN_FEATURE_ACTION_OUI=y
+CONFIG_WLAN_FEATURE_BIG_DATA_STATS=y
+CONFIG_WLAN_FEATURE_CAL_FAILURE_TRIGGER=y
+CONFIG_WLAN_FEATURE_COAP=y
+CONFIG_WLAN_FEATURE_COEX_DBAM=y
+CONFIG_WLAN_FEATURE_DFS_OFFLOAD=y
+CONFIG_WLAN_FEATURE_DISA=y
+CONFIG_WLAN_FEATURE_DP_BUS_BANDWIDTH=y
+CONFIG_WLAN_FEATURE_DP_EVENT_HISTORY=y
+CONFIG_WLAN_FEATURE_DP_RX_THREADS=y
+CONFIG_WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE=y
+CONFIG_WLAN_FEATURE_ELNA=y
+CONFIG_WLAN_FEATURE_FILS=y
+CONFIG_WLAN_FEATURE_FIPS=y
+CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST=y
+CONFIG_WLAN_FEATURE_ICMP_OFFLOAD=y
+CONFIG_WLAN_FEATURE_IGMP_OFFLOAD=y
+CONFIG_WLAN_FEATURE_LINK_LAYER_STATS=y
+CONFIG_WLAN_FEATURE_LPSS=y
+CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB=y
+CONFIG_WLAN_FEATURE_MBSSID=y
+CONFIG_WLAN_FEATURE_MCC_QUOTA=y
+CONFIG_WLAN_FEATURE_MDNS_OFFLOAD=y
+CONFIG_WLAN_FEATURE_MEDIUM_ASSESS=y
+CONFIG_WLAN_FEATURE_MIB_STATS=y
+CONFIG_WLAN_FEATURE_NEAR_FULL_IRQ=y
+CONFIG_WLAN_FEATURE_P2P_DEBUG=y
+CONFIG_WLAN_FEATURE_P2P_P2P_STA=y
+CONFIG_WLAN_FEATURE_PACKET_FILTERING=y
+CONFIG_WLAN_FEATURE_PEER_TXQ_FLUSH_CONF=y
+CONFIG_WLAN_FEATURE_ROAM_INFO_STATS=y
+CONFIG_WLAN_FEATURE_RX_BUFFER_POOL=y
+CONFIG_WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT=y
+CONFIG_WLAN_FEATURE_SAE=y
+CONFIG_WLAN_FEATURE_SAP_ACS_OPTIMIZE=y
+CONFIG_WLAN_FEATURE_SARV1_TO_SARV2=y
+CONFIG_WLAN_FEATURE_SR=y
+CONFIG_WLAN_FEATURE_TWT=y
+CONFIG_WLAN_FEATURE_WMI_DIAG_OVER_CE7=y
+CONFIG_WLAN_FREQ_LIST=y
+CONFIG_WLAN_FW_OFFLOAD=y
+CONFIG_WLAN_GTX_BW_MASK=y
+CONFIG_WLAN_HANG_EVENT=y
+CONFIG_WLAN_LOG_DEBUG=y
+CONFIG_WLAN_LOG_ENTER=y
+CONFIG_WLAN_LOG_ERROR=y
+CONFIG_WLAN_LOG_EXIT=y
+CONFIG_WLAN_LOG_FATAL=y
+CONFIG_WLAN_LOG_INFO=y
+CONFIG_WLAN_LOG_WARN=y
+CONFIG_WLAN_LOGGING_SOCK_SVC=y
+CONFIG_WLAN_MWS_INFO_DEBUGFS=y
+CONFIG_WLAN_NAPI=y
+CONFIG_WLAN_NS_OFFLOAD=y
+CONFIG_WLAN_NUD_TRACKING=y
+CONFIG_WLAN_OFFLOAD_PACKETS=y
+CONFIG_WLAN_OPEN_P2P_INTERFACE=y
+CONFIG_WLAN_PDEV_VDEV_SEND_MULTI_PARAM=y
+CONFIG_WLAN_PMO_ENABLE=y
+CONFIG_WLAN_POLICY_MGR_ENABLE=y
+CONFIG_WLAN_POWER_DEBUG=y
+CONFIG_WLAN_REASSOC=y
+CONFIG_WLAN_RX_MON_PARSE_CMN_USER_INFO=y
+CONFIG_WLAN_SCAN_DISABLE=y
+CONFIG_WLAN_SKIP_BAR_UPDATE=y
+CONFIG_WLAN_SUPPORT_DATA_STALL=y
+CONFIG_WLAN_SYNC_TSF=y
+CONFIG_WLAN_SYNC_TSF_PLUS=y
+CONFIG_WLAN_SYNC_TSF_TIMER=y
+CONFIG_WLAN_SYSFS=y
+CONFIG_WLAN_SYSFS_CHANNEL=y
+CONFIG_WLAN_SYSFS_CONNECT_INFO=y
+CONFIG_WLAN_SYSFS_DCM=y
+CONFIG_WLAN_SYSFS_DFSNOL=y
+CONFIG_WLAN_SYSFS_DP_STATS=y
+CONFIG_WLAN_SYSFS_DP_TRACE=y
+CONFIG_WLAN_SYSFS_EHT_RATE=y
+CONFIG_WLAN_SYSFS_FW_MODE_CFG=y
+CONFIG_WLAN_SYSFS_HE_BSS_COLOR=y
+CONFIG_WLAN_SYSFS_LOG_BUFFER=y
+CONFIG_WLAN_SYSFS_MEM_STATS=y
+CONFIG_WLAN_SYSFS_MONITOR_MODE_CHANNEL=y
+CONFIG_WLAN_SYSFS_RADAR=y
+CONFIG_WLAN_SYSFS_RANGE_EXT=y
+CONFIG_WLAN_SYSFS_RTS_CTS=y
+CONFIG_WLAN_SYSFS_SCAN_CFG=y
+CONFIG_WLAN_SYSFS_STA_INFO=y
+CONFIG_WLAN_SYSFS_STATS=y
+CONFIG_WLAN_SYSFS_TDLS_PEERS=y
+CONFIG_WLAN_SYSFS_TEMPERATURE=y
+CONFIG_WLAN_SYSFS_TX_STBC=y
+CONFIG_WLAN_SYSFS_WLAN_DBG=y
+CONFIG_WLAN_THERMAL_CFG=y
+CONFIG_WLAN_THERMAL_MULTI_CLIENT_SUPPORT=y
+CONFIG_WLAN_TRACEPOINTS=y
+CONFIG_WLAN_TSF_UPLINK_DELAY=y
+CONFIG_WLAN_TWT_CONVERGED=y
+CONFIG_WLAN_TWT_SAP_PDEV_COUNT=y
+CONFIG_WLAN_TWT_SAP_STA_COUNT=y
+CONFIG_WLAN_TX_FLOW_CONTROL_V2=y
+CONFIG_WLAN_TXRX_FW_ST_RST=y
+CONFIG_WLAN_TXRX_FW_STATS=y
+CONFIG_WLAN_TXRX_STATS=y
+CONFIG_WLAN_UMAC_MLO_MAX_DEV=3
+CONFIG_WLAN_VENDOR_HANDOFF_CONTROL=y
+CONFIG_WLAN_WBUFF=y
+CONFIG_WLAN_WOW_ITO=y
+CONFIG_WLAN_WOWL_ADD_PTRN=y
+CONFIG_WLAN_WOWL_DEL_PTRN=y
+CONFIG_WMI_BCN_OFFLOAD=y
+CONFIG_WMI_CMD_STRINGS=y
+CONFIG_WMI_CONCURRENCY_SUPPORT=y
+CONFIG_WMI_DBR_SUPPORT=y
+CONFIG_WMI_INTERFACE_EVENT_LOGGING=y
+CONFIG_WMI_ROAM_SUPPORT=y
+CONFIG_WMI_SEND_RECV_QMI=y
+CONFIG_WMI_STA_SUPPORT=y
+CONFIG_CFG80211_EXTERNAL_AUTH_MLO_SUPPORT=y
+CONFIG_CFG80211_EXT_FEATURE_SECURE_NAN=y
+CONFIG_WLAN_CTRL_NAME="wlan"
+CONFIG_MULTI_IF_NAME="peach"
+CONFIG_NL80211_TESTMODE=y
+CONFIG_ENABLE_CE4_COMP_DISABLE_HTT_HTC_MISC_LIST=y
+CONFIG_WLAN_HOST_ARCH_ARM=y
+CONFIG_ARCH_MSM=y
+CONFIG_DP_TX_PACKET_INSPECT_FOR_ILP=y
+CONFIG_NUM_SOC_PERF_CLUSTER=2
+CONFIG_WLAN_OPEN_SOURCE=y
+CONFIG_QCA_WIFI_FTM_NL80211=y
+CONFIG_CFG80211_MLD_AP_STA_CONNECT_UPSTREAM_SUPPORT=y
+CONFIG_DP_MULTIPASS_SUPPORT=y
+CONFIG_WLAN_DP_VDEV_NO_SELF_PEER=y
+CONFIG_WLAN_FEATURE_AFFINITY_MGR=y
+CONFIG_DP_MLO_LINK_STATS_SUPPORT=y
+CONFIG_HIF_DEBUG=y
+CONFIG_WLAN_OBJMGR_DEBUG=y
+CONFIG_WLAN_OBJMGR_REF_ID_TRACE=y
+CONFIG_WLAN_WARN_ON_ASSERT=y
+CONFIG_WLAN_DP_FEATURE_DEFERRED_REO_QDESC_DESTROY=y
+CONFIG_PANIC_ON_BUG=y
+CONFIG_FEATURE_WLAN_CH_AVOID_EXT=y
+CONFIG_CNSS2_SSR_DRIVER_DUMP=y
+CONFIG_BUS_AUTO_SUSPEND=y
+CONFIG_CNSS_OUT_OF_TREE=y
+CONFIG_SMP=y
+CONFIG_RPS=y

+ 9 - 0
configs/wcn6450_defconfig

@@ -580,6 +580,9 @@ CONFIG_WIFI_POS_LEGACY := y
 endif
 
 CONFIG_CP_STATS := y
+
+CONFIG_QCA_TARGET_IF_MLME := y
+
 CONFIG_FEATURE_INTEROP_ISSUES_AP := y
 
 CONFIG_FEATURE_WLAN_WAPI := y
@@ -768,6 +771,8 @@ CONFIG_DP_RX_REFILL_BUFF_POOL_SIZE := 2048
 CONFIG_DP_RX_REFILL_THRD_THRESHOLD := 512
 CONFIG_DP_SWLM := y
 
+CONFIG_WLAN_FEATURE_CE_RX_BUFFER_REUSE := y
+
 #Enable Hang Event
 CONFIG_WLAN_HANG_EVENT := y
 
@@ -800,6 +805,10 @@ CONFIG_BYPASS_WDS_OL_OPS := y
 CONFIG_WDS_CONV_TARGET_IF_OPS_ENABLE := y
 endif
 
+ifeq ($(CONFIG_WLAN_FEATURE_CE_RX_BUFFER_REUSE), y)
+CONFIG_WLAN_WBUFF := y
+endif
+
 CONFIG_WLAN_FEATURE_SAP_ACS_OPTIMIZE := y
 
 # Enable sending DSCP-TID map config to firmware

+ 1 - 0
configs/wear_defconfig

@@ -837,6 +837,7 @@ CONFIG_WIFI_POS_LEGACY := y
 endif
 
 CONFIG_CP_STATS := y
+CONFIG_QCA_TARGET_IF_MLME := y
 CONFIG_FEATURE_INTEROP_ISSUES_AP := y
 
 CONFIG_FEATURE_WLAN_WAPI := y

+ 2 - 0
core/cds/inc/cds_config.h

@@ -100,6 +100,7 @@ struct wlan_cds_feature_set {
  * @enable_tx_compl_tsf64:
  * @cds_feature_set: CDS feature set structure.
  * @get_wifi_features: Get wifi features from fw
+ * @exclude_selftx_from_cca_busy: Exclude selx tx time from cca busy time
  */
 
 struct cds_config_info {
@@ -136,5 +137,6 @@ struct cds_config_info {
 	struct wlan_cds_feature_set cds_feature_set;
 	bool get_wifi_features;
 #endif
+	bool exclude_selftx_from_cca_busy;
 };
 #endif /* !defined( __CDS_CONFIG_H ) */

+ 18 - 0
core/cds/src/cds_api.c

@@ -691,6 +691,21 @@ static qdf_notif_block cds_hang_event_notifier = {
 	.notif_block.notifier_call = cds_hang_event_notifier_call,
 };
 
+/**
+ * cds_set_exclude_selftx_from_cca_busy_time() - Set exclude self tx time
+ * from cca busy time bool in cds config
+ * @exclude_selftx_from_cca_busy: Bool to be stored in cds config
+ * @cds_cfg: Pointer to cds config
+ *
+ * Return: None
+ */
+static void
+cds_set_exclude_selftx_from_cca_busy_time(bool exclude_selftx_from_cca_busy,
+					  struct cds_config_info *cds_cfg)
+{
+	cds_cfg->exclude_selftx_from_cca_busy = exclude_selftx_from_cca_busy;
+}
+
 /**
  * cds_open() - open the CDS Module
  *
@@ -807,6 +822,9 @@ QDF_STATUS cds_open(struct wlan_objmgr_psoc *psoc)
 		goto err_htc_close;
 	}
 
+	cds_set_exclude_selftx_from_cca_busy_time(
+				hdd_ctx->config->exclude_selftx_from_cca_busy,
+				cds_cfg);
 	/*Open the WMA module */
 	status = wma_open(psoc, hdd_update_tgt_cfg, cds_cfg,
 			  hdd_ctx->target_type);

+ 21 - 1
core/hdd/inc/hdd_config.h

@@ -1291,6 +1291,25 @@ enum host_log_level {
 #define CFG_DYNAMIC_MAC_ADDR_UPDATE_SUPPORTED_ALL
 #endif
 
+/*
+ * <ini>
+ * exclude_selftx_from_cca_busy_time - Exclude self tx time from cca busy time
+ * @Default: false
+ *
+ * This ini is used to exclude self tx time from cca busy time.
+ *
+ * false: Don't exclude self tx time from cca busy time.
+ * true: Deduct tx time from cca busy time.
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_EXCLUDE_SELFTX_FROM_CCA_BUSY_TIME CFG_INI_BOOL( \
+	"exclude_selftx_from_cca_busy_time", \
+	false, \
+	"This ini is used to exclude self tx time from CCA busy time")
+
 #define CFG_HDD_ALL \
 	CFG_DYNAMIC_MAC_ADDR_UPDATE_SUPPORTED_ALL \
 	CFG_ENABLE_PACKET_LOG_ALL \
@@ -1328,5 +1347,6 @@ enum host_log_level {
 	CFG(CFG_ENABLE_HOST_MODULE_LOG_LEVEL) \
 	SAR_SAFETY_FEATURE_ALL \
 	CFG_GET_WIFI_FEATURES_ALL \
-	CFG_CPU_CXPC_THRESHOLD_ALL
+	CFG_CPU_CXPC_THRESHOLD_ALL \
+	CFG(CFG_EXCLUDE_SELFTX_FROM_CCA_BUSY_TIME)
 #endif

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.