Skip to content

Commit

Permalink
wl12xx: fix passive and radar channel generation for scheduled scan
Browse files Browse the repository at this point in the history
We were comparing bitwise AND results with a boolean, so when the
boolean was set to true, it was not matching as it should.

Fix this by booleanizing the bitwise AND results with !!.

Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Luciano Coelho authored and John W. Linville committed May 31, 2011
1 parent 71005be commit dd08682
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/wireless/wl12xx/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ wl1271_scan_get_sched_scan_channels(struct wl1271 *wl,
flags = req->channels[i]->flags;

if (!(flags & IEEE80211_CHAN_DISABLED) &&
((flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive) &&
((flags & IEEE80211_CHAN_RADAR) == radar) &&
(!!(flags & IEEE80211_CHAN_PASSIVE_SCAN) == passive) &&
(!!(flags & IEEE80211_CHAN_RADAR) == radar) &&
(req->channels[i]->band == band)) {
wl1271_debug(DEBUG_SCAN, "band %d, center_freq %d ",
req->channels[i]->band,
Expand Down

0 comments on commit dd08682

Please sign in to comment.