diff options
Diffstat (limited to 'drivers/staging/rtl8723bs/hal')
-rw-r--r-- | drivers/staging/rtl8723bs/hal/Hal8723BReg.h | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c | 9 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c | 7 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_btcoex.c | 11 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_com.c | 10 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/hal_com_phycfg.c | 69 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/odm_CfoTracking.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/odm_DIG.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/odm_HWConfig.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_halinit.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8723bs/hal/sdio_ops.c | 10 |
14 files changed, 74 insertions, 61 deletions
diff --git a/drivers/staging/rtl8723bs/hal/Hal8723BReg.h b/drivers/staging/rtl8723bs/hal/Hal8723BReg.h index 152a198c8f17..ce02457922b7 100644 --- a/drivers/staging/rtl8723bs/hal/Hal8723BReg.h +++ b/drivers/staging/rtl8723bs/hal/Hal8723BReg.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /***************************************************************************** *Copyright(c) 2009, RealTEK Technology Inc. All Right Reserved. * diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c index 51d4219177d3..951585467ab1 100644 --- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c +++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c @@ -13,7 +13,7 @@ * ******************************************************************************/ - +#include <linux/kernel.h> #include "odm_precomp.h" static bool CheckPositive( @@ -268,7 +268,7 @@ static u32 Array_MP_8723B_AGC_TAB[] = { void ODM_ReadAndConfig_MP_8723B_AGC_TAB(PDM_ODM_T pDM_Odm) { u32 i = 0; - u32 ArrayLen = sizeof(Array_MP_8723B_AGC_TAB)/sizeof(u32); + u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_AGC_TAB); u32 *Array = Array_MP_8723B_AGC_TAB; ODM_RT_TRACE( @@ -537,7 +537,7 @@ static u32 Array_MP_8723B_PHY_REG[] = { void ODM_ReadAndConfig_MP_8723B_PHY_REG(PDM_ODM_T pDM_Odm) { u32 i = 0; - u32 ArrayLen = sizeof(Array_MP_8723B_PHY_REG)/sizeof(u32); + u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_PHY_REG); u32 *Array = Array_MP_8723B_PHY_REG; ODM_RT_TRACE( @@ -617,7 +617,6 @@ static u32 Array_MP_8723B_PHY_REG_PG[] = { void ODM_ReadAndConfig_MP_8723B_PHY_REG_PG(PDM_ODM_T pDM_Odm) { u32 i = 0; - u32 ArrayLen = sizeof(Array_MP_8723B_PHY_REG_PG)/sizeof(u32); u32 *Array = Array_MP_8723B_PHY_REG_PG; ODM_RT_TRACE( @@ -630,7 +629,7 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG_PG(PDM_ODM_T pDM_Odm) pDM_Odm->PhyRegPgVersion = 1; pDM_Odm->PhyRegPgValueType = PHY_REG_PG_EXACT_VALUE; - for (i = 0; i < ArrayLen; i += 6) { + for (i = 0; i < ARRAY_SIZE(Array_MP_8723B_PHY_REG_PG); i += 6) { u32 v1 = Array[i]; u32 v2 = Array[i+1]; u32 v3 = Array[i+2]; diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c index b868e26f20ac..7f8afa1be1ca 100644 --- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c +++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c @@ -13,7 +13,7 @@ * ******************************************************************************/ - +#include <linux/kernel.h> #include "odm_precomp.h" static bool CheckPositive( @@ -239,7 +239,7 @@ static u32 Array_MP_8723B_MAC_REG[] = { void ODM_ReadAndConfig_MP_8723B_MAC_REG(PDM_ODM_T pDM_Odm) { u32 i = 0; - u32 ArrayLen = sizeof(Array_MP_8723B_MAC_REG)/sizeof(u32); + u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_MAC_REG); u32 *Array = Array_MP_8723B_MAC_REG; ODM_RT_TRACE( diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c index 84a0be7ba697..fadfcbd91858 100644 --- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c +++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c @@ -13,7 +13,7 @@ * ******************************************************************************/ - +#include <linux/kernel.h> #include "odm_precomp.h" static bool CheckPositive( @@ -270,7 +270,7 @@ static u32 Array_MP_8723B_RadioA[] = { void ODM_ReadAndConfig_MP_8723B_RadioA(PDM_ODM_T pDM_Odm) { u32 i = 0; - u32 ArrayLen = sizeof(Array_MP_8723B_RadioA)/sizeof(u32); + u32 ArrayLen = ARRAY_SIZE(Array_MP_8723B_RadioA); u32 *Array = Array_MP_8723B_RadioA; ODM_RT_TRACE( @@ -766,7 +766,6 @@ static u8 *Array_MP_8723B_TXPWR_LMT[] = { void ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(PDM_ODM_T pDM_Odm) { u32 i = 0; - u32 ArrayLen = sizeof(Array_MP_8723B_TXPWR_LMT)/sizeof(u8 *); u8 **Array = Array_MP_8723B_TXPWR_LMT; ODM_RT_TRACE( @@ -776,7 +775,7 @@ void ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(PDM_ODM_T pDM_Odm) ("===> ODM_ReadAndConfig_MP_8723B_TXPWR_LMT\n") ); - for (i = 0; i < ArrayLen; i += 7) { + for (i = 0; i < ARRAY_SIZE(Array_MP_8723B_TXPWR_LMT); i += 7) { u8 *regulation = Array[i]; u8 *band = Array[i+1]; u8 *bandwidth = Array[i+2]; diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c index 86fee109e42d..7d4df5a8832e 100644 --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c @@ -463,7 +463,7 @@ static u8 halbtcoutsrc_Get(void *pBtcContext, u8 getType, void *pOutBuf) break; case BTC_GET_BL_WIFI_UNDER_5G: - *pu8 = (pHalData->CurrentBandType == 1) ? true : false; + *pu8 = pHalData->CurrentBandType == 1; break; case BTC_GET_BL_WIFI_AP_MODE_ENABLE: @@ -1411,15 +1411,8 @@ void hal_btcoex_SetSingleAntPath(struct adapter *padapter, u8 singleAntPath) u8 hal_btcoex_Initialize(struct adapter *padapter) { - u8 ret1; - u8 ret2; - - memset(&GLBtCoexist, 0, sizeof(GLBtCoexist)); - ret1 = EXhalbtcoutsrc_InitlizeVariables((void *)padapter); - ret2 = (ret1 == true) ? true : false; - - return ret2; + return EXhalbtcoutsrc_InitlizeVariables((void *)padapter); } void hal_btcoex_PowerOnSetting(struct adapter *padapter) diff --git a/drivers/staging/rtl8723bs/hal/hal_com.c b/drivers/staging/rtl8723bs/hal/hal_com.c index 3e63b6d9c097..dec887a5b338 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com.c +++ b/drivers/staging/rtl8723bs/hal/hal_com.c @@ -14,6 +14,7 @@ ******************************************************************************/ #define _HAL_COM_C_ +#include <linux/kernel.h> #include <drv_types.h> #include <rtw_debug.h> #include "hal_com_h2c.h" @@ -1622,7 +1623,7 @@ void rtw_get_raw_rssi_info(void *sel, struct adapter *padapter) psample_pkt_rssi->pwdball, psample_pkt_rssi->pwr_all ); - isCCKrate = (psample_pkt_rssi->data_rate <= DESC_RATE11M) ? true : false; + isCCKrate = psample_pkt_rssi->data_rate <= DESC_RATE11M; if (isCCKrate) psample_pkt_rssi->mimo_singal_strength[0] = psample_pkt_rssi->pwdball; @@ -1655,7 +1656,7 @@ void rtw_dump_raw_rssi_info(struct adapter *padapter) DBG_871X("RxRate = %s, PWDBALL = %d(%%), rx_pwr_all = %d(dBm)\n", HDATA_RATE(psample_pkt_rssi->data_rate), psample_pkt_rssi->pwdball, psample_pkt_rssi->pwr_all); - isCCKrate = (psample_pkt_rssi->data_rate <= DESC_RATE11M) ? true : false; + isCCKrate = psample_pkt_rssi->data_rate <= DESC_RATE11M; if (isCCKrate) psample_pkt_rssi->mimo_singal_strength[0] = psample_pkt_rssi->pwdball; @@ -1683,7 +1684,7 @@ void rtw_store_phy_info(struct adapter *padapter, union recv_frame *prframe) struct rx_raw_rssi *psample_pkt_rssi = &padapter->recvpriv.raw_rssi_info; psample_pkt_rssi->data_rate = pattrib->data_rate; - isCCKrate = (pattrib->data_rate <= DESC_RATE11M) ? true : false; + isCCKrate = pattrib->data_rate <= DESC_RATE11M; psample_pkt_rssi->pwdball = pPhyInfo->RxPWDBAll; psample_pkt_rssi->pwr_all = pPhyInfo->RecvSignalPower; @@ -1716,7 +1717,6 @@ void rtw_bb_rf_gain_offset(struct adapter *padapter) { u8 value = padapter->eeprompriv.EEPROMRFGainOffset; u32 res, i = 0; - u32 ArrayLen = sizeof(Array_kfreemap)/sizeof(u32); u32 *Array = Array_kfreemap; u32 v1 = 0, v2 = 0, target = 0; /* DBG_871X("+%s value: 0x%02x+\n", __func__, value); */ @@ -1729,7 +1729,7 @@ void rtw_bb_rf_gain_offset(struct adapter *padapter) res &= 0xfff87fff; DBG_871X("Offset RF Gain. before reg 0x7f = 0x%08x\n", res); /* res &= 0xfff87fff; */ - for (i = 0; i < ArrayLen; i += 2) { + for (i = 0; i < ARRAY_SIZE(Array_kfreemap); i += 2) { v1 = Array[i]; v2 = Array[i+1]; if (v1 == padapter->eeprompriv.EEPROMRFGainVal) { diff --git a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c index 566b6f0997da..e6787c22e00b 100644 --- a/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c +++ b/drivers/staging/rtl8723bs/hal/hal_com_phycfg.c @@ -17,6 +17,7 @@ #include <drv_types.h> #include <rtw_debug.h> #include <hal_data.h> +#include <linux/kernel.h> u8 PHY_GetTxPowerByRateBase(struct adapter *Adapter, u8 Band, u8 RfPath, u8 TxNum, enum RATE_SECTION RateSection) @@ -860,7 +861,7 @@ struct adapter *padapter for (txNum = RF_1TX; txNum < RF_MAX_TX_NUM; ++txNum) { /* CCK */ base = PHY_GetTxPowerByRate(padapter, band, path, txNum, MGN_11M); - for (i = 0; i < sizeof(cckRates); ++i) { + for (i = 0; i < ARRAY_SIZE(cckRates); ++i) { value = PHY_GetTxPowerByRate(padapter, band, path, txNum, cckRates[i]); PHY_SetTxPowerByRate(padapter, band, path, txNum, cckRates[i], value - base); } @@ -939,58 +940,78 @@ void PHY_SetTxPowerIndexByRateSection( if (RateSection == CCK) { u8 cckRates[] = {MGN_1M, MGN_2M, MGN_5_5M, MGN_11M}; if (pHalData->CurrentBandType == BAND_ON_2_4G) - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - cckRates, sizeof(cckRates)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, cckRates, + ARRAY_SIZE(cckRates)); } else if (RateSection == OFDM) { u8 ofdmRates[] = {MGN_6M, MGN_9M, MGN_12M, MGN_18M, MGN_24M, MGN_36M, MGN_48M, MGN_54M}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - ofdmRates, sizeof(ofdmRates)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, ofdmRates, + ARRAY_SIZE(ofdmRates)); } else if (RateSection == HT_MCS0_MCS7) { u8 htRates1T[] = {MGN_MCS0, MGN_MCS1, MGN_MCS2, MGN_MCS3, MGN_MCS4, MGN_MCS5, MGN_MCS6, MGN_MCS7}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - htRates1T, sizeof(htRates1T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, htRates1T, + ARRAY_SIZE(htRates1T)); } else if (RateSection == HT_MCS8_MCS15) { u8 htRates2T[] = {MGN_MCS8, MGN_MCS9, MGN_MCS10, MGN_MCS11, MGN_MCS12, MGN_MCS13, MGN_MCS14, MGN_MCS15}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - htRates2T, sizeof(htRates2T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, htRates2T, + ARRAY_SIZE(htRates2T)); } else if (RateSection == HT_MCS16_MCS23) { u8 htRates3T[] = {MGN_MCS16, MGN_MCS17, MGN_MCS18, MGN_MCS19, MGN_MCS20, MGN_MCS21, MGN_MCS22, MGN_MCS23}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - htRates3T, sizeof(htRates3T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, htRates3T, + ARRAY_SIZE(htRates3T)); } else if (RateSection == HT_MCS24_MCS31) { u8 htRates4T[] = {MGN_MCS24, MGN_MCS25, MGN_MCS26, MGN_MCS27, MGN_MCS28, MGN_MCS29, MGN_MCS30, MGN_MCS31}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - htRates4T, sizeof(htRates4T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, htRates4T, + ARRAY_SIZE(htRates4T)); } else if (RateSection == VHT_1SSMCS0_1SSMCS9) { u8 vhtRates1T[] = {MGN_VHT1SS_MCS0, MGN_VHT1SS_MCS1, MGN_VHT1SS_MCS2, MGN_VHT1SS_MCS3, MGN_VHT1SS_MCS4, MGN_VHT1SS_MCS5, MGN_VHT1SS_MCS6, MGN_VHT1SS_MCS7, MGN_VHT1SS_MCS8, MGN_VHT1SS_MCS9}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - vhtRates1T, sizeof(vhtRates1T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, vhtRates1T, + ARRAY_SIZE(vhtRates1T)); } else if (RateSection == VHT_2SSMCS0_2SSMCS9) { u8 vhtRates2T[] = {MGN_VHT2SS_MCS0, MGN_VHT2SS_MCS1, MGN_VHT2SS_MCS2, MGN_VHT2SS_MCS3, MGN_VHT2SS_MCS4, MGN_VHT2SS_MCS5, MGN_VHT2SS_MCS6, MGN_VHT2SS_MCS7, MGN_VHT2SS_MCS8, MGN_VHT2SS_MCS9}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - vhtRates2T, sizeof(vhtRates2T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, vhtRates2T, + ARRAY_SIZE(vhtRates2T)); } else if (RateSection == VHT_3SSMCS0_3SSMCS9) { u8 vhtRates3T[] = {MGN_VHT3SS_MCS0, MGN_VHT3SS_MCS1, MGN_VHT3SS_MCS2, MGN_VHT3SS_MCS3, MGN_VHT3SS_MCS4, MGN_VHT3SS_MCS5, MGN_VHT3SS_MCS6, MGN_VHT3SS_MCS7, MGN_VHT3SS_MCS8, MGN_VHT3SS_MCS9}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - vhtRates3T, sizeof(vhtRates3T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, vhtRates3T, + ARRAY_SIZE(vhtRates3T)); } else if (RateSection == VHT_4SSMCS0_4SSMCS9) { u8 vhtRates4T[] = {MGN_VHT4SS_MCS0, MGN_VHT4SS_MCS1, MGN_VHT4SS_MCS2, MGN_VHT4SS_MCS3, MGN_VHT4SS_MCS4, MGN_VHT4SS_MCS5, MGN_VHT4SS_MCS6, MGN_VHT4SS_MCS7, MGN_VHT4SS_MCS8, MGN_VHT4SS_MCS9}; - PHY_SetTxPowerIndexByRateArray(padapter, RFPath, pHalData->CurrentChannelBW, Channel, - vhtRates4T, sizeof(vhtRates4T)/sizeof(u8)); + PHY_SetTxPowerIndexByRateArray(padapter, RFPath, + pHalData->CurrentChannelBW, + Channel, vhtRates4T, + ARRAY_SIZE(vhtRates4T)); } else DBG_871X("Invalid RateSection %d in %s", RateSection, __func__); } @@ -1012,7 +1033,7 @@ static bool phy_GetChnlIndex(u8 Channel, u8 *ChannelIdx) } else { bIn24G = false; - for (i = 0; i < sizeof(channel5G)/sizeof(u8); ++i) { + for (i = 0; i < ARRAY_SIZE(channel5G); ++i) { if (channel5G[i] == Channel) { *ChannelIdx = i; return bIn24G; @@ -1149,7 +1170,7 @@ u8 PHY_GetTxPowerIndexBase( } else if (BandWidth == CHANNEL_WIDTH_80) { /* BW80-1S, BW80-2S */ /* <20121220, Kordan> Get the index of array "Index5G_BW80_Base". */ u8 channel5G_80M[CHANNEL_MAX_NUMBER_5G_80M] = {42, 58, 106, 122, 138, 155, 171}; - for (i = 0; i < sizeof(channel5G_80M)/sizeof(u8); ++i) + for (i = 0; i < ARRAY_SIZE(channel5G_80M); ++i) if (channel5G_80M[i] == Channel) chnlIdx = i; @@ -1588,7 +1609,7 @@ static s8 phy_GetChannelIndexOfTxPowerLimit(u8 Band, u8 Channel) if (Band == BAND_ON_2_4G) channelIndex = Channel - 1; else if (Band == BAND_ON_5G) { - for (i = 0; i < sizeof(channel5G)/sizeof(u8); ++i) { + for (i = 0; i < ARRAY_SIZE(channel5G); ++i) { if (channel5G[i] == Channel) channelIndex = i; } diff --git a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c index 9cde6c66235b..71853e6f7106 100644 --- a/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c +++ b/drivers/staging/rtl8723bs/hal/odm_CfoTracking.c @@ -23,7 +23,7 @@ static void odm_SetCrystalCap(void *pDM_VOID, u8 CrystalCap) struct adapter *Adapter = pDM_Odm->Adapter; struct hal_com_data *pHalData = GET_HAL_DATA(Adapter); - bEEPROMCheck = (pHalData->EEPROMVersion >= 0x01) ? true : false; + bEEPROMCheck = pHalData->EEPROMVersion >= 0x01; if (pCfoTrack->CrystalCap == CrystalCap) return; diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c index 0bde9444471d..f02eb63a45ce 100644 --- a/drivers/staging/rtl8723bs/hal/odm_DIG.c +++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c @@ -553,7 +553,7 @@ void odm_DIG(void *pDM_VOID) dm_dig_min = DM_DIG_MIN_NIC; DIG_MaxOfMin = DM_DIG_MAX_AP; - ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Absolutly upper bound = 0x%x, lower bound = 0x%x\n", dm_dig_max, dm_dig_min)); + ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Absolutely upper bound = 0x%x, lower bound = 0x%x\n", dm_dig_max, dm_dig_min)); /* 1 Adjust boundary by RSSI */ if (pDM_Odm->bLinked && bPerformance) { diff --git a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c index ba2700135b60..8dd6da8a4e26 100644 --- a/drivers/staging/rtl8723bs/hal/odm_HWConfig.c +++ b/drivers/staging/rtl8723bs/hal/odm_HWConfig.c @@ -106,7 +106,7 @@ static void odm_RxPhyStatus92CSeries_Parsing( u8 LNA_idx, VGA_idx; PPHY_STATUS_RPT_8192CD_T pPhyStaRpt = (PPHY_STATUS_RPT_8192CD_T)pPhyStatus; - isCCKrate = (pPktinfo->DataRate <= DESC_RATE11M) ? true : false; + isCCKrate = pPktinfo->DataRate <= DESC_RATE11M; pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_A] = -1; pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_B] = -1; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c index 1565f2d67ea4..d6cef9e8378d 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723b_hal_init.c @@ -891,7 +891,7 @@ static void hal_ReadEFuse_WiFi( return; } - efuseTbl = (u8 *)rtw_malloc(EFUSE_MAX_MAP_LEN); + efuseTbl = rtw_malloc(EFUSE_MAX_MAP_LEN); if (efuseTbl == NULL) { DBG_8192C("%s: alloc efuseTbl fail!\n", __func__); return; diff --git a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c index d0b317077511..6281dfa1a3ca 100644 --- a/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c +++ b/drivers/staging/rtl8723bs/hal/rtl8723bs_xmit.c @@ -113,7 +113,7 @@ query_free_page: RT_TRACE( _module_hal_xmit_c_, _drv_notice_, - ("%s: bSurpriseRemoved(wirte port)\n", __func__) + ("%s: bSurpriseRemoved(write port)\n", __func__) ); goto free_xmitbuf; } diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c index 6dfb06a49d41..1af77add6af4 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c +++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c @@ -1019,8 +1019,8 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter) rtw_btcoex_IQKNotify(padapter, true); - restore_iqk_rst = (pwrpriv->bips_processing == true) ? true : false; - b2Ant = pHalData->EEPROMBluetoothAntNum == Ant_x2 ? true : false; + restore_iqk_rst = pwrpriv->bips_processing; + b2Ant = pHalData->EEPROMBluetoothAntNum == Ant_x2; PHY_IQCalibrate_8723B(padapter, false, restore_iqk_rst, b2Ant, pHalData->ant_path); pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = true; diff --git a/drivers/staging/rtl8723bs/hal/sdio_ops.c b/drivers/staging/rtl8723bs/hal/sdio_ops.c index 1d1b14dedd35..9a4c24861947 100644 --- a/drivers/staging/rtl8723bs/hal/sdio_ops.c +++ b/drivers/staging/rtl8723bs/hal/sdio_ops.c @@ -218,7 +218,7 @@ static u32 sdio_read32(struct intf_hdl *pintfhdl, u32 addr) } else { u8 *ptmpbuf; - ptmpbuf = (u8 *)rtw_malloc(8); + ptmpbuf = rtw_malloc(8); if (NULL == ptmpbuf) { DBG_8192C(KERN_ERR "%s: Allocate memory FAIL!(size =8) addr = 0x%x\n", __func__, addr); return SDIO_ERR_VAL32; @@ -594,7 +594,7 @@ static s32 _sdio_local_read( } n = RND4(cnt); - ptmpbuf = (u8 *)rtw_malloc(n); + ptmpbuf = rtw_malloc(n); if (!ptmpbuf) return (-1); @@ -637,7 +637,7 @@ s32 sdio_local_read( } n = RND4(cnt); - ptmpbuf = (u8 *)rtw_malloc(n); + ptmpbuf = rtw_malloc(n); if (!ptmpbuf) return (-1); @@ -684,7 +684,7 @@ s32 sdio_local_write( return err; } - ptmpbuf = (u8 *)rtw_malloc(cnt); + ptmpbuf = rtw_malloc(cnt); if (!ptmpbuf) return (-1); @@ -1108,7 +1108,7 @@ void sd_int_dpc(struct adapter *padapter) struct c2h_evt_hdr_88xx *c2h_evt; DBG_8192C("%s: C2H Command\n", __func__); - c2h_evt = (struct c2h_evt_hdr_88xx *)rtw_zmalloc(16); + c2h_evt = rtw_zmalloc(16); if (c2h_evt != NULL) { if (rtw_hal_c2h_evt_read(padapter, (u8 *)c2h_evt) == _SUCCESS) { if (c2h_id_filter_ccx_8723b((u8 *)c2h_evt)) { |