From patchwork Tue Apr 25 16:02:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gokul Sivakumar X-Patchwork-Id: 1773493 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=vMb1flwJ; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=infineon.com header.i=@infineon.com header.a=rsa-sha256 header.s=IFXMAIL header.b=KoM77spa; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Q5Rch37jGz23td for ; Wed, 26 Apr 2023 02:03:32 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:CC:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=C+4muAHaF8fGHpypmFGg6j9NFxb8eQK3RkOKNlTX5Dk=; b=vMb1flwJsx9p6n v9lLwMOjAlsUrPq5FLdL+Gg9peIK5RTogJKDpV0ERQXYD5JgGm9q1i64m7omv+Xhe4ZNbJKf5vF13 aD+kBzlowRt+dfIVdVWdUt0JGhG76QME7BmbHqYFFPCy/zVD7/udoKycH3/b62u4lvXO7d+zKCO3C f7miAqGgS3I/VkQUk8kdjUpBzu+8QK3hSPjXTG581K4DVIhwBv7mX9aHTOlV2F/S2crVAza4CkbPe 5C2njxLv88yG2OW1S5WBwB9rYb1V946B7s2vuJWibZeJAxte2HHoFrgUS/uE9VLE1Y5qmUKEpqsJA 7abl7bC5vc5zNjaHUiQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1prL82-001b52-2E; Tue, 25 Apr 2023 16:02:54 +0000 Received: from smtp11.infineon.com ([2a00:18f0:1e00:4::5]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1prL7z-001b3q-0J for hostap@lists.infradead.org; Tue, 25 Apr 2023 16:02:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infineon.com; i=@infineon.com; q=dns/txt; s=IFXMAIL; t=1682438571; x=1713974571; h=date:from:to:cc:subject:message-id:mime-version; bh=RfPgdeWET8wqWeHzfV2zYOUjKCUdE1vHz+SuFSEi20Y=; b=KoM77spaVJPdQSZMd619oRJYepez5AoE747mgLZfJ+iQloa5+26bWpmX BoVbxAdWtWo6dn4y+62HBFGSCkhDiET9+5wjLaMRQwRN/u1RKJcF5DR7r xs0TaKE46YLxvb74rxYg9MXljrWFTo/5+VEWFqdTkOl3tIvpq+kH6c3ji k=; X-IronPort-AV: E=McAfee;i="6600,9927,10691"; a="11707080" X-IronPort-AV: E=Sophos;i="5.99,225,1677538800"; d="scan'208";a="11707080" Received: from unknown (HELO MUCSE814.infineon.com) ([172.23.29.40]) by smtp11.infineon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2023 18:02:50 +0200 Received: from MUCSE827.infineon.com (172.23.29.20) by MUCSE814.infineon.com (172.23.29.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 25 Apr 2023 18:02:49 +0200 Received: from infineon.com (10.3.51.165) by MUCSE827.infineon.com (172.23.29.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.42; Tue, 25 Apr 2023 18:02:47 +0200 Date: Tue, 25 Apr 2023 21:32:39 +0530 From: Gokul Sivakumar To: CC: Vinoth Sampath , Double Lo , Ian Lin Subject: [PATCH 4/7] nl80211: Introduce new Vendor header file for driver interface with IFX OUI Message-ID: <20230425160239.volnhqy7kqp4r4kb@infineon.com> MIME-Version: 1.0 Content-Disposition: inline X-Originating-IP: [10.3.51.165] X-ClientProxiedBy: MUCSE820.infineon.com (172.23.29.46) To MUCSE827.infineon.com (172.23.29.20) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230425_090251_437425_9753046E X-CRM114-Status: GOOD ( 19.76 ) X-Spam-Score: -5.2 (-----) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Use a new Vendor header file to maintain Infineon specific vendor subcmds, attributes and events. And the vendor subcmds and event NL80211 messages are nested under NL80211_CMD_VENDOR with IFX OUI. IFX OUI: 00:03:19 (Refer "Infineon AG" in https://standards-oui.ieee.org/) Content analysis details: (-5.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at https://www.dnswl.org/, high trust [2a00:18f0:1e00:4:0:0:0:5 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Use a new Vendor header file to maintain Infineon specific vendor subcmds, attributes and events. And the vendor subcmds and event NL80211 messages are nested under NL80211_CMD_VENDOR with IFX OUI. IFX OUI: 00:03:19 (Refer "Infineon AG" in https://standards-oui.ieee.org/) And introduce a new build flag CONFIG_DRIVER_NL80211_IFX for Infineon WiFi. Signed-off-by: Gokul Sivakumar --- hostapd/defconfig | 3 + src/common/ifx_vendor.h | 118 +++++++++++++++++++++++++++++++++++++++ src/drivers/drivers.mak | 3 + src/drivers/drivers.mk | 3 + wpa_supplicant/defconfig | 3 + 5 files changed, 130 insertions(+) create mode 100644 src/common/ifx_vendor.h diff --git a/hostapd/defconfig b/hostapd/defconfig index a9eab4d9c..37499b4ee 100644 --- a/hostapd/defconfig +++ b/hostapd/defconfig @@ -21,6 +21,9 @@ CONFIG_DRIVER_NL80211=y # QCA vendor extensions to nl80211 #CONFIG_DRIVER_NL80211_QCA=y +# IFX vendor extensions to nl80211 +#CONFIG_DRIVER_NL80211_IFX=y + # driver_nl80211.c requires libnl. If you are compiling it yourself # you may need to point hostapd to your version of libnl. # diff --git a/src/common/ifx_vendor.h b/src/common/ifx_vendor.h new file mode 100644 index 000000000..729c01901 --- /dev/null +++ b/src/common/ifx_vendor.h @@ -0,0 +1,118 @@ +/* + * Infineon OUI and vendor specific assignments + * Copyright (c) 2023, Cypress Semiconductor Corporation (an Infineon company) + * + * This software may be distributed under the terms of the BSD license. + * See README for more details. + */ + +#ifndef IFX_VENDOR_H +#define IFX_VENDOR_H + +/* + * This file is a registry of identifier assignments from the Infineon + * OUI 00:03:19 for purposes other than MAC address assignment. New identifiers + * can be assigned through normal review process for changes to the upstream + * hostap.git repository. + */ +#define OUI_IFX 0x000319 + +/* + * enum ifx_nl80211_vendor_subcmds - IFX nl80211 vendor command identifiers + * + * @IFX_VENDOR_SCMD_UNSPEC: Reserved value 0 + * + * @IFX_VENDOR_SCMD_DCMD: Handle the Dongle commands triggered from the userspace utilities. + * These commands will be passed to the Dongle for processing. + * + * @IFX_VENDOR_SCMD_FRAMEBURST: Control the Frameburst feature. This feature allows more + * efficient use of the airtime between the transmitting and receiving WLAN devices. + * + * @IFX_VENDOR_SCMD_ACS: Configure the Automatic Channel Selection (ACS) feature. + * + * @IFX_VENDOR_SCMD_SET_MAC_P2P_DEV: Set MAC address for a P2P Discovery device. + * Uses Vendor attribute IFX_VENDOR_ATTR_MAC_ADDR to pass the MAC address. + * + * @IFX_VENDOR_SCMD_MUEDCA: Configure Multi User Enhanced Distrubuted Channel Access (MU-EDCA). + * + * @IFX_VENDOR_SCMD_LDPC: Enable support for handling Low Density Parity Check (LDPC) Coding + * in received payload. + * + * @IFX_VENDOR_SCMD_AMSDU: Control AMSDU aggregation for both TX & RX on all the TID queues. + * + * @IFX_VENDOR_SCMD_TWT: Configure Target Wake Time (TWT) Session with the needed parameters. + * + * @IFX_VENDOR_SCMD_OCE: Configure the Optimized Connectivity Experience (OCE) functionality + * related parameters. + * + * @IFX_VENDOR_SCMD_BSSCOLOR: Set BSS Color (1-63) for AP Mode operation in HE. + * + * @IFX_VENDOR_SCMD_RAND_MAC: Configure the Random MAC module. + * + * @IFX_VENDOR_SCMD_MBO: Configure Multi Band Operation (MBO) functionality related parameters. + * + * @IFX_VENDOR_SCMD_MPC: Control the Minimum Power Consumption (MPC) feature. + * This is a STA-only power saving feature and not related to 802.11 power save. + * + * @IFX_VENDOR_SCMD_GIANTRX: Allow handling RX MGMT Packts of size 1840 bytes. + * + * @IFX_VENDOR_SCMD_PFN_CONFIG: Send the Preferred Network (PFN) information to the Dongle + * + * @IFX_VENDOR_SCMD_PFN_STATUS: Fetch the Preferred Network (PFN) information from the Dongle + * through the driver. + * + * @IFX_VENDOR_SCMD_WNM: Configure the Wireless Network Management (WNM) 802.11v functionaltiy + * related parameters. + * + * @IFX_VENDOR_SCMD_MAX: This acts as a the tail of cmds list. + * Make sure it located at the end of the list. + */ +enum ifx_nl80211_vendor_subcmds { + IFX_VENDOR_SCMD_UNSPEC = 0, + IFX_VENDOR_SCMD_DCMD = 1, + /* Reserved 2-5 */ + IFX_VENDOR_SCMD_FRAMEBURST = 6, + /* Reserved 7-8 */ + IFX_VENDOR_SCMD_ACS = 9, + IFX_VENDOR_SCMD_SET_MAC_P2P_DEV = 10, + IFX_VENDOR_SCMD_MUEDCA = 11, + IFX_VENDOR_SCMD_LDPC = 12, + IFX_VENDOR_SCMD_AMSDU = 13, + IFX_VENDOR_SCMD_TWT = 14, + IFX_VENDOR_SCMD_OCE = 15, + IFX_VENDOR_SCMD_BSSCOLOR = 16, + IFX_VENDOR_SCMD_RAND_MAC = 17, + IFX_VENDOR_SCMD_MBO = 18, + IFX_VENDOR_SCMD_MPC = 19, + IFX_VENDOR_SCMD_GIANTRX = 20, + IFX_VENDOR_SCMD_PFN_CONFIG = 21, + IFX_VENDOR_SCMD_PFN_STATUS = 22, + /* Reserved 23-24 */ + IFX_VENDOR_SCMD_WNM = 25, + IFX_VENDOR_SCMD_MAX +}; + +/* + * enum ifx_vendor_attr - IFX nl80211 vendor attributes + * + * @IFX_VENDOR_ATTR_UNSPEC: Reserved value 0 + * + * @IFX_VENDOR_ATTR_LEN: Dongle Command Message Body Length. + * + * @IFX_VENDOR_ATTR_DATA: Dongle Commend Message Body. + * + * @IFX_VENDOR_ATTR_MAC_ADDR: Medium Access Control (MAC) address. + * + * @IFX_VENDOR_ATTR_MAX: This acts as a the tail of attrs list. + * Make sure it located at the end of the list. + */ +enum ifx_vendor_attr { + IFX_VENDOR_ATTR_UNSPEC = 0, + IFX_VENDOR_ATTR_LEN = 1, + IFX_VENDOR_ATTR_DATA = 2, + IFX_VENDOR_ATTR_MAC_ADDR = 3, + /* Reserved 4-10 */ + IFX_VENDOR_ATTR_MAX +}; + +#endif /* IFX_VENDOR_H */ diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak index a03d4a034..fe2c5554f 100644 --- a/src/drivers/drivers.mak +++ b/src/drivers/drivers.mak @@ -50,6 +50,9 @@ DRV_OBJS += ../src/drivers/driver_nl80211_scan.o ifdef CONFIG_DRIVER_NL80211_QCA DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_QCA endif +ifdef CONFIG_DRIVER_NL80211_IFX +DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_IFX +endif NEED_SME=y NEED_AP_MLME=y NEED_NETLINK=y diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk index 10eab6a92..03ec32da3 100644 --- a/src/drivers/drivers.mk +++ b/src/drivers/drivers.mk @@ -44,6 +44,9 @@ endif ifdef CONFIG_DRIVER_NL80211_BRCM DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_BRCM endif +ifdef CONFIG_DRIVER_NL80211_IFX +DRV_CFLAGS += -DCONFIG_DRIVER_NL80211_IFX +endif NEED_SME=y NEED_AP_MLME=y NEED_NETLINK=y diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig index a4f20d439..03dba3465 100644 --- a/wpa_supplicant/defconfig +++ b/wpa_supplicant/defconfig @@ -34,6 +34,9 @@ CONFIG_DRIVER_NL80211=y # QCA vendor extensions to nl80211 #CONFIG_DRIVER_NL80211_QCA=y +# IFX vendor extensions to nl80211 +#CONFIG_DRIVER_NL80211_IFX=y + # driver_nl80211.c requires libnl. If you are compiling it yourself # you may need to point hostapd to your version of libnl. #