+ */
+
++/*
++ * This header file defines the userspace API to the wireless stack. Please
++ * be careful not to break things - i.e. don't move anything around or so
++ * unless you can demonstrate that it breaks neither API nor ABI.
++ *
++ * Additions to the API should be accompanied by actual implementations in
++ * an upstream driver, so that example implementations exist in case there
++ * are ever concerns about the precise semantics of the API or changes are
++ * needed, and to ensure that code for dead (no longer implemented) API
++ * can actually be identified and removed.
++ * Nonetheless, semantics should also be documented carefully in this file.
++ */
++
+ #include <linux/types.h>
+
+ #define NL80211_GENL_NAME "nl80211"
+
++#define NL80211_MULTICAST_GROUP_CONFIG "config"
++#define NL80211_MULTICAST_GROUP_SCAN "scan"
++#define NL80211_MULTICAST_GROUP_REG "regulatory"
++#define NL80211_MULTICAST_GROUP_MLME "mlme"
++#define NL80211_MULTICAST_GROUP_VENDOR "vendor"
++#define NL80211_MULTICAST_GROUP_TESTMODE "testmode"
++
+ /**
+ * DOC: Station handling
+ *
+@@ -173,8 +193,8 @@
+ * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME.
+ *
+ * @NL80211_CMD_GET_INTERFACE: Request an interface's configuration;
+- * either a dump request on a %NL80211_ATTR_WIPHY or a specific get
+- * on an %NL80211_ATTR_IFINDEX is supported.
++ * either a dump request for all interfaces or a specific get with a
++ * single %NL80211_ATTR_IFINDEX is supported.
+ * @NL80211_CMD_SET_INTERFACE: Set type of a virtual interface, requires
+ * %NL80211_ATTR_IFINDEX and %NL80211_ATTR_IFTYPE.
+ * @NL80211_CMD_NEW_INTERFACE: Newly created virtual interface or response
+@@ -227,7 +247,11 @@
+ * the interface identified by %NL80211_ATTR_IFINDEX.
+ * @NL80211_CMD_DEL_STATION: Remove a station identified by %NL80211_ATTR_MAC
+ * or, if no MAC address given, all stations, on the interface identified
+- * by %NL80211_ATTR_IFINDEX.
++ * by %NL80211_ATTR_IFINDEX. %NL80211_ATTR_MGMT_SUBTYPE and
++ * %NL80211_ATTR_REASON_CODE can optionally be used to specify which type
++ * of disconnection indication should be sent to the station
++ * (Deauthentication or Disassociation frame and reason code for that
++ * frame).
+ *
+ * @NL80211_CMD_GET_MPATH: Get mesh path attributes for mesh path to
+ * destination %NL80211_ATTR_MAC on the interface identified by
+@@ -248,7 +272,18 @@
+ * %NL80211_ATTR_IFINDEX.
+ *
+ * @NL80211_CMD_GET_REG: ask the wireless core to send us its currently set
+- * regulatory domain.
++ * regulatory domain. If %NL80211_ATTR_WIPHY is specified and the device
++ * has a private regulatory domain, it will be returned. Otherwise, the
++ * global regdomain will be returned.
++ * A device will have a private regulatory domain if it uses the
++ * regulatory_hint() API. Even when a private regdomain is used the channel
++ * information will still be mended according to further hints from
++ * the regulatory core to help with compliance. A dump version of this API
++ * is now available which will returns the global regdomain as well as
++ * all private regdomains of present wiphys (for those that have it).
++ * If a wiphy is self-managed (%NL80211_ATTR_WIPHY_SELF_MANAGED_REG), then
++ * its private regdomain is the only valid one for it. The regulatory
++ * core is not used to help with compliance in this case.
+ * @NL80211_CMD_SET_REG: Set current regulatory domain. CRDA sends this command
+ * after being queried by the kernel. CRDA replies by sending a regulatory
+ * domain structure which consists of %NL80211_ATTR_REG_ALPHA set to our
+@@ -302,7 +337,9 @@
+ * if passed, define which channels should be scanned; if not
+ * passed, all channels allowed for the current regulatory domain
+ * are used. Extra IEs can also be passed from the userspace by
+- * using the %NL80211_ATTR_IE attribute.
++ * using the %NL80211_ATTR_IE attribute. The first cycle of the
++ * scheduled scan can be delayed by %NL80211_ATTR_SCHED_SCAN_DELAY
++ * is supplied.
+ * @NL80211_CMD_STOP_SCHED_SCAN: stop a scheduled scan. Returns -ENOENT if
+ * scheduled scan is not running. The caller may assume that as soon
+ * as the call returns, it is safe to start a new scheduled scan again.
+@@ -639,7 +676,18 @@
+ * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels
+ * independently of the userspace SME, send this event indicating
+ * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ and the
+- * attributes determining channel width.
++ * attributes determining channel width. This indication may also be
++ * sent when a remotely-initiated switch (e.g., when a STA receives a CSA
++ * from the remote AP) is completed;
++ *
++ * @NL80211_CMD_CH_SWITCH_STARTED_NOTIFY: Notify that a channel switch
++ * has been started on an interface, regardless of the initiator
++ * (ie. whether it was requested from a remote device or
++ * initiated on our own). It indicates that
++ * %NL80211_ATTR_IFINDEX will be on %NL80211_ATTR_WIPHY_FREQ
++ * after %NL80211_ATTR_CH_SWITCH_COUNT TBTT's. The userspace may
++ * decide to react to this indication by requesting other
++ * interfaces to change channel as well.
+ *
+ * @NL80211_CMD_START_P2P_DEVICE: Start the given P2P Device, identified by
+ * its %NL80211_ATTR_WDEV identifier. It must have been created with
+@@ -738,6 +786,31 @@
+ * before removing a station entry entirely, or before disassociating
+ * or similar, cleanup will happen in the driver/device in this case.
+ *
++ * @NL80211_CMD_GET_MPP: Get mesh path attributes for mesh proxy path to
++ * destination %NL80211_ATTR_MAC on the interface identified by
++ * %NL80211_ATTR_IFINDEX.
++ *
++ * @NL80211_CMD_JOIN_OCB: Join the OCB network. The center frequency and
++ * bandwidth of a channel must be given.
++ * @NL80211_CMD_LEAVE_OCB: Leave the OCB network -- no special arguments, the
++ * network is determined by the network interface.
++ *
++ * @NL80211_CMD_TDLS_CHANNEL_SWITCH: Start channel-switching with a TDLS peer,
++ * identified by the %NL80211_ATTR_MAC parameter. A target channel is
++ * provided via %NL80211_ATTR_WIPHY_FREQ and other attributes determining
++ * channel width/type. The target operating class is given via
++ * %NL80211_ATTR_OPER_CLASS.
++ * The driver is responsible for continually initiating channel-switching
++ * operations and returning to the base channel for communication with the
++ * AP.
++ * @NL80211_CMD_TDLS_CANCEL_CHANNEL_SWITCH: Stop channel-switching with a TDLS
++ * peer given by %NL80211_ATTR_MAC. Both peers must be on the base channel
++ * when this command completes.
++ *
++ * @NL80211_CMD_WIPHY_REG_CHANGE: Similar to %NL80211_CMD_REG_CHANGE, but used
++ * as an event to indicate changes for devices with wiphy-specific regdom
++ * management.