diff --git a/Makefile b/Makefile old mode 100644 new mode 100755 index eb1da4f..12e90b2 --- a/Makefile +++ b/Makefile @@ -1,14 +1,24 @@ -EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) -fno-pie +EXTRA_CFLAGS += $(USER_EXTRA_CFLAGS) EXTRA_CFLAGS += -O1 #EXTRA_CFLAGS += -O3 -EXTRA_CFLAGS += -Wall -Wno-switch -Wno-date-time -Wno-unused-value -Wno-unused-label -EXTRA_CFLAGS += -Wno-cast-function-type -Wno-unused-variable -Wno-unused -Wno-unused-parameter -EXTRA_CFLAGS += -Wno-unused-function -Wno-cast-function-type -Wno-misleading-indentation -EXTRA_CFLAGS += -Wno-uninitialized -Wno-missing-field-initializers -Wno-vla -g +#EXTRA_CFLAGS += -Wall #EXTRA_CFLAGS += -Wextra #EXTRA_CFLAGS += -Werror #EXTRA_CFLAGS += -pedantic #EXTRA_CFLAGS += -Wshadow -Wpointer-arith -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes + +EXTRA_CFLAGS += -Wno-unused-variable +EXTRA_CFLAGS += -Wno-unused-value +EXTRA_CFLAGS += -Wno-unused-label +EXTRA_CFLAGS += -Wno-unused-parameter +EXTRA_CFLAGS += -Wno-unused-function +EXTRA_CFLAGS += -Wno-unused +EXTRA_CFLAGS += -Wno-date-time +EXTRA_CFLAGS += -Wno-uninitialized +EXTRA_CFLAGS += -Wno-cast-function-type +EXTRA_CFLAGS += -Wno-misleading-indentation +EXTRA_CFLAGS += -Wno-missing-field-initializers +EXTRA_CFLAGS += -Wno-vla -g #EXTRA_CFLAGS += -Wno-tautological-compare #EXTRA_CFLAGS += -Wno-incompatible-pointer-types #EXTRA_CFLAGS += -Wsign-conversion @@ -16,18 +26,19 @@ EXTRA_CFLAGS += -Wno-uninitialized -Wno-missing-field-initializers -Wno-vla -g #EXTRA_CFLAGS += -Wno-sign-compare -Wno-sign-conversion #EXTRA_CFLAGS += -Wno-type-limits -EXTRA_CFLAGS += -I$(src)/include -#EXTRA_LDFLAGS += --strip-debug - GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc ) ifeq ($(GCC_VER_49),1) EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later endif +EXTRA_CFLAGS += -I$(src)/include + +EXTRA_LDFLAGS += --strip-debug + ########################## WIFI IC ############################ CONFIG_RTL8812A = y -CONFIG_RTL8821A = y -CONFIG_RTL8814A = y +CONFIG_RTL8821A = n +CONFIG_RTL8814A = n ######################### Interface ########################### CONFIG_USB_HCI = y ########################## Features ########################### @@ -41,25 +52,20 @@ CONFIG_WAPI_SUPPORT = n CONFIG_EFUSE_CONFIG_FILE = y CONFIG_EXT_CLK = n CONFIG_TRAFFIC_PROTECT = n +CONFIG_LOAD_PHY_PARA_FROM_FILE = y CONFIG_TXPWR_BY_RATE = y CONFIG_TXPWR_BY_RATE_EN = n CONFIG_TXPWR_LIMIT = y CONFIG_TXPWR_LIMIT_EN = n -CONFIG_CALIBRATE_TX_POWER_TO_MAX = y CONFIG_RTW_CHPLAN = 0xFF CONFIG_RTW_ADAPTIVITY_EN = disable CONFIG_RTW_ADAPTIVITY_MODE = normal CONFIG_SIGNAL_SCALE_MAPPING = n -CONFIG_80211W = n +CONFIG_80211W = y CONFIG_REDUCE_TX_CPU_LOADING = n CONFIG_BR_EXT = y CONFIG_TDLS = n -CONFIG_AP_MODE = n CONFIG_WIFI_MONITOR = y -CONFIG_NET_NS = y -# If you are setting up AP (e.g. by hostapd) in 802.11ac mode, you may have to choose 'y' below. -# Otherwise some channels may be flagged 'NO-IR' (i.e. Passive scanning) by the driver. -CONFIG_DISABLE_REGD_C=y CONFIG_MCC_MODE = n CONFIG_APPEND_VENDOR_IE_ENABLE = n CONFIG_RTW_NAPI = y @@ -72,12 +78,10 @@ CONFIG_RTW_WIFI_HAL = n CONFIG_ICMP_VOQ = n CONFIG_IP_R_MONITOR = n #arp VOQ and high rate ########################## Debug ########################### -CONFIG_RTW_DEBUG = n -CONFIG_RTW_LOG_LEVEL = 3 -CONFIG_USB_DEBUG = n -#DEBUG=1 -######################### Enable Country Set ############### -CONFIG_RTW_IOCTL_SET_COUNTRY = y +CONFIG_RTW_DEBUG = y +# default log level is _DRV_INFO_ = 4, +# please refer to "How_to_set_driver_debug_log_level.doc" to set the available level. +CONFIG_RTW_LOG_LEVEL = 4 ######################## Wake On Lan ########################## CONFIG_WOWLAN = n #bit2: deauth, bit1: unicast, bit0: magic pkt. @@ -94,7 +98,7 @@ CONFIG_HIGH_ACTIVE_HST2DEV = n CONFIG_PNO_SUPPORT = n CONFIG_PNO_SET_DEBUG = n CONFIG_AP_WOWLAN = n -######### Notify SDIO Host Keep Power During Suspend ########## +######### Notify SDIO Host Keep Power During Syspend ########## CONFIG_RTW_SDIO_PM_KEEP_POWER = y ###################### MP HW TX MODE FOR VHT ####################### CONFIG_MP_VHT_HW_TX_MODE = y @@ -109,7 +113,6 @@ CONFIG_PLATFORM_ARM_S3C6K4 = n CONFIG_PLATFORM_MIPS_RMI = n CONFIG_PLATFORM_RTD2880B = n CONFIG_PLATFORM_MIPS_AR9132 = n -CONFIG_PLATFORM_OPENWRT_NEO2 = n CONFIG_PLATFORM_RTK_DMP = n CONFIG_PLATFORM_MIPS_PLM = n CONFIG_PLATFORM_MSTAR389 = n @@ -147,8 +150,6 @@ CONFIG_PLATFORM_ARM_LGE = n CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n CONFIG_PLATFORM_ARM_WMT = n -CONFIG_PLATFORM_ARM_RPI = n -CONFIG_PLATFORM_ARM64_RPI = n CONFIG_PLATFORM_TI_DM365 = n CONFIG_PLATFORM_MOZART = n CONFIG_PLATFORM_RTK119X = n @@ -163,23 +164,31 @@ CONFIG_PLATFORM_NV_TK1_UBUNTU = n CONFIG_PLATFORM_RTL8197D = n CONFIG_PLATFORM_AML_S905 = n CONFIG_PLATFORM_ZTE_ZX296716 = n -CONFIG_PLATFORM_ARM_NV_NANO = n - ########### CUSTOMER ################################ CONFIG_CUSTOMER_HUAWEI_GENERAL = n + CONFIG_DRVEXT_MODULE = n + export TopDIR ?= $(shell pwd) ########### COMMON ################################# -ifeq ($(CONFIG_DISABLE_REGD_C), y) -EXTRA_CFLAGS += -DCONFIG_DISABLE_REGD_C +ifeq ($(CONFIG_GSPI_HCI), y) +HCI_NAME = gspi +endif + +ifeq ($(CONFIG_SDIO_HCI), y) +HCI_NAME = sdio endif ifeq ($(CONFIG_USB_HCI), y) HCI_NAME = usb endif -ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A)_$(CONFIG_RTL8814A), y_y_y) +ifeq ($(CONFIG_PCI_HCI), y) +HCI_NAME = pci +endif + +ifeq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A)_$(CONFIG_RTL8814A), y_n_n) EXTRA_CFLAGS += -DDRV_NAME=\"rtl88xxau\" ifeq ($(CONFIG_USB_HCI), y) @@ -202,12 +211,24 @@ _OS_INTFS_FILES := os_dep/osdep_service.o \ os_dep/linux/rtw_cfgvendor.o \ os_dep/linux/wifi_regd.o \ os_dep/linux/rtw_android.o \ + os_dep/linux/rtw_proc.o \ os_dep/linux/rtw_rhashtable.o ifeq ($(CONFIG_MP_INCLUDED), y) _OS_INTFS_FILES += os_dep/linux/ioctl_mp.o endif +ifeq ($(CONFIG_SDIO_HCI), y) +_OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o +_OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o +endif + +ifeq ($(CONFIG_GSPI_HCI), y) +_OS_INTFS_FILES += os_dep/linux/custom_gpio_linux.o +_OS_INTFS_FILES += os_dep/linux/$(HCI_NAME)_ops_linux.o +endif + + _HAL_INTFS_FILES := hal/hal_intf.o \ hal/hal_com.o \ hal/hal_com_phycfg.o \ @@ -222,16 +243,147 @@ _HAL_INTFS_FILES := hal/hal_intf.o \ hal/led/hal_led.o \ hal/led/hal_$(HCI_NAME)_led.o + EXTRA_CFLAGS += -I$(src)/platform +_PLATFORM_FILES := platform/platform_ops.o + EXTRA_CFLAGS += -I$(src)/hal/btc +########### HAL_RTL8188E ################################# +ifeq ($(CONFIG_RTL8188E), y) + +RTL871X = rtl8188e +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8189es +endif + +ifeq ($(CONFIG_GSPI_HCI), y) +MODULE_NAME = 8189es +endif + +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8188eu +endif + +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8188ee +endif +EXTRA_CFLAGS += -DCONFIG_RTL8188E + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8188EPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_xmit.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8188e_s_fw.o \ + hal/$(RTL871X)/hal8188e_t_fw.o \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o + +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else +ifeq ($(CONFIG_GSPI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +endif +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_USB.o +endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_PCIE.o +endif +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188E_SDIO.o +endif + +endif + +########### HAL_RTL8192E ################################# +ifeq ($(CONFIG_RTL8192E), y) + +RTL871X = rtl8192e +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8192es +endif + +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8192eu +endif + +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8192ee +endif +EXTRA_CFLAGS += -DCONFIG_RTL8192E +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8192EPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_xmit.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8192e_fw.o \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o + +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else +ifeq ($(CONFIG_GSPI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +endif +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_USB.o +endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_PCIE.o +endif +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8192E_SDIO.o +endif + +ifeq ($(CONFIG_BT_COEXIST), y) +_BTC_FILES += hal/btc/halbtc8192e1ant.o \ + hal/btc/halbtc8192e2ant.o +endif + +endif + ########### HAL_RTL8812A_RTL8821A ################################# + ifneq ($(CONFIG_RTL8812A)_$(CONFIG_RTL8821A), n_n) RTL871X = rtl8812a ifeq ($(CONFIG_USB_HCI), y) MODULE_NAME = 8812au endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8812ae +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8812as +endif _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ hal/$(RTL871X)/Hal8812PwrSeq.o \ @@ -250,20 +402,34 @@ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o - -ifeq ($(CONFIG_USB_HCI), y) +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else +ifeq ($(CONFIG_GSPI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o endif +endif ifeq ($(CONFIG_RTL8812A), y) ifeq ($(CONFIG_USB_HCI), y) _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8812A_USB.o endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8812A_PCIE.o +endif endif ifeq ($(CONFIG_RTL8821A), y) ifeq ($(CONFIG_USB_HCI), y) _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_USB.o endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_PCIE.o +endif +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8821A_SDIO.o +endif endif ifeq ($(CONFIG_RTL8812A), y) @@ -272,6 +438,7 @@ _HAL_INTFS_FILES += hal/rtl8812a/hal8812a_fw.o endif ifeq ($(CONFIG_RTL8821A), y) + ifeq ($(CONFIG_RTL8812A), n) RTL871X = rtl8821a @@ -282,11 +449,19 @@ else MODULE_NAME := 8811au endif endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME := 8821ae +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME := 8821as +endif + endif EXTRA_CFLAGS += -DCONFIG_RTL8821A _HAL_INTFS_FILES += hal/rtl8812a/hal8821a_fw.o + endif ifeq ($(CONFIG_BT_COEXIST), y) @@ -299,6 +474,65 @@ _BTC_FILES += hal/btc/halbtc8821a1ant.o \ hal/btc/halbtc8821a2ant.o endif endif + +endif + +########### HAL_RTL8723B ################################# +ifeq ($(CONFIG_RTL8723B), y) + +RTL871X = rtl8723b +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8723bu +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8723be +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8723bs +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8723B + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8723BPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8723b_fw.o + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_USB.o +endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_PCIE.o +endif +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723B_SDIO.o +endif + +_BTC_FILES += hal/btc/halbtc8723bwifionly.o +ifeq ($(CONFIG_BT_COEXIST), y) +_BTC_FILES += hal/btc/halbtc8723b1ant.o \ + hal/btc/halbtc8723b2ant.o +endif + endif ########### HAL_RTL8814A ################################# @@ -313,6 +547,7 @@ MODULE_NAME = 8814au endif EXTRA_CFLAGS += -DCONFIG_RTL8814A + _HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ hal/$(RTL871X)/Hal8814PwrSeq.o \ hal/$(RTL871X)/$(RTL871X)_xmit.o\ @@ -326,19 +561,392 @@ _HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ hal/$(RTL871X)/$(RTL871X)_cmd.o \ hal/$(RTL871X)/hal8814a_fw.o + _HAL_INTFS_FILES += \ hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \ hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o -ifeq ($(CONFIG_USB_HCI), y) +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else +ifeq ($(CONFIG_GSPI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +else _HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o endif +endif ifeq ($(CONFIG_USB_HCI), y) _HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8814A_USB.o endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8814A_PCIE.o +endif + +endif + +########### HAL_RTL8723C ################################# +ifeq ($(CONFIG_RTL8723C), y) + +RTL871X = rtl8703b +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8723cu +MODULE_SUB_NAME = 8703bu +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8723ce +MODULE_SUB_NAME = 8703be +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8723cs +MODULE_SUB_NAME = 8703bs +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8703B + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8703BPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8703b_fw.o + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_recv.o + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8703B_USB.o +endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8703B_PCIE.o +endif + +ifeq ($(CONFIG_BT_COEXIST), y) +_BTC_FILES += hal/btc/halbtc8703b1ant.o +endif + +endif + +########### HAL_RTL8723D ################################# +ifeq ($(CONFIG_RTL8723D), y) + +RTL871X = rtl8723d +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8723du +MODULE_SUB_NAME = 8723du +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8723de +MODULE_SUB_NAME = 8723de +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8723ds +MODULE_SUB_NAME = 8723ds +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8723D + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8723DPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8723d_fw.o \ + hal/$(RTL871X)/$(RTL871X)_lps_poff.o + + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_recv.o + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723D_USB.o +endif +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8723D_PCIE.o +endif + +ifeq ($(CONFIG_BT_COEXIST), y) +_BTC_FILES += hal/btc/halbtc8723d1ant.o \ + hal/btc/halbtc8723d2ant.o +endif + +endif + +########### HAL_RTL8188F ################################# +ifeq ($(CONFIG_RTL8188F), y) + +RTL871X = rtl8188f +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8188fu +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8188fe +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8189fs +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8188F + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8188FPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8188f_fw.o + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188F_USB.o +endif + +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188F_SDIO.o +endif + +endif + +########### HAL_RTL8188GTV ################################# +ifeq ($(CONFIG_RTL8188GTV), y) + +RTL871X = rtl8188gtv +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8188gtvu +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8189gtvs +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8188GTV + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8188GTVPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8188gtv_fw.o + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_NAME)_recv.o + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188GTV_USB.o +endif + +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8188GTV_SDIO.o +endif + +endif + +########### HAL_RTL8822B ################################# +ifeq ($(CONFIG_RTL8822B), y) +RTL871X := rtl8822b +ifeq ($(CONFIG_USB_HCI), y) +ifeq ($(CONFIG_BT_COEXIST), n) +MODULE_NAME = 8812bu +else +MODULE_NAME = 88x2bu +endif +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 88x2be +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 88x2bs +endif + +endif +########### HAL_RTL8821C ################################# +ifeq ($(CONFIG_RTL8821C), y) +RTL871X := rtl8821c +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8821cu +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8821ce +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8821cs +endif + +endif + +########### HAL_RTL8710B ################################# +ifeq ($(CONFIG_RTL8710B), y) + +RTL871X = rtl8710b +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8710bu +MODULE_SUB_NAME = 8710bu +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8710B + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8710BPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8710b_fw.o \ + hal/$(RTL871X)/$(RTL871X)_lps_poff.o + + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_recv.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES +=hal/efuse/$(RTL871X)/HalEfuseMask8710B_USB.o +endif + +endif + +########### HAL_RTL8192F ################################# +ifeq ($(CONFIG_RTL8192F), y) + +RTL871X = rtl8192f +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME = 8192fu +MODULE_SUB_NAME = 8192fu +endif +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME = 8192fe +MODULE_SUB_NAME = 8192fe +endif +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME = 8192fs +MODULE_SUB_NAME = 8192fs +endif + +EXTRA_CFLAGS += -DCONFIG_RTL8192F + +_HAL_INTFS_FILES += hal/HalPwrSeqCmd.o \ + hal/$(RTL871X)/Hal8192FPwrSeq.o\ + hal/$(RTL871X)/$(RTL871X)_sreset.o + +_HAL_INTFS_FILES += hal/$(RTL871X)/$(RTL871X)_hal_init.o \ + hal/$(RTL871X)/$(RTL871X)_phycfg.o \ + hal/$(RTL871X)/$(RTL871X)_rf6052.o \ + hal/$(RTL871X)/$(RTL871X)_dm.o \ + hal/$(RTL871X)/$(RTL871X)_rxdesc.o \ + hal/$(RTL871X)/$(RTL871X)_cmd.o \ + hal/$(RTL871X)/hal8192f_fw.o \ + hal/$(RTL871X)/$(RTL871X)_lps_poff.o + + +_HAL_INTFS_FILES += \ + hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_halinit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_led.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_xmit.o \ + hal/$(RTL871X)/$(HCI_NAME)/rtl$(MODULE_SUB_NAME)_recv.o + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops_linux.o +else +_HAL_INTFS_FILES += hal/$(RTL871X)/$(HCI_NAME)/$(HCI_NAME)_ops.o +endif + +ifeq ($(CONFIG_SDIO_HCI), y) +_HAL_INTFS_FILES += hal/efuse/$(RTL871X)/HalEfuseMask8192F_SDIO.o +endif + +ifeq ($(CONFIG_USB_HCI), y) +_HAL_INTFS_FILES += hal/efuse/$(RTL871X)/HalEfuseMask8192F_USB.o +endif + +ifeq ($(CONFIG_PCI_HCI), y) +_HAL_INTFS_FILES += hal/efuse/$(RTL871X)/HalEfuseMask8192F_PCIE.o +endif + +endif +########### AUTO_CFG ################################# + +ifeq ($(CONFIG_AUTOCFG_CP), y) + +ifeq ($(CONFIG_MULTIDRV), y) +$(shell cp $(TopDIR)/autoconf_multidrv_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) +else +ifeq ($(CONFIG_RTL8188E)$(CONFIG_SDIO_HCI),yy) +$(shell cp $(TopDIR)/autoconf_rtl8189e_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) +else ifeq ($(CONFIG_RTL8188F)$(CONFIG_SDIO_HCI),yy) +$(shell cp $(TopDIR)/autoconf_rtl8189f_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) +else ifeq ($(CONFIG_RTL8723C),y) +$(shell cp $(TopDIR)/autoconf_rtl8723c_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) +else +$(shell cp $(TopDIR)/autoconf_$(RTL871X)_$(HCI_NAME)_linux.h $(TopDIR)/include/autoconf.h) +endif +endif + endif ########### END OF PATH ################################# @@ -374,6 +982,7 @@ ifeq ($(CONFIG_WAPI_SUPPORT), y) EXTRA_CFLAGS += -DCONFIG_WAPI_SUPPORT endif + ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y) EXTRA_CFLAGS += -DCONFIG_EFUSE_CONFIG_FILE @@ -396,6 +1005,7 @@ EXTRA_CFLAGS += -DWIFIMAC_PATH=\"$(USER_WIFIMAC_PATH)\" else EXTRA_CFLAGS += -DWIFIMAC_PATH=\"/data/wifimac.txt\" endif + endif ifeq ($(CONFIG_EXT_CLK), y) @@ -406,6 +1016,12 @@ ifeq ($(CONFIG_TRAFFIC_PROTECT), y) EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT endif +ifeq ($(CONFIG_LOAD_PHY_PARA_FROM_FILE), y) +EXTRA_CFLAGS += -DCONFIG_LOAD_PHY_PARA_FROM_FILE +#EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH_WITH_IC_NAME_FOLDER +EXTRA_CFLAGS += -DREALTEK_CONFIG_PATH=\"/lib/firmware/\" +endif + ifeq ($(CONFIG_TXPWR_BY_RATE), n) EXTRA_CFLAGS += -DCONFIG_TXPWR_BY_RATE=0 else ifeq ($(CONFIG_TXPWR_BY_RATE), y) @@ -527,6 +1143,7 @@ EXTRA_CFLAGS += -DCONFIG_BR_EXT EXTRA_CFLAGS += '-DCONFIG_BR_EXT_BRNAME="'$(BR_NAME)'"' endif + ifeq ($(CONFIG_TDLS), y) EXTRA_CFLAGS += -DCONFIG_TDLS endif @@ -574,16 +1191,6 @@ ifeq ($(CONFIG_IP_R_MONITOR), y) EXTRA_CFLAGS += -DCONFIG_IP_R_MONITOR endif -ifeq ($(CONFIG_LED_CONTROL), y) -EXTRA_CFLAGS += -DCONFIG_LED_CONTROL -ifeq ($(RTL8814), 1) -EXTRA_CFLAGS += -DCONFIG_SW_LED -DCONFIG_RTW_SW_LED -endif -ifeq ($(CONFIG_LED_ENABLE), y) -EXTRA_CFLAGS += -DCONFIG_LED_ENABLE -endif -endif - ifeq ($(CONFIG_RTW_WIFI_HAL), y) #EXTRA_CFLAGS += -DCONFIG_RTW_WIFI_HAL_DEBUG EXTRA_CFLAGS += -DCONFIG_RTW_WIFI_HAL @@ -598,15 +1205,9 @@ EXTRA_CFLAGS += -DCONFIG_MP_VHT_HW_TX_MODE ifeq ($(CONFIG_PLATFORM_I386_PC), y) ## For I386 X86 ToolChain use Hardware FLOATING EXTRA_CFLAGS += -mhard-float -EXTRA_CFLAGS += -DMARK_KERNEL_PFU -else ifeq ($(CONFIG_PLATFORM_ARM_RPI), y) -## For Rpi3: use hardware floating, but not on the api -EXTRA_CFLAGS += -mfloat-abi=softfp else ## For ARM ToolChain use Hardware FLOATING -# Raspbian kernel is with soft-float. -# 'softfp' allows FP instructions, but no FP on function call interfaces -EXTRA_CFLAGS += -mfloat-abi=softfp +EXTRA_CFLAGS += -mfloat-abi=hard endif endif @@ -619,15 +1220,12 @@ EXTRA_CFLAGS += -DCONFIG_RTW_DEBUG EXTRA_CFLAGS += -DRTW_LOG_LEVEL=$(CONFIG_RTW_LOG_LEVEL) endif -ifeq ($(CONFIG_RTW_IOCTL_SET_COUNTRY), y) -EXTRA_CFLAGS += -DCONFIG_RTW_IOCTL_SET_COUNTRY -endif - EXTRA_CFLAGS += -DDM_ODM_SUPPORT_TYPE=0x04 ifeq ($(CONFIG_PLATFORM_I386_PC), y) +EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc64le/powerpc/ | sed -e s/aarch64/arm64/ | sed -e s/armv7l/arm/) +SUBARCH := $(shell uname -m | sed -e s/i.86/i386/) ARCH ?= $(SUBARCH) CROSS_COMPILE ?= KVER := $(shell uname -r) @@ -649,6 +1247,7 @@ EXTRA_CFLAGS += -DCONFIG_RADIO_WORK EXTRA_CFLAGS += -DRTW_VENDOR_EXT_SUPPORT EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC ARCH ?= arm + CROSS_COMPILE := /mnt/newdisk/android_sdk/nvidia_tk1/android_L/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi- KSRC :=/mnt/newdisk/android_sdk/nvidia_tk1/android_L/out/target/product/shieldtablet/obj/KERNEL/ MODULE_NAME = wlan @@ -658,7 +1257,9 @@ ifeq ($(CONFIG_PLATFORM_NV_TK1_UBUNTU), y) EXTRA_CFLAGS += -DCONFIG_PLATFORM_NV_TK1 EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT + ARCH ?= arm + CROSS_COMPILE ?= KVER := $(shell uname -r) KSRC := /lib/modules/$(KVER)/build @@ -678,6 +1279,7 @@ KSRC := $(KERNEL_BUILD_PATH) MODULE_NAME :=wlan endif + ifeq ($(CONFIG_PLATFORM_ACTIONS_ATM705X), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #EXTRA_CFLAGS += -DRTW_ENABLE_WIFI_CONTROL_FUNC @@ -691,6 +1293,7 @@ EXTRA_CFLAGS += -DCONFIG_RADIO_WORK ifeq ($(CONFIG_SDIO_HCI), y) EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS +_PLATFORM_FILES += platform/platform_arm_act_sdio.o endif ARCH := arm @@ -713,8 +1316,10 @@ EXTRA_CFLAGS += -DCONFIG_RADIO_WORK ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX +_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) +_PLATFORM_FILES += platform/platform_ARM_SUN50IW1P1_sdio.o endif ARCH := arm64 @@ -843,23 +1448,11 @@ endif ifeq ($(CONFIG_PLATFORM_MIPS_AR9132), y) EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT ARCH := mips CROSS_COMPILE := mips-openwrt-linux- KSRC := /home/alex/test_openwrt/tmp/linux-2.6.30.9 endif -# This is how I built for openwrt Neo2 platform. --Ben -ifeq ($(CONFIG_PLATFORM_OPENWRT_NEO2), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -#EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -ARCH := arm64 -CROSS_COMPILE := aarch64-openwrt-linux- -#export PATH=$PATH:/home/greearb/git/openwrt-neo2-dev/staging_dir/toolchain-aarch64_cortex-a53_gcc-7.3.0_musl/bin/ -#export STAGING_DIR=/home/greearb/git/openwrt-neo2-dev/staging_dir -KSRC := /home/greearb/git/openwrt-neo2-dev/build_dir/target-aarch64_cortex-a53_musl/linux-sunxi_cortexa53/linux-4.14.78 -endif - ifeq ($(CONFIG_PLATFORM_DMP_PHILIPS), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM ARCH := mips @@ -872,6 +1465,7 @@ ifeq ($(CONFIG_PLATFORM_RTK_DMP), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DRTK_DMP_PLATFORM -DCONFIG_WIRELESS_EXT EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_USB_HCI), y) +_PLATFORM_FILES += platform/platform_RTK_DMP_usb.o endif ARCH:=mips CROSS_COMPILE:=mipsel-linux- @@ -902,6 +1496,8 @@ CROSS_COMPILE := /home/share/CusEnv/FreeScale/arm-eabi-4.4.3/bin/arm-eabi- KSRC ?= /home/share/CusEnv/FreeScale/FS_kernel_env endif + + ifeq ($(CONFIG_PLATFORM_ACTIONS_ATJ227X), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -DCONFIG_PLATFORM_ACTIONS_ATJ227X ARCH := mips @@ -1066,10 +1662,12 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX +_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) # default setting for A10-EVB mmc0 #EXTRA_CFLAGS += -DCONFIG_WITS_EVB_V13 +_PLATFORM_FILES += platform/platform_ARM_SUNxI_sdio.o endif ARCH := arm @@ -1088,13 +1686,16 @@ EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT EXTRA_CFLAGS += -DCONFIG_QOS_OPTIMIZATION + EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX +_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) # default setting for A31-EVB mmc0 EXTRA_CFLAGS += -DCONFIG_A31_EVB +_PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o endif ARCH := arm @@ -1121,8 +1722,10 @@ EXTRA_CFLAGS += -DCONFIG_QOS_OPTIMIZATION EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX +_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) +_PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o endif ARCH := arm @@ -1149,8 +1752,10 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX +_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) +_PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o endif ARCH := arm @@ -1170,13 +1775,17 @@ EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT # default setting for Android 4.1, 4.2 EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT + # Enable this for Android 5.0 EXTRA_CFLAGS += -DCONFIG_RADIO_WORK + EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX +_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) +_PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o endif ARCH := arm @@ -1274,6 +1883,14 @@ ifndef KSRC KSRC := /HiSTBAndroidV600R003C00SPC021_git_0512/device/hisilicon/bigfish/sdk/source/kernel/linux-3.18.y KSRC += O=/HiSTBAndroidV600R003C00SPC021_git_0512/out/target/product/Hi3798MV200/obj/KERNEL_OBJ endif + +ifeq ($(CONFIG_RTL8822B), y) +ifeq ($(CONFIG_SDIO_HCI), y) +CONFIG_RTL8822BS ?= m +USER_MODULE_NAME := rtl8822bs +endif +endif + endif # Platform setting @@ -1289,6 +1906,7 @@ EXTRA_CFLAGS += -DSOFTAP_PS_DURATION=50 endif ifeq ($(CONFIG_SDIO_HCI), y) EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS +_PLATFORM_FILES += platform/platform_sprd_sdio.o endif endif @@ -1304,6 +1922,7 @@ EXTRA_CFLAGS += -DSOFTAP_PS_DURATION=50 endif ifeq ($(CONFIG_SDIO_HCI), y) EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS +_PLATFORM_FILES += platform/platform_sprd_sdio.o endif endif @@ -1313,6 +1932,7 @@ EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS ifeq ($(CONFIG_SDIO_HCI), y) +_PLATFORM_FILES += platform/platform_ARM_WMT_sdio.o endif ARCH := arm CROSS_COMPILE := /home/android_sdk/WonderMedia/wm8880-android4.4/toolchain/arm_201103_gcc4.5.2/mybin/arm_1103_le- @@ -1320,39 +1940,6 @@ KSRC := /home/android_sdk/WonderMedia/wm8880-android4.4/kernel4.4/ MODULE_NAME :=8189es_kk endif -ifeq ($(CONFIG_PLATFORM_ARM_NV_NANO), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -ARCH := arm64 -KVER := $(shell uname -r) -KSRC := /lib/modules/$(KVER)/build -MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ -INSTALL_PREFIX := -STAGINGMODDIR := /lib/modules/$(KVER)/kernel/drivers/staging -endif - -ifeq ($(CONFIG_PLATFORM_ARM_RPI), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -ARCH ?= arm -CROSS_COMPILE ?= -KVER ?= $(shell uname -r) -KSRC := /lib/modules/$(KVER)/build -MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ -INSTALL_PREFIX := -endif - -ifeq ($(CONFIG_PLATFORM_ARM64_RPI), y) -EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN -EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT -ARCH ?= arm64 -CROSS_COMPILE ?= -KVER ?= $(shell uname -r) -KSRC := /lib/modules/$(KVER)/build -MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ -INSTALL_PREFIX := -endif - ifeq ($(CONFIG_PLATFORM_RTK119X), y) EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN #EXTRA_CFLAGS += -DCONFIG_PLATFORM_ARM_SUN7I @@ -1369,9 +1956,11 @@ EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX #_PLATFORM_FILES += platform/platform_ARM_SUNxI_usb.o endif ifeq ($(CONFIG_SDIO_HCI), y) +_PLATFORM_FILES += platform/platform_ARM_SUNnI_sdio.o endif ARCH := arm + # ==== Cross compile setting for Android 4.4 SDK ===== #CROSS_COMPILE := arm-linux-gnueabihf- KVER := 3.10.24 @@ -1379,6 +1968,7 @@ KVER := 3.10.24 CROSS_COMPILE := /home/realtek/software_phoenix/phoenix/toolchain/usr/local/arm-2013.11/bin/arm-linux-gnueabihf- KSRC := /home/realtek/software_phoenix/linux-kernel MODULE_NAME := 8192eu + endif ifeq ($(CONFIG_PLATFORM_RTK119X_AM), y) @@ -1388,11 +1978,13 @@ EXTRA_CFLAGS += -DCONFIG_TRAFFIC_PROTECT EXTRA_CFLAGS += -DCONFIG_CONCURRENT_MODE -DCONFIG_FULL_CH_IN_P2P_HANDSHAKE EXTRA_CFLAGS += -DCONFIG_IFACE_NUMBER=3 EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT + ifeq ($(CONFIG_USB_HCI), y) EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX endif ARCH := arm + #CROSS_COMPILE := arm-linux-gnueabihf- KVER := 3.10.24 #KSRC := @@ -1425,6 +2017,7 @@ EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX endif ARCH := arm64 + # ==== Cross compile setting for Android 4.4 SDK ===== #CROSS_COMPILE := arm-linux-gnueabihf- #KVER := 4.1.10 @@ -1444,8 +2037,10 @@ EXTRA_CFLAGS += -DCONFIG_USE_USB_BUFFER_ALLOC_TX endif ARCH:=rlx + CROSS_COMPILE:=mips-linux- KSRC:= /home/realtek/share/Develop/IPCAM_SDK/RealSil/rts3901_sdk_v1.2_vanilla/linux-3.10 + endif ifeq ($(CONFIG_PLATFORM_NOVATEK_NT72668), y) @@ -1471,7 +2066,7 @@ ARCH := arm CROSS_COMPILE := /home/android_sdk/Telechips/v13.05_r1-tcc-android-4.2.2_tcc893x-evm_build/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi- KSRC := /home/android_sdk/Telechips/v13.05_r1-tcc-android-4.2.2_tcc893x-evm_build/kernel MODULE_NAME := wlan -endif +endif ifeq ($(CONFIG_PLATFORM_RTL8197D), y) EXTRA_CFLAGS += -DCONFIG_BIG_ENDIAN -DCONFIG_PLATFORM_RTL8197D @@ -1490,8 +2085,10 @@ EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 EXTRA_CFLAGS += -DRTW_USE_CFG80211_STA_EVENT # default setting for Android 5.x and later EXTRA_CFLAGS += -DCONFIG_RADIO_WORK + ifeq ($(CONFIG_SDIO_HCI), y) EXTRA_CFLAGS += -DCONFIG_PLATFORM_OPS +_PLATFORM_FILES += platform/platform_aml_s905_sdio.o endif ARCH ?= arm64 @@ -1508,6 +2105,7 @@ CONFIG_RTL8822BS ?= m USER_MODULE_NAME := 8822bs endif endif + endif ifeq ($(CONFIG_PLATFORM_ZTE_ZX296716), y) @@ -1530,6 +2128,14 @@ endif ARCH ?= arm64 CROSS_COMPILE ?= KSRC ?= + +ifeq ($(CONFIG_RTL8822B), y) +ifeq ($(CONFIG_SDIO_HCI), y) +CONFIG_RTL8822BS ?= m +USER_MODULE_NAME := 8822bs +endif +endif + endif ########### CUSTOMER ################################ @@ -1541,6 +2147,23 @@ ifeq ($(CONFIG_CUSTOMER_HUAWEI), y) EXTRA_CFLAGS += -DCONFIG_HUAWEI_PROC endif +ifeq ($(CONFIG_MULTIDRV), y) + +ifeq ($(CONFIG_SDIO_HCI), y) +MODULE_NAME := rtw_sdio +endif + +ifeq ($(CONFIG_USB_HCI), y) +MODULE_NAME := rtw_usb +endif + +ifeq ($(CONFIG_PCI_HCI), y) +MODULE_NAME := rtw_pci +endif + + +endif + USER_MODULE_NAME ?= ifneq ($(USER_MODULE_NAME),) MODULE_NAME := $(USER_MODULE_NAME) @@ -1551,6 +2174,16 @@ ifneq ($(KERNELRELEASE),) ########### this part for *.mk ############################ include $(src)/hal/phydm/phydm.mk +########### HAL_RTL8822B ################################# +ifeq ($(CONFIG_RTL8822B), y) +include $(src)/rtl8822b.mk +endif + +########### HAL_RTL8821C ################################# +ifeq ($(CONFIG_RTL8821C), y) +include $(src)/rtl8821c.mk +endif + rtk_core := core/rtw_cmd.o \ core/rtw_security.o \ core/rtw_debug.o \ @@ -1585,10 +2218,16 @@ rtk_core := core/rtw_cmd.o \ core/rtw_odm.o \ core/rtw_rm.o \ core/rtw_rm_fsm.o \ - core/efuse/rtw_efuse.o + core/efuse/rtw_efuse.o + +ifeq ($(CONFIG_SDIO_HCI), y) +rtk_core += core/rtw_sdio.o +endif $(MODULE_NAME)-y += $(rtk_core) + $(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o + $(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \ core/rtw_wapi_sms4.o @@ -1596,10 +2235,18 @@ $(MODULE_NAME)-y += $(_OS_INTFS_FILES) $(MODULE_NAME)-y += $(_HAL_INTFS_FILES) $(MODULE_NAME)-y += $(_PHYDM_FILES) $(MODULE_NAME)-y += $(_BTC_FILES) +$(MODULE_NAME)-y += $(_PLATFORM_FILES) + $(MODULE_NAME)-$(CONFIG_MP_INCLUDED) += core/rtw_mp.o +ifeq ($(CONFIG_RTL8723B), y) +$(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o +endif + obj-$(CONFIG_RTL8812AU) := $(MODULE_NAME).o + else + export CONFIG_RTL8812AU = m all: modules @@ -1615,11 +2262,11 @@ install: /sbin/depmod -a ${KVER} uninstall: - rm -f $(MODDESTDIR)$(MODULE_NAME).ko + rm -f $(MODDESTDIR)/$(MODULE_NAME).ko /sbin/depmod -a ${KVER} -backup: - @echo "Making backup of drivers" +backup_rtlwifi: + @echo "Making backup rtlwifi drivers" ifneq (,$(wildcard $(STAGINGMODDIR)/rtl*)) @tar cPf $(wildcard $(STAGINGMODDIR))/backup_rtlwifi_driver.tar $(wildcard $(STAGINGMODDIR)/rtl*) @rm -rf $(wildcard $(STAGINGMODDIR)/rtl*) @@ -1635,7 +2282,7 @@ endif @/sbin/depmod -a ${KVER} @echo "Please reboot your system" -restore: +restore_rtlwifi: @echo "Restoring backups" ifneq (,$(wildcard $(STAGINGMODDIR)/backup_rtlwifi_driver.tar)) @tar xPf $(STAGINGMODDIR)/backup_rtlwifi_driver.tar @@ -1656,6 +2303,7 @@ config_r: @echo "make config" /bin/bash script/Configure script/config.in + .PHONY: modules clean clean: @@ -1673,3 +2321,4 @@ clean: rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~ rm -fr .tmp_versions endif + diff --git a/README.md b/README.md index d2737b9..ac3cfbd 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,7 @@ ZerBea - https://github.com/ZerBea lwfinger - https://github.com/lwfinger Ulli-Kroll - https://github.com/Ulli-Kroll -Aldo, thanks to Realtek and Alfa Networks for all they're help & support. +Also, thanks to Realtek and Alfa Networks for all they're help & support. All the others interested and participating. Appreciate it! diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c old mode 100755 new mode 100644 diff --git a/core/rtw_recv.c b/core/rtw_recv.c old mode 100755 new mode 100644 diff --git a/dkms.conf b/dkms.conf index 4d31175..fa7b103 100644 --- a/dkms.conf +++ b/dkms.conf @@ -1,5 +1,5 @@ PACKAGE_NAME="realtek-rtl88xxau" -PACKAGE_VERSION="5.6.4.2~20191030" +PACKAGE_VERSION="5.6.4.2~20191031" CLEAN="'make' clean" BUILT_MODULE_NAME[0]=88XXau PROCS_NUM=`nproc` diff --git a/hal/hal_mp.c b/hal/hal_mp.c index 1af9de3..0f084c7 100644 --- a/hal/hal_mp.c +++ b/hal/hal_mp.c @@ -30,7 +30,7 @@ #ifdef CONFIG_RTL8192E #include #endif - #ifdef CONFIG_RTL8814A + #if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8812A) #include #endif #if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) @@ -862,7 +862,7 @@ VOID mpt_SetRFPath_8814A(PADAPTER pAdapter) mpt_ToggleIG_8814A(pAdapter); } #endif /* CONFIG_RTL8814A */ -#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) +#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) || defined(CONFIG_RTL8812A) VOID mpt_SetSingleTone_8814A( IN PADAPTER pAdapter, @@ -966,126 +966,6 @@ mpt_SetSingleTone_8814A( phy_set_bb_reg(pAdapter, rD_TxScale_Jaguar2, bMaskDWord, regIG3); /* 0x1A1C[31:21]*/ } } - -#endif - -#if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) -void mpt_SetRFPath_8812A(PADAPTER pAdapter) -{ - HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); - PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.mpt_ctx; - struct mp_priv *pmp = &pAdapter->mppriv; - u8 channel = pmp->channel; - u8 bandwidth = pmp->bandwidth; - u8 eLNA_2g = pHalData->ExternalLNA_2G; - u32 ulAntennaTx, ulAntennaRx; - - ulAntennaTx = pHalData->antenna_tx_path; - ulAntennaRx = pHalData->AntennaRxPath; - - switch (ulAntennaTx) { - case ANTENNA_A: - pMptCtx->mpt_rf_path = RF_PATH_A; - phy_set_bb_reg(pAdapter, rTxPath_Jaguar, bMaskLWord, 0x1111); - if (pHalData->rfe_type == 3 && IS_HARDWARE_TYPE_8812(pAdapter)) - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, bMask_AntselPathFollow_Jaguar, 0x0); - break; - case ANTENNA_B: - pMptCtx->mpt_rf_path = RF_PATH_B; - phy_set_bb_reg(pAdapter, rTxPath_Jaguar, bMaskLWord, 0x2222); - if (pHalData->rfe_type == 3 && IS_HARDWARE_TYPE_8812(pAdapter)) - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, bMask_AntselPathFollow_Jaguar, 0x1); - break; - case ANTENNA_AB: - pMptCtx->mpt_rf_path = RF_PATH_AB; - phy_set_bb_reg(pAdapter, rTxPath_Jaguar, bMaskLWord, 0x3333); - if (pHalData->rfe_type == 3 && IS_HARDWARE_TYPE_8812(pAdapter)) - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, bMask_AntselPathFollow_Jaguar, 0x0); - break; - default: - pMptCtx->mpt_rf_path = RF_PATH_AB; - RTW_INFO("Unknown Tx antenna.\n"); - break; - } - - switch (ulAntennaRx) { - u32 reg0xC50 = 0; - case ANTENNA_A: - phy_set_bb_reg(pAdapter, rRxPath_Jaguar, bMaskByte0, 0x11); - phy_set_rf_reg(pAdapter, RF_PATH_B, RF_AC_Jaguar, 0xF0000, 0x1); /*/ RF_B_0x0[19:16] = 1, Standby mode*/ - phy_set_bb_reg(pAdapter, rCCK_RX_Jaguar, bCCK_RX_Jaguar, 0x0); - phy_set_rf_reg(pAdapter, RF_PATH_A, RF_AC_Jaguar, BIT19 | BIT18 | BIT17 | BIT16, 0x3); - - /*/ <20121101, Kordan> To prevent gain table from not switched, asked by Ynlin.*/ - reg0xC50 = phy_query_bb_reg(pAdapter, rA_IGI_Jaguar, bMaskByte0); - phy_set_bb_reg(pAdapter, rA_IGI_Jaguar, bMaskByte0, reg0xC50 + 2); - phy_set_bb_reg(pAdapter, rA_IGI_Jaguar, bMaskByte0, reg0xC50); - - /* set PWED_TH for BB Yn user guide R29 */ - if (IS_HARDWARE_TYPE_8812(pAdapter)) { - if (channel <= 14) { /* 2.4G */ - if (bandwidth == CHANNEL_WIDTH_20 - && eLNA_2g == 0) { - /* 0x830[3:1]=3'b010 */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x02); - } else - /* 0x830[3:1]=3'b100 */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x04); - } else - /* 0x830[3:1]=3'b100 for 5G */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x04); - } - break; - case ANTENNA_B: - phy_set_bb_reg(pAdapter, rRxPath_Jaguar, bMaskByte0, 0x22); - phy_set_rf_reg(pAdapter, RF_PATH_A, RF_AC_Jaguar, 0xF0000, 0x1);/*/ RF_A_0x0[19:16] = 1, Standby mode */ - phy_set_bb_reg(pAdapter, rCCK_RX_Jaguar, bCCK_RX_Jaguar, 0x1); - phy_set_rf_reg(pAdapter, RF_PATH_B, RF_AC_Jaguar, BIT19 | BIT18 | BIT17 | BIT16, 0x3); - - /*/ <20121101, Kordan> To prevent gain table from not switched, asked by Ynlin.*/ - reg0xC50 = phy_query_bb_reg(pAdapter, rB_IGI_Jaguar, bMaskByte0); - phy_set_bb_reg(pAdapter, rB_IGI_Jaguar, bMaskByte0, reg0xC50 + 2); - phy_set_bb_reg(pAdapter, rB_IGI_Jaguar, bMaskByte0, reg0xC50); - - /* set PWED_TH for BB Yn user guide R29 */ - if (IS_HARDWARE_TYPE_8812(pAdapter)) { - if (channel <= 14) { - if (bandwidth == CHANNEL_WIDTH_20 - && eLNA_2g == 0) { - /* 0x830[3:1]=3'b010 */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x02); - } else - /* 0x830[3:1]=3'b100 */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x04); - } else - /* 0x830[3:1]=3'b100 for 5G */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x04); - } - break; - case ANTENNA_AB: - phy_set_bb_reg(pAdapter, rRxPath_Jaguar, bMaskByte0, 0x33); - phy_set_rf_reg(pAdapter, RF_PATH_B, RF_AC_Jaguar, 0xF0000, 0x3); /*/ RF_B_0x0[19:16] = 3, Rx mode*/ - phy_set_bb_reg(pAdapter, rCCK_RX_Jaguar, bCCK_RX_Jaguar, 0x0); - /* set PWED_TH for BB Yn user guide R29 */ - phy_set_bb_reg(pAdapter, rPwed_TH_Jaguar, BIT1 | BIT2 | BIT3, 0x04); - break; - default: - RTW_INFO("Unknown Rx antenna.\n"); - break; - } - - if (pHalData->rfe_type == 5 || pHalData->rfe_type == 1) { - if (ulAntennaTx == ANTENNA_A || ulAntennaTx == ANTENNA_AB) { - /* WiFi */ - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, BIT(1) | BIT(0), 0x2); - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, BIT(9) | BIT(8), 0x3); - } else { - /* BT */ - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, BIT(1) | BIT(0), 0x1); - phy_set_bb_reg(pAdapter, r_ANTSEL_SW_Jaguar, BIT(9) | BIT(8), 0x3); - } - } -} #endif #ifdef CONFIG_RTL8723B @@ -1526,12 +1406,6 @@ void hal_mpt_SetAntenna(PADAPTER pAdapter) return; } #endif -#if defined(CONFIG_RTL8812A) || defined(CONFIG_RTL8821A) - if (IS_HARDWARE_TYPE_JAGUAR(pAdapter)) { - mpt_SetRFPath_8812A(pAdapter); - return; - } -#endif #ifdef CONFIG_RTL8723B if (IS_HARDWARE_TYPE_8723B(pAdapter)) { mpt_SetRFPath_8723B(pAdapter); @@ -2148,8 +2022,7 @@ static VOID mpt_StartOfdmContTx( pMptCtx->bOfdmContTx = TRUE; } /* mpt_StartOfdmContTx */ - -#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8821B) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) +#if defined(CONFIG_MP_VHT_HW_TX_MODE) /* for HW TX mode */ void mpt_ProSetPMacTx(PADAPTER Adapter) { diff --git a/include/autoconf.h b/include/autoconf.h index d88036b..9dce108 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -22,8 +22,9 @@ */ #define AUTOCONF_INCLUDED #define RTL871X_MODULE_NAME "8812AU" +#ifndef DRV_NAME #define DRV_NAME "rtl8812au" - +#endif #define CONFIG_USB_HCI diff --git a/include/drv_conf.h b/include/drv_conf.h old mode 100755 new mode 100644 diff --git a/include/hal_data.h b/include/hal_data.h old mode 100755 new mode 100644 diff --git a/include/rtl8723b_hal.h b/include/rtl8723b_hal.h old mode 100755 new mode 100644 diff --git a/include/rtl8723b_led.h b/include/rtl8723b_led.h old mode 100755 new mode 100644 diff --git a/include/rtl8723b_recv.h b/include/rtl8723b_recv.h old mode 100755 new mode 100644 diff --git a/include/rtl8723b_spec.h b/include/rtl8723b_spec.h old mode 100755 new mode 100644 diff --git a/include/rtl8723b_xmit.h b/include/rtl8723b_xmit.h old mode 100755 new mode 100644 diff --git a/include/rtl8814a_cmd.h b/include/rtl8814a_cmd.h old mode 100755 new mode 100644 diff --git a/include/rtl8814a_hal.h b/include/rtl8814a_hal.h old mode 100755 new mode 100644 diff --git a/include/rtl8814a_recv.h b/include/rtl8814a_recv.h old mode 100755 new mode 100644 diff --git a/include/rtl8814a_spec.h b/include/rtl8814a_spec.h old mode 100755 new mode 100644 diff --git a/include/rtl8814a_xmit.h b/include/rtl8814a_xmit.h old mode 100755 new mode 100644 diff --git a/include/rtl8821ce_hal.h b/include/rtl8821ce_hal.h old mode 100755 new mode 100644 diff --git a/include/rtl8822be_hal.h b/include/rtl8822be_hal.h old mode 100755 new mode 100644 diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c old mode 100755 new mode 100644 diff --git a/os_dep/linux/ioctl_mp.c b/os_dep/linux/ioctl_mp.c index 06233dc..3ba0557 100644 --- a/os_dep/linux/ioctl_mp.c +++ b/os_dep/linux/ioctl_mp.c @@ -2069,7 +2069,7 @@ int rtw_mp_hwtx(struct net_device *dev, struct mp_priv *pmp_priv = &padapter->mppriv; PMPT_CONTEXT pMptCtx = &(padapter->mppriv.mpt_ctx); -#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8821B) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) +#if defined(CONFIG_MP_VHT_HW_TX_MODE) u8 input[wrqu->data.length]; if (copy_from_user(input, wrqu->data.pointer, wrqu->data.length))