1
0
Fork 0

wl12xx: fix passive and radar channel generation for scheduled scan

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>
hifive-unleashed-5.1
Luciano Coelho 2011-05-27 15:34:45 +03:00 committed by John W. Linville
parent 71005be40a
commit dd08682150
1 changed files with 2 additions and 2 deletions

View File

@ -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,