mac80211: allow channel switch with multiple channel contexts
[deliverable/linux.git] / include / net / mac80211.h
index c9b2bec8db47bc5fa661772f6891fe7e4a21f960..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;
@@ -1536,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
@@ -1631,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,
@@ -2672,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.
@@ -2837,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
@@ -2956,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);
@@ -2967,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);
@@ -3043,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.027783 seconds and 5 git commands to generate.