Update linux/nl80211.h copy based on wireless-testing.git
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 20 Mar 2009 19:28:34 +0000 (21:28 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 20 Mar 2009 19:28:34 +0000 (21:28 +0200)
src/common/nl80211_copy.h

index f6e5637..9685eaa 100644 (file)
  * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
  *     partial scan results may be available
  *
+ * @NL80211_CMD_REG_CHANGE: indicates to userspace the regulatory domain
+ *     has been changed and provides details of the request information
+ *     that caused the change such as who initiated the regulatory request
+ *     (%NL80211_ATTR_REG_INITIATOR), the wiphy_idx
+ *     (%NL80211_ATTR_REG_ALPHA2) on which the request was made from if
+ *     the initiator was %NL80211_REGDOM_SET_BY_COUNTRY_IE or
+ *     %NL80211_REGDOM_SET_BY_DRIVER, the type of regulatory domain
+ *     set (%NL80211_ATTR_REG_TYPE), if the type of regulatory domain is
+ *     %NL80211_REG_TYPE_COUNTRY the alpha2 to which we have moved on
+ *     to (%NL80211_ATTR_REG_ALPHA2).
+ *
+ * @NL80211_CMD_AUTHENTICATE: authentication request and notification.
+ *     This command is used both as a command (request to authenticate) and
+ *     as an event on the "mlme" multicast group indicating completion of the
+ *     authentication process.
+ *     When used as a command, %NL80211_ATTR_IFINDEX is used to identify the
+ *     interface. %NL80211_ATTR_MAC is used to specify PeerSTAAddress (and
+ *     BSSID in case of station mode). %NL80211_ATTR_SSID is used to specify
+ *     the SSID (mainly for association, but is included in authentication
+ *     request, too, to help BSS selection. %NL80211_ATTR_WIPHY_FREQ is used
+ *     to specify the frequence of the channel in MHz. %NL80211_ATTR_AUTH_TYPE
+ *     is used to specify the authentication type. %NL80211_ATTR_IE is used to
+ *     define IEs (VendorSpecificInfo, but also including RSN IE and FT IEs)
+ *     to be added to the frame.
+ *     When used as an event, this reports reception of an Authentication
+ *     frame in station and IBSS modes when the local MLME processed the
+ *     frame, i.e., it was for the local STA and was received in correct
+ *     state. This is similar to MLME-AUTHENTICATE.confirm primitive in the
+ *     MLME SAP interface (kernel providing MLME, userspace SME). The
+ *     included NL80211_ATTR_FRAME attribute contains the management frame
+ *     (including both the header and frame body, but not FCS).
+ * @NL80211_CMD_ASSOCIATE: association request and notification; like
+ *     NL80211_CMD_AUTHENTICATE but for Association and Reassociation
+ *     (similar to MLME-ASSOCIATE.request, MLME-REASSOCIATE.request,
+ *     MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitives).
+ * @NL80211_CMD_DEAUTHENTICATE: deauthentication request and notification; like
+ *     NL80211_CMD_AUTHENTICATE but for Deauthentication frames (similar to
+ *     MLME-DEAUTHENTICATION.request and MLME-DEAUTHENTICATE.indication
+ *     primitives).
+ * @NL80211_CMD_DISASSOCIATE: disassociation request and notification; like
+ *     NL80211_CMD_AUTHENTICATE but for Disassociation frames (similar to
+ *     MLME-DISASSOCIATE.request and MLME-DISASSOCIATE.indication primitives).
+ *
  * @NL80211_CMD_MAX: highest used command number
  * @__NL80211_CMD_AFTER_LAST: internal use
  */
@@ -204,6 +247,13 @@ enum nl80211_commands {
        NL80211_CMD_NEW_SCAN_RESULTS,
        NL80211_CMD_SCAN_ABORTED,
 
+       NL80211_CMD_REG_CHANGE,
+
+       NL80211_CMD_AUTHENTICATE,
+       NL80211_CMD_ASSOCIATE,
+       NL80211_CMD_DEAUTHENTICATE,
+       NL80211_CMD_DISASSOCIATE,
+
        /* add new commands above here */
 
        /* used to define NL80211_CMD_MAX below */
@@ -217,6 +267,11 @@ enum nl80211_commands {
  */
 #define NL80211_CMD_SET_BSS NL80211_CMD_SET_BSS
 #define NL80211_CMD_SET_MGMT_EXTRA_IE NL80211_CMD_SET_MGMT_EXTRA_IE
+#define NL80211_CMD_REG_CHANGE NL80211_CMD_REG_CHANGE
+#define NL80211_CMD_AUTHENTICATE NL80211_CMD_AUTHENTICATE
+#define NL80211_CMD_ASSOCIATE NL80211_CMD_ASSOCIATE
+#define NL80211_CMD_DEAUTHENTICATE NL80211_CMD_DEAUTHENTICATE
+#define NL80211_CMD_DISASSOCIATE NL80211_CMD_DISASSOCIATE
 
 /**
  * enum nl80211_attrs - nl80211 netlink attributes
@@ -329,6 +384,24 @@ enum nl80211_commands {
  *     messages carried the same generation number)
  * @NL80211_ATTR_BSS: scan result BSS
  *
+ * @NL80211_ATTR_REG_INITIATOR: indicates who requested the regulatory domain
+ *     currently in effect. This could be any of the %NL80211_REGDOM_SET_BY_*
+ * @NL80211_ATTR_REG_TYPE: indicates the type of the regulatory domain currently
+ *     set. This can be one of the nl80211_reg_type (%NL80211_REGDOM_TYPE_*)
+ *
+ * @NL80211_ATTR_SUPPORTED_COMMANDS: wiphy attribute that specifies
+ *     an array of command numbers (i.e. a mapping index to command number)
+ *     that the driver for the given wiphy supports.
+ *
+ * @NL80211_ATTR_FRAME: frame data (binary attribute), including frame header
+ *     and body, but not FCS; used, e.g., with NL80211_CMD_AUTHENTICATE and
+ *     NL80211_CMD_ASSOCIATE events
+ * @NL80211_ATTR_SSID: SSID (binary attribute, 0..32 octets)
+ * @NL80211_ATTR_AUTH_TYPE: AuthenticationType, see &enum nl80211_auth_type,
+ *     represented as a u32
+ * @NL80211_ATTR_REASON_CODE: ReasonCode for %NL80211_CMD_DEAUTHENTICATE and
+ *     %NL80211_CMD_DISASSOCIATE, u16
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -403,6 +476,16 @@ enum nl80211_attrs {
        NL80211_ATTR_SCAN_GENERATION,
        NL80211_ATTR_BSS,
 
+       NL80211_ATTR_REG_INITIATOR,
+       NL80211_ATTR_REG_TYPE,
+
+       NL80211_ATTR_SUPPORTED_COMMANDS,
+
+       NL80211_ATTR_FRAME,
+       NL80211_ATTR_SSID,
+       NL80211_ATTR_AUTH_TYPE,
+       NL80211_ATTR_REASON_CODE,
+
        /* add attributes here, update the policy in nl80211.c */
 
        __NL80211_ATTR_AFTER_LAST,
@@ -420,6 +503,12 @@ enum nl80211_attrs {
 #define NL80211_ATTR_WIPHY_CHANNEL_TYPE NL80211_ATTR_WIPHY_CHANNEL_TYPE
 #define NL80211_ATTR_MGMT_SUBTYPE NL80211_ATTR_MGMT_SUBTYPE
 #define NL80211_ATTR_IE NL80211_ATTR_IE
+#define NL80211_ATTR_REG_INITIATOR NL80211_ATTR_REG_INITIATOR
+#define NL80211_ATTR_REG_TYPE NL80211_ATTR_REG_TYPE
+#define NL80211_ATTR_FRAME NL80211_ATTR_FRAME
+#define NL80211_ATTR_SSID NL80211_ATTR_SSID
+#define NL80211_ATTR_AUTH_TYPE NL80211_ATTR_AUTH_TYPE
+#define NL80211_ATTR_REASON_CODE NL80211_ATTR_REASON_CODE
 
 #define NL80211_MAX_SUPP_RATES                 32
 #define NL80211_MAX_SUPP_REG_RULES             32
@@ -673,6 +762,48 @@ enum nl80211_bitrate_attr {
 };
 
 /**
+ * enum nl80211_initiator - Indicates the initiator of a reg domain request
+ * @NL80211_REGDOM_SET_BY_CORE: Core queried CRDA for a dynamic world
+ *     regulatory domain.
+ * @NL80211_REGDOM_SET_BY_USER: User asked the wireless core to set the
+ *     regulatory domain.
+ * @NL80211_REGDOM_SET_BY_DRIVER: a wireless drivers has hinted to the
+ *     wireless core it thinks its knows the regulatory domain we should be in.
+ * @NL80211_REGDOM_SET_BY_COUNTRY_IE: the wireless core has received an
+ *     802.11 country information element with regulatory information it
+ *     thinks we should consider.
+ */
+enum nl80211_reg_initiator {
+       NL80211_REGDOM_SET_BY_CORE,
+       NL80211_REGDOM_SET_BY_USER,
+       NL80211_REGDOM_SET_BY_DRIVER,
+       NL80211_REGDOM_SET_BY_COUNTRY_IE,
+};
+
+/**
+ * enum nl80211_reg_type - specifies the type of regulatory domain
+ * @NL80211_REGDOM_TYPE_COUNTRY: the regulatory domain set is one that pertains
+ *     to a specific country. When this is set you can count on the
+ *     ISO / IEC 3166 alpha2 country code being valid.
+ * @NL80211_REGDOM_TYPE_WORLD: the regulatory set domain is the world regulatory
+ *     domain.
+ * @NL80211_REGDOM_TYPE_CUSTOM_WORLD: the regulatory domain set is a custom
+ *     driver specific world regulatory domain. These do not apply system-wide
+ *     and are only applicable to the individual devices which have requested
+ *     them to be applied.
+ * @NL80211_REGDOM_TYPE_INTERSECTION: the regulatory domain set is the product
+ *     of an intersection between two regulatory domains -- the previously
+ *     set regulatory domain on the system and the last accepted regulatory
+ *     domain request to be processed.
+ */
+enum nl80211_reg_type {
+       NL80211_REGDOM_TYPE_COUNTRY,
+       NL80211_REGDOM_TYPE_WORLD,
+       NL80211_REGDOM_TYPE_CUSTOM_WORLD,
+       NL80211_REGDOM_TYPE_INTERSECTION,
+};
+
+/**
  * enum nl80211_reg_rule_attr - regulatory rule attributes
  * @NL80211_ATTR_REG_RULE_FLAGS: a set of flags which specify additional
  *     considerations for a given frequency range. These are the
@@ -911,4 +1042,18 @@ enum nl80211_bss {
        NL80211_BSS_MAX = __NL80211_BSS_AFTER_LAST - 1
 };
 
+/**
+ * enum nl80211_auth_type - AuthenticationType
+ *
+ * @NL80211_AUTHTYPE_OPEN_SYSTEM: Open System authentication
+ * @NL80211_AUTHTYPE_SHARED_KEY: Shared Key authentication (WEP only)
+ * @NL80211_AUTHTYPE_FT: Fast BSS Transition (IEEE 802.11r)
+ * @NL80211_AUTHTYPE_NETWORK_EAP: Network EAP (some Cisco APs and mainly LEAP)
+ */
+enum nl80211_auth_type {
+       NL80211_AUTHTYPE_OPEN_SYSTEM,
+       NL80211_AUTHTYPE_SHARED_KEY,
+       NL80211_AUTHTYPE_FT,
+       NL80211_AUTHTYPE_NETWORK_EAP,
+};
 #endif /* __LINUX_NL80211_H */