]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
cfg80211: fix radar_detect combination checking
authorMichal Kazior <michal.kazior@tieto.com>
Fri, 21 Mar 2014 13:52:15 +0000 (14:52 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 9 Apr 2014 08:55:58 +0000 (10:55 +0200)
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>
net/wireless/util.c

index 5433659a08ee54ae717e08de482efc51b266bfbb..d032a31828f1025f0752daa6519f67c24f3724e9 100644 (file)
@@ -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