From 54afc7997e9ba3e279b080a8ffa9dc49bb64888a Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 21 Oct 2016 12:15:00 +0200 Subject: [PATCH] cfg80211: fix beacon interval in interface combination iteration 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. CRs-Fixed: 1087922 Change-Id: Ib1ae7221291b8176d61d58e756a3814c80d98d27 Signed-off-by: Johannes Berg Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git Git-commit: 0507a3ac6e98f50583912ec78d07c2e4daaf2b28 [liord@codeaurora.org: cherry-pick without changes] Signed-off-by: Lior David --- net/wireless/util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/net/wireless/util.c b/net/wireless/util.c index 5fdeb1107fe6..2334d3d65173 100644 --- a/net/wireless/util.c +++ b/net/wireless/util.c @@ -1600,10 +1600,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;