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 <gokulkumar.sivakumar@xxxxxxxxxxxx> --- Changes in v3: - Removed some of the newly introduced IFX vendor specific NL80211 API from the v2 patchset, to address the review comment suggesting that, those can be potentially supported by extending the standard NL80211 API. - Renamed the IFX vendor specific enum member subcmd from "TWT" to "TWT_OFFLOAD", to highlight that this API is used in offloading the TWT Session configuration work to the IFX Dongle Firmware. - Updated the Description of few vendor specific NL80211 API. hostapd/defconfig | 3 ++ src/common/ifx_vendor.h | 94 ++++++++++++++++++++++++++++++++++++++++ src/drivers/drivers.mak | 3 ++ src/drivers/drivers.mk | 3 ++ wpa_supplicant/defconfig | 3 ++ 5 files changed, 106 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..4e02b0ed3 --- /dev/null +++ b/src/common/ifx_vendor.h @@ -0,0 +1,94 @@ +/* + * 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 in the Dongle. This feature + * allows more efficient use of the airtime between the transmitting and receiving WLAN + * devices. + * + * @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_TWT_OFFLOAD: Offload Target Wake Time (TWT) Session configuration to the Dongle. + * + * @IFX_VENDOR_SCMD_RAND_MAC: Configure the Random MAC module in the Dongle. + * + * @IFX_VENDOR_SCMD_MPC: Control the Minimum Power Consumption (MPC) feature in the Dongle. + * 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 in the Dongle. + * + * @IFX_VENDOR_SCMD_PFN_CONFIG: Send the Preferred Network (PFN) information to the Dongle + * through the driver. + * + * @IFX_VENDOR_SCMD_PFN_STATUS: Fetch the Preferred Network (PFN) information from the Dongle + * through the driver. + * + * @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-9 */ + IFX_VENDOR_SCMD_SET_MAC_P2P_DEV = 10, + /* Reserved 11-13 */ + IFX_VENDOR_SCMD_TWT_OFFLOAD = 14, + /* Reserved 15-16 */ + IFX_VENDOR_SCMD_RAND_MAC = 17, + /* Reserved 18 */ + IFX_VENDOR_SCMD_MPC = 19, + IFX_VENDOR_SCMD_GIANTRX = 20, + IFX_VENDOR_SCMD_PFN_CONFIG = 21, + IFX_VENDOR_SCMD_PFN_STATUS = 22, + 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, + 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. # -- 2.25.1 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap