]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/mac80211.h
mac80211: disable power save when scanning
[linux-2.6-omap-h63xx.git] / include / net / mac80211.h
index 88fa3e03e3e9dbf4746f59851c27cfd9407fe7bf..174dc1d7526b6ae4e3fdd2b585adf30f44927fc6 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
@@ -1017,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)
@@ -1323,11 +1307,19 @@ enum ieee80211_ampdu_mlme_action {
  *
  * @hw_scan: Ask the hardware to service the scan request, no need to start
  *     the scan state machine in stack. The scan must honour the channel
- *     configuration done by the regulatory agent in the wiphy's registered
- *     bands. When the scan finishes, ieee80211_scan_completed() must be
- *     called; note that it also must be called when the scan cannot finish
- *     because the hardware is turned off! Anything else is a bug!
- *     Returns a negative error code which will be seen in userspace.
+ *     configuration done by the regulatory agent in the wiphy's
+ *     registered bands. The hardware (or the driver) needs to make sure
+ *     that power save is disabled. When the scan finishes,
+ *     ieee80211_scan_completed() must be called; note that it also must
+ *     be called when the scan cannot finish 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.
@@ -1408,6 +1400,8 @@ struct ieee80211_ops {
                        u32 iv32, u16 *phase1key);
        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,
@@ -1979,6 +1973,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
  *
@@ -2015,6 +2019,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);