Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4386845ybb; Tue, 14 Apr 2020 06:22:25 -0700 (PDT) X-Google-Smtp-Source: APiQypL0iGqx+bSTCz/+sGIJR226u4Y+O8990dOP/KatId+R+tPP1VQEfeVDZXbeTPk8BlHATtcr X-Received: by 2002:a05:6402:144c:: with SMTP id d12mr19810070edx.225.1586870545463; Tue, 14 Apr 2020 06:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586870545; cv=none; d=google.com; s=arc-20160816; b=nA15X43IiRhYKGDX7DbT9cfrt7E3wJJWhlkqAVe1myzcJ3YUsht62SVaxgOugagM00 NRJ57yEDMADRKo6uY3CYiS54yiqG2wD2nco50AR920COFjXq9pUh55nyUhKQIZw5TSa/ +GEL15+XmV2FUqntqOkqdzXCdY45tmsPvm6YKCPHVtn9kxDoMzEUCJRFNL2S1ZzGe79g jHhVQ5hSQTp8avEcILvRmib30+LrjR9R6sFy/8INqJqfNlaPtGrSSlrDWU+DIbNgmDyG Bz9Fq7c2ZbeEsQYe8+kh4YsXb46StkmhfdFDdU09giw0z1Rvw90g/thFFjcmFPnWKOi3 VJ3A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=oZ87g3+hZwo3IPgpVTfaLkO2pQdeEeP4I4vsWs0xg6g=; b=xhT4CnU9uD+ga6kE5gpJayvdo+iU6yJk3Tn4gPt5UjTJLFO1oAbg1BiUCmkwO1lfQK RTkzK0Rt1q0Tprjs+02+/hfQb3pvvIK8biDLO6iJXHZgCc38FKNzMlX84SVoNZrex+dn Rxq7pPDVHJZLnC3/87NTmJbgUqKOm4Kp2RlM4KVmASgX/aEOeZ6etVHjUe3RzjAG3v1M mWGdhzONFTLicXgOw9gUKGwVI5EdM8sXfwCleKVLh3kYO4TKFpHOIJvI2oKSgp7k1qrF wginANM6nCrAq6ACQwhLO4wBIMrHCbLDwllZSqgrLXyTj6wv+WQek2Lr57Rc0yATqIjw uX7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PylV2Tuu; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u13si7765929edx.550.2020.04.14.06.22.01; Tue, 14 Apr 2020 06:22:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PylV2Tuu; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731460AbgDMQVB (ORCPT + 99 others); Mon, 13 Apr 2020 12:21:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1731410AbgDMQVA (ORCPT ); Mon, 13 Apr 2020 12:21:00 -0400 Received: from mail-pf1-x444.google.com (mail-pf1-x444.google.com [IPv6:2607:f8b0:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89E5BC0A3BDC for ; Mon, 13 Apr 2020 09:21:00 -0700 (PDT) Received: by mail-pf1-x444.google.com with SMTP id l1so4681818pff.10 for ; Mon, 13 Apr 2020 09:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oZ87g3+hZwo3IPgpVTfaLkO2pQdeEeP4I4vsWs0xg6g=; b=PylV2TuuJeUD9qDYywfx4Lby2klZcP36TJi6QyMr7rWdEGszJQ9q8hfrXgf0+TetwA G+Pktbvvw+00PQtu2CH0U22y30MwSveXPEEK7zqUJI8BkrFeVC+eMhTEqIJJSuVGvo3r RUCK6xju8RBJ+qoDS+1L6JGvml4JZ946/txHK+zc6AmLYZx5+5nttwRFTVxkle+8uH39 VUjpGlqa1oLNVbOjg2f6b1R3hQivJ0eCrYILvo2pyUvO695XeyIuRnUZbYvPnSknRvg9 WyV18AuzEg3RIKjMDcLEN+1cGEs8ClrfUlUSfNF9JNR+o4TQXttSSHiFHQZSLnQb2I6t Ij1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oZ87g3+hZwo3IPgpVTfaLkO2pQdeEeP4I4vsWs0xg6g=; b=rbqs7JxS5dv142Ae2z5c38kPMV2sZLdpe5Rhn1dReVNFiAFQBoS52TWk3t8fSgpXPi w+Qy8O2X5Xg7VJyEUNOxycLqaiQ6Y39Pgaddg3TF6LlKMLZ3uRVl0RbxPJvLUkDeEpVW TvFIMyc+Wa84HwbETxf/JhzG2wA8OyK2VKHKpu0Wkxkr10G3Nuw8FAkU0lMXCYBWZ9B3 kAlNlrb+bBc2xFGuSple+ob3LlIkvs9VDwXtgNi0pUs8OrhjohPo+On0SHt71UtIUoVx PjhmH1qFmqVqgBF8Ll9/KIUfPiUUOZOsLh4vzYq5bRjBgFsgjxkkd8bEjYqwJn6nBwwF rjDA== X-Gm-Message-State: AGi0PuYSLONNZFRipzFW1CPpKYariuTOtv89xvuCnq/q5EYJpqXaqOIf NDwZNLaBgm6mYBopdoixVV89/l3XUNA= X-Received: by 2002:a62:2a8c:: with SMTP id q134mr19226249pfq.35.1586794859772; Mon, 13 Apr 2020 09:20:59 -0700 (PDT) Received: from unknown7c7a912bd80b.home (50-39-169-98.bvtn.or.frontiernet.net. [50.39.169.98]) by smtp.gmail.com with ESMTPSA id e4sm6308337pfn.199.2020.04.13.09.20.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 09:20:59 -0700 (PDT) From: James Prestwood To: linux-wireless@vger.kernel.org Cc: James Prestwood Subject: [PATCH] nl80211: fix PORT_AUTHORIZED wording to reflect behavior Date: Mon, 13 Apr 2020 09:20:53 -0700 Message-Id: <20200413162053.3711-1-prestwoj@gmail.com> X-Mailer: git-send-email 2.21.1 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 The CMD_PORT_AUTHORIZED event was described as an event which indicated a successfully completed 4-way handshake. But the behavior was not as advertized. The only driver which uses this is brcmfmac, and this driver only sends the event after a successful 8021x-FT roam. This prevents userspace applications from knowing if the 4-way completed on: 1. Normal 8021x connects 2. Normal PSK connections 3. FT-PSK roams wpa_supplicant handles this incorrect behavior by just completing the connection after association, before the 4-way has completed. If the 4-way ends up failing it disconnects at that point. Since this behavior appears to be expected (wpa_s handles it this way) I have changed the wording in the API description to reflect the actual behavior. Signed-off-by: James Prestwood --- include/uapi/linux/nl80211.h | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 5eab191607f8..42161d985004 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -611,13 +611,9 @@ * authentication/association or not receiving a response from the AP. * Non-zero %NL80211_ATTR_STATUS_CODE value is indicated in that case as * well to remain backwards compatible. - * When establishing a security association, drivers that support 4 way - * handshake offload should send %NL80211_CMD_PORT_AUTHORIZED event when - * the 4 way handshake is completed successfully. * @NL80211_CMD_ROAM: Notification indicating the card/driver roamed by itself. - * When a security association was established with the new AP (e.g. if - * the FT protocol was used for roaming or the driver completed the 4 way - * handshake), this event should be followed by an + * When a security association was established on an 8021x network using + * fast transition, this event should be followed by an * %NL80211_CMD_PORT_AUTHORIZED event. * @NL80211_CMD_DISCONNECT: drop a given connection; also used to notify * userspace that a connection was dropped by the AP or due to other @@ -1027,13 +1023,11 @@ * @NL80211_CMD_DEL_PMK: For offloaded 4-Way handshake, delete the previously * configured PMK for the authenticator address identified by * %NL80211_ATTR_MAC. - * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates that the 4 way - * handshake was completed successfully by the driver. The BSSID is - * specified with %NL80211_ATTR_MAC. Drivers that support 4 way handshake - * offload should send this event after indicating 802.11 association with - * %NL80211_CMD_CONNECT or %NL80211_CMD_ROAM. If the 4 way handshake failed - * %NL80211_CMD_DISCONNECT should be indicated instead. - * + * @NL80211_CMD_PORT_AUTHORIZED: An event that indicates an 8021x FT roam was + * completed successfully. Drivers that support 4 way handshake offload + * should send this event after indicating 8021x FT assocation with + * %NL80211_CMD_ROAM. If the 4 way handshake failed %NL80211_CMD_DISCONNECT + * should be indicated instead. * @NL80211_CMD_CONTROL_PORT_FRAME: Control Port (e.g. PAE) frame TX request * and RX notification. This command is used both as a request to transmit * a control port frame and as a notification that a control port frame -- 2.21.1