]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
cfg80211: fix beacon interval in interface combination iteration
authorJohannes Berg <johannes.berg@intel.com>
Fri, 21 Oct 2016 10:15:00 +0000 (12:15 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 27 Oct 2016 07:08:44 +0000 (09:08 +0200)
We shouldn't abort the iteration with an error when one of the
potential combinations can't accomodate the beacon interval
request, we should just skip that particular combination. Fix
the code to do so.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/wireless/util.c

index ec17c28001172987a5d8bc49bdcde43634165fee..78bf53705466e61422f3f161c178ad81e8b06436 100644 (file)
@@ -1676,10 +1676,8 @@ int cfg80211_iter_combinations(struct wiphy *wiphy,
 
                if (params->beacon_int_gcd) {
                        if (c->beacon_int_min_gcd &&
-                           params->beacon_int_gcd < c->beacon_int_min_gcd) {
-                               kfree(limits);
-                               return -EINVAL;
-                       }
+                           params->beacon_int_gcd < c->beacon_int_min_gcd)
+                               goto cont;
                        if (!c->beacon_int_min_gcd &&
                            params->beacon_int_different)
                                goto cont;