nl80211: Event notifications for MLME events
[safe/jmp/linux-2.6] / include / net / mac80211.h
index c1e8261..daa539a 100644 (file)
@@ -97,7 +97,7 @@ struct ieee80211_ht_bss_info {
  *     for A-MPDU operation.
  */
 enum ieee80211_max_queues {
-       IEEE80211_MAX_QUEUES =          16,
+       IEEE80211_MAX_QUEUES =          4,
        IEEE80211_MAX_AMPDU_QUEUES =    16,
 };
 
@@ -520,12 +520,6 @@ enum ieee80211_conf_flags {
        IEEE80211_CONF_PS               = (1<<1),
 };
 
-/* XXX: remove all this once drivers stop trying to use it */
-static inline int __deprecated __IEEE80211_CONF_SHORT_SLOT_TIME(void)
-{
-       return 0;
-}
-#define IEEE80211_CONF_SHORT_SLOT_TIME (__IEEE80211_CONF_SHORT_SLOT_TIME())
 
 /**
  * enum ieee80211_conf_changed - denotes which configuration changed
@@ -860,11 +854,6 @@ enum ieee80211_tkip_key_type {
  *     expect values between 0 and @max_signal.
  *     If possible please provide dB or dBm instead.
  *
- * @IEEE80211_HW_SIGNAL_DB:
- *     Hardware gives signal values in dB, decibel difference from an
- *     arbitrary, fixed reference. We expect values between 0 and @max_signal.
- *     If possible please provide dBm instead.
- *
  * @IEEE80211_HW_SIGNAL_DBM:
  *     Hardware gives signal values in dBm, decibel difference from
  *     one milliwatt. This is the preferred method since it is standardized
@@ -900,15 +889,14 @@ enum ieee80211_hw_flags {
        IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE          = 1<<3,
        IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE      = 1<<4,
        IEEE80211_HW_SIGNAL_UNSPEC                      = 1<<5,
-       IEEE80211_HW_SIGNAL_DB                          = 1<<6,
-       IEEE80211_HW_SIGNAL_DBM                         = 1<<7,
-       IEEE80211_HW_NOISE_DBM                          = 1<<8,
-       IEEE80211_HW_SPECTRUM_MGMT                      = 1<<9,
-       IEEE80211_HW_AMPDU_AGGREGATION                  = 1<<10,
-       IEEE80211_HW_SUPPORTS_PS                        = 1<<11,
-       IEEE80211_HW_PS_NULLFUNC_STACK                  = 1<<12,
-       IEEE80211_HW_SUPPORTS_DYNAMIC_PS                = 1<<13,
-       IEEE80211_HW_MFP_CAPABLE                        = 1<<14,
+       IEEE80211_HW_SIGNAL_DBM                         = 1<<6,
+       IEEE80211_HW_NOISE_DBM                          = 1<<7,
+       IEEE80211_HW_SPECTRUM_MGMT                      = 1<<8,
+       IEEE80211_HW_AMPDU_AGGREGATION                  = 1<<9,
+       IEEE80211_HW_SUPPORTS_PS                        = 1<<10,
+       IEEE80211_HW_PS_NULLFUNC_STACK                  = 1<<11,
+       IEEE80211_HW_SUPPORTS_DYNAMIC_PS                = 1<<12,
+       IEEE80211_HW_MFP_CAPABLE                        = 1<<13,
 };
 
 /**
@@ -928,9 +916,8 @@ enum ieee80211_hw_flags {
  * @workqueue: single threaded workqueue available for driver use,
  *     allocated by mac80211 on registration and flushed when an
  *     interface is removed.
- *     NOTICE: All work performed on this workqueue should NEVER
- *     acquire the RTNL lock (i.e. Don't use the function
- *     ieee80211_iterate_active_interfaces())
+ *     NOTICE: All work performed on this workqueue must not
+ *     acquire the RTNL lock.
  *
  * @priv: pointer to private area that was allocated for driver use
  *     along with this structure.
@@ -1024,16 +1011,6 @@ static inline void SET_IEEE80211_PERM_ADDR(struct ieee80211_hw *hw, u8 *addr)
        memcpy(hw->wiphy->perm_addr, addr, ETH_ALEN);
 }
 
-static inline int ieee80211_num_regular_queues(struct ieee80211_hw *hw)
-{
-       return hw->queues;
-}
-
-static inline int ieee80211_num_queues(struct ieee80211_hw *hw)
-{
-       return hw->queues + hw->ampdu_queues;
-}
-
 static inline struct ieee80211_rate *
 ieee80211_get_tx_rate(const struct ieee80211_hw *hw,
                      const struct ieee80211_tx_info *c)
@@ -1336,6 +1313,12 @@ enum ieee80211_ampdu_mlme_action {
  *     because the hardware is turned off! Anything else is a bug!
  *     Returns a negative error code which will be seen in userspace.
  *
+ * @sw_scan_start: Notifier function that is called just before a software scan
+ *     is started. Can be NULL, if the driver doesn't need this notification.
+ *
+ * @sw_scan_complete: Notifier function that is called just after a software scan
+ *     finished. Can be NULL, if the driver doesn't need this notification.
+ *
  * @get_stats: Return low-level statistics.
  *     Returns zero if statistics are available.
  *
@@ -1360,8 +1343,12 @@ enum ieee80211_ampdu_mlme_action {
  *     hw->ampdu_queues items.
  *
  * @get_tsf: Get the current TSF timer value from firmware/hardware. Currently,
- *     this is only used for IBSS mode debugging and, as such, is not a
- *     required function. Must be atomic.
+ *     this is only used for IBSS mode BSSID merging and debugging. Is not a
+ *     required function.
+ *
+ * @set_tsf: Set the TSF timer to the specified value in the firmware/hardware.
+ *      Currently, this is only used for IBSS mode debugging. Is not a
+ *     required function.
  *
  * @reset_tsf: Reset the TSF timer and allow firmware/hardware to synchronize
  *     with other STAs in the IBSS. This is only used in IBSS mode. This
@@ -1409,7 +1396,10 @@ struct ieee80211_ops {
        void (*update_tkip_key)(struct ieee80211_hw *hw,
                        struct ieee80211_key_conf *conf, const u8 *address,
                        u32 iv32, u16 *phase1key);
-       int (*hw_scan)(struct ieee80211_hw *hw, u8 *ssid, size_t len);
+       int (*hw_scan)(struct ieee80211_hw *hw,
+                      struct cfg80211_scan_request *req);
+       void (*sw_scan_start)(struct ieee80211_hw *hw);
+       void (*sw_scan_complete)(struct ieee80211_hw *hw);
        int (*get_stats)(struct ieee80211_hw *hw,
                         struct ieee80211_low_level_stats *stats);
        void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx,
@@ -1422,6 +1412,7 @@ struct ieee80211_ops {
        int (*get_tx_stats)(struct ieee80211_hw *hw,
                            struct ieee80211_tx_queue_stats *stats);
        u64 (*get_tsf)(struct ieee80211_hw *hw);
+       void (*set_tsf)(struct ieee80211_hw *hw, u64 tsf);
        void (*reset_tsf)(struct ieee80211_hw *hw);
        int (*tx_last_beacon)(struct ieee80211_hw *hw);
        int (*ampdu_action)(struct ieee80211_hw *hw,
@@ -1846,8 +1837,9 @@ void ieee80211_wake_queues(struct ieee80211_hw *hw);
  * mac80211 that the scan finished.
  *
  * @hw: the hardware that finished the scan
+ * @aborted: set to true if scan was aborted
  */
-void ieee80211_scan_completed(struct ieee80211_hw *hw);
+void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted);
 
 /**
  * ieee80211_iterate_active_interfaces - iterate active interfaces
@@ -1980,6 +1972,16 @@ struct ieee80211_sta *ieee80211_find_sta(struct ieee80211_hw *hw,
 /* Rate control API */
 
 /**
+ * enum rate_control_changed - flags to indicate which parameter changed
+ *
+ * @IEEE80211_RC_HT_CHANGED: The HT parameters of the operating channel have
+ *     changed, rate control algorithm can update its internal state if needed.
+ */
+enum rate_control_changed {
+       IEEE80211_RC_HT_CHANGED = BIT(0)
+};
+
+/**
  * struct ieee80211_tx_rate_control - rate control information for/from RC algo
  *
  * @hw: The hardware the algorithm is invoked for.
@@ -2015,6 +2017,9 @@ struct rate_control_ops {
        void *(*alloc_sta)(void *priv, struct ieee80211_sta *sta, gfp_t gfp);
        void (*rate_init)(void *priv, struct ieee80211_supported_band *sband,
                          struct ieee80211_sta *sta, void *priv_sta);
+       void (*rate_update)(void *priv, struct ieee80211_supported_band *sband,
+                           struct ieee80211_sta *sta,
+                           void *priv_sta, u32 changed);
        void (*free_sta)(void *priv, struct ieee80211_sta *sta,
                         void *priv_sta);