From 181b1996799a2d764b0b13d388df495d96bea116 Mon Sep 17 00:00:00 2001 From: Thijs Withaar Date: Tue, 4 Sep 2018 17:26:45 +0200 Subject: [PATCH] CONFIG_MP_VHT_HW_TX_MODE: Mark floating point regions --- Makefile | 5 +++-- os_dep/linux/ioctl_mp.c | 20 +++++++++++++------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index f989785..ad1043f 100755 --- a/Makefile +++ b/Makefile @@ -110,7 +110,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_ARM_RPI = n @@ -1038,7 +1038,8 @@ ifeq ($(CONFIG_PLATFORM_I386_PC), y) EXTRA_CFLAGS += -mhard-float else ## For ARM ToolChain use Hardware FLOATING -EXTRA_CFLAGS += -mfloat-abi=hard +# Raspbian kernel is with soft-float, so can't do this here +#EXTRA_CFLAGS += -mfloat-abi=hard endif endif diff --git a/os_dep/linux/ioctl_mp.c b/os_dep/linux/ioctl_mp.c index eacd685..6d046c4 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 CONFIG_MP_VHT_HW_TX_MODE + #include + #include +#endif + #include #include #include @@ -826,7 +831,7 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev, u32 bt_coexist; _rtw_memset(input, 0, sizeof(input)); - + if (copy_from_user(input, wrqu->data.pointer, wrqu->data.length)) return -EFAULT; @@ -1617,14 +1622,16 @@ int rtw_mp_tx(struct net_device *dev, PMAC_Get_Pkt_Param(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); + kernel_fpu_begin(); if (MPT_IS_CCK_RATE(pMptCtx->PMacTxInfo.TX_RATE)) - - CCK_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); + CCK_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); // Floating-Point! else { - PMAC_Nsym_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); + PMAC_Nsym_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); // Floating-Point! /* 24 BIT*/ - L_SIG_generator(pMptCtx->PMacPktInfo.N_sym, &pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); + L_SIG_generator(pMptCtx->PMacPktInfo.N_sym, &pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); // Floating-Point! } + kernel_fpu_end(); + /* 48BIT*/ if (MPT_IS_HT_RATE(pMptCtx->PMacTxInfo.TX_RATE)) HT_SIG_generator(&pMptCtx->PMacTxInfo, &pMptCtx->PMacPktInfo); @@ -1640,7 +1647,6 @@ int rtw_mp_tx(struct net_device *dev, } mpt_ProSetPMacTx(padapter); - } else if (strncmp(extra, "pmact,mode=", 11) == 0) { int txmode = 0; @@ -2227,7 +2233,7 @@ int rtw_mp_SetBT(struct net_device *dev, return -EFAULT; *(extra + wrqu->data.length) = '\0'; - + if (strlen(extra) < 1) return -EFAULT;