|
|
9266085 |
From: Johannes Berg <johannes.berg@intel.com>
|
|
|
9266085 |
|
|
|
9266085 |
When a full scan 2.4 and 5 GHz scan is scheduled, but then the 2.4 GHz
|
|
|
9266085 |
part of the scan disables a 5.2 GHz channel due to, e.g. receiving
|
|
|
9266085 |
country or frequency information, that 5.2 GHz channel might already
|
|
|
9266085 |
be in the list of channels to scan next. Then, when the driver checks
|
|
|
9266085 |
if it should do a passive scan, that will return false and attempt an
|
|
|
9266085 |
active scan. This is not only wrong but can also lead to the iwlwifi
|
|
|
9266085 |
device firmware crashing since it checks regulatory as well.
|
|
|
9266085 |
|
|
|
9266085 |
Fix this by not setting the channel flags to just disabled but rather
|
|
|
9266085 |
OR'ing in the disabled flag. That way, even if the race happens, the
|
|
|
9266085 |
channel will be scanned passively which is still (mostly) correct.
|
|
|
9266085 |
|
|
|
9266085 |
Cc: stable@vger.kernel.org
|
|
|
9266085 |
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
|
|
|
9266085 |
---
|
|
|
9266085 |
net/wireless/reg.c | 2 +-
|
|
|
9266085 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
9266085 |
|
|
|
9266085 |
diff --git a/net/wireless/reg.c b/net/wireless/reg.c
|
|
|
9266085 |
index 93ab840..507c28e 100644
|
|
|
9266085 |
--- a/net/wireless/reg.c
|
|
|
9266085 |
+++ b/net/wireless/reg.c
|
|
|
9266085 |
@@ -855,7 +855,7 @@ static void handle_channel(struct wiphy *wiphy,
|
|
|
9266085 |
return;
|
|
|
9266085 |
|
|
|
9266085 |
REG_DBG_PRINT("Disabling freq %d MHz\n", chan->center_freq);
|
|
|
9266085 |
- chan->flags = IEEE80211_CHAN_DISABLED;
|
|
|
9266085 |
+ chan->flags |= IEEE80211_CHAN_DISABLED;
|
|
|
9266085 |
return;
|
|
|
9266085 |
}
|
|
|
9266085 |
|
|
|
9266085 |
--
|
|
|
9266085 |
1.8.0
|
|
|
9266085 |
|
|
|
9266085 |
--
|
|
|
9266085 |
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
|
|
|
9266085 |
the body of a message to majordomo@vger.kernel.org
|
|
|
9266085 |
More majordomo info at http://vger.kernel.org/majordomo-info.html
|