diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2011-06-30 17:47:11 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-05 15:26:54 -0400 |
commit | 9928c7d1b1c5e3dcba04a10c7014c9f3319b1fbc (patch) | |
tree | 42790976776c8731ba63b1059647039bc26f04da | |
parent | f2e795ffae1c4127277ce25727d5ac097f91238c (diff) |
rtlwifi: rtl8192de: Remove comparison of boolean with true
Tests of a boolean against "true" are not needed as non-zero is sufficient..
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/led.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/rf.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192de/trx.c | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c index 270571a1971f..5c84131f62e5 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c | |||
@@ -449,7 +449,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
449 | case HW_VAR_CORRECT_TSF: { | 449 | case HW_VAR_CORRECT_TSF: { |
450 | u8 btype_ibss = ((u8 *) (val))[0]; | 450 | u8 btype_ibss = ((u8 *) (val))[0]; |
451 | 451 | ||
452 | if (btype_ibss == true) | 452 | if (btype_ibss) |
453 | _rtl92de_stop_tx_beacon(hw); | 453 | _rtl92de_stop_tx_beacon(hw); |
454 | _rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(3)); | 454 | _rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(3)); |
455 | rtl_write_dword(rtlpriv, REG_TSFTR, | 455 | rtl_write_dword(rtlpriv, REG_TSFTR, |
@@ -457,7 +457,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
457 | rtl_write_dword(rtlpriv, REG_TSFTR + 4, | 457 | rtl_write_dword(rtlpriv, REG_TSFTR + 4, |
458 | (u32) ((mac->tsf >> 32) & 0xffffffff)); | 458 | (u32) ((mac->tsf >> 32) & 0xffffffff)); |
459 | _rtl92de_set_bcn_ctrl_reg(hw, BIT(3), 0); | 459 | _rtl92de_set_bcn_ctrl_reg(hw, BIT(3), 0); |
460 | if (btype_ibss == true) | 460 | if (btype_ibss) |
461 | _rtl92de_resume_tx_beacon(hw); | 461 | _rtl92de_resume_tx_beacon(hw); |
462 | 462 | ||
463 | break; | 463 | break; |
@@ -1142,7 +1142,7 @@ void rtl92de_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) | |||
1142 | 1142 | ||
1143 | if (rtlpriv->psc.rfpwr_state != ERFON) | 1143 | if (rtlpriv->psc.rfpwr_state != ERFON) |
1144 | return; | 1144 | return; |
1145 | if (check_bssid == true) { | 1145 | if (check_bssid) { |
1146 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); | 1146 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); |
1147 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); | 1147 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); |
1148 | _rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(4)); | 1148 | _rtl92de_set_bcn_ctrl_reg(hw, 0, BIT(4)); |
@@ -1785,7 +1785,7 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw) | |||
1785 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload OK\n")); | 1785 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload OK\n")); |
1786 | rtlefuse->autoload_failflag = false; | 1786 | rtlefuse->autoload_failflag = false; |
1787 | } | 1787 | } |
1788 | if (rtlefuse->autoload_failflag == true) { | 1788 | if (rtlefuse->autoload_failflag) { |
1789 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, | 1789 | RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, |
1790 | ("RTL819X Not boot from eeprom, check it !!")); | 1790 | ("RTL819X Not boot from eeprom, check it !!")); |
1791 | return; | 1791 | return; |
@@ -2147,7 +2147,7 @@ bool rtl92de_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid) | |||
2147 | REG_MAC_PINMUX_CFG) & ~(BIT(3))); | 2147 | REG_MAC_PINMUX_CFG) & ~(BIT(3))); |
2148 | u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); | 2148 | u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); |
2149 | e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF; | 2149 | e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF; |
2150 | if ((ppsc->hwradiooff == true) && (e_rfpowerstate_toset == ERFON)) { | 2150 | if (ppsc->hwradiooff && (e_rfpowerstate_toset == ERFON)) { |
2151 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 2151 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
2152 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); | 2152 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); |
2153 | e_rfpowerstate_toset = ERFON; | 2153 | e_rfpowerstate_toset = ERFON; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/led.c b/drivers/net/wireless/rtlwifi/rtl8192de/led.c index 719972c16fcc..f1552f4df658 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/led.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/led.c | |||
@@ -93,7 +93,7 @@ void rtl92de_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
93 | break; | 93 | break; |
94 | case LED_PIN_LED0: | 94 | case LED_PIN_LED0: |
95 | ledcfg &= 0xf0; | 95 | ledcfg &= 0xf0; |
96 | if (pcipriv->ledctl.led_opendrain == true) | 96 | if (pcipriv->ledctl.led_opendrain) |
97 | rtl_write_byte(rtlpriv, REG_LEDCFG2, | 97 | rtl_write_byte(rtlpriv, REG_LEDCFG2, |
98 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); | 98 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); |
99 | else | 99 | else |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/rf.c b/drivers/net/wireless/rtlwifi/rtl8192de/rf.c index c326372220f3..db27cebaac2c 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/rf.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/rf.c | |||
@@ -87,7 +87,7 @@ void rtl92d_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, | |||
87 | 87 | ||
88 | if (rtlefuse->eeprom_regulatory != 0) | 88 | if (rtlefuse->eeprom_regulatory != 0) |
89 | turbo_scanoff = true; | 89 | turbo_scanoff = true; |
90 | if (mac->act_scanning == true) { | 90 | if (mac->act_scanning) { |
91 | tx_agc[RF90_PATH_A] = 0x3f3f3f3f; | 91 | tx_agc[RF90_PATH_A] = 0x3f3f3f3f; |
92 | tx_agc[RF90_PATH_B] = 0x3f3f3f3f; | 92 | tx_agc[RF90_PATH_B] = 0x3f3f3f3f; |
93 | if (turbo_scanoff) { | 93 | if (turbo_scanoff) { |
@@ -416,9 +416,9 @@ bool rtl92d_phy_enable_anotherphy(struct ieee80211_hw *hw, bool bmac0) | |||
416 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 416 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
417 | struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); | 417 | struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); |
418 | u8 u1btmp; | 418 | u8 u1btmp; |
419 | u8 direct = bmac0 == true ? BIT(3) | BIT(2) : BIT(3); | 419 | u8 direct = bmac0 ? BIT(3) | BIT(2) : BIT(3); |
420 | u8 mac_reg = bmac0 == true ? REG_MAC1 : REG_MAC0; | 420 | u8 mac_reg = bmac0 ? REG_MAC1 : REG_MAC0; |
421 | u8 mac_on_bit = bmac0 == true ? MAC1_ON : MAC0_ON; | 421 | u8 mac_on_bit = bmac0 ? MAC1_ON : MAC0_ON; |
422 | bool bresult = true; /* true: need to enable BB/RF power */ | 422 | bool bresult = true; /* true: need to enable BB/RF power */ |
423 | 423 | ||
424 | rtlhal->during_mac0init_radiob = false; | 424 | rtlhal->during_mac0init_radiob = false; |
@@ -447,9 +447,9 @@ void rtl92d_phy_powerdown_anotherphy(struct ieee80211_hw *hw, bool bmac0) | |||
447 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 447 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
448 | struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); | 448 | struct rtl_hal *rtlhal = &(rtlpriv->rtlhal); |
449 | u8 u1btmp; | 449 | u8 u1btmp; |
450 | u8 direct = bmac0 == true ? BIT(3) | BIT(2) : BIT(3); | 450 | u8 direct = bmac0 ? BIT(3) | BIT(2) : BIT(3); |
451 | u8 mac_reg = bmac0 == true ? REG_MAC1 : REG_MAC0; | 451 | u8 mac_reg = bmac0 ? REG_MAC1 : REG_MAC0; |
452 | u8 mac_on_bit = bmac0 == true ? MAC1_ON : MAC0_ON; | 452 | u8 mac_on_bit = bmac0 ? MAC1_ON : MAC0_ON; |
453 | 453 | ||
454 | rtlhal->during_mac0init_radiob = false; | 454 | rtlhal->during_mac0init_radiob = false; |
455 | rtlhal->during_mac1init_radioa = false; | 455 | rtlhal->during_mac1init_radioa = false; |
@@ -573,7 +573,7 @@ bool rtl92d_phy_rf6052_config(struct ieee80211_hw *hw) | |||
573 | udelay(1); | 573 | udelay(1); |
574 | switch (rfpath) { | 574 | switch (rfpath) { |
575 | case RF90_PATH_A: | 575 | case RF90_PATH_A: |
576 | if (true_bpath == true) | 576 | if (true_bpath) |
577 | rtstatus = rtl92d_phy_config_rf_with_headerfile( | 577 | rtstatus = rtl92d_phy_config_rf_with_headerfile( |
578 | hw, radiob_txt, | 578 | hw, radiob_txt, |
579 | (enum radio_path)rfpath); | 579 | (enum radio_path)rfpath); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c index bf1462f69b52..dc86fcb0b3a3 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c | |||
@@ -614,7 +614,7 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, | |||
614 | (u8) | 614 | (u8) |
615 | GET_RX_DESC_RXMCS(pdesc)); | 615 | GET_RX_DESC_RXMCS(pdesc)); |
616 | rx_status->mactime = GET_RX_DESC_TSFL(pdesc); | 616 | rx_status->mactime = GET_RX_DESC_TSFL(pdesc); |
617 | if (phystatus == true) { | 617 | if (phystatus) { |
618 | p_drvinfo = (struct rx_fwinfo_92d *)(skb->data + | 618 | p_drvinfo = (struct rx_fwinfo_92d *)(skb->data + |
619 | stats->rx_bufshift); | 619 | stats->rx_bufshift); |
620 | _rtl92de_translate_rx_signal_stuff(hw, | 620 | _rtl92de_translate_rx_signal_stuff(hw, |
@@ -876,7 +876,7 @@ void rtl92de_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
876 | 876 | ||
877 | void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | 877 | void rtl92de_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) |
878 | { | 878 | { |
879 | if (istx == true) { | 879 | if (istx) { |
880 | switch (desc_name) { | 880 | switch (desc_name) { |
881 | case HW_DESC_OWN: | 881 | case HW_DESC_OWN: |
882 | wmb(); | 882 | wmb(); |
@@ -917,7 +917,7 @@ u32 rtl92de_get_desc(u8 *p_desc, bool istx, u8 desc_name) | |||
917 | { | 917 | { |
918 | u32 ret = 0; | 918 | u32 ret = 0; |
919 | 919 | ||
920 | if (istx == true) { | 920 | if (istx) { |
921 | switch (desc_name) { | 921 | switch (desc_name) { |
922 | case HW_DESC_OWN: | 922 | case HW_DESC_OWN: |
923 | ret = GET_TX_DESC_OWN(p_desc); | 923 | ret = GET_TX_DESC_OWN(p_desc); |