mac80211: allow channel switch with multiple channel contexts
[deliverable/linux.git] / include / net / mac80211.h
index dae2e24616e16bf3051af3dd31414f91f4220af9..9bb2fc73aeaa92d8be60104bd0d71c21013c6c9e 100644 (file)
@@ -4,6 +4,7 @@
  * Copyright 2002-2005, Devicescape Software, Inc.
  * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
  * Copyright 2007-2010 Johannes Berg <johannes@sipsolutions.net>
+ * Copyright 2013-2014  Intel Mobile Communications GmbH
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1116,6 +1117,8 @@ struct ieee80211_conf {
  *     Function (TSF) timer when the frame containing the channel switch
  *     announcement was received. This is simply the rx.mactime parameter
  *     the driver passed into mac80211.
+ * @device_timestamp: arbitrary timestamp for the device, this is the
+ *     rx.device_timestamp parameter the driver passed to mac80211.
  * @block_tx: Indicates whether transmission must be blocked before the
  *     scheduled channel switch, as indicated by the AP.
  * @chandef: the new channel to switch to
@@ -1123,6 +1126,7 @@ struct ieee80211_conf {
  */
 struct ieee80211_channel_switch {
        u64 timestamp;
+       u32 device_timestamp;
        bool block_tx;
        struct cfg80211_chan_def chandef;
        u8 count;
@@ -1226,7 +1230,8 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
  *
  * @IEEE80211_KEY_FLAG_GENERATE_IV: This flag should be set by the
  *     driver to indicate that it requires IV generation for this
- *     particular key.
+ *     particular key. Setting this flag does not necessarily mean that SKBs
+ *     will have sufficient tailroom for ICV or MIC.
  * @IEEE80211_KEY_FLAG_GENERATE_MMIC: This flag should be set by
  *     the driver for a TKIP key if it requires Michael MIC
  *     generation in software.
@@ -1238,7 +1243,9 @@ struct ieee80211_vif *wdev_to_ieee80211_vif(struct wireless_dev *wdev);
  * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver
  *     if space should be prepared for the IV, but the IV
  *     itself should not be generated. Do not set together with
- *     @IEEE80211_KEY_FLAG_GENERATE_IV on the same key.
+ *     @IEEE80211_KEY_FLAG_GENERATE_IV on the same key. Setting this flag does
+ *     not necessarily mean that SKBs will have sufficient tailroom for ICV or
+ *     MIC.
  * @IEEE80211_KEY_FLAG_RX_MGMT: This key will be used to decrypt received
  *     management frames. The flag can help drivers that have a hardware
  *     crypto implementation that doesn't deal with management frames
@@ -1405,7 +1412,7 @@ struct ieee80211_sta_rates {
  * @supp_rates: Bitmap of supported rates (per band)
  * @ht_cap: HT capabilities of this STA; restricted to our own capabilities
  * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities
- * @wme: indicates whether the STA supports WME. Only valid during AP-mode.
+ * @wme: indicates whether the STA supports QoS/WME.
  * @drv_priv: data area for driver use, will always be aligned to
  *     sizeof(void *), size is determined in hw information.
  * @uapsd_queues: bitmap of queues configured for uapsd. Only valid
@@ -1533,16 +1540,6 @@ struct ieee80211_tx_control {
  * @IEEE80211_HW_MFP_CAPABLE:
  *     Hardware supports management frame protection (MFP, IEEE 802.11w).
  *
- * @IEEE80211_HW_SUPPORTS_STATIC_SMPS:
- *     Hardware supports static spatial multiplexing powersave,
- *     ie. can turn off all but one chain even on HT connections
- *     that should be using more chains.
- *
- * @IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS:
- *     Hardware supports dynamic spatial multiplexing powersave,
- *     ie. can turn off all but one chain and then wake the rest
- *     up as required after, for example, rts/cts handshake.
- *
  * @IEEE80211_HW_SUPPORTS_UAPSD:
  *     Hardware supports Unscheduled Automatic Power Save Delivery
  *     (U-APSD) in managed mode. The mode is configured with
@@ -1606,6 +1603,9 @@ struct ieee80211_tx_control {
  *     is not enabled the default action is to disconnect when getting the
  *     CSA frame.
  *
+ * @IEEE80211_HW_SUPPORTS_CLONED_SKBS: The driver will never modify the payload
+ *     or tailroom of TX skbs without copying them first.
+ *
  * @IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS: The HW supports scanning on all bands
  *     in one command, mac80211 doesn't have to run separate scans per band.
  */
@@ -1625,8 +1625,7 @@ enum ieee80211_hw_flags {
        IEEE80211_HW_SUPPORTS_DYNAMIC_PS                = 1<<12,
        IEEE80211_HW_MFP_CAPABLE                        = 1<<13,
        IEEE80211_HW_WANT_MONITOR_VIF                   = 1<<14,
-       IEEE80211_HW_SUPPORTS_STATIC_SMPS               = 1<<15,
-       IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS              = 1<<16,
+       /* free slots */
        IEEE80211_HW_SUPPORTS_UAPSD                     = 1<<17,
        IEEE80211_HW_REPORTS_TX_ACK_STATUS              = 1<<18,
        IEEE80211_HW_CONNECTION_MONITOR                 = 1<<19,
@@ -1639,7 +1638,7 @@ enum ieee80211_hw_flags {
        IEEE80211_HW_TIMING_BEACON_ONLY                 = 1<<26,
        IEEE80211_HW_SUPPORTS_HT_CCK_RATES              = 1<<27,
        IEEE80211_HW_CHANCTX_STA_CSA                    = 1<<28,
-       /* bit 29 unused */
+       IEEE80211_HW_SUPPORTS_CLONED_SKBS               = 1<<29,
        IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS           = 1<<30,
 };
 
@@ -2666,7 +2665,9 @@ enum ieee80211_roc_type {
  *
  * @set_coverage_class: Set slot time for given coverage class as specified
  *     in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout
- *     accordingly. This callback is not required and may sleep.
+ *     accordingly; coverage class equals to -1 to enable ACK timeout
+ *     estimation algorithm (dynack). To disable dynack set valid value for
+ *     coverage class. This callback is not required and may sleep.
  *
  * @testmode_cmd: Implement a cfg80211 test mode command. The passed @vif may
  *     be %NULL. The callback can sleep.
@@ -2831,6 +2832,13 @@ enum ieee80211_roc_type {
  *     transmitted and then call ieee80211_csa_finish().
  *     If the CSA count starts as zero or 1, this function will not be called,
  *     since there won't be any time to beacon before the switch anyway.
+ * @pre_channel_switch: This is an optional callback that is called
+ *     before a channel switch procedure is started (ie. when a STA
+ *     gets a CSA or an userspace initiated channel-switch), allowing
+ *     the driver to prepare for the channel switch.
+ * @post_channel_switch: This is an optional callback that is called
+ *     after a channel switch procedure is completed, allowing the
+ *     driver to go back to a normal configuration.
  *
  * @join_ibss: Join an IBSS (on an IBSS interface); this is called after all
  *     information in bss_conf is set up and the beacon can be retrieved. A
@@ -2950,7 +2958,7 @@ struct ieee80211_ops {
        int (*get_survey)(struct ieee80211_hw *hw, int idx,
                struct survey_info *survey);
        void (*rfkill_poll)(struct ieee80211_hw *hw);
-       void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
+       void (*set_coverage_class)(struct ieee80211_hw *hw, s16 coverage_class);
 #ifdef CONFIG_NL80211_TESTMODE
        int (*testmode_cmd)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                            void *data, int len);
@@ -2961,6 +2969,7 @@ struct ieee80211_ops {
        void (*flush)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                      u32 queues, bool drop);
        void (*channel_switch)(struct ieee80211_hw *hw,
+                              struct ieee80211_vif *vif,
                               struct ieee80211_channel_switch *ch_switch);
        int (*set_antenna)(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant);
        int (*get_antenna)(struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant);
@@ -3037,6 +3046,12 @@ struct ieee80211_ops {
        void (*channel_switch_beacon)(struct ieee80211_hw *hw,
                                      struct ieee80211_vif *vif,
                                      struct cfg80211_chan_def *chandef);
+       int (*pre_channel_switch)(struct ieee80211_hw *hw,
+                                 struct ieee80211_vif *vif,
+                                 struct ieee80211_channel_switch *ch_switch);
+
+       int (*post_channel_switch)(struct ieee80211_hw *hw,
+                                  struct ieee80211_vif *vif);
 
        int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
        void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
This page took 0.026345 seconds and 5 git commands to generate.