mac80211: remove kdoc references to IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE
[safe/jmp/linux-2.6] / include / net / mac80211.h
index 02c79e6..ff137fd 100644 (file)
@@ -42,7 +42,7 @@
  * tasklet function.
  *
  * NOTE: If the driver opts to use the _irqsafe() functions, it may not also
- *      use the non-irqsafe functions!
+ *      use the non-IRQ-safe functions!
  */
 
 /**
@@ -85,7 +85,7 @@ enum ieee80211_notification_types {
  * struct ieee80211_ht_bss_info - describing BSS's HT characteristics
  *
  * This structure describes most essential parameters needed
- * to describe 802.11n HT characteristics in a BSS
+ * to describe 802.11n HT characteristics in a BSS.
  *
  * @primary_channel: channel number of primery channel
  * @bss_cap: 802.11n's general BSS capabilities (e.g. channel width)
@@ -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;
 };
 
 /**
@@ -177,9 +177,10 @@ enum ieee80211_bss_change {
  * @aid: association ID number, valid only when @assoc is true
  * @use_cts_prot: use CTS protection
  * @use_short_preamble: use 802.11b short preamble
+ * @dtim_period: num of beacons before the next DTIM, for PSM
  * @timestamp: beacon timestamp
  * @beacon_int: beacon interval
- * @assoc_capability: capabbilities taken from assoc resp
+ * @assoc_capability: capabilities taken from assoc resp
  * @assoc_ht: association in HT mode
  * @ht_conf: ht capabilities
  * @ht_bss_conf: ht extended capabilities
@@ -191,6 +192,7 @@ struct ieee80211_bss_conf {
        /* erp related data */
        bool use_cts_prot;
        bool use_short_preamble;
+       u8 dtim_period;
        u16 beacon_int;
        u16 assoc_capability;
        u64 timestamp;
@@ -201,25 +203,23 @@ struct ieee80211_bss_conf {
 };
 
 /**
- * enum mac80211_tx_flags - flags to transmission information/status
+ * enum mac80211_tx_control_flags - flags to describe transmission information/status
  *
- * These flags are used with the @flags member of &ieee80211_tx_info
+ * 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)
  * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack
- * @IEEE80211_TX_CTL_RATE_CTRL_PROBE
+ * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: TBD
  * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination
  *     station
- * @IEEE80211_TX_CTL_REQUEUE:
+ * @IEEE80211_TX_CTL_REQUEUE: TBD
  * @IEEE80211_TX_CTL_FIRST_FRAGMENT: this is a first fragment of the frame
+ * @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
@@ -230,15 +230,28 @@ struct ieee80211_bss_conf {
  * @IEEE80211_TX_CTL_40_MHZ_WIDTH: send this frame using 40 Mhz channel width
  * @IEEE80211_TX_CTL_DUP_DATA: duplicate data frame on both 20 Mhz channels
  * @IEEE80211_TX_CTL_SHORT_GI: send this frame using short guard interval
+ * @IEEE80211_TX_CTL_INJECTED: TBD
  * @IEEE80211_TX_STAT_TX_FILTERED: The frame was not transmitted
  *     because the destination STA was in powersave mode.
  * @IEEE80211_TX_STAT_ACK: Frame was acknowledged
  * @IEEE80211_TX_STAT_AMPDU: The frame was aggregated, so status
  *     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),
@@ -248,7 +261,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),
@@ -260,6 +272,8 @@ enum mac80211_tx_control_flags {
        IEEE80211_TX_STAT_TX_FILTERED           = BIT(20),
        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),
 };
 
 
@@ -277,6 +291,12 @@ enum mac80211_tx_control_flags {
  *  (3) TX status information - driver tells mac80211 what happened
  *
  * @flags: transmit info flags, defined above
+ * @band: TBD
+ * @tx_rate_idx: TBD
+ * @antenna_sel_tx: TBD
+ * @control: union for control data
+ * @status: union for status data
+ * @driver_data: array of driver_data pointers
  * @retry_count: number of retries
  * @excessive_retries: set to 1 if the frame was retried many times
  *     but not acknowledged
@@ -300,7 +320,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;
@@ -396,11 +415,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),
 };
 
 /**
@@ -411,6 +432,7 @@ enum ieee80211_conf_flags {
  * @radio_enabled: when zero, driver is required to switch off the radio.
  *     TODO make a flag
  * @beacon_int: beacon interval (TODO make interface config)
+ * @listen_interval: listen interval in units of beacon interval
  * @flags: configuration flags defined above
  * @power_level: requested transmit power (in dBm)
  * @max_antenna_gain: maximum antenna gain (in dBi)
@@ -425,6 +447,7 @@ struct ieee80211_conf {
        int radio_enabled;
 
        int beacon_int;
+       u16 listen_interval;
        u32 flags;
        int power_level;
        int max_antenna_gain;
@@ -516,33 +539,38 @@ struct ieee80211_if_init_conf {
 };
 
 /**
+ * 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;
 };
 
 /**
@@ -557,6 +585,15 @@ enum ieee80211_key_alg {
        ALG_CCMP,
 };
 
+/**
+ * enum ieee80211_key_len - key length
+ * @LEN_WEP40: WEP 5-byte long key
+ * @LEN_WEP104: WEP 13-byte long key
+ */
+enum ieee80211_key_len {
+       LEN_WEP40 = 5,
+       LEN_WEP104 = 13,
+};
 
 /**
  * enum ieee80211_key_flags - key flags
@@ -628,7 +665,7 @@ enum set_key_cmd {
  * enum sta_notify_cmd - sta notify command
  *
  * Used with the sta_notify() callback in &struct ieee80211_ops, this
- * indicates addition and removal of a station to station table
+ * indicates addition and removal of a station to station table.
  *
  * @STA_NOTIFY_ADD: a station was added to the station table
  * @STA_NOTIFY_REMOVE: a station being removed from the station table
@@ -661,15 +698,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.
@@ -680,10 +708,7 @@ enum ieee80211_tkip_key_type {
  *     rely on the host system for such buffering. This option is used
  *     to configure the IEEE 802.11 upper layer to buffer broadcast and
  *     multicast frames when there are power saving stations so that
- *     the driver can fetch them with ieee80211_get_buffered_bc(). Note
- *     that not setting this flag works properly only when the
- *     %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because
- *     otherwise the stack will not know when the DTIM beacon was sent.
+ *     the driver can fetch them with ieee80211_get_buffered_bc().
  *
  * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE:
  *     Hardware is not capable of short slot operation on the 2.4 GHz band.
@@ -710,9 +735,12 @@ enum ieee80211_tkip_key_type {
  * @IEEE80211_HW_NOISE_DBM:
  *     Hardware can provide noise (radio interference) values in units dBm,
  *      decibel difference from one milliwatt.
+ *
+ * @IEEE80211_HW_SPECTRUM_MGMT:
+ *     Hardware supports spectrum management defined in 802.11h
+ *     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,
@@ -721,6 +749,7 @@ enum ieee80211_hw_flags {
        IEEE80211_HW_SIGNAL_DB                          = 1<<6,
        IEEE80211_HW_SIGNAL_DBM                         = 1<<7,
        IEEE80211_HW_NOISE_DBM                          = 1<<8,
+       IEEE80211_HW_SPECTRUM_MGMT                      = 1<<9,
 };
 
 /**
@@ -757,6 +786,9 @@ enum ieee80211_hw_flags {
  * @max_signal: Maximum value for signal (rssi) in RX information, used
  *     only when @IEEE80211_HW_SIGNAL_UNSPEC or @IEEE80211_HW_SIGNAL_DB
  *
+ * @max_listen_interval: max listen interval in units of beacon interval
+ *     that HW supports
+ *
  * @queues: number of available hardware transmit queues for
  *     data packets. WMM/QoS requires at least four, these
  *     queues need to have configurable access parameters.
@@ -784,7 +816,9 @@ struct ieee80211_hw {
        unsigned int extra_tx_headroom;
        int channel_change_time;
        int vif_data_size;
-       u16 queues, ampdu_queues;
+       u16 queues;
+       u16 ampdu_queues;
+       u16 max_listen_interval;
        s8 max_signal;
 };
 
@@ -812,20 +846,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 *
@@ -1070,10 +1096,8 @@ enum ieee80211_ampdu_mlme_action {
  *     See the section "Frame filtering" for more information.
  *     This callback must be implemented and atomic.
  *
- * @set_tim: Set TIM bit. If the hardware/firmware takes care of beacon
- *     generation (that is, %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set)
- *     mac80211 calls this function when a TIM bit must be set or cleared
- *     for a given AID. Must be atomic.
+ * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit
+ *     must be set or cleared for a given AID. Must be atomic.
  *
  * @set_key: See the section "Hardware crypto acceleration"
  *     This callback can sleep, and is only called between add_interface
@@ -1124,17 +1148,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.
@@ -1192,8 +1205,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,
@@ -1323,7 +1334,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw);
  *
  * This function frees everything that was allocated, including the
  * private data for the driver. You must call ieee80211_unregister_hw()
- * before calling this function
+ * before calling this function.
  *
  * @hw: the hardware to free
  */
@@ -1394,7 +1405,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw,
                         struct sk_buff *skb);
 
 /**
- * ieee80211_tx_status_irqsafe - irq-safe transmit status callback
+ * ieee80211_tx_status_irqsafe - IRQ-safe transmit status callback
  *
  * Like ieee80211_tx_status() but can be called in IRQ context
  * (internally defers to a tasklet.)
@@ -1572,6 +1583,8 @@ unsigned int ieee80211_hdrlen(__le16 fc);
  * @keyconf: the parameter passed with the set key
  * @skb: the skb for which the key is needed
  * @rc4key: a buffer to which the key will be written
+ * @type: TBD
+ * @key: TBD
  */
 void ieee80211_get_tkip_key(struct ieee80211_key_conf *keyconf,
                                struct sk_buff *skb,
@@ -1622,7 +1635,7 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
 void ieee80211_scan_completed(struct ieee80211_hw *hw);
 
 /**
- * ieee80211_iterate_active_interfaces- iterate active interfaces
+ * ieee80211_iterate_active_interfaces - iterate active interfaces
  *
  * This function iterates over the interfaces associated with a given
  * hardware that are currently active and calls the callback for them.
@@ -1689,7 +1702,7 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid);
  *
  * This function must be called by low level driver once it has
  * finished with preparations for the BA session.
- * This version of the function is irq safe.
+ * This version of the function is IRQ-safe.
  */
 void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
                                      u16 tid);
@@ -1729,7 +1742,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
  *
  * This function must be called by low level driver once it has
  * finished with preparations for the BA session tear down.
- * This version of the function is irq safe.
+ * This version of the function is IRQ-safe.
  */
 void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
                                     u16 tid);
@@ -1737,7 +1750,7 @@ void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
 /**
  * ieee80211_notify_mac - low level driver notification
  * @hw: pointer as obtained from ieee80211_alloc_hw().
- * @notification_types: enum ieee80211_notification_types
+ * @notif_type: enum ieee80211_notification_types
  *
  * This function must be called by low level driver to inform mac80211 of
  * low level driver status change or force mac80211 to re-assoc for low