Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3076825imm; Sun, 1 Jul 2018 11:43:16 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeA1Mom4w7ZVAeJeWeeAGGjpInJgOuf6zhMyB0jue1mbkxhzXNWs8CkUlQo+P05ii6e2GjK X-Received: by 2002:a62:fd0b:: with SMTP id p11-v6mr22549694pfh.52.1530470596916; Sun, 01 Jul 2018 11:43:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530470596; cv=none; d=google.com; s=arc-20160816; b=n1X/k6Rt3xghV+s2Bh8BSTFvMOR/nORPp5irh7+QLZ6EHmXeNzjj7QKaQvhNmXvBCY na7vvtyIBuVwDs8QUSNStZuxIC46DdzQR1JokecFS8RLxZIbSXA4qwSM5/eOnhS00frU ZeoVsiowFnubNgL0bF8R5HYC6QSis0N4Pz3wkS2fKwFWRRuFC85iBgqSjP6swMmsCCxo RPhd4I6ylkN8iDaPI7PTwsvG278dKXr0m5q234Z9F8EPNWaJemlEEV0W0yQ1I0anUAiV Ib0hJSi3GABpqiyA9uM4gyBg/ivdbRWdmwmzTvztnIivWw9wGPYnrWd89EuAlI0xsBW0 GlOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=M0pEeaZkw9b/P/N7QcBuNkaz0WHo7wb77kDME/LPQt8=; b=MrQ9M2ydpTzTWYmyru7JfwZ5wbU9RqXJGe5PsfbT/qgSqYtHDI8pZ4PVkm57XYWKGP e+rPZ8qYSVVxanfAyQ7KbTmlOBhtuo+9YCUrT5SStz3qWW/s7lv7NMbFYSWfhPrO9h5P +Gfh6TW7kYFLdYzHGbj7PB47fKjOQte6sIMflPBSpqnqXASx+uP7g6YJeTjQwkwyM9no 5J8BozkWLaQp7/DSjeKUvBfmi3KcYj8/FH4sRe4xFoXDCKJQDhvQc3gpjvHos9PKX01p 50b4aBS4fHja4tnTH/zVvvQaXxO3XqEi0jNlRUq0tRjItltgukLT/QKgAe2BCWkXNObC 3Tpw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i4-v6si546613pgl.435.2018.07.01.11.43.02; Sun, 01 Jul 2018 11:43:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932520AbeGAQNh (ORCPT + 99 others); Sun, 1 Jul 2018 12:13:37 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:60162 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932421AbeGAQNc (ORCPT ); Sun, 1 Jul 2018 12:13:32 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id F16AB4A3; Sun, 1 Jul 2018 16:13:31 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Ilan Peer , Luca Coelho , Johannes Berg , Sasha Levin Subject: [PATCH 3.18 24/85] mac80211: Adjust SAE authentication timeout Date: Sun, 1 Jul 2018 18:01:42 +0200 Message-Id: <20180701153123.326973852@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701153122.365061142@linuxfoundation.org> References: <20180701153122.365061142@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilan Peer [ Upstream commit 407879b690ba3a6bf29be896d02dad63463bd1c0 ] The IEEE P802.11-REVmd D1.0 specification updated the SAE authentication timeout to be 2000 milliseconds (see dot11RSNASAERetransPeriod). Update the SAE timeout setting accordingly. While at it, reduce some code duplication in the timeout configuration. Signed-off-by: Ilan Peer Signed-off-by: Luca Coelho Signed-off-by: Johannes Berg Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- net/mac80211/mlme.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -34,6 +34,7 @@ #define IEEE80211_AUTH_TIMEOUT (HZ / 5) #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) @@ -3464,16 +3465,19 @@ static int ieee80211_probe_auth(struct i } if (tx_flags == 0) { - auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; - auth_data->timeout_started = true; - run_again(sdata, auth_data->timeout); + if (auth_data->algorithm == WLAN_AUTH_SAE) + auth_data->timeout = jiffies + + IEEE80211_AUTH_TIMEOUT_SAE; + else + auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT; } else { auth_data->timeout = round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG); - auth_data->timeout_started = true; - run_again(sdata, auth_data->timeout); } + auth_data->timeout_started = true; + run_again(sdata, auth_data->timeout); + return 0; } @@ -3545,8 +3549,15 @@ void ieee80211_sta_work(struct ieee80211 if (ifmgd->auth_data && (ieee80211_is_probe_req(fc) || ieee80211_is_auth(fc))) { if (status_acked) { - ifmgd->auth_data->timeout = - jiffies + IEEE80211_AUTH_TIMEOUT_SHORT; + if (ifmgd->auth_data->algorithm == + WLAN_AUTH_SAE) + ifmgd->auth_data->timeout = + jiffies + + IEEE80211_AUTH_TIMEOUT_SAE; + else + ifmgd->auth_data->timeout = + jiffies + + IEEE80211_AUTH_TIMEOUT_SHORT; run_again(sdata, ifmgd->auth_data->timeout); } else { ifmgd->auth_data->timeout = jiffies - 1;