Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e10542c4 authored by Mike McCormack's avatar Mike McCormack Committed by John W. Linville
Browse files

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: default avatarMike McCormack <mikem@ring3k.org>
Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 4b9d8d67
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -523,7 +523,7 @@ static void _rtl_query_shortgi(struct ieee80211_hw *hw,
		mac->opmode == NL80211_IFTYPE_ADHOC)
		mac->opmode == NL80211_IFTYPE_ADHOC)
		bw_40 = sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40;
		bw_40 = sta->ht_cap.cap & IEEE80211_HT_CAP_SUP_WIDTH_20_40;


	if ((bw_40 == true) && sgi_40)
	if (bw_40 && sgi_40)
		tcb_desc->use_shortgi = true;
		tcb_desc->use_shortgi = true;
	else if ((bw_40 == false) && sgi_20)
	else if ((bw_40 == false) && sgi_20)
		tcb_desc->use_shortgi = true;
		tcb_desc->use_shortgi = true;
+2 −2
Original line number Original line Diff line number Diff line
@@ -443,11 +443,11 @@ static int rtl_op_sta_add(struct ieee80211_hw *hw,
			sta_entry->wireless_mode = WIRELESS_MODE_G;
			sta_entry->wireless_mode = WIRELESS_MODE_G;
			if (sta->supp_rates[0] <= 0xf)
			if (sta->supp_rates[0] <= 0xf)
				sta_entry->wireless_mode = WIRELESS_MODE_B;
				sta_entry->wireless_mode = WIRELESS_MODE_B;
			if (sta->ht_cap.ht_supported == true)
			if (sta->ht_cap.ht_supported)
				sta_entry->wireless_mode = WIRELESS_MODE_N_24G;
				sta_entry->wireless_mode = WIRELESS_MODE_N_24G;
		} else if (rtlhal->current_bandtype == BAND_ON_5G) {
		} else if (rtlhal->current_bandtype == BAND_ON_5G) {
			sta_entry->wireless_mode = WIRELESS_MODE_A;
			sta_entry->wireless_mode = WIRELESS_MODE_A;
			if (sta->ht_cap.ht_supported == true)
			if (sta->ht_cap.ht_supported)
				sta_entry->wireless_mode = WIRELESS_MODE_N_24G;
				sta_entry->wireless_mode = WIRELESS_MODE_N_24G;
		}
		}


+4 −4
Original line number Original line Diff line number Diff line
@@ -382,7 +382,7 @@ bool efuse_shadow_update_chk(struct ieee80211_hw *hw)
			}
			}
		}
		}


		if (wordchanged == true)
		if (wordchanged)
			hdr_num++;
			hdr_num++;
	}
	}


@@ -453,7 +453,7 @@ bool efuse_shadow_update(struct ieee80211_hw *hw)
		base = offset * 8;
		base = offset * 8;


		for (i = 0; i < 8; i++) {
		for (i = 0; i < 8; i++) {
			if (first_pg == true) {
			if (first_pg) {


				word_en &= ~(BIT(i / 2));
				word_en &= ~(BIT(i / 2));


@@ -505,7 +505,7 @@ void rtl_efuse_shadow_map_update(struct ieee80211_hw *hw)
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	struct rtl_priv *rtlpriv = rtl_priv(hw);
	struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
	struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));


	if (rtlefuse->autoload_failflag == true)
	if (rtlefuse->autoload_failflag)
		memset(&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], 0xFF,
		memset(&rtlefuse->efuse_map[EFUSE_INIT_MAP][0], 0xFF,
			rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
			rtlpriv->cfg->maps[EFUSE_HWSET_MAX_SIZE]);
	else
	else
@@ -690,7 +690,7 @@ static void efuse_read_data_case1(struct ieee80211_hw *hw, u16 *efuse_addr,
			}
			}
		}
		}


		if (dataempty == true) {
		if (dataempty) {
			*readstate = PG_STATE_DATA;
			*readstate = PG_STATE_DATA;
		} else {
		} else {
			*efuse_addr = *efuse_addr + (word_cnts * 2) + 1;
			*efuse_addr = *efuse_addr + (word_cnts * 2) + 1;
+1 −1
Original line number Original line Diff line number Diff line
@@ -90,7 +90,7 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
		ppsc->rfoff_reason &= (~changesource);
		ppsc->rfoff_reason &= (~changesource);


		if ((changesource == RF_CHANGE_BY_HW) &&
		if ((changesource == RF_CHANGE_BY_HW) &&
		    (ppsc->hwradiooff == true)) {
		    (ppsc->hwradiooff)) {
			ppsc->hwradiooff = false;
			ppsc->hwradiooff = false;
		}
		}


+1 −1
Original line number Original line Diff line number Diff line
@@ -200,7 +200,7 @@ static void rtl_tx_status(void *ppriv,
	if (sta) {
	if (sta) {
		/* Check if aggregation has to be enabled for this tid */
		/* Check if aggregation has to be enabled for this tid */
		sta_entry = (struct rtl_sta_info *) sta->drv_priv;
		sta_entry = (struct rtl_sta_info *) sta->drv_priv;
		if ((sta->ht_cap.ht_supported == true) &&
		if ((sta->ht_cap.ht_supported) &&
				!(skb->protocol == cpu_to_be16(ETH_P_PAE))) {
				!(skb->protocol == cpu_to_be16(ETH_P_PAE))) {
			if (ieee80211_is_data_qos(fc)) {
			if (ieee80211_is_data_qos(fc)) {
				u8 tid = rtl_get_tid(skb);
				u8 tid = rtl_get_tid(skb);
Loading