mac80211: Fix likely misuse of | for &
authorJoe Perches <joe@perches.com>
Wed, 30 May 2012 20:25:54 +0000 (13:25 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 4 Jun 2012 19:25:56 +0000 (15:25 -0400)
Using | with a constant is always true.
Likely this should have be &.

cc: Ben Greear <greearb@candelatech.com>
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/cfg.c

index 495831ee48f1b007abe235852968e9fd3bd188b5..e9cecca5c44d1a4b9134de59c6ee9afb7418e0e5 100644 (file)
@@ -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 {
This page took 0.031843 seconds and 5 git commands to generate.