From 7c93fa7c052e4077e22ca34c500d87a703161f08 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Thu, 6 Sep 2018 18:54:47 +0200 Subject: [PATCH] Fix floating point in VHT_HW_TX for both x86 and rpi --- Makefile | 13 ++++++++----- os_dep/linux/ioctl_mp.c | 11 +++++++++++ 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0e9822e..1fe5f26 100755 --- a/Makefile +++ b/Makefile @@ -104,7 +104,7 @@ CONFIG_AP_WOWLAN = n ######### 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 = n +CONFIG_MP_VHT_HW_TX_MODE = y ###################### Platform Related ####################### CONFIG_PLATFORM_I386_PC = y CONFIG_PLATFORM_ANDROID_X86 = n @@ -484,7 +484,7 @@ endif EXTRA_CFLAGS += -DCONFIG_RTL8821A _HAL_INTFS_FILES += hal/rtl8812a/hal8821a_fw.o - + endif ifeq ($(CONFIG_BT_COEXIST), y) @@ -1055,9 +1055,12 @@ 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 ## For ARM ToolChain use Hardware FLOATING -EXTRA_CFLAGS += -mfloat-abi=hard +# Raspbian kernel is with soft-float. +# 'softfp' allows FP instructions, but no FP on function call interfaces +EXTRA_CFLAGS += -mfloat-abi=softfp endif endif @@ -1868,7 +1871,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 @@ -2010,7 +2013,7 @@ 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 diff --git a/os_dep/linux/ioctl_mp.c b/os_dep/linux/ioctl_mp.c index e82c39f..f094bdb 100644 --- a/os_dep/linux/ioctl_mp.c +++ b/os_dep/linux/ioctl_mp.c @@ -14,6 +14,11 @@ *****************************************************************************/ #if defined(CONFIG_MP_INCLUDED) +#ifdef MARK_KERNEL_PFU + #include + #include +#endif + #include #include #include @@ -1693,6 +1698,9 @@ int rtw_mp_tx(struct net_device *dev, PMAC_Get_Pkt_Param(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); + #ifdef MARK_KERNEL_PFU + kernel_fpu_begin(); + #endif if (MPT_IS_CCK_RATE(pMptCtx->PMacTxInfo.TX_RATE)) CCK_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); @@ -1701,6 +1709,9 @@ int rtw_mp_tx(struct net_device *dev, /* 24 BIT*/ L_SIG_generator(pMptCtx->PMacPktInfo.N_sym, &pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); } + #ifdef MARK_KERNEL_PFU + kernel_fpu_end(); + #endif /* 48BIT*/ if (MPT_IS_HT_RATE(pMptCtx->PMacTxInfo.TX_RATE)) HT_SIG_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo);