From patchwork Mon Sep 25 12:30:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dedy Lansky X-Patchwork-Id: 9969865 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 14B2C602D8 for ; Mon, 25 Sep 2017 12:30:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 050BE28CAA for ; Mon, 25 Sep 2017 12:30:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE12C28C8B; Mon, 25 Sep 2017 12:30:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DA4128C97 for ; Mon, 25 Sep 2017 12:30:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932814AbdIYMaI (ORCPT ); Mon, 25 Sep 2017 08:30:08 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52210 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752111AbdIYMaH (ORCPT ); Mon, 25 Sep 2017 08:30:07 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E716660246; Mon, 25 Sep 2017 12:30:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1506342606; bh=+i9YvggCOYjad9A3SP7DykgGjWNEou+SN0LgWtMoCCA=; h=From:To:Cc:Subject:Date:From; b=Bm1xcE8QNxEmeCjdjD29j/cRc1fYeQ4Jx34+5aOJNRzB5hB/arpqUCDTlgRjIe3tG xZLlJoTRqm9CHcMONCh4FECHjhvzqamOZJKGCNdAJKI5irLUmWihlD3hed5oJoVe1Z v+rVW7enD+TmzAtt1zvNFVy8PWxVFbJzxjsT8N10= Received: from DLANSKY (unknown [185.23.60.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: dlansky@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1F635606DB; Mon, 25 Sep 2017 12:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1506342606; bh=+i9YvggCOYjad9A3SP7DykgGjWNEou+SN0LgWtMoCCA=; h=From:To:Cc:Subject:Date:From; b=Bm1xcE8QNxEmeCjdjD29j/cRc1fYeQ4Jx34+5aOJNRzB5hB/arpqUCDTlgRjIe3tG xZLlJoTRqm9CHcMONCh4FECHjhvzqamOZJKGCNdAJKI5irLUmWihlD3hed5oJoVe1Z v+rVW7enD+TmzAtt1zvNFVy8PWxVFbJzxjsT8N10= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1F635606DB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=dlansky@codeaurora.org From: "Dedy Lansky" To: "'Johannes Berg'" , Cc: "wil6210" Subject: [RFC] Add cfg80211/nl80211 support for AP mode 802.11 FT roaming Date: Mon, 25 Sep 2017 15:30:02 +0300 Message-ID: <000901d335fa$0483f7d0$0d8be770$@codeaurora.org> MIME-Version: 1.0 X-Mailer: Microsoft Outlook 16.0 Content-Language: en-us Thread-Index: AdM197/MLFkdB2fHQgyhstqGifPaMA== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dedy Lansky Drivers which have integrated AP SME can use this to communicate with userspace (e.g. hostapd) for the purpose of FT roaming processing. cfg80211 API added for driver to indicate received Authentication and Reassociation frames from the roaming STA. NL80211_CMD_AUTHENTICATE and NL80211_CMD_ASSOCIATE are enhanced to be used in AP mode, for indication/response to/from userspace. Signed-off-by: Dedy Lansky --- In FT roaming, 4 way handshake is piggybacked on top of Authentication request/response and Reassociation request/response frames. This RFC provides API for WLAN drivers to communicate with userspace and pass required information (e.g. Information Elements) so FT 4 way handshake can be accomplished in userspace. This RFC describes only documentation and header file changes. In case the concept is accepted, a complete patch with implementation changes will be provided. --- include/net/cfg80211.h | 29 +++++++++++++++++++++++++++++ include/uapi/linux/nl80211.h | 19 +++++++++++++++++++ 2 files changed, 48 insertions(+) Information + * Elements. + * * @NL80211_CMD_ASSOCIATE: association request and notification; like * NL80211_CMD_AUTHENTICATE but for Association and Reassociation * (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request, @@ -504,6 +518,11 @@ * request is for the initial association to an ESS (that attribute not * included) or for reassociation within the ESS (that attribute is * included). + * In AP mode, this is used for FT roaming when driver has AP SME, as a + * Reassociation indication and response. like NL80211_CMD_AUTHENTICATE + * but for Reassociation (similar to MLME-REASSOCIATE.indication, + * MLME-REASSOCIATE.response). + * * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like * NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to * MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index f12fa52..917e3ac 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -6183,6 +6183,35 @@ void cfg80211_nan_func_terminated(struct wireless_dev *wdev, enum nl80211_nan_func_term_reason reason, u64 cookie, gfp_t gfp); +/** + * cfg80211_ft_auth - notify cfg80211 of FT authentication request + * + * @dev: network device + * @req: information about the authentication request + * + * This function is called by the driver when it receives FT Authentication + * frame in AP mode. This is used only with SME-in-device drivers. + * req should provide information about the Authentication frame which will be + * forwarded to userspace. + */ +void cfg80211_ft_auth(struct net_device *dev, + struct cfg80211_auth_request *req); + +/** + * cfg80211_ft_reassoc - notify cfg80211 of FT reassociation request + * + * @dev: network device + * @reassoc_data: Reassociation frame + * @reassoc_data_len: Reassociation frame length + * + * This function is called by the driver when it receives FT Reassociation + * frame in AP mode. This is used only with SME-in-device drivers. + * reassoc_data contains the Reassociation frame which will be forwarded to + * userspace. + */ +void cfg80211_ft_reassoc(struct net_device *dev, + const u8 *reassoc_data, size_t reassoc_data_len); + /* ethtool helper */ void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info); diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h index 51626b4..65cf0fc 100644 --- a/include/uapi/linux/nl80211.h +++ b/include/uapi/linux/nl80211.h @@ -496,6 +496,20 @@ * case the %NL80211_ATTR_FRAME attribute is replaced with a * %NL80211_ATTR_TIMED_OUT flag (and %NL80211_ATTR_MAC to indicate which * pending authentication timed out). + * In AP mode, this is used for FT roaming when driver has AP SME, as an + * authentication indication and response. + * When used as an event, this reports reception of an Authentication + * frame from a STA requesting authentication (i.e. + * MLME-AUTHENTICATE.indication). %NL80211_ATTR_MAC is used to specify + * PeerSTAAddress. %NL80211_ATTR_FRAME attribute contains the management + * frame. + * When used as a command, it indicates whether authentication is + * successful. WLAN driver should send authentication response to the + * authenticating STA (i.e. MLME-AUTHENTICATE.response). %NL80211_ATTR_MAC + * is used to specify PeerSTAAddress. %NL80211_ATTR_STATUS_CODE is used to + * indicate success or failure. %NL80211_ATTR_IE contains FT