From: Michal Kazior Date: Fri, 21 Mar 2014 13:52:15 +0000 (+0100) Subject: cfg80211: fix radar_detect combination checking X-Git-Tag: v3.16~18^2~11^2~7^2~46^2~85 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65d26f29ec018c863ae181c96c1dd91ed8c4b652;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: Johannes Berg --- diff --git a/net/wireless/util.c b/net/wireless/util.c index 5433659..d032a31 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1309,7 +1309,7 @@ int cfg80211_check_combinations(struct wiphy *wiphy, } } - if (radar_detect && !(c->radar_detect_widths & radar_detect)) + if (radar_detect != (c->radar_detect_widths & radar_detect)) goto cont; /* Finally check that all iftypes that we're currently