]> err.no Git - linux-2.6/blobdiff - include/net/mac80211.h
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
[linux-2.6] / include / net / mac80211.h
index 656442c6b1c3669ee50e3d32ea21f86248f4f475..b52721008be81dd34e3b6379e8729c5abf439b0a 100644 (file)
@@ -115,17 +115,17 @@ enum ieee80211_max_queues {
  * The information provided in this structure is required for QoS
  * transmit queue configuration. Cf. IEEE 802.11 7.3.2.29.
  *
- * @aifs: arbitration interface space [0..255, -1: use default]
- * @cw_min: minimum contention window [will be a value of the form
- *     2^n-1 in the range 1..1023; 0: use default]
+ * @aifs: arbitration interface space [0..255]
+ * @cw_min: minimum contention window [a value of the form
+ *     2^n-1 in the range 1..32767]
  * @cw_max: maximum contention window [like @cw_min]
  * @txop: maximum burst time in units of 32 usecs, 0 meaning disabled
  */
 struct ieee80211_tx_queue_params {
-       s16 aifs;
+       u16 txop;
        u16 cw_min;
        u16 cw_max;
-       u16 txop;
+       u8 aifs;
 };
 
 /**
@@ -206,8 +206,6 @@ struct ieee80211_bss_conf {
  * These flags are used with the @flags member of &ieee80211_tx_info.
  *
  * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame.
- * @IEEE80211_TX_CTL_DO_NOT_ENCRYPT: send this frame without encryption;
- *     e.g., for EAPOL frame
  * @IEEE80211_TX_CTL_USE_RTS_CTS: use RTS-CTS before sending frame
  * @IEEE80211_TX_CTL_USE_CTS_PROTECT: use CTS protection for the frame (e.g.,
  *     for combined 802.11g / 802.11b networks)
@@ -220,7 +218,6 @@ struct ieee80211_bss_conf {
  * @IEEE80211_TX_CTL_SHORT_PREAMBLE: TBD
  * @IEEE80211_TX_CTL_LONG_RETRY_LIMIT: this frame should be send using the
  *     through set_retry_limit configured long retry value
- * @IEEE80211_TX_CTL_EAPOL_FRAME: internal to mac80211
  * @IEEE80211_TX_CTL_SEND_AFTER_DTIM: send this frame after DTIM beacon
  * @IEEE80211_TX_CTL_AMPDU: this frame should be sent as part of an A-MPDU
  * @IEEE80211_TX_CTL_OFDM_HT: this frame can be sent in HT OFDM rates. number
@@ -239,10 +236,20 @@ struct ieee80211_bss_conf {
  *     is for the whole aggregation.
  * @IEEE80211_TX_STAT_AMPDU_NO_BACK: no block ack was returned,
  *     so consider using block ack request (BAR).
+ * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
+ *     number to this frame, taking care of not overwriting the fragment
+ *     number and increasing the sequence number only when the
+ *     IEEE80211_TX_CTL_FIRST_FRAGMENT flags is set. mac80211 will properly
+ *     assign sequence numbers to QoS-data frames but cannot do so correctly
+ *     for non-QoS-data and management frames because beacons need them from
+ *     that counter as well and mac80211 cannot guarantee proper sequencing.
+ *     If this flag is set, the driver should instruct the hardware to
+ *     assign a sequence number to the frame or assign one itself. Cf. IEEE
+ *     802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for
+ *     beacons always be clear for frames without a sequence number field.
  */
 enum mac80211_tx_control_flags {
        IEEE80211_TX_CTL_REQ_TX_STATUS          = BIT(0),
-       IEEE80211_TX_CTL_DO_NOT_ENCRYPT         = BIT(1),
        IEEE80211_TX_CTL_USE_RTS_CTS            = BIT(2),
        IEEE80211_TX_CTL_USE_CTS_PROTECT        = BIT(3),
        IEEE80211_TX_CTL_NO_ACK                 = BIT(4),
@@ -252,7 +259,6 @@ enum mac80211_tx_control_flags {
        IEEE80211_TX_CTL_FIRST_FRAGMENT         = BIT(8),
        IEEE80211_TX_CTL_SHORT_PREAMBLE         = BIT(9),
        IEEE80211_TX_CTL_LONG_RETRY_LIMIT       = BIT(10),
-       IEEE80211_TX_CTL_EAPOL_FRAME            = BIT(11),
        IEEE80211_TX_CTL_SEND_AFTER_DTIM        = BIT(12),
        IEEE80211_TX_CTL_AMPDU                  = BIT(13),
        IEEE80211_TX_CTL_OFDM_HT                = BIT(14),
@@ -265,6 +271,7 @@ enum mac80211_tx_control_flags {
        IEEE80211_TX_STAT_ACK                   = BIT(21),
        IEEE80211_TX_STAT_AMPDU                 = BIT(22),
        IEEE80211_TX_STAT_AMPDU_NO_BACK         = BIT(23),
+       IEEE80211_TX_CTL_ASSIGN_SEQ             = BIT(24),
 };
 
 
@@ -311,7 +318,6 @@ struct ieee80211_tx_info {
                        struct ieee80211_vif *vif;
                        struct ieee80211_key_conf *hw_key;
                        unsigned long jiffies;
-                       int ifindex;
                        u16 aid;
                        s8 rts_cts_rate_idx, alt_retry_rate_idx;
                        u8 retry_limit;
@@ -407,11 +413,13 @@ struct ieee80211_rx_status {
  * @IEEE80211_CONF_SHORT_SLOT_TIME: use 802.11g short slot time
  * @IEEE80211_CONF_RADIOTAP: add radiotap header at receive time (if supported)
  * @IEEE80211_CONF_SUPPORT_HT_MODE: use 802.11n HT capabilities (if supported)
+ * @IEEE80211_CONF_PS: Enable 802.11 power save mode
  */
 enum ieee80211_conf_flags {
        IEEE80211_CONF_SHORT_SLOT_TIME  = (1<<0),
        IEEE80211_CONF_RADIOTAP         = (1<<1),
        IEEE80211_CONF_SUPPORT_HT_MODE  = (1<<2),
+       IEEE80211_CONF_PS               = (1<<3),
 };
 
 /**
@@ -526,34 +534,39 @@ struct ieee80211_if_init_conf {
        void *mac_addr;
 };
 
+/**
+ * enum ieee80211_if_conf_change - interface config change flags
+ *
+ * @IEEE80211_IFCC_BSSID: The BSSID changed.
+ * @IEEE80211_IFCC_SSID: The SSID changed.
+ * @IEEE80211_IFCC_BEACON: The beacon for this interface changed
+ *     (currently AP and MESH only), use ieee80211_beacon_get().
+ */
+enum ieee80211_if_conf_change {
+       IEEE80211_IFCC_BSSID    = BIT(0),
+       IEEE80211_IFCC_SSID     = BIT(1),
+       IEEE80211_IFCC_BEACON   = BIT(2),
+};
+
 /**
  * struct ieee80211_if_conf - configuration of an interface
  *
- * @type: type of the interface. This is always the same as was specified in
- *     &struct ieee80211_if_init_conf. The type of an interface never changes
- *     during the life of the interface; this field is present only for
- *     convenience.
+ * @changed: parameters that have changed, see &enum ieee80211_if_conf_change.
  * @bssid: BSSID of the network we are associated to/creating.
  * @ssid: used (together with @ssid_len) by drivers for hardware that
  *     generate beacons independently. The pointer is valid only during the
  *     config_interface() call, so copy the value somewhere if you need
  *     it.
  * @ssid_len: length of the @ssid field.
- * @beacon: beacon template. Valid only if @host_gen_beacon_template in
- *     &struct ieee80211_hw is set. The driver is responsible of freeing
- *     the sk_buff.
- * @beacon_control: tx_control for the beacon template, this field is only
- *     valid when the @beacon field was set.
  *
  * This structure is passed to the config_interface() callback of
  * &struct ieee80211_hw.
  */
 struct ieee80211_if_conf {
-       int type;
+       u32 changed;
        u8 *bssid;
        u8 *ssid;
        size_t ssid_len;
-       struct sk_buff *beacon;
 };
 
 /**
@@ -681,15 +694,6 @@ enum ieee80211_tkip_key_type {
  * any particular flags. There are some exceptions to this rule,
  * however, so you are advised to review these flags carefully.
  *
- * @IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE:
- *     The device only needs to be supplied with a beacon template.
- *     If you need the host to generate each beacon then don't use
- *     this flag and call ieee80211_beacon_get() when you need the
- *     next beacon frame. Note that if you set this flag, you must
- *     implement the set_tim() callback for powersave mode to work
- *     properly.
- *     This flag is only relevant for access-point mode.
- *
  * @IEEE80211_HW_RX_INCLUDES_FCS:
  *     Indicates that received frames passed to the stack include
  *     the FCS at the end.
@@ -736,7 +740,6 @@ enum ieee80211_tkip_key_type {
  *     Measurement, Channel Switch, Quieting, TPC
  */
 enum ieee80211_hw_flags {
-       IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE           = 1<<0,
        IEEE80211_HW_RX_INCLUDES_FCS                    = 1<<1,
        IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING        = 1<<2,
        IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE          = 1<<3,
@@ -837,20 +840,12 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr)
 
 static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw)
 {
-#ifdef CONFIG_MAC80211_QOS
        return hw->queues;
-#else
-       return 1;
-#endif
 }
 
 static inline int ieee80211_num_queues(struct ieee80211_hw *hw)
 {
-#ifdef CONFIG_MAC80211_QOS
        return hw->queues + hw->ampdu_queues;
-#else
-       return 1;
-#endif
 }
 
 static inline struct ieee80211_rate *
@@ -1149,17 +1144,6 @@ enum ieee80211_ampdu_mlme_action {
  *     function is optional if the firmware/hardware takes full care of
  *     TSF synchronization.
  *
- * @beacon_update: Setup beacon data for IBSS beacons. Unlike access point,
- *     IBSS uses a fixed beacon frame which is configured using this
- *     function.
- *     If the driver returns success (0) from this callback, it owns
- *     the skb. That means the driver is responsible to kfree_skb() it.
- *     The control structure is not dynamically allocated. That means the
- *     driver does not own the pointer and if it needs it somewhere
- *     outside of the context of this function, it must copy it
- *     somewhere else.
- *     This handler is required only for IBSS mode.
- *
  * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us.
  *     This is needed only for IBSS mode and the result of this function is
  *     used to determine whether to reply to Probe Requests.
@@ -1217,8 +1201,6 @@ struct ieee80211_ops {
                            struct ieee80211_tx_queue_stats *stats);
        u64 (*get_tsf)(struct ieee80211_hw *hw);
        void (*reset_tsf)(struct ieee80211_hw *hw);
-       int (*beacon_update)(struct ieee80211_hw *hw,
-                            struct sk_buff *skb);
        int (*tx_last_beacon)(struct ieee80211_hw *hw);
        int (*ampdu_action)(struct ieee80211_hw *hw,
                            enum ieee80211_ampdu_mlme_action action,