From 14b7612447358b4014f0c49ecabe74fa2bba6520 Mon Sep 17 00:00:00 2001 From: Sunil Dutt Date: Thu, 4 Aug 2016 15:31:31 +0530 Subject: [PATCH] Define vendor command to support IE based access control This commit defines QCA vendor subcommand and attributes for IE based access control, i.e., the specific configured IE (full IE) is matched with the frames originated by the Wi-Fi STA / AP to accept or deny the connection. A specific IE can either be a whitelist or blacklist. Signed-off-by: Jouni Malinen --- src/common/qca-vendor.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/common/qca-vendor.h b/src/common/qca-vendor.h index 740ee8c10..8a026c7c4 100644 --- a/src/common/qca-vendor.h +++ b/src/common/qca-vendor.h @@ -420,6 +420,25 @@ enum qca_set_band { QCA_SETBAND_2G, }; +/** + * enum qca_access_policy - Access control policy + * + * Access control policy is applied on the configured IE + * (QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE). + * To be set with QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY. + * + * @QCA_ACCESS_POLICY_ACCEPT_UNLESS_LISTED: Deny Wi-Fi connections which match + * the specific configuration (IE) set, i.e., allow all the + * connections which do not match the configuration. + * @QCA_ACCESS_POLICY_DENY_UNLESS_LISTED: Accept Wi-Fi connections which match + * the specific configuration (IE) set, i.e., deny all the + * connections which do not match the configuration. + */ +enum qca_access_policy { + QCA_ACCESS_POLICY_ACCEPT_UNLESS_LISTED, + QCA_ACCESS_POLICY_DENY_UNLESS_LISTED, +}; + /** * enum qca_vendor_attr_get_tsf: Vendor attributes for TSF capture * @QCA_WLAN_VENDOR_ATTR_TSF_CMD: enum qca_tsf_operation (u32) @@ -695,6 +714,15 @@ enum qca_wlan_vendor_attr_config { /* Unsigned 32-bit flags attribute for * QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_DATA */ QCA_WLAN_VENDOR_ATTR_CONFIG_GENERIC_FLAGS, + /* Unsigned 32-bit, defining the access policy. + * See enum qca_access_policy. Used with + * QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE_LIST. */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY, + /* Sets the list of full set of IEs for which a specific access policy + * has to be applied. Used along with + * QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY to control the access. + * Zero length payload can be used to clear this access constraint. */ + QCA_WLAN_VENDOR_ATTR_CONFIG_ACCESS_POLICY_IE_LIST, /* keep last */ QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,