Commit 64338f0d authored by Aditya Srivastava's avatar Aditya Srivastava Committed by Kalle Valo

rtlwifi: rtl8188ee: fix bool comparison in expressions

There are certain conditional expressions in rtl8188ee, where a boolean
variable is compared with true/false, in forms such as (foo == true) or
(false != bar), which does not comply with checkpatch.pl (CHECK:
BOOL_COMPARISON), according to which boolean variables should be
themselves used in the condition, rather than comparing with true/false

E.g., in drivers/net/wireless/realtek/rtlwifi/rtl8188ee/dm.c,
"if (mac->act_scanning == true)" can be replaced with
"if (mac->act_scanning)"

Replace all such expressions with the bool variables appropriately
Signed-off-by: default avatarAditya Srivastava <yashsri421@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210110121525.2407-4-yashsri421@gmail.com
parent f7c76283
...@@ -474,11 +474,11 @@ static void rtl88e_dm_dig(struct ieee80211_hw *hw) ...@@ -474,11 +474,11 @@ static void rtl88e_dm_dig(struct ieee80211_hw *hw)
u8 dm_dig_max, dm_dig_min; u8 dm_dig_max, dm_dig_min;
u8 current_igi = dm_dig->cur_igvalue; u8 current_igi = dm_dig->cur_igvalue;
if (rtlpriv->dm.dm_initialgain_enable == false) if (!rtlpriv->dm.dm_initialgain_enable)
return; return;
if (dm_dig->dig_enable_flag == false) if (!dm_dig->dig_enable_flag)
return; return;
if (mac->act_scanning == true) if (mac->act_scanning)
return; return;
if (mac->link_state >= MAC80211_LINKED) if (mac->link_state >= MAC80211_LINKED)
...@@ -1637,7 +1637,7 @@ static void rtl88e_dm_fast_ant_training(struct ieee80211_hw *hw) ...@@ -1637,7 +1637,7 @@ static void rtl88e_dm_fast_ant_training(struct ieee80211_hw *hw)
} }
} }
if (bpkt_filter_match == false) { if (!bpkt_filter_match) {
rtl_set_bbreg(hw, DM_REG_TXAGC_A_1_MCS32_11N, rtl_set_bbreg(hw, DM_REG_TXAGC_A_1_MCS32_11N,
BIT(16), 0); BIT(16), 0);
rtl_set_bbreg(hw, DM_REG_IGI_A_11N, BIT(7), 0); rtl_set_bbreg(hw, DM_REG_IGI_A_11N, BIT(7), 0);
......
...@@ -1269,12 +1269,12 @@ void rtl88ee_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) ...@@ -1269,12 +1269,12 @@ void rtl88ee_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
if (rtlpriv->psc.rfpwr_state != ERFON) if (rtlpriv->psc.rfpwr_state != ERFON)
return; return;
if (check_bssid == true) { if (check_bssid) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
(u8 *)(&reg_rcr)); (u8 *)(&reg_rcr));
_rtl88ee_set_bcn_ctrl_reg(hw, 0, BIT(4)); _rtl88ee_set_bcn_ctrl_reg(hw, 0, BIT(4));
} else if (check_bssid == false) { } else if (!check_bssid) {
reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN)); reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN));
_rtl88ee_set_bcn_ctrl_reg(hw, BIT(4), 0); _rtl88ee_set_bcn_ctrl_reg(hw, BIT(4), 0);
rtlpriv->cfg->ops->set_hw_reg(hw, rtlpriv->cfg->ops->set_hw_reg(hw,
......
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