diff options
author | Mike McCormack <mikem@ring3k.org> | 2011-06-19 21:47:51 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-20 15:47:43 -0400 |
commit | e10542c447abf7c840931ff12f7d0dee976ca2ea (patch) | |
tree | ae254d633339b2617e4062fe070d2f4bc274cfb2 /drivers/net/wireless/rtlwifi/rtl8192ce | |
parent | 4b9d8d67b44aae18e1c4b71281f5cfc0f2105cf6 (diff) |
rtlwifi: rtl8192{c,ce,cu,se}: Remove comparisons of booleans with true
These are a potential source of confusion, as most C code treats all
non-zero values as true.
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192ce')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/led.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | 6 |
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 944f55e9d316..bc6ae9dcf940 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | |||
@@ -488,7 +488,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
488 | case HW_VAR_CORRECT_TSF:{ | 488 | case HW_VAR_CORRECT_TSF:{ |
489 | u8 btype_ibss = ((u8 *) (val))[0]; | 489 | u8 btype_ibss = ((u8 *) (val))[0]; |
490 | 490 | ||
491 | if (btype_ibss == true) | 491 | if (btype_ibss) |
492 | _rtl92ce_stop_tx_beacon(hw); | 492 | _rtl92ce_stop_tx_beacon(hw); |
493 | 493 | ||
494 | _rtl92ce_set_bcn_ctrl_reg(hw, 0, BIT(3)); | 494 | _rtl92ce_set_bcn_ctrl_reg(hw, 0, BIT(3)); |
@@ -500,7 +500,7 @@ void rtl92ce_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
500 | 500 | ||
501 | _rtl92ce_set_bcn_ctrl_reg(hw, BIT(3), 0); | 501 | _rtl92ce_set_bcn_ctrl_reg(hw, BIT(3), 0); |
502 | 502 | ||
503 | if (btype_ibss == true) | 503 | if (btype_ibss) |
504 | _rtl92ce_resume_tx_beacon(hw); | 504 | _rtl92ce_resume_tx_beacon(hw); |
505 | 505 | ||
506 | break; | 506 | break; |
@@ -1121,7 +1121,7 @@ void rtl92ce_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) | |||
1121 | if (rtlpriv->psc.rfpwr_state != ERFON) | 1121 | if (rtlpriv->psc.rfpwr_state != ERFON) |
1122 | return; | 1122 | return; |
1123 | 1123 | ||
1124 | if (check_bssid == true) { | 1124 | if (check_bssid) { |
1125 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); | 1125 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); |
1126 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, | 1126 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, |
1127 | (u8 *) (®_rcr)); | 1127 | (u8 *) (®_rcr)); |
@@ -1585,7 +1585,7 @@ static void _rtl92ce_read_adapter_info(struct ieee80211_hw *hw) | |||
1585 | rtlefuse->autoload_failflag = false; | 1585 | rtlefuse->autoload_failflag = false; |
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | if (rtlefuse->autoload_failflag == true) | 1588 | if (rtlefuse->autoload_failflag) |
1589 | return; | 1589 | return; |
1590 | 1590 | ||
1591 | for (i = 0; i < 6; i += 2) { | 1591 | for (i = 0; i < 6; i += 2) { |
@@ -1994,7 +1994,7 @@ bool rtl92ce_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid) | |||
1994 | u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); | 1994 | u1tmp = rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL); |
1995 | e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF; | 1995 | e_rfpowerstate_toset = (u1tmp & BIT(3)) ? ERFON : ERFOFF; |
1996 | 1996 | ||
1997 | if ((ppsc->hwradiooff == true) && (e_rfpowerstate_toset == ERFON)) { | 1997 | if ((ppsc->hwradiooff) && (e_rfpowerstate_toset == ERFON)) { |
1998 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, | 1998 | RT_TRACE(rtlpriv, COMP_RF, DBG_DMESG, |
1999 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); | 1999 | ("GPIOChangeRF - HW Radio ON, RF ON\n")); |
2000 | 2000 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/led.c b/drivers/net/wireless/rtlwifi/rtl8192ce/led.c index 9dd1ed7b6422..28a1a707d09c 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/led.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/led.c | |||
@@ -84,7 +84,7 @@ void rtl92ce_sw_led_off(struct ieee80211_hw *hw, struct rtl_led *pled) | |||
84 | break; | 84 | break; |
85 | case LED_PIN_LED0: | 85 | case LED_PIN_LED0: |
86 | ledcfg &= 0xf0; | 86 | ledcfg &= 0xf0; |
87 | if (pcipriv->ledctl.led_opendrain == true) | 87 | if (pcipriv->ledctl.led_opendrain) |
88 | rtl_write_byte(rtlpriv, REG_LEDCFG2, | 88 | rtl_write_byte(rtlpriv, REG_LEDCFG2, |
89 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); | 89 | (ledcfg | BIT(1) | BIT(5) | BIT(6))); |
90 | else | 90 | else |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c index 90d0f2cf3b27..d3b01e6023ba 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/rf.c | |||
@@ -76,7 +76,7 @@ void rtl92ce_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, | |||
76 | if (rtlefuse->eeprom_regulatory != 0) | 76 | if (rtlefuse->eeprom_regulatory != 0) |
77 | turbo_scanoff = true; | 77 | turbo_scanoff = true; |
78 | 78 | ||
79 | if (mac->act_scanning == true) { | 79 | if (mac->act_scanning) { |
80 | tx_agc[RF90_PATH_A] = 0x3f3f3f3f; | 80 | tx_agc[RF90_PATH_A] = 0x3f3f3f3f; |
81 | tx_agc[RF90_PATH_B] = 0x3f3f3f3f; | 81 | tx_agc[RF90_PATH_B] = 0x3f3f3f3f; |
82 | 82 | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c index be375214ad9e..230bbe900d8d 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c | |||
@@ -678,7 +678,7 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw, | |||
678 | GET_RX_DESC_PAGGR(pdesc)); | 678 | GET_RX_DESC_PAGGR(pdesc)); |
679 | 679 | ||
680 | rx_status->mactime = GET_RX_DESC_TSFL(pdesc); | 680 | rx_status->mactime = GET_RX_DESC_TSFL(pdesc); |
681 | if (phystatus == true) { | 681 | if (phystatus) { |
682 | p_drvinfo = (struct rx_fwinfo_92c *)(skb->data + | 682 | p_drvinfo = (struct rx_fwinfo_92c *)(skb->data + |
683 | stats->rx_bufshift); | 683 | stats->rx_bufshift); |
684 | 684 | ||
@@ -927,7 +927,7 @@ void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
927 | 927 | ||
928 | void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) | 928 | void rtl92ce_set_desc(u8 *pdesc, bool istx, u8 desc_name, u8 *val) |
929 | { | 929 | { |
930 | if (istx == true) { | 930 | if (istx) { |
931 | switch (desc_name) { | 931 | switch (desc_name) { |
932 | case HW_DESC_OWN: | 932 | case HW_DESC_OWN: |
933 | wmb(); | 933 | wmb(); |
@@ -968,7 +968,7 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name) | |||
968 | { | 968 | { |
969 | u32 ret = 0; | 969 | u32 ret = 0; |
970 | 970 | ||
971 | if (istx == true) { | 971 | if (istx) { |
972 | switch (desc_name) { | 972 | switch (desc_name) { |
973 | case HW_DESC_OWN: | 973 | case HW_DESC_OWN: |
974 | ret = GET_TX_DESC_OWN(p_desc); | 974 | ret = GET_TX_DESC_OWN(p_desc); |