Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2948381ybx; Fri, 8 Nov 2019 11:43:03 -0800 (PST) X-Google-Smtp-Source: APXvYqw8zCnKyPMfZLOQPDGZYqXfy94ETjM1o6nIhBk2653qU9eCLQiJBhRALC0UhO4pOcH2tRFh X-Received: by 2002:aa7:dbd4:: with SMTP id v20mr12611592edt.58.1573242183135; Fri, 08 Nov 2019 11:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573242183; cv=none; d=google.com; s=arc-20160816; b=JP01mHOM5M3VzV8YWr1rwkxwUPWuMWAx5V74jvs0Tyx/8XdhBoTl1a2q1aIWLx3Egn owKrgbhxn7G1iPdnXrMVaN/KFvSxwcLJm3Gd8MKta2x5aSj29YZnBrOob0+RbOk/2m7m tniF7im+woMU6iOf9uyUUauyBh+igxTLXtI8GgR9x9QmWcH+wcNb05oX8LxNSp6OuC24 ZTQSo5weY6hPt6MJqRDz/mkW5yfAqIKOuCWEloqEewvBaiIbTH7QygbNv8cG0M1+j4z3 bz9/9ffMWCpGCRZBIU9Hqh2n8r5MqafyWJLRNWazTt3RclpydwlZie08XRuw9ujxkz2I Pgcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter; bh=z0jDfAuNHmBNSHX256W5RT9ZO55hBBHsflvXF52QQpo=; b=qm/PyX4DyzNRl+PVIcY1XbCg9I7X3eHsbIBeKrgZzaNuyXh4fHlPmDJGIgj3xTq4yU SPZ7PRSKQkF6BvvHCTCrYWy/U61YUttLcgzAx+Xql2k8SGQz9v17p1e5XGQrDmf6SsQm T9XjR3bwcdQNKueXW+orgsqHIZ/fHNAExrI3KgKKktkqXdCLCNf7A99R3QhJsKEPfOu3 l6oSHCPCe7JgPQGhpaQj3tb1DaJ3D5QJPL/yH7uAo055nDVAVxS+VceEpcOUVujrBY7O hQAo1kQGjg2GErRzmNDHGzZ8ReKLCLOcbb9FW84kkSOVCMalVE3QaVV3SM6Us96Uk8/I 8wSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=lMQADlGg; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s12si4129051eja.47.2019.11.08.11.42.38; Fri, 08 Nov 2019 11:43:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@candelatech.com header.s=default header.b=lMQADlGg; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=candelatech.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731978AbfKHTm0 (ORCPT + 99 others); Fri, 8 Nov 2019 14:42:26 -0500 Received: from mail2.candelatech.com ([208.74.158.173]:46176 "EHLO mail3.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731422AbfKHTm0 (ORCPT ); Fri, 8 Nov 2019 14:42:26 -0500 Received: from ben-dt4.candelatech.com (50-251-239-81-static.hfc.comcastbusiness.net [50.251.239.81]) by mail3.candelatech.com (Postfix) with ESMTP id 42D0013C342; Fri, 8 Nov 2019 11:42:26 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 mail3.candelatech.com 42D0013C342 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=candelatech.com; s=default; t=1573242146; bh=NV8g2arCv4enRYTpkjOzbuBqNX7QeHu72Lh1uVmAY4E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lMQADlGgFZ6p+Mnq4ILUbTJC31gETgiVAt/LV7XzhuibcPFkrPARxoN9MbYyH2lBv JR9xYxDhpRZ+ejwVTyI+GSsepC7y/58lNgyabnPxp6m3Iv2MHhLr7r3UmplXlGScHS Ec7/OGO/0EfRqFs2vD1hFy8RHdEYucw7OIY9wuss= From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net, Ben Greear Subject: [PATCH 06/10] mac80211: Make max-auth-tries configurable as module option Date: Fri, 8 Nov 2019 11:42:07 -0800 Message-Id: <20191108194210.23618-7-greearb@candelatech.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191108194210.23618-1-greearb@candelatech.com> References: <20191108194210.23618-1-greearb@candelatech.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Ben Greear In some cases, one might wish to have more retries before giving up on auth. For instance, ath10k 9984 radios take about 270ms to (re)calibrate when moving channels, and auth will not go out during that calibration period. I think that might be part of the issue I see with roaming stations on that radio. Signed-off-by: Ben Greear --- net/mac80211/mlme.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 6a458aac331d..64336433925d 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -35,13 +35,17 @@ #define IEEE80211_AUTH_TIMEOUT_LONG (HZ / 2) #define IEEE80211_AUTH_TIMEOUT_SHORT (HZ / 10) #define IEEE80211_AUTH_TIMEOUT_SAE (HZ * 2) -#define IEEE80211_AUTH_MAX_TRIES 3 #define IEEE80211_AUTH_WAIT_ASSOC (HZ * 5) #define IEEE80211_ASSOC_TIMEOUT (HZ / 5) #define IEEE80211_ASSOC_TIMEOUT_LONG (HZ / 2) #define IEEE80211_ASSOC_TIMEOUT_SHORT (HZ / 10) #define IEEE80211_ASSOC_MAX_TRIES 3 +static int max_auth_tries = 3; +module_param(max_auth_tries, int, 0644); +MODULE_PARM_DESC(max_auth_tries, + "Maximum auth tries before giving up (default is 3)."); + static int max_nullfunc_tries = 2; module_param(max_nullfunc_tries, int, 0644); MODULE_PARM_DESC(max_nullfunc_tries, @@ -4189,9 +4193,9 @@ static int ieee80211_auth(struct ieee80211_sub_if_data *sdata) auth_data->tries++; - if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) { - sdata_info(sdata, "authentication with %pM timed out\n", - auth_data->bss->bssid); + if (auth_data->tries > max_auth_tries) { + sdata_info(sdata, "authentication with %pM timed out after %d tries\n", + auth_data->bss->bssid, max_auth_tries); /* * Most likely AP is not in the range so remove the @@ -4210,7 +4214,7 @@ static int ieee80211_auth(struct ieee80211_sub_if_data *sdata) sdata_info(sdata, "send auth to %pM (try %d/%d)\n", auth_data->bss->bssid, auth_data->tries, - IEEE80211_AUTH_MAX_TRIES); + max_auth_tries); auth_data->expected_transaction = 2; -- 2.20.1