Skip to content

Commit 5204267

Browse files
JoePercheslinvjw
authored andcommitted
mac80211: Fix likely misuse of | for &
Using | with a constant is always true. Likely this should have be &. cc: Ben Greear <[email protected]> Signed-off-by: Joe Perches <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent d8c7aae commit 5204267

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

net/mac80211/cfg.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,16 +533,16 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
533533
sinfo.filled = 0;
534534
sta_set_sinfo(sta, &sinfo);
535535

536-
if (sinfo.filled | STATION_INFO_TX_BITRATE)
536+
if (sinfo.filled & STATION_INFO_TX_BITRATE)
537537
data[i] = 100000 *
538538
cfg80211_calculate_bitrate(&sinfo.txrate);
539539
i++;
540-
if (sinfo.filled | STATION_INFO_RX_BITRATE)
540+
if (sinfo.filled & STATION_INFO_RX_BITRATE)
541541
data[i] = 100000 *
542542
cfg80211_calculate_bitrate(&sinfo.rxrate);
543543
i++;
544544

545-
if (sinfo.filled | STATION_INFO_SIGNAL_AVG)
545+
if (sinfo.filled & STATION_INFO_SIGNAL_AVG)
546546
data[i] = (u8)sinfo.signal_avg;
547547
i++;
548548
} else {

0 commit comments

Comments
 (0)