Pārlūkot izejas kodu

qcacld-3.0: Changes to enable BE/WCN7850 flags

Changes to enable compilation for beryllium target(chip WCN7850).

CRs-Fixed: 2888534
Change-Id: I7b3d252fc8550883a2d24b6beb2b78f482f5004b
Rakesh Pillai 4 gadi atpakaļ
vecāks
revīzija
e86da7276c

+ 79 - 21
Kbuild

@@ -253,7 +253,7 @@ ifeq ($(CONFIG_FEATURE_MONITOR_MODE_SUPPORT), y)
 HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_rx_monitor.o
 endif
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_WLAN_FEATURE_DP_RX_THREADS := y
 CONFIG_WLAN_FEATURE_RX_SOFTIRQ_TIME_LIMIT := y
 endif
@@ -931,6 +931,14 @@ endif
 
 $(call add-wlan-objs,qdf,$(QDF_OBJS))
 
+ifeq ($(CONFIG_LITHIUM), y)
+cppflags-y += -DCONFIG_LITHIUM
+endif
+
+ifeq ($(CONFIG_BERYLLIUM), y)
+cppflags-y += -DCONFIG_BERYLLIUM
+endif
+
 cppflags-$(CONFIG_TALLOC_DEBUG) += -DWLAN_TALLOC_DEBUG
 cppflags-$(CONFIG_QDF_TEST) += -DWLAN_DELAYED_WORK_TEST
 cppflags-$(CONFIG_QDF_TEST) += -DWLAN_HASHTABLE_TEST
@@ -1877,7 +1885,7 @@ ifeq ($(CONFIG_WDI_EVENT_ENABLE), y)
 TXRX_OBJS += 	$(TXRX_DIR)/ol_txrx_event.o
 endif
 
-ifneq ($(CONFIG_LITHIUM), y)
+ifneq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 TXRX_OBJS += $(TXRX_DIR)/ol_txrx.o \
 		$(TXRX_DIR)/ol_cfg.o \
                 $(TXRX_DIR)/ol_rx.o \
@@ -1927,7 +1935,7 @@ endif
 ifeq ($(CONFIG_QCA_SUPPORT_TX_THROTTLE), y)
 TXRX_OBJS +=     $(TXRX_DIR)/ol_tx_throttle.o
 endif
-endif #LITHIUM
+endif #LITHIUM/BERYLLIUM
 
 $(call add-wlan-objs,txrx,$(TXRX_OBJS))
 
@@ -1935,7 +1943,7 @@ $(call add-wlan-objs,txrx,$(TXRX_OBJS))
 TXRX3.0_DIR :=     core/dp/txrx3.0
 TXRX3.0_INC :=     -I$(WLAN_ROOT)/$(TXRX3.0_DIR)
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 TXRX3.0_OBJS := $(TXRX3.0_DIR)/dp_txrx.o
 
 ifeq ($(CONFIG_WLAN_FEATURE_DP_RX_THREADS), y)
@@ -1955,7 +1963,7 @@ endif #LITHIUM
 
 $(call add-wlan-objs,txrx30,$(TXRX3.0_OBJS))
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 ############ DP 3.0 ############
 DP_INC := -I$(WLAN_COMMON_INC)/dp/inc \
 	-I$(WLAN_COMMON_INC)/dp/wifi3.0 \
@@ -2006,7 +2014,7 @@ WCFG_DIR := wlan_cfg
 WCFG_INC := -I$(WLAN_COMMON_INC)/$(WCFG_DIR)
 WCFG_SRC := $(WLAN_COMMON_ROOT)/$(WCFG_DIR)
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 WCFG_OBJS := $(WCFG_SRC)/wlan_cfg.o
 endif
 
@@ -2043,7 +2051,7 @@ $(call add-wlan-objs,pktlog,$(PKTLOG_OBJS))
 HTT_DIR :=      core/dp/htt
 HTT_INC :=      -I$(WLAN_ROOT)/$(HTT_DIR)
 
-ifneq ($(CONFIG_LITHIUM), y)
+ifneq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 HTT_OBJS := $(HTT_DIR)/htt_tx.o \
             $(HTT_DIR)/htt.o \
             $(HTT_DIR)/htt_t2h.o \
@@ -2343,7 +2351,7 @@ HIF_COMMON_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/ath_procfs.o \
 		   $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_runtime_pm.o \
 		   $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_exec.o
 
-ifneq ($(CONFIG_LITHIUM), y)
+ifneq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 HIF_COMMON_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_main_legacy.o
 endif
 
@@ -2379,6 +2387,12 @@ ifeq ($(CONFIG_CNSS_QCA6750), y)
 HIF_CE_OBJS +=  $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/qca6750def.o
 endif
 
+HIF_CE_OBJS +=  $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service_srng.o
+else ifeq ($(CONFIG_BERYLLIUM), y)
+ifeq ($(CONFIG_CNSS_WCN7850), y)
+HIF_CE_OBJS +=  $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/wcn7850def.o
+endif
+
 HIF_CE_OBJS +=  $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service_srng.o
 else
 HIF_CE_OBJS +=  $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service_legacy.o
@@ -2457,8 +2471,8 @@ endif
 
 $(call add-wlan-objs,hif,$(HIF_OBJS))
 
-ifeq ($(CONFIG_LITHIUM), y)
 ############ HAL ############
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 HAL_DIR :=	hal
 HAL_INC :=	-I$(WLAN_COMMON_INC)/$(HAL_DIR)/inc \
 		-I$(WLAN_COMMON_INC)/$(HAL_DIR)/wifi3.0
@@ -2469,6 +2483,14 @@ HAL_OBJS :=	$(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/hal_srng.o \
 ifeq ($(CONFIG_RX_FISA), y)
 HAL_OBJS += $(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/hal_rx_flow.o
 endif
+endif #### CONFIG LITHIUM/BERYLLIUM ####
+
+ifeq ($(CONFIG_LITHIUM), y)
+HAL_INC += 	-I$(WLAN_COMMON_INC)/$(HAL_DIR)/wifi3.0/li
+
+HAL_OBJS +=	$(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/li/hal_li_generic_api.o
+
+HAL_OBJS +=	$(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/li/hal_li_reo.o
 
 ifeq ($(CONFIG_CNSS_QCA6290), y)
 HAL_INC += -I$(WLAN_COMMON_INC)/$(HAL_DIR)/wifi3.0/qca6290
@@ -2488,6 +2510,22 @@ endif
 
 endif #####CONFIG_LITHIUM####
 
+ifeq ($(CONFIG_BERYLLIUM), y)
+HAL_INC += 	-I$(WLAN_COMMON_INC)/$(HAL_DIR)/wifi3.0/be
+
+HAL_OBJS +=	$(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/be/hal_be_generic_api.o
+
+HAL_OBJS +=	$(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/be/hal_be_reo.o \
+
+ifeq ($(CONFIG_CNSS_WCN7850), y)
+HAL_INC += -I$(WLAN_COMMON_INC)/$(HAL_DIR)/wifi3.0/wcn7850
+HAL_OBJS += $(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/wcn7850/hal_7850.o
+else
+#error "Not Beryllium"
+endif
+
+endif #### CONFIG_BERYLLIUM ####
+
 $(call add-wlan-objs,hal,$(HAL_OBJS))
 
 ############ WMA ############
@@ -2611,6 +2649,14 @@ ifeq ($(CONFIG_CNSS_QCA6750), y)
 TARGET_INC +=	-I$(WLAN_FW_API)/hw/qca6750/v1
 endif
 
+ifeq ($(CONFIG_CNSS_WCN7850), y)
+ifeq ($(CONFIG_EMULATION_2_0), y)
+TARGET_INC +=	-I$(WLAN_FW_API)/hw/wcn7850/v1/E2.0/
+else
+TARGET_INC +=	-I$(WLAN_FW_API)/hw/wcn7850/v1/E1.5/
+endif
+endif
+
 LINUX_INC :=	-Iinclude
 
 INCS :=		$(HDD_INC) \
@@ -2657,7 +2703,7 @@ INCS +=		$(HIF_INC) \
 		$(BMI_INC) \
 		$(CMN_SYS_INC)
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 INCS += 	$(HAL_INC) \
 		$(DP_INC)
 endif
@@ -2821,6 +2867,7 @@ cppflags-$(CONFIG_PLD_SDIO_CNSS_FLAG) += -DCONFIG_PLD_SDIO_CNSS
 cppflags-$(CONFIG_WLAN_RESIDENT_DRIVER) += -DFEATURE_WLAN_RESIDENT_DRIVER
 cppflags-$(CONFIG_FEATURE_GPIO_CFG) += -DWLAN_FEATURE_GPIO_CFG
 cppflags-$(CONFIG_FEATURE_BUS_BANDWIDTH_MGR) += -DFEATURE_BUS_BANDWIDTH_MGR
+cppflags-$(CONFIG_DP_BE_WAR) += -DDP_BE_WAR
 
 ifeq ($(CONFIG_IPCIE_FW_SIM), y)
 cppflags-y += -DCONFIG_PLD_IPCIE_FW_SIM
@@ -2846,6 +2893,8 @@ cppflags-$(CONFIG_PLD_SDIO_CNSS2) += -DCONFIG_PLD_SDIO_CNSS2
 cppflags-$(CONFIG_WLAN_RECORD_RX_PADDR) += -DHIF_RECORD_RX_PADDR
 cppflags-$(CONFIG_FEATURE_WLAN_TIME_SYNC_FTM) += -DFEATURE_WLAN_TIME_SYNC_FTM
 
+cppflags-$(CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB) += -DWLAN_FEATURE_LRO_CTX_IN_CB
+
 #For both legacy and lithium chip's monitor mode config
 ifeq ($(CONFIG_FEATURE_MONITOR_MODE_SUPPORT), y)
 cppflags-y += -DFEATURE_MONITOR_MODE_SUPPORT
@@ -2853,6 +2902,7 @@ else
 cppflags-y += -DDISABLE_MON_CONFIG
 endif
 
+
 #Enable NL80211 test mode
 cppflags-$(CONFIG_NL80211_TESTMODE) += -DWLAN_NL80211_TESTMODE
 
@@ -2975,7 +3025,7 @@ endif
 
 #normally, TDLS negative behavior is not needed
 cppflags-$(CONFIG_QCOM_TDLS) += -DFEATURE_WLAN_TDLS
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 cppflags-$(CONFIG_QCOM_TDLS) += -DTDLS_WOW_ENABLED
 endif
 
@@ -3427,8 +3477,10 @@ cppflags-$(CONFIG_QCA6390_HEADERS_DEF) += -DQCA6390_HEADERS_DEF
 cppflags-$(CONFIG_QCA6750_HEADERS_DEF) += -DQCA6750_HEADERS_DEF
 cppflags-$(CONFIG_QCA_WIFI_QCA6390) += -DQCA_WIFI_QCA6390
 cppflags-$(CONFIG_QCA6490_HEADERS_DEF) += -DQCA6490_HEADERS_DEF
+cppflags-$(CONFIG_WCN7850_HEADERS_DEF) += -DWCN7850_HEADERS_DEF
 cppflags-$(CONFIG_QCA_WIFI_QCA6490) += -DQCA_WIFI_QCA6490
 cppflags-$(CONFIG_QCA_WIFI_QCA6750) += -DQCA_WIFI_QCA6750
+cppflags-$(CONFIG_QCA_WIFI_WCN7850) += -DQCA_WIFI_WCN7850
 cppflags-$(CONFIG_QCA_WIFI_QCA8074) += -DQCA_WIFI_QCA8074
 cppflags-$(CONFIG_SCALE_INCLUDES) += -DSCALE_INCLUDES
 cppflags-$(CONFIG_QCA_WIFI_QCA8074_VP) += -DQCA_WIFI_QCA8074_VP
@@ -3463,13 +3515,15 @@ ifeq ($(CONFIG_QCA6290_11AX), y)
 cppflags-y += -DQCA_WIFI_QCA6290_11AX -DQCA_WIFI_QCA6290_11AX_MU_UL
 endif
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 cppflags-$(CONFIG_WLAN_TX_FLOW_CONTROL_V2) += -DQCA_AC_BASED_FLOW_CONTROL
 cppflags-y += -DFEATURE_NO_DBS_INTRABAND_MCC_SUPPORT
 cppflags-y += -DHAL_DISABLE_NON_BA_2K_JUMP_ERROR
 cppflags-y += -DENABLE_HAL_SOC_STATS
 cppflags-y += -DENABLE_HAL_REG_WR_HISTORY
+ifeq ($(CONFIG_LITHIUM), y)
 cppflags-y += -DDP_RX_DESC_COOKIE_INVALIDATE
+endif
 cppflags-y += -DMON_ENABLE_DROP_FOR_MAC
 cppflags-y += -DPCI_LINK_STATUS_SANITY
 cppflags-y += -DDP_MON_RSSI_IN_DBM
@@ -3497,15 +3551,17 @@ cppflags-$(CONFIG_WLAN_TRACE_HIDE_MAC_ADDRESS) += -DWLAN_TRACE_HIDE_MAC_ADDRESS
 cppflags-$(CONFIG_WLAN_FEATURE_11BE) += -DWLAN_FEATURE_11BE
 cppflags-$(CONFIG_WLAN_FEATURE_11BE_MLO) += -DWLAN_FEATURE_11BE_MLO
 
-cppflags-$(CONFIG_LITHIUM) += -DFIX_TXDMA_LIMITATION
-cppflags-$(CONFIG_LITHIUM) += -DFEATURE_AST
-cppflags-$(CONFIG_LITHIUM) += -DPEER_PROTECTED_ACCESS
-cppflags-$(CONFIG_LITHIUM) += -DSERIALIZE_QUEUE_SETUP
-cppflags-$(CONFIG_LITHIUM) += -DDP_RX_PKT_NO_PEER_DELIVER
-cppflags-$(CONFIG_LITHIUM) += -DDP_RX_DROP_RAW_FRM
-cppflags-$(CONFIG_LITHIUM) += -DFEATURE_ALIGN_STATS_FROM_DP
-cppflags-$(CONFIG_LITHIUM) += -DDP_RX_SPECIAL_FRAME_NEED
-cppflags-$(CONFIG_LITHIUM) += -DFEATURE_STATS_EXT_V2
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
+cppflags-y += -DFIX_TXDMA_LIMITATION
+cppflags-y += -DFEATURE_AST
+cppflags-y += -DPEER_PROTECTED_ACCESS
+cppflags-y += -DSERIALIZE_QUEUE_SETUP
+cppflags-y += -DDP_RX_PKT_NO_PEER_DELIVER
+cppflags-y += -DDP_RX_DROP_RAW_FRM
+cppflags-y += -DFEATURE_ALIGN_STATS_FROM_DP
+cppflags-y += -DDP_RX_SPECIAL_FRAME_NEED
+cppflags-y += -DFEATURE_STATS_EXT_V2
+endif
 cppflags-$(CONFIG_VERBOSE_DEBUG) += -DENABLE_VERBOSE_DEBUG
 cppflags-$(CONFIG_RX_DESC_DEBUG_CHECK) += -DRX_DESC_DEBUG_CHECK
 cppflags-$(CONFIG_REGISTER_OP_DEBUG) += -DHAL_REGISTER_WRITE_DEBUG
@@ -3670,6 +3726,8 @@ cppflags-$(CONFIG_WLAN_SUPPORT_TXRX_HL_BUNDLE) += -DWLAN_SUPPORT_TXRX_HL_BUNDLE
 cppflags-$(CONFIG_QCN7605_PCIE_SHADOW_REG_SUPPORT) += -DQCN7605_PCIE_SHADOW_REG_SUPPORT
 cppflags-$(CONFIG_QCN7605_PCIE_GOLBAL_RESET_SUPPORT) += -DQCN7605_PCIE_GOLBAL_RESET_SUPPORT
 cppflags-$(CONFIG_MARK_ICMP_REQ_TO_FW) += -DWLAN_DP_FEATURE_MARK_ICMP_REQ_TO_FW
+cppflags-$(CONFIG_EMULATION_2_0) += -DCONFIG_WCN7850_EMULATION_2_0
+cppflags-$(CONFIG_WORD_BASED_TLV) += -DCONFIG_WORD_BASED_TLV
 
 ifdef CONFIG_MAX_LOGS_PER_SEC
 ccflags-y += -DWLAN_MAX_LOGS_PER_SEC=$(CONFIG_MAX_LOGS_PER_SEC)

+ 4 - 2
components/ipa/core/inc/wlan_ipa_priv.h

@@ -195,7 +195,8 @@ struct wlan_ipa_tx_hdr {
  * @reserved2: Reserved not used
  */
 #if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
+    defined(QCA_WIFI_WCN7850)
 struct frag_header {
 	uint8_t reserved[0];
 };
@@ -221,7 +222,8 @@ struct frag_header {
  */
 
 #if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
+    defined(QCA_WIFI_WCN7850)
 struct ipa_header {
 	uint8_t reserved[0];
 };

+ 4 - 2
components/ipa/core/src/wlan_ipa_core.c

@@ -430,7 +430,8 @@ drop_pkt:
  * TODO: Get WDI version through FW capabilities
  */
 #if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
+    defined(QCA_WIFI_WCN7850)
 static inline void wlan_ipa_wdi_get_wdi_version(struct wlan_ipa_priv *ipa_ctx)
 {
 	ipa_ctx->wdi_version = IPA_WDI_3;
@@ -1815,7 +1816,8 @@ end:
 }
 
 #if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
+    defined(QCA_WIFI_WCN7850)
 
 #ifdef IPA_LAN_RX_NAPI_SUPPORT
 void ipa_set_rps(struct wlan_ipa_priv *ipa_ctx, enum QDF_OPMODE mode,

+ 61 - 14
configs/default_defconfig

@@ -9,6 +9,7 @@ ifeq ($(CONFIG_CNSS_QCA6290), y)
 	CONFIG_WLAN_FEATURE_11AX := y
 	CONFIG_WLAN_FEATURE_DFS_OFFLOAD := y
 	CONFIG_IPA3 := n
+	CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB := y
 endif
 
 ifeq ($(CONFIG_CNSS_QCA6390), y)
@@ -27,6 +28,7 @@ ifeq ($(CONFIG_CNSS_QCA6390), y)
 	CONFIG_DIRECT_BUF_RX_ENABLE := y
 	CONFIG_WMI_DBR_SUPPORT := y
 	CONFIG_MORE_TX_DESC := y
+	CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB := y
 endif
 
 ifeq ($(CONFIG_CNSS_QCA6490), y)
@@ -53,6 +55,7 @@ ifeq ($(CONFIG_CNSS_QCA6490), y)
 	CONFIG_HIF_REG_WINDOW_SUPPORT :=y
 	CONFIG_DUMP_REO_QUEUE_INFO_IN_DDR :=y
 	CONFIG_TX_AGGREGATION_SIZE_ENABLE := n
+	CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB := y
 endif
 
 ifeq ($(CONFIG_CNSS_QCA6750), y)
@@ -75,6 +78,30 @@ ifeq ($(CONFIG_CNSS_QCA6750), y)
 	CONFIG_HOST_WAKEUP_OVER_QMI := y
 	CONFIG_WLAN_FEATURE_WMI_DIAG_OVER_CE7 := y
 	CONFIG_WLAN_DP_FEATURE_DEFERRED_REO_QDESC_DESTROY := y
+	CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB := y
+endif
+
+ifeq ($(CONFIG_CNSS_WCN7850), y)
+	ifeq ($(CONFIG_CNSS_EMULATION), y)
+		CONFIG_QCA_WIFI_EMULATION := y
+	endif
+	CONFIG_EMULATION_2_0 := y
+	CONFIG_DIRECT_BUF_RX_ENABLE := y
+	CONFIG_WMI_DBR_SUPPORT := y
+	CONFIG_WLAN_CFR_ENABLE := n
+	CONFIG_WLAN_ENH_CFR_ENABLE := n
+	CONFIG_BERYLLIUM := y
+	CONFIG_WLAN_FEATURE_11AX := y
+	CONFIG_WLAN_FEATURE_DFS_OFFLOAD := y
+	CONFIG_IPA3 := n
+	CONFIG_DP_BE_WAR := y
+	CONFIG_SCALE_INCLUDES := y
+	CONFIG_HASTINGS_BT_WAR := y
+	CONFIG_WDI3_IPA_OVER_GSI := y
+	CONFIG_WLAN_FEATURE_LRO_CTX_IN_CB := y
+	CONFIG_PCIE_GEN_SWITCH := y
+	CONFIG_GENERIC_SHADOW_REGISTER_ACCESS_ENABLE := y
+	CONFIG_ATH_SUPPORT_SPECTRAL := n
 endif
 
 ifeq ($(CONFIG_CLD_HL_SDIO_CORE), y)
@@ -201,7 +228,7 @@ endif
 CONFIG_WLAN_FEATURE_MBSSID := y
 
 #Flag to enable Legacy Fast Roaming3(LFR3)
-ifeq (y,$(findstring y,$(CONFIG_HELIUMPLUS) $(CONFIG_LITHIUM)))
+ifeq (y,$(findstring y,$(CONFIG_HELIUMPLUS) $(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 	CONFIG_QCACLD_WLAN_LFR3 := y
 else
 	CONFIG_QCACLD_WLAN_LFR2 := y
@@ -394,7 +421,7 @@ ifneq ($(CONFIG_ROME_IF),sdio)
 	CONFIG_WLAN_FEATURE_FIPS := y
 
 	#Flag to enable Fast Path feature
-	ifneq ($(CONFIG_LITHIUM), y)
+	ifneq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 		CONFIG_WLAN_FASTPATH := y
 	endif
 
@@ -403,7 +430,7 @@ ifneq ($(CONFIG_ROME_IF),sdio)
 	CONFIG_WLAN_NAPI_DEBUG := n
 
 	# Flag to enable FW based TX Flow control
-	ifeq ($(CONFIG_LITHIUM), y)
+	ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 		CONFIG_WLAN_TX_FLOW_CONTROL_V2 := y
 	else
 		CONFIG_WLAN_TX_FLOW_CONTROL_V2 := n
@@ -454,7 +481,7 @@ endif
 
 ifeq ($(CONFIG_ROME_IF),pci)
 ifneq ($(CONFIG_WLAN_TX_FLOW_CONTROL_V2), y)
-ifneq ($(CONFIG_LITHIUM), y)
+ifneq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_WLAN_TX_FLOW_CONTROL_LEGACY := y
 endif
 endif
@@ -481,7 +508,7 @@ endif
 endif
 
 # Enable fw stats version 2
-ifeq (y,$(findstring y,$(CONFIG_HELIUMPLUS) $(CONFIG_LITHIUM)))
+ifeq (y,$(findstring y,$(CONFIG_HELIUMPLUS) $(CONFIG_LITHIUM)) $(CONFIG_BERYLLIUM))
 CONFIG_AR900B := y
 endif
 
@@ -506,7 +533,7 @@ endif
 
 endif #CONFIG_HELIUMPLUS
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_RX_DEFRAG_DO_NOT_REINJECT := y
 CONFIG_MARK_ICMP_REQ_TO_FW := y
 CONFIG_IPA_SET_RESET_TX_DB_PA := y
@@ -552,6 +579,11 @@ ifeq ($(CONFIG_CNSS_QCA6750), y)
 	CONFIG_BUS_AUTO_SUSPEND := y
 endif
 
+ifeq ($(CONFIG_CNSS_WCN7850), y)
+	CONFIG_WCN7850_HEADERS_DEF := y
+	CONFIG_QCA_WIFI_WCN7850 := y
+endif
+
 CONFIG_QCA_WIFI_QCA8074 := y
 CONFIG_QCA_WIFI_QCA8074_VP := y
 CONFIG_DP_INTR_POLL_BASED := y
@@ -607,7 +639,7 @@ ifneq ($(TARGET_BUILD_VARIANT),user)
 endif
 
 #Disable pktlog feature for lithium based target
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 	CONFIG_FEATURE_PKTLOG := n
 endif
 
@@ -749,7 +781,7 @@ ifeq ($(CONFIG_HELIUMPLUS), y)
 CONFIG_WLAN_CUSTOM_DSCP_UP_MAP := y
 CONFIG_WLAN_SEND_DSCP_UP_MAP_TO_FW := y
 endif
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_WLAN_CUSTOM_DSCP_UP_MAP := y
 endif
 
@@ -778,11 +810,11 @@ CONFIG_PKTLOG_LEGACY := y
 endif
 endif
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_PKTLOG_LEGACY := n
 endif
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_WAPI_BIG_ENDIAN := y
 else
 CONFIG_WAPI_BIG_ENDIAN := n
@@ -797,7 +829,7 @@ endif
 
 #Enable the type_specific_data in the ath_pktlog_arg
 ifeq ($(CONFIG_REMOVE_PKT_LOG), n)
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_PKTLOG_HAS_SPECIFIC_DATA := y
 endif
 
@@ -859,7 +891,7 @@ endif
 
 ifeq ($(CONFIG_ARCH_SM8150), y)
 ifeq ($(CONFIG_IPA_OFFLOAD), y)
-ifneq ($(CONFIG_LITHIUM), y)
+ifneq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 CONFIG_ENABLE_SMMU_S1_TRANSLATION := y
 endif
 endif
@@ -1038,7 +1070,11 @@ CONFIG_HDD_INIT_WITH_RTNL_LOCK := y
 CONFIG_WLAN_CONV_SPECTRAL_ENABLE := y
 CONFIG_WLAN_SPECTRAL_ENABLE := y
 CONFIG_WMI_CMD_STRINGS := y
+
+ifneq ($(CONFIG_CNSS_WCN7850), y)
 CONFIG_FEATURE_MONITOR_MODE_SUPPORT := y
+endif
+
 CONFIG_WLAN_ALLOCATE_GLOBAL_BUFFERS_DYNAMICALLY := n
 CONFIG_WLAN_FEATURE_TWT := y
 CONFIG_FW_THERMAL_THROTTLE := y
@@ -1046,7 +1082,7 @@ CONFIG_WLAN_FEATURE_BIG_DATA_STATS := y
 CONFIG_WLAN_FEATURE_IGMP_OFFLOAD := y
 CONFIG_WLAN_FEATURE_GET_USABLE_CHAN_LIST := y
 
-ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE) $(CONFIG_ICNSS2_HELIUM)))
+ifeq (y,$(findstring y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM) $(CONFIG_ICNSS) $(CONFIG_ICNSS_MODULE) $(CONFIG_ICNSS2_HELIUM)))
 CONFIG_WLAN_FEATURE_BMI := n
 else
 CONFIG_WLAN_FEATURE_BMI := y
@@ -1104,6 +1140,10 @@ endif
 ifneq ($(CONFIG_ARCH_HOLI), y)
 	CONFIG_HIF_DETECTION_LATENCY_ENABLE := y
 endif
+
+ifneq ($(CONFIG_CNSS_EMULATION), y)
+	CONFIG_HIF_DETECTION_LATENCY_ENABLE := y
+endif
 endif
 
 ifeq ($(CONFIG_CNSS2_DEBUG), y)
@@ -1128,7 +1168,7 @@ ifeq ($(CONFIG_UNIT_TEST), y)
 	CONFIG_FEATURE_WLM_STATS := y
 endif
 
-ifeq ($(CONFIG_LITHIUM), y)
+ifeq (y,$(filter y,$(CONFIG_LITHIUM) $(CONFIG_BERYLLIUM)))
 	ifeq ($(CONFIG_SLUB_DEBUG_ON), y)
 		CONFIG_HIF_CE_DEBUG_DATA_BUF := y
 		CONFIG_WLAN_RECORD_RX_PADDR := y
@@ -1256,6 +1296,13 @@ CONFIG_MORE_TX_DESC := y
 
 endif
 
+ifeq ($(CONFIG_CNSS_WCN7850), y)
+#Enable 6 GHz Band
+CONFIG_BAND_6GHZ := y
+CONFIG_RX_FISA := n
+CONFIG_MORE_TX_DESC := y
+endif
+
 ifeq ($(CONFIG_RX_FISA), y)
 	 ifeq ($(CONFIG_SLUB_DEBUG_ON), y)
 	 	CONFIG_RX_FISA_HISTORY := y

+ 4 - 2
core/hdd/src/wlan_hdd_lro.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2015-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2015-2021 The Linux Foundation. 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
@@ -39,7 +39,9 @@
 	 LRO_TCP_DATA_CSUM | LRO_TCP_SEQ_NUM | LRO_TCP_WIN)
 
 #if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750) || \
+    defined(QCA_WIFI_WCN7850)
+#ifdef WLAN_FEATURE_LRO_CTX_IN_CB
 static qdf_lro_ctx_t wlan_hdd_get_lro_ctx(struct sk_buff *skb)
 {
 	return (qdf_lro_ctx_t)QDF_NBUF_CB_RX_LRO_CTX(skb);

+ 0 - 7
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -1137,13 +1137,6 @@ QDF_STATUS hdd_softap_rx_packet_cbk(void *adapter_context, qdf_nbuf_t rx_buf)
 		next = skb->next;
 		skb->next = NULL;
 
-/* Debug code, remove later */
-#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
-		QDF_TRACE(QDF_MODULE_ID_HDD_DATA, QDF_TRACE_LEVEL_DEBUG,
-			 "%s: skb %pK skb->len %d\n", __func__, skb, skb->len);
-#endif
-
 		hdd_softap_dump_sk_buff(skb);
 
 		skb->dev = adapter->dev;

+ 1 - 2
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -5333,8 +5333,7 @@ returnAfterError:
 	return nSirStatus;
 } /* End lim_send_sa_query_response_frame */
 
-#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+#if defined(CONFIG_LITHIUM) || defined(CONFIG_BERYLLIUM)
 #ifdef WLAN_FEATURE_11AX
 #define IS_PE_SESSION_HE_MODE(_session) ((_session)->he_capable)
 #else

+ 2 - 0
core/pld/src/pld_pcie.c

@@ -628,6 +628,8 @@ static struct pci_device_id pld_pcie_id_table[] = {
 	{ 0x17cb, 0x1101, PCI_ANY_ID, PCI_ANY_ID },
 #elif defined(QCA_WIFI_QCA6490)
 	{ 0x17cb, 0x1103, PCI_ANY_ID, PCI_ANY_ID },
+#elif defined(QCA_WIFI_WCN7850)
+	{ 0x17cb, 0x1107, PCI_ANY_ID, PCI_ANY_ID },
 #elif defined(QCN7605_SUPPORT)
 	{ 0x17cb, 0x1102, PCI_ANY_ID, PCI_ANY_ID },
 #else

+ 1 - 1
core/wma/src/wma_main.c

@@ -7300,7 +7300,7 @@ static void wma_set_wifi_start_packet_stats(void *wma_handle,
 		ATH_PKTLOG_RX | ATH_PKTLOG_TX |
 		ATH_PKTLOG_TEXT | ATH_PKTLOG_SW_EVENT;
 #elif defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
-      defined(QCA_WIFI_QCA6750)
+      defined(QCA_WIFI_QCA6750) || defined(QCA_WIFI_WCN7850)
 	log_state = ATH_PKTLOG_RCFIND | ATH_PKTLOG_RCUPDATE |
 		    ATH_PKTLOG_TX | ATH_PKTLOG_LITE_T2H |
 		    ATH_PKTLOG_SW_EVENT | ATH_PKTLOG_RX;

+ 1 - 2
core/wma/src/wma_mgmt.c

@@ -1869,8 +1869,7 @@ void wma_update_frag_params(tp_wma_handle wma, uint32_t value)
 
 #ifdef FEATURE_WLAN_WAPI
 #define WPI_IV_LEN 16
-#if defined(QCA_WIFI_QCA6290) || defined(QCA_WIFI_QCA6390) || \
-    defined(QCA_WIFI_QCA6490) || defined(QCA_WIFI_QCA6750)
+#if defined(CONFIG_LITHIUM) || defined(CONFIG_BERYLLIUM)
 /**
  * wma_fill_in_wapi_key_params() - update key parameters about wapi
  * @key_params: wma key parameters