Skip to content

Commit

Permalink
mac80211: Fix likely misuse of | for &
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
JoePerches authored and linvjw committed Jun 4, 2012
1 parent d8c7aae commit 5204267
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,16 +533,16 @@ static void ieee80211_get_et_stats(struct wiphy *wiphy,
sinfo.filled = 0;
sta_set_sinfo(sta, &sinfo);

if (sinfo.filled | STATION_INFO_TX_BITRATE)
if (sinfo.filled & STATION_INFO_TX_BITRATE)
data[i] = 100000 *
cfg80211_calculate_bitrate(&sinfo.txrate);
i++;
if (sinfo.filled | STATION_INFO_RX_BITRATE)
if (sinfo.filled & STATION_INFO_RX_BITRATE)
data[i] = 100000 *
cfg80211_calculate_bitrate(&sinfo.rxrate);
i++;

if (sinfo.filled | STATION_INFO_SIGNAL_AVG)
if (sinfo.filled & STATION_INFO_SIGNAL_AVG)
data[i] = (u8)sinfo.signal_avg;
i++;
} else {
Expand Down

0 comments on commit 5204267

Please sign in to comment.