Skip to content

Commit

Permalink
staging: rtl8192u: Fix bitwise vs logical operator in TranslateRxSign…
Browse files Browse the repository at this point in the history
…alStuff819xUsb()

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: 8fc8598 ("Staging: Added Realtek rtl8192u driver to staging")
Signed-off-by: Nathan Chancellor <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
nathanchance authored and gregkh committed Aug 16, 2021
1 parent 7c715fb commit 099ec97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/rtl8192u/r8192U_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4265,7 +4265,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)
Expand Down

0 comments on commit 099ec97

Please sign in to comment.