From 957b79f1db5f5610523887a37d922ba8bdbb6659 Mon Sep 17 00:00:00 2001 From: fariouche Date: Sun, 7 Oct 2018 22:19:52 +0200 Subject: [PATCH] fixed compilation error if rtl8814 is not enabled in the Makefile --- hal/hal_mp.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/hal/hal_mp.c b/hal/hal_mp.c index 6821e0c..7a4274d 100644 --- a/hal/hal_mp.c +++ b/hal/hal_mp.c @@ -1732,8 +1732,8 @@ void hal_mpt_SetSingleToneTx(PADAPTER pAdapter, u8 bStart) #endif } #if defined(CONFIG_RTL8814A) - else if (IS_HARDWARE_TYPE_8814A(pAdapter)) - mpt_SetSingleTone_8814A(pAdapter, TRUE, FALSE); + else if (IS_HARDWARE_TYPE_8814A(pAdapter)) + mpt_SetSingleTone_8814A(pAdapter, TRUE, FALSE); #endif else /*/ Turn On SingleTone and turn off the other test modes.*/ phy_set_bb_reg(pAdapter, rOFDM1_LSTF, BIT30 | BIT29 | BIT28, OFDM_SingleTone); @@ -1817,10 +1817,10 @@ void hal_mpt_SetSingleToneTx(PADAPTER pAdapter, u8 bStart) #if defined(CONFIG_RTL8814A) else if (IS_HARDWARE_TYPE_8814A(pAdapter)) mpt_SetSingleTone_8814A(pAdapter, FALSE, FALSE); - +#endif else/*/ Turn off all test modes.*/ phy_set_bb_reg(pAdapter, rSingleTone_ContTx_Jaguar, BIT18 | BIT17 | BIT16, OFDM_ALL_OFF); -#endif + write_bbreg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000100); write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000100); @@ -2039,7 +2039,7 @@ static VOID mpt_StartOfdmContTx( } /* mpt_StartOfdmContTx */ -#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8821B) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) +//#if defined(CONFIG_RTL8814A) || defined(CONFIG_RTL8821B) || defined(CONFIG_RTL8822B) || defined(CONFIG_RTL8821C) /* for HW TX mode */ void mpt_ProSetPMacTx(PADAPTER Adapter) { @@ -2087,8 +2087,10 @@ void mpt_ProSetPMacTx(PADAPTER Adapter) mpt_StopCckContTx(Adapter); else mpt_StopOfdmContTx(Adapter); - - mpt_SetSingleTone_8814A(Adapter, FALSE, TRUE); +#if defined(CONFIG_RTL8814A) + if (IS_HARDWARE_TYPE_8814A(padapter)) + mpt_SetSingleTone_8814A(Adapter, FALSE, TRUE); +#endif } return; @@ -2237,13 +2239,15 @@ void mpt_ProSetPMacTx(PADAPTER Adapter) phy_set_bb_reg(Adapter, 0xA84, BIT31, 0); } else phy_set_bb_reg(Adapter, 0xb04, 0xf, 4); /* TX Ofdm ON */ - - if (PMacTxInfo.Mode == OFDM_Single_Tone_TX) - mpt_SetSingleTone_8814A(Adapter, TRUE, TRUE); - +#if defined(CONFIG_RTL8814A) + if (PMacTxInfo.Mode == OFDM_Single_Tone_TX) { + if (IS_HARDWARE_TYPE_8814A(padapter)) + mpt_SetSingleTone_8814A(Adapter, TRUE, TRUE); + } +#endif } -#endif +//#endif void hal_mpt_SetContinuousTx(PADAPTER pAdapter, u8 bStart) {