From b41dc61afaf8aec5a59d9a81a8922e7057600272 Mon Sep 17 00:00:00 2001 From: Subrat Dash Date: Thu, 3 Oct 2019 21:42:46 +0530 Subject: [PATCH] Add a new QCA vendor attribute to carry device info for OEM data The OEM data binary blobs from application/service will be routed to the appropriate device based on this attribute value. This optional attribute is used to specify whether the device type is virtual or physical. This attribute can be omitted when the command is for a virtual device. Signed-off-by: Jouni Malinen --- src/common/qca-vendor.h | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 7a8b9d669..36c714549 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -7909,17 +7909,40 @@ enum qca_vendor_attr_interop_issues_ap { QCA_WLAN_VENDOR_ATTR_INTEROP_ISSUES_AP_AFTER_LAST - 1 }; -/* +/** + * enum qca_vendor_oem_device_type - Represents the target device in firmware. + * It is used by QCA_WLAN_VENDOR_ATTR_OEM_DEVICE_INFO. + * + * @QCA_VENDOR_OEM_DEVICE_VIRTUAL: The command is intended for + * a virtual device. + * + * @QCA_VENDOR_OEM_DEVICE_PHYSICAL: The command is intended for + * a physical device. + */ +enum qca_vendor_oem_device_type { + QCA_VENDOR_OEM_DEVICE_VIRTUAL = 0, + QCA_VENDOR_OEM_DEVICE_PHYSICAL = 1, +}; + +/** * enum qca_wlan_vendor_attr_oem_data_params - Used by the vendor command * QCA_NL80211_VENDOR_SUBCMD_OEM_DATA. * * @QCA_WLAN_VENDOR_ATTR_OEM_DATA_CMD_DATA: The binary blob for the vendor * command QCA_NL80211_VENDOR_SUBCMD_OEM_DATA are carried through this attribute. * NLA_BINARY attribute, the max size is 1024 bytes. + * + * @QCA_WLAN_VENDOR_ATTR_OEM_DEVICE_INFO: The binary blob will be routed + * based on this field. This optional attribute is included to specify whether + * the device type is a virtual device or a physical device for the command. + * This attribute can be omitted for a virtual device (default) command. + * This u8 attribute is used to carry information for the device type using + * values defined by enum qca_vendor_oem_device_type. */ enum qca_wlan_vendor_attr_oem_data_params { QCA_WLAN_VENDOR_ATTR_OEM_DATA_INVALID = 0, QCA_WLAN_VENDOR_ATTR_OEM_DATA_CMD_DATA = 1, + QCA_WLAN_VENDOR_ATTR_OEM_DEVICE_INFO = 2, /* keep last */ QCA_WLAN_VENDOR_ATTR_OEM_DATA_PARAMS_AFTER_LAST,