From 74cc8cdbc113eb253a15082cb23267521b4b1826 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Sat, 8 Jun 2019 10:43:35 +0200 Subject: [PATCH] i386: mark floating point operations correctly. From commit #1603b05c --- Makefile | 1 + os_dep/linux/ioctl_mp.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/Makefile b/Makefile index ece860e..ba233cb 100755 --- a/Makefile +++ b/Makefile @@ -1254,6 +1254,7 @@ 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 diff --git a/os_dep/linux/ioctl_mp.c b/os_dep/linux/ioctl_mp.c index 06233dc..eff4945 100644 --- a/os_dep/linux/ioctl_mp.c +++ b/os_dep/linux/ioctl_mp.c @@ -19,6 +19,10 @@ #include #include "../../hal/phydm/phydm_precomp.h" +ifdef MARK_KERNEL_PFU + #include + #include +#endif #if defined(CONFIG_RTL8723B) #include @@ -1718,6 +1722,10 @@ 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); @@ -1726,6 +1734,11 @@ 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);