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

Commit 4cd05e39 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Greg Kroah-Hartman
Browse files

staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSignalStuff819xUsb()



commit 099ec97ac92911abfb102bb5c68ed270fc12e0dd upstream.

clang warns:

drivers/staging/rtl8192u/r8192U_core.c:4268:20: warning: bitwise and of
boolean expressions; did you mean logical and? [-Wbool-operation-and]
        bpacket_toself =  bpacket_match_bssid &
                          ^~~~~~~~~~~~~~~~~~~~~
                                              &&
1 warning generated.

Replace the bitwise AND with a logical one to clear up the warning, as
that is clearly what was intended.

Fixes: 8fc8598e ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20210814235625.1780033-1-nathan@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2f4b67bc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4338,7 +4338,7 @@ static void TranslateRxSignalStuff819xUsb(struct sk_buff *skb,
	bpacket_match_bssid = (type != IEEE80211_FTYPE_CTL) &&
			       (ether_addr_equal(priv->ieee80211->current_network.bssid,  (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : hdr->addr3))
			       && (!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV);
	bpacket_toself =  bpacket_match_bssid &
	bpacket_toself =  bpacket_match_bssid &&
			  (ether_addr_equal(praddr, priv->ieee80211->dev->dev_addr));

	if (WLAN_FC_GET_FRAMETYPE(fc) == IEEE80211_STYPE_BEACON)