From patchwork Wed Oct 26 21:42:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 9398483 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 7F66760234 for ; Wed, 26 Oct 2016 21:44:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4948829C05 for ; Wed, 26 Oct 2016 21:44:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E2F929C34; Wed, 26 Oct 2016 21:44:26 +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 BB1EB29C05 for ; Wed, 26 Oct 2016 21:44:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934551AbcJZVoX (ORCPT ); Wed, 26 Oct 2016 17:44:23 -0400 Received: from wolverine02.qualcomm.com ([199.106.114.251]:28863 "EHLO wolverine02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934200AbcJZVoW (ORCPT ); Wed, 26 Oct 2016 17:44:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1477518262; x=1509054262; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Z4zSXGQDoG80QY+IHaSYHolFqitB3/Dl4Gwwl1lCAho=; b=H0czN+NLSZNx81M/cKpaQST8iMukdhh4Tale2vjECn20rYyI493de0jm /GAzzv7ykEl9IQS/IUYmsV2/5r+8kO6uJ6Nddpzn6gso4qn/nCFmj+vg8 ivO7XlsiQRS/G/PyUBOGo2PvwVHmBq2kPKD+s8v2E6l36zPdq543AYm0P 8=; X-IronPort-AV: E=Sophos;i="5.31,551,1473145200"; d="scan'208";a="330230588" Received: from unknown (HELO ironmsg02-L.qualcomm.com) ([10.53.140.109]) by wolverine02.qualcomm.com with ESMTP; 26 Oct 2016 14:44:22 -0700 X-IronPort-AV: E=McAfee;i="5700,7163,8330"; a="801812568" Received: from nasanexm02f.na.qualcomm.com ([10.85.0.87]) by ironmsg02-L.qualcomm.com with ESMTP/TLS/RC4-SHA; 26 Oct 2016 14:44:21 -0700 Received: from eusanexr01e.eu.qualcomm.com (10.85.0.100) by nasanexm02f.na.qualcomm.com (10.85.0.87) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 26 Oct 2016 14:44:21 -0700 Received: from jouni.qca.qualcomm.com (10.80.80.8) by eusanexr01e.eu.qualcomm.com (10.85.0.100) with Microsoft SMTP Server (TLS) id 15.0.1178.4; Wed, 26 Oct 2016 14:44:18 -0700 From: Jouni Malinen To: Johannes Berg CC: , Jouni Malinen Subject: [PATCH v2 4/9] cfg80211: Define IEEE P802.11ai (FILS) information elements Date: Thu, 27 Oct 2016 00:42:01 +0300 Message-ID: <1477518126-823-5-git-send-email-jouni@qca.qualcomm.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477518126-823-1-git-send-email-jouni@qca.qualcomm.com> References: <1477518126-823-1-git-send-email-jouni@qca.qualcomm.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: NASANEXM01C.na.qualcomm.com (10.85.0.83) To eusanexr01e.eu.qualcomm.com (10.85.0.100) 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 Define the Element IDs and Element ID Extensions from IEEE P802.11ai/D11.0. In addition, add a new cfg80211_find_ext_ie() wrapper to make it easier to find information elements that used the Element ID Extension field. Signed-off-by: Jouni Malinen --- include/linux/ieee80211.h | 20 ++++++++++++++++++++ include/net/cfg80211.h | 21 +++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index a80516f..d428adf 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -1960,6 +1960,26 @@ enum ieee80211_eid { WLAN_EID_VENDOR_SPECIFIC = 221, WLAN_EID_QOS_PARAMETER = 222, + WLAN_EID_CAG_NUMBER = 237, + WLAN_EID_AP_CSN = 239, + WLAN_EID_FILS_INDICATION = 240, + WLAN_EID_DILS = 241, + WLAN_EID_FRAGMENT = 242, + WLAN_EID_EXTENSION = 255 +}; + +/* Element ID Extensions for Element ID 255 */ +enum ieee80211_eid_ext { + WLAN_EID_EXT_ASSOC_DELAY_INFO = 1, + WLAN_EID_EXT_FILS_REQ_PARAMS = 2, + WLAN_EID_EXT_FILS_KEY_CONFIRM = 3, + WLAN_EID_EXT_FILS_SESSION = 4, + WLAN_EID_EXT_FILS_HLP_CONTAINER = 5, + WLAN_EID_EXT_FILS_IP_ADDR_ASSIGN = 6, + WLAN_EID_EXT_KEY_DELIVERY = 7, + WLAN_EID_EXT_FILS_WRAPPED_DATA = 8, + WLAN_EID_EXT_FILS_PUBLIC_KEY = 12, + WLAN_EID_EXT_FILS_NONCE = 13, }; /* Action category code */ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 843ab8a..e1bc478 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -4179,6 +4179,27 @@ static inline const u8 *cfg80211_find_ie(u8 eid, const u8 *ies, int len) } /** + * cfg80211_find_ext_ie - find information element with EID Extension in data + * + * @eid: element ID Extension + * @ies: data consisting of IEs + * @len: length of data + * + * Return: %NULL if the extended element ID could not be found or if + * the element is invalid (claims to be longer than the given + * data), or a pointer to the first byte of the requested + * element, that is the byte containing the element ID. + * + * Note: There are no checks on the element length other than + * having to fit into the given data. + */ +static inline const u8 *cfg80211_find_ext_ie(u8 ext_eid, const u8 *ies, int len) +{ + return cfg80211_find_ie_match(WLAN_EID_EXTENSION, ies, len, + &ext_eid, 1, 2); +} + +/** * cfg80211_find_vendor_ie - find vendor specific information element in data * * @oui: vendor OUI