Commit d8f36e80 authored by Frank A. Cancio Bello's avatar Frank A. Cancio Bello Committed by Greg Kroah-Hartman

staging: rtlwifi: rtl8822be: Remove useless parentheses

Remove unnecessary parentheses to comply with preferred coding style for
the linux kernel and avoid the following checkpatch's message:
'CHECK: Unnecessary parentheses around'.

Credits to checkpatch.
Signed-off-by: default avatarFrank A. Cancio Bello <frank@generalsoftwareinc.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 778fbddd
...@@ -330,7 +330,7 @@ void rtl8822be_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode) ...@@ -330,7 +330,7 @@ void rtl8822be_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode)
byte5 = btc_ops->btc_get_lps_val(rtlpriv); byte5 = btc_ops->btc_get_lps_val(rtlpriv);
power_state = btc_ops->btc_get_rpwm_val(rtlpriv); power_state = btc_ops->btc_get_rpwm_val(rtlpriv);
if ((rlbm == 2) && (byte5 & BIT(4))) { if (rlbm == 2 && (byte5 & BIT(4))) {
/* Keep awake interval to 1 to prevent from /* Keep awake interval to 1 to prevent from
* decreasing coex performance * decreasing coex performance
*/ */
...@@ -835,7 +835,7 @@ void rtl8822be_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state) ...@@ -835,7 +835,7 @@ void rtl8822be_set_p2p_ps_offload_cmd(struct ieee80211_hw *hw, u8 p2p_ps_state)
rtl_write_dword(rtlpriv, 0x5EC, rtl_write_dword(rtlpriv, 0x5EC,
p2pinfo->noa_count_type[i]); p2pinfo->noa_count_type[i]);
} }
if ((p2pinfo->opp_ps == 1) || (p2pinfo->noa_num > 0)) { if (p2pinfo->opp_ps == 1 || p2pinfo->noa_num > 0) {
/* rst p2p circuit */ /* rst p2p circuit */
rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST_8822B, BIT(4)); rtl_write_byte(rtlpriv, REG_DUAL_TSF_RST_8822B, BIT(4));
p2p_ps_offload->offload_en = 1; p2p_ps_offload->offload_en = 1;
......
...@@ -114,7 +114,7 @@ void rtl8822be_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction) ...@@ -114,7 +114,7 @@ void rtl8822be_led_control(struct ieee80211_hw *hw, enum led_ctl_mode ledaction)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
if ((ppsc->rfoff_reason > RF_CHANGE_BY_PS) && if (ppsc->rfoff_reason > RF_CHANGE_BY_PS &&
(ledaction == LED_CTL_TX || ledaction == LED_CTL_RX || (ledaction == LED_CTL_TX || ledaction == LED_CTL_RX ||
ledaction == LED_CTL_SITE_SURVEY || ledaction == LED_CTL_LINK || ledaction == LED_CTL_SITE_SURVEY || ledaction == LED_CTL_LINK ||
ledaction == LED_CTL_NO_LINK || ledaction == LED_CTL_NO_LINK ||
......
...@@ -1610,9 +1610,9 @@ u8 rtl8822be_get_txpower_index(struct ieee80211_hw *hw, u8 path, u8 rate, ...@@ -1610,9 +1610,9 @@ u8 rtl8822be_get_txpower_index(struct ieee80211_hw *hw, u8 path, u8 rate,
char limit; char limit;
char powerdiff_byrate = 0; char powerdiff_byrate = 0;
if (((rtlhal->current_bandtype == BAND_ON_2_4G) && if ((rtlhal->current_bandtype == BAND_ON_2_4G &&
(channel > 14 || channel < 1)) || (channel > 14 || channel < 1)) ||
((rtlhal->current_bandtype == BAND_ON_5G) && (channel <= 14))) { (rtlhal->current_bandtype == BAND_ON_5G && channel <= 14)) {
index = 0; index = 0;
RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD, RT_TRACE(rtlpriv, COMP_POWER_TRACKING, DBG_LOUD,
"Illegal channel!!\n"); "Illegal channel!!\n");
...@@ -1913,8 +1913,8 @@ static u8 _rtl8822be_phy_get_pri_ch_id(struct rtl_priv *rtlpriv) ...@@ -1913,8 +1913,8 @@ static u8 _rtl8822be_phy_get_pri_ch_id(struct rtl_priv *rtlpriv)
if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) { if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_80) {
/* primary channel is at lower subband of 80MHz & 40MHz */ /* primary channel is at lower subband of 80MHz & 40MHz */
if ((mac->cur_40_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)) { mac->cur_80_prime_sc == HAL_PRIME_CHNL_OFFSET_LOWER) {
pri_ch_idx = VHT_DATA_SC_20_LOWEST_OF_80MHZ; pri_ch_idx = VHT_DATA_SC_20_LOWEST_OF_80MHZ;
/* primary channel is at /* primary channel is at
* lower subband of 80MHz & upper subband of 40MHz * lower subband of 80MHz & upper subband of 40MHz
...@@ -2142,7 +2142,7 @@ static bool _rtl8822be_phy_set_rf_power_state(struct ieee80211_hw *hw, ...@@ -2142,7 +2142,7 @@ static bool _rtl8822be_phy_set_rf_power_state(struct ieee80211_hw *hw,
switch (rfpwr_state) { switch (rfpwr_state) {
case ERFON: case ERFON:
if ((ppsc->rfpwr_state == ERFOFF) && if (ppsc->rfpwr_state == ERFOFF &&
RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) { RT_IN_PS_LEVEL(ppsc, RT_RF_OFF_LEVL_HALT_NIC)) {
bool rtstatus = false; bool rtstatus = false;
u32 initialize_count = 0; u32 initialize_count = 0;
......
...@@ -165,7 +165,7 @@ static bool rtl8822be_get_rxdesc_is_ht(struct ieee80211_hw *hw, u8 *pdesc) ...@@ -165,7 +165,7 @@ static bool rtl8822be_get_rxdesc_is_ht(struct ieee80211_hw *hw, u8 *pdesc)
RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD, "rx_rate=0x%02x.\n", rx_rate); RT_TRACE(rtlpriv, COMP_RXDESC, DBG_LOUD, "rx_rate=0x%02x.\n", rx_rate);
if ((rx_rate >= DESC_RATEMCS0) && (rx_rate <= DESC_RATEMCS15)) if (rx_rate >= DESC_RATEMCS0 && rx_rate <= DESC_RATEMCS15)
return true; return true;
else else
return false; return false;
...@@ -193,8 +193,8 @@ static u8 rtl8822be_get_rx_vht_nss(struct ieee80211_hw *hw, u8 *pdesc) ...@@ -193,8 +193,8 @@ static u8 rtl8822be_get_rx_vht_nss(struct ieee80211_hw *hw, u8 *pdesc)
rx_rate = GET_RX_DESC_RX_RATE(pdesc); rx_rate = GET_RX_DESC_RX_RATE(pdesc);
if ((rx_rate >= DESC_RATEVHT1SS_MCS0) && if (rx_rate >= DESC_RATEVHT1SS_MCS0 &&
(rx_rate <= DESC_RATEVHT1SS_MCS9)) rx_rate <= DESC_RATEVHT1SS_MCS9)
vht_nss = 1; vht_nss = 1;
else if ((rx_rate >= DESC_RATEVHT2SS_MCS0) && else if ((rx_rate >= DESC_RATEVHT2SS_MCS0) &&
(rx_rate <= DESC_RATEVHT2SS_MCS9)) (rx_rate <= DESC_RATEVHT2SS_MCS9))
...@@ -510,8 +510,8 @@ static u8 rtl8822be_bw_mapping(struct ieee80211_hw *hw, ...@@ -510,8 +510,8 @@ static u8 rtl8822be_bw_mapping(struct ieee80211_hw *hw,
else else
bw_setting_of_desc = 0; bw_setting_of_desc = 0;
} else if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) { } else if (rtlphy->current_chan_bw == HT_CHANNEL_WIDTH_20_40) {
if ((ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_20_40) || if (ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_20_40 ||
(ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_80)) ptcb_desc->packet_bw == HT_CHANNEL_WIDTH_80)
bw_setting_of_desc = 1; bw_setting_of_desc = 1;
else else
bw_setting_of_desc = 0; bw_setting_of_desc = 0;
...@@ -546,10 +546,10 @@ static u8 rtl8822be_sc_mapping(struct ieee80211_hw *hw, ...@@ -546,10 +546,10 @@ static u8 rtl8822be_sc_mapping(struct ieee80211_hw *hw,
"%s: Not Correct Primary40MHz Setting\n", "%s: Not Correct Primary40MHz Setting\n",
__func__); __func__);
} else { } else {
if ((mac->cur_40_prime_sc == if (mac->cur_40_prime_sc ==
HAL_PRIME_CHNL_OFFSET_LOWER) && HAL_PRIME_CHNL_OFFSET_LOWER &&
(mac->cur_80_prime_sc == mac->cur_80_prime_sc ==
HAL_PRIME_CHNL_OFFSET_LOWER)) HAL_PRIME_CHNL_OFFSET_LOWER)
sc_setting_of_desc = sc_setting_of_desc =
VHT_DATA_SC_20_LOWEST_OF_80MHZ; VHT_DATA_SC_20_LOWEST_OF_80MHZ;
else if ((mac->cur_40_prime_sc == else if ((mac->cur_40_prime_sc ==
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment