diff options
author | Michal Kazior <michal.kazior@tieto.com> | 2014-03-21 09:52:15 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-04-09 04:55:58 -0400 |
commit | 65d26f29ec018c863ae181c96c1dd91ed8c4b652 (patch) | |
tree | 51036c3319dde4323c3110436e017482336e5e4d | |
parent | 5d52ee81101943c507f45c76368026935f6bb75a (diff) |
cfg80211: fix radar_detect combination checking
All bits from radar_detect must match combination
radar bitmask. Otherwise it is theoretically
possible to lead into an invalid combination
provided a driver reports strange combinations.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r-- | net/wireless/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c index 5433659a08ee..d032a31828f1 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c | |||
@@ -1309,7 +1309,7 @@ int cfg80211_check_combinations(struct wiphy *wiphy, | |||
1309 | } | 1309 | } |
1310 | } | 1310 | } |
1311 | 1311 | ||
1312 | if (radar_detect && !(c->radar_detect_widths & radar_detect)) | 1312 | if (radar_detect != (c->radar_detect_widths & radar_detect)) |
1313 | goto cont; | 1313 | goto cont; |
1314 | 1314 | ||
1315 | /* Finally check that all iftypes that we're currently | 1315 | /* Finally check that all iftypes that we're currently |