From d95583dc1db025661c10707a7cc3dd0f0cafd2df Mon Sep 17 00:00:00 2001
From: Ondrej Jirman <megi@xff.cz>
Date: Sun, 2 Jun 2024 21:07:46 +0200
Subject: [PATCH 056/463] 8723cs: Port to 6.10

---
 drivers/staging/rtl8723cs/Makefile            | 23 ++++++++++---------
 drivers/staging/rtl8723cs/hal/phydm/phydm.mk  |  2 +-
 .../rtl8723cs/hal/phydm/sd4_phydm_2_kernel.mk |  2 +-
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/rtl8723cs/Makefile b/drivers/staging/rtl8723cs/Makefile
index 873898ffcb7e6..81d28421b3880 100644
--- a/drivers/staging/rtl8723cs/Makefile
+++ b/drivers/staging/rtl8723cs/Makefile
@@ -25,7 +25,7 @@ ifeq ($(GCC_VER_49),1)
 EXTRA_CFLAGS += -Wno-date-time	# Fix compile error && warning on gcc 4.9 and later
 endif
 
-EXTRA_CFLAGS += -I$(srctree)/$(src)/include
+EXTRA_CFLAGS += -I$(src)/include
 EXTRA_CFLAGS += -DCONFIG_RTW_CFGVENDOR_RSSIMONITOR -DCONFIG_RTW_CFGVENDOR_CQM_THRESHOLD_EVT_LOW
 
 EXTRA_LDFLAGS += --strip-debug
@@ -207,7 +207,7 @@ CONFIG_CUSTOMER_HUAWEI_GENERAL = n
 
 CONFIG_DRVEXT_MODULE = n
 
-export TopDIR ?= $(srctree)/$(src)
+export TopDIR ?= $(src)
 
 ########### COMMON  #################################
 ifeq ($(CONFIG_GSPI_HCI), y)
@@ -273,10 +273,10 @@ _HAL_INTFS_FILES :=	hal/hal_intf.o \
 			hal/led/hal_$(HCI_NAME)_led.o
 
 
-EXTRA_CFLAGS += -I$(srctree)/$(src)/platform
+EXTRA_CFLAGS += -I$(src)/platform
 _PLATFORM_FILES := platform/platform_ops.o
 
-EXTRA_CFLAGS += -I$(srctree)/$(src)/hal/btc
+EXTRA_CFLAGS += -I$(src)/hal/btc
 
 ########### HAL_RTL8188E #################################
 ifeq ($(CONFIG_RTL8188E), y)
@@ -2338,31 +2338,32 @@ endif
 ifneq ($(KERNELRELEASE),)
 
 ########### this part for *.mk ############################
-include $(srctree)/$(src)/hal/phydm/phydm.mk
+#include $(src)/hal/phydm/phydm.mk
+include $(src)/hal/phydm/phydm.mk
 
 ########### HAL_RTL8822B #################################
 ifeq ($(CONFIG_RTL8822B), y)
-include $(srctree)/$(src)/rtl8822b.mk
+include $(src)/rtl8822b.mk
 endif
 
 ########### HAL_RTL8821C #################################
 ifeq ($(CONFIG_RTL8821C), y)
-include $(srctree)/$(src)/rtl8821c.mk
+include $(src)/rtl8821c.mk
 endif
 
 ########### HAL_RTL8822C #################################
 ifeq ($(CONFIG_RTL8822C), y)
-include $(srctree)/$(src)/rtl8822c.mk
+include $(src)/rtl8822c.mk
 endif
 
 ########### HAL_RTL8814B #################################
 ifeq ($(CONFIG_RTL8814B), y)
-include $(srctree)/$(src)/rtl8814b.mk
+include $(src)/rtl8814b.mk
 endif
 
 ########### HAL_RTL8723F #################################
 ifeq ($(CONFIG_RTL8723F), y)
-include $(srctree)/$(src)/rtl8723f.mk
+include $(src)/rtl8723f.mk
 endif
 
 rtk_core :=	core/rtw_cmd.o \
@@ -2412,7 +2413,7 @@ ifeq ($(CONFIG_SDIO_HCI), y)
 rtk_core += core/rtw_sdio.o
 endif
 
-EXTRA_CFLAGS += -I$(srctree)/$(src)/core/crypto
+EXTRA_CFLAGS += -I$(src)/core/crypto
 rtk_core += \
 		core/crypto/aes-internal.o \
 		core/crypto/aes-internal-enc.o \
diff --git a/drivers/staging/rtl8723cs/hal/phydm/phydm.mk b/drivers/staging/rtl8723cs/hal/phydm/phydm.mk
index dcf9199097819..42c8273b878a2 100644
--- a/drivers/staging/rtl8723cs/hal/phydm/phydm.mk
+++ b/drivers/staging/rtl8723cs/hal/phydm/phydm.mk
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -I$(srctree)/$(src)/hal/phydm
+EXTRA_CFLAGS += -I$(src)/hal/phydm
 
 _PHYDM_FILES := hal/phydm/phydm_debug.o	\
 								hal/phydm/phydm_antdiv.o\
diff --git a/drivers/staging/rtl8723cs/hal/phydm/sd4_phydm_2_kernel.mk b/drivers/staging/rtl8723cs/hal/phydm/sd4_phydm_2_kernel.mk
index 09898476ededd..f11c6ac90bf52 100644
--- a/drivers/staging/rtl8723cs/hal/phydm/sd4_phydm_2_kernel.mk
+++ b/drivers/staging/rtl8723cs/hal/phydm/sd4_phydm_2_kernel.mk
@@ -1,4 +1,4 @@
-EXTRA_CFLAGS += -I$(srctree)/$(src)/hal/phydm
+EXTRA_CFLAGS += -I$(src)/hal/phydm
 
 _PHYDM_FILES := hal/phydm/phydm_debug.o	\
 								hal/phydm/phydm_interface.o\
-- 
2.46.0

