cfg80211: introduce TDLS channel switch commands
[deliverable/linux.git] / include / net / cfg80211.h
index a2ddcf2398fdadf43bcb5ccc12891aba20f0c946..8d04dfef32bf298f9de387d5f0b4b9aa56104edc 100644 (file)
@@ -319,9 +319,12 @@ struct ieee80211_supported_band {
 /**
  * struct vif_params - describes virtual interface parameters
  * @use_4addr: use 4-address frames
- * @macaddr: address to use for this virtual interface. This will only
- *     be used for non-netdevice interfaces. If this parameter is set
- *     to zero address the driver may determine the address as needed.
+ * @macaddr: address to use for this virtual interface.
+ *     If this parameter is set to zero address the driver may
+ *     determine the address as needed.
+ *     This feature is only fully supported by drivers that enable the
+ *     %NL80211_FEATURE_MAC_ON_CREATE flag.  Others may support creating
+ **    only p2p devices with specified MAC.
  */
 struct vif_params {
        int use_4addr;
@@ -798,6 +801,22 @@ struct station_parameters {
        bool opmode_notif_used;
 };
 
+/**
+ * struct station_del_parameters - station deletion parameters
+ *
+ * Used to delete a station entry (or all stations).
+ *
+ * @mac: MAC address of the station to remove or NULL to remove all stations
+ * @subtype: Management frame subtype to use for indicating removal
+ *     (10 = Disassociation, 12 = Deauthentication)
+ * @reason_code: Reason code for the Disassociation/Deauthentication frame
+ */
+struct station_del_parameters {
+       const u8 *mac;
+       u8 subtype;
+       u16 reason_code;
+};
+
 /**
  * enum cfg80211_station_type - the type of station being modified
  * @CFG80211_STA_AP_CLIENT: client of an AP interface
@@ -1339,6 +1358,16 @@ struct mesh_setup {
        u32 basic_rates;
 };
 
+/**
+ * struct ocb_setup - 802.11p OCB mode setup configuration
+ * @chandef: defines the channel to use
+ *
+ * These parameters are fixed when connecting to the network
+ */
+struct ocb_setup {
+       struct cfg80211_chan_def chandef;
+};
+
 /**
  * struct ieee80211_txq_params - TX queue parameters
  * @ac: AC identifier
@@ -2132,7 +2161,7 @@ struct cfg80211_qos_map {
  * @stop_ap: Stop being an AP, including stopping beaconing.
  *
  * @add_station: Add a new station.
- * @del_station: Remove a station; @mac may be NULL to remove all stations.
+ * @del_station: Remove a station
  * @change_station: Modify a given station. Note that flags changes are not much
  *     validated in cfg80211, in particular the auth/assoc/authorized flags
  *     might come to the driver in invalid combinations -- make sure to check
@@ -2146,6 +2175,8 @@ struct cfg80211_qos_map {
  * @change_mpath: change a given mesh path
  * @get_mpath: get a mesh path for the given parameters
  * @dump_mpath: dump mesh path callback -- resume dump at index @idx
+ * @get_mpp: get a mesh proxy path for the given parameters
+ * @dump_mpp: dump mesh proxy path callback -- resume dump at index @idx
  * @join_mesh: join the mesh network with the specified parameters
  *     (invoked with the wireless_dev mutex held)
  * @leave_mesh: leave the current mesh network
@@ -2331,6 +2362,17 @@ struct cfg80211_qos_map {
  *     with the peer followed by immediate teardown when the addition is later
  *     rejected)
  * @del_tx_ts: remove an existing TX TS
+ *
+ * @join_ocb: join the OCB network with the specified parameters
+ *     (invoked with the wireless_dev mutex held)
+ * @leave_ocb: leave the current OCB network
+ *     (invoked with the wireless_dev mutex held)
+ *
+ * @tdls_channel_switch: Start channel-switching with a TDLS peer. The driver
+ *     is responsible for continually initiating channel-switching operations
+ *     and returning to the base channel for communication with the AP.
+ * @tdls_cancel_channel_switch: Stop channel-switching with a TDLS peer. Both
+ *     peers must be on the base channel when the call completes.
  */
 struct cfg80211_ops {
        int     (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -2376,7 +2418,7 @@ struct cfg80211_ops {
                               const u8 *mac,
                               struct station_parameters *params);
        int     (*del_station)(struct wiphy *wiphy, struct net_device *dev,
-                              const u8 *mac);
+                              struct station_del_parameters *params);
        int     (*change_station)(struct wiphy *wiphy, struct net_device *dev,
                                  const u8 *mac,
                                  struct station_parameters *params);
@@ -2396,6 +2438,11 @@ struct cfg80211_ops {
        int     (*dump_mpath)(struct wiphy *wiphy, struct net_device *dev,
                              int idx, u8 *dst, u8 *next_hop,
                              struct mpath_info *pinfo);
+       int     (*get_mpp)(struct wiphy *wiphy, struct net_device *dev,
+                          u8 *dst, u8 *mpp, struct mpath_info *pinfo);
+       int     (*dump_mpp)(struct wiphy *wiphy, struct net_device *dev,
+                           int idx, u8 *dst, u8 *mpp,
+                           struct mpath_info *pinfo);
        int     (*get_mesh_config)(struct wiphy *wiphy,
                                struct net_device *dev,
                                struct mesh_config *conf);
@@ -2407,6 +2454,10 @@ struct cfg80211_ops {
                             const struct mesh_setup *setup);
        int     (*leave_mesh)(struct wiphy *wiphy, struct net_device *dev);
 
+       int     (*join_ocb)(struct wiphy *wiphy, struct net_device *dev,
+                           struct ocb_setup *setup);
+       int     (*leave_ocb)(struct wiphy *wiphy, struct net_device *dev);
+
        int     (*change_bss)(struct wiphy *wiphy, struct net_device *dev,
                              struct bss_parameters *params);
 
@@ -2577,6 +2628,14 @@ struct cfg80211_ops {
                             u16 admitted_time);
        int     (*del_tx_ts)(struct wiphy *wiphy, struct net_device *dev,
                             u8 tsid, const u8 *peer);
+
+       int     (*tdls_channel_switch)(struct wiphy *wiphy,
+                                      struct net_device *dev,
+                                      const u8 *addr, u8 oper_class,
+                                      struct cfg80211_chan_def *chandef);
+       void    (*tdls_cancel_channel_switch)(struct wiphy *wiphy,
+                                             struct net_device *dev,
+                                             const u8 *addr);
 };
 
 /*
@@ -2623,13 +2682,9 @@ struct cfg80211_ops {
  * @WIPHY_FLAG_SUPPORTS_5_10_MHZ: Device supports 5 MHz and 10 MHz channels.
  * @WIPHY_FLAG_HAS_CHANNEL_SWITCH: Device supports channel switch in
  *     beaconing mode (AP, IBSS, Mesh, ...).
- * @WIPHY_FLAG_SUPPORTS_WMM_ADMISSION: the device supports setting up WMM
- *     TSPEC sessions (TID aka TSID 0-7) with the NL80211_CMD_ADD_TX_TS
- *     command. Standard IEEE 802.11 TSPEC setup is not yet supported, it
- *     needs to be able to handle Block-Ack agreements and other things.
  */
 enum wiphy_flags {
-       WIPHY_FLAG_SUPPORTS_WMM_ADMISSION       = BIT(0),
+       /* use hole at 0 */
        /* use hole at 1 */
        /* use hole at 2 */
        WIPHY_FLAG_NETNS_OK                     = BIT(3),
@@ -3165,6 +3220,23 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
        return dev_name(&wiphy->dev);
 }
 
+/**
+ * wiphy_new_nm - create a new wiphy for use with cfg80211
+ *
+ * @ops: The configuration operations for this device
+ * @sizeof_priv: The size of the private area to allocate
+ * @requested_name: Request a particular name.
+ *     NULL is valid value, and means use the default phy%d naming.
+ *
+ * Create a new wiphy and associate the given operations with it.
+ * @sizeof_priv bytes are allocated for private use.
+ *
+ * Return: A pointer to the new wiphy. This pointer must be
+ * assigned to each netdev's ieee80211_ptr for proper operation.
+ */
+struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
+                          const char *requested_name);
+
 /**
  * wiphy_new - create a new wiphy for use with cfg80211
  *
@@ -3177,7 +3249,11 @@ static inline const char *wiphy_name(const struct wiphy *wiphy)
  * Return: A pointer to the new wiphy. This pointer must be
  * assigned to each netdev's ieee80211_ptr for proper operation.
  */
-struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv);
+static inline struct wiphy *wiphy_new(const struct cfg80211_ops *ops,
+                                     int sizeof_priv)
+{
+       return wiphy_new_nm(ops, sizeof_priv, NULL);
+}
 
 /**
  * wiphy_register - register a wiphy with cfg80211
@@ -4657,6 +4733,20 @@ bool cfg80211_reg_can_beacon(struct wiphy *wiphy,
 void cfg80211_ch_switch_notify(struct net_device *dev,
                               struct cfg80211_chan_def *chandef);
 
+/*
+ * cfg80211_ch_switch_started_notify - notify channel switch start
+ * @dev: the device on which the channel switch started
+ * @chandef: the future channel definition
+ * @count: the number of TBTTs until the channel switch happens
+ *
+ * Inform the userspace about the channel switch that has just
+ * started, so that it can take appropriate actions (eg. starting
+ * channel switch on other vifs), if necessary.
+ */
+void cfg80211_ch_switch_started_notify(struct net_device *dev,
+                                      struct cfg80211_chan_def *chandef,
+                                      u8 count);
+
 /**
  * ieee80211_operating_class_to_band - convert operating class to band
  *
This page took 0.032103 seconds and 5 git commands to generate.