diff options
Diffstat (limited to 'drivers/staging/rtlwifi/rtl8822be/phy.c')
-rw-r--r-- | drivers/staging/rtlwifi/rtl8822be/phy.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/staging/rtlwifi/rtl8822be/phy.c b/drivers/staging/rtlwifi/rtl8822be/phy.c index 4cba2adc3165..ef37ae98c803 100644 --- a/drivers/staging/rtlwifi/rtl8822be/phy.c +++ b/drivers/staging/rtlwifi/rtl8822be/phy.c @@ -890,7 +890,7 @@ bool rtl8822be_load_txpower_by_rate(struct ieee80211_hw *hw) rtstatus = rtlpriv->phydm.ops->phydm_load_txpower_by_rate(rtlpriv); if (!rtstatus) { - pr_err("BB_PG Reg Fail!!"); + pr_err("BB_PG Reg Fail!!\n"); return false; } @@ -915,7 +915,7 @@ bool rtl8822be_load_txpower_limit(struct ieee80211_hw *hw) rtstatus = rtlpriv->phydm.ops->phydm_load_txpower_limit(rtlpriv); if (!rtstatus) { - pr_err("RF TxPwr Limit Fail!!"); + pr_err("RF TxPwr Limit Fail!!\n"); return false; } @@ -1562,9 +1562,10 @@ static char _rtl8822be_phy_get_txpower_limit(struct ieee80211_hw *hw, u8 band, [channel_index] [rate_section] [channel_index][rf_path]; - } else + } else { RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, "No power limit table of the specified band\n"); + } return power_limit; } @@ -1609,9 +1610,9 @@ u8 rtl8822be_get_txpower_index(struct ieee80211_hw *hw, u8 path, u8 rate, char limit; char powerdiff_byrate = 0; - if (((rtlhal->current_bandtype == BAND_ON_2_4G) && + if ((rtlhal->current_bandtype == BAND_ON_2_4G && (channel > 14 || channel < 1)) || - ((rtlhal->current_bandtype == BAND_ON_5G) && (channel <= 14))) { + (rtlhal->current_bandtype == BAND_ON_5G && channel <= 14)) { index = 0; RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, "Illegal channel!!\n"); @@ -1755,9 +1756,9 @@ static void _rtl8822be_phy_set_txpower_index(struct ieee80211_hw *hw, static u32 index; /* - * For 8822B, phydm api use 4 bytes txagc value - * driver must combine every four 1 byte to one 4 byte and send to phydm - */ + * For 8822B, phydm api use 4 bytes txagc value driver must + * combine every four 1 byte to one 4 byte and send to phydm + */ shift = rate & 0x03; index |= ((u32)power_index << (shift * 8)); @@ -1912,8 +1913,8 @@ static u8 _rtl8822be_phy_get_pri_ch_id(struct rtl_priv *rtlpriv) if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) { /* primary channel is at lower subband of 80MHz & 40MHz */ - if ((mac->cur_40_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER) && - (mac->cur_80_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER)) { + if (mac->cur_40_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER && + mac->cur_80_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER) { pri_ch_idx = VHT_DATA_SC_20_LOWEST_OF_80MHZ; /* primary channel is at * lower subband of 80MHz & upper subband of 40MHz @@ -2141,7 +2142,7 @@ static bool _rtl8822be_phy_set_rf_power_state(struct ieee80211_hw *hw, switch (rfpwr_state) { case ERFON: - if ((ppsc->rfpwr_state == ERFOFF) && + if (ppsc->rfpwr_state == ERFOFF && RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) { bool rtstatus = false; u32 initialize_count = 0; |