]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/mac80211/ieee80211_i.h
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / net / mac80211 / ieee80211_i.h
index 006486b267261fa3f18b6dc3e1bb8f53f7e46efb..884be4d100f11fe1c022f743c4d3d60690420b52 100644 (file)
@@ -2,6 +2,7 @@
  * Copyright 2002-2005, Instant802 Networks, Inc.
  * Copyright 2005, Devicescape Software, Inc.
  * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz>
+ * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net>
  *
  * 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
@@ -82,7 +83,7 @@ struct ieee80211_sta_bss {
        u16 capability; /* host byte order */
        enum ieee80211_band band;
        int freq;
-       int rssi, signal, noise;
+       int signal, noise, qual;
        u8 *wpa_ie;
        size_t wpa_ie_len;
        u8 *rsn_ie;
@@ -91,6 +92,8 @@ struct ieee80211_sta_bss {
        size_t wmm_ie_len;
        u8 *ht_ie;
        size_t ht_ie_len;
+       u8 *ht_add_ie;
+       size_t ht_add_ie_len;
 #ifdef CONFIG_MAC80211_MESH
        u8 *mesh_id;
        size_t mesh_id_len;
@@ -147,7 +150,6 @@ typedef unsigned __bitwise__ ieee80211_tx_result;
 #define IEEE80211_TX_UNICAST           BIT(1)
 #define IEEE80211_TX_PS_BUFFERED       BIT(2)
 #define IEEE80211_TX_PROBE_LAST_FRAG   BIT(3)
-#define IEEE80211_TX_INJECTED          BIT(4)
 
 struct ieee80211_tx_data {
        struct sk_buff *skb;
@@ -157,13 +159,12 @@ struct ieee80211_tx_data {
        struct sta_info *sta;
        struct ieee80211_key *key;
 
-       struct ieee80211_tx_control *control;
        struct ieee80211_channel *channel;
-       struct ieee80211_rate *rate;
+       s8 rate_idx;
        /* use this rate (if set) for last fragment; rate can
         * be set to lower rate for the first fragments, e.g.,
         * when using CTS protection with IEEE 802.11g. */
-       struct ieee80211_rate *last_frag_rate;
+       s8 last_frag_rate_idx;
 
        /* Extra fragments (in addition to the first fragment
         * in skb) */
@@ -202,32 +203,16 @@ struct ieee80211_rx_data {
        unsigned int flags;
        int sent_ps_buffered;
        int queue;
-       int load;
        u32 tkip_iv32;
        u16 tkip_iv16;
 };
 
-/* flags used in struct ieee80211_tx_packet_data.flags */
-#define IEEE80211_TXPD_REQ_TX_STATUS   BIT(0)
-#define IEEE80211_TXPD_DO_NOT_ENCRYPT  BIT(1)
-#define IEEE80211_TXPD_REQUEUE         BIT(2)
-#define IEEE80211_TXPD_EAPOL_FRAME     BIT(3)
-#define IEEE80211_TXPD_AMPDU           BIT(4)
-/* Stored in sk_buff->cb */
-struct ieee80211_tx_packet_data {
-       int ifindex;
-       unsigned long jiffies;
-       unsigned int flags;
-       u8 queue;
-};
-
 struct ieee80211_tx_stored_packet {
-       struct ieee80211_tx_control control;
        struct sk_buff *skb;
        struct sk_buff **extra_frag;
-       struct ieee80211_rate *last_frag_rate;
+       s8 last_frag_rate_idx;
        int num_extra_frag;
-       unsigned int last_frag_rate_ctrl_probe;
+       bool last_frag_rate_ctrl_probe;
 };
 
 struct beacon_data {
@@ -464,14 +449,11 @@ struct ieee80211_sub_if_data {
                struct ieee80211_if_sta sta;
                u32 mntr_flags;
        } u;
-       int channel_use;
-       int channel_use_raw;
 
 #ifdef CONFIG_MAC80211_DEBUGFS
        struct dentry *debugfsdir;
        union {
                struct {
-                       struct dentry *channel_use;
                        struct dentry *drop_unencrypted;
                        struct dentry *state;
                        struct dentry *bssid;
@@ -490,7 +472,6 @@ struct ieee80211_sub_if_data {
                        struct dentry *num_beacons_sta;
                } sta;
                struct {
-                       struct dentry *channel_use;
                        struct dentry *drop_unencrypted;
                        struct dentry *num_sta_ps;
                        struct dentry *dtim_count;
@@ -500,12 +481,10 @@ struct ieee80211_sub_if_data {
                        struct dentry *num_buffered_multicast;
                } ap;
                struct {
-                       struct dentry *channel_use;
                        struct dentry *drop_unencrypted;
                        struct dentry *peer;
                } wds;
                struct {
-                       struct dentry *channel_use;
                        struct dentry *drop_unencrypted;
                } vlan;
                struct {
@@ -610,8 +589,8 @@ struct ieee80211_local {
        struct sta_info *sta_hash[STA_HASH_SIZE];
        struct timer_list sta_cleanup;
 
-       unsigned long state[NUM_TX_DATA_QUEUES_AMPDU];
-       struct ieee80211_tx_stored_packet pending_packet[NUM_TX_DATA_QUEUES_AMPDU];
+       unsigned long queues_pending[BITS_TO_LONGS(IEEE80211_MAX_QUEUES)];
+       struct ieee80211_tx_stored_packet pending_packet[IEEE80211_MAX_QUEUES];
        struct tasklet_struct tx_pending_tasklet;
 
        /* number of interfaces with corresponding IFF_ flags */
@@ -677,9 +656,6 @@ struct ieee80211_local {
             assoc_led_name[32], radio_led_name[32];
 #endif
 
-       u32 channel_use;
-       u32 channel_use_raw;
-
 #ifdef CONFIG_MAC80211_DEBUGFS
        struct work_struct sta_debugfs_add;
 #endif
@@ -705,8 +681,6 @@ struct ieee80211_local {
        unsigned int rx_expand_skb_head2;
        unsigned int rx_handlers_fragments;
        unsigned int tx_status_drop;
-       unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES];
-       unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES];
 #define I802_DEBUG_INC(c) (c)++
 #else /* CONFIG_MAC80211_DEBUG_COUNTERS */
 #define I802_DEBUG_INC(c) do { } while (0)
@@ -764,8 +738,6 @@ struct ieee80211_local {
                        struct dentry *rx_expand_skb_head2;
                        struct dentry *rx_handlers_fragments;
                        struct dentry *tx_status_drop;
-                       struct dentry *wme_tx_queue;
-                       struct dentry *wme_rx_queue;
 #endif
                        struct dentry *dot11ACKFailureCount;
                        struct dentry *dot11RTSFailureCount;
@@ -778,6 +750,15 @@ struct ieee80211_local {
 #endif
 };
 
+static inline int ieee80211_is_multiqueue(struct ieee80211_local *local)
+{
+#ifdef CONFIG_MAC80211_QOS
+       return netif_is_multiqueue(local->mdev);
+#else
+       return 0;
+#endif
+}
+
 /* this struct represents 802.11n's RA/TID combination */
 struct ieee80211_ra_tid {
        u8 ra[ETH_ALEN];
@@ -847,11 +828,6 @@ static inline struct ieee80211_hw *local_to_hw(
        return &local->hw;
 }
 
-enum ieee80211_link_state_t {
-       IEEE80211_LINK_STATE_XOFF = 0,
-       IEEE80211_LINK_STATE_PENDING,
-};
-
 struct sta_attribute {
        struct attribute attr;
        ssize_t (*show)(const struct sta_info *, char *buf);
@@ -878,7 +854,6 @@ u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht,
 /* ieee80211_ioctl.c */
 extern const struct iw_handler_def ieee80211_iw_handler_def;
 
-
 /* Least common multiple of the used rates (in 100 kbps). This is used to
  * calculate rate_inv values for each rate so that only integers are needed. */
 #define CHAN_UTIL_RATE_LCM 95040
@@ -900,6 +875,7 @@ extern const struct iw_handler_def ieee80211_iw_handler_def;
 
 /* ieee80211_ioctl.c */
 int ieee80211_set_freq(struct net_device *dev, int freq);
+
 /* ieee80211_sta.c */
 void ieee80211_sta_timer(unsigned long data);
 void ieee80211_sta_work(struct work_struct *work);
@@ -919,9 +895,9 @@ ieee80211_rx_result ieee80211_sta_rx_scan(
 void ieee80211_rx_bss_list_init(struct net_device *dev);
 void ieee80211_rx_bss_list_deinit(struct net_device *dev);
 int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len);
-struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev,
-                                        struct sk_buff *skb, u8 *bssid,
-                                        u8 *addr);
+struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev,
+                                       struct sk_buff *skb, u8 *bssid,
+                                       u8 *addr);
 int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason);
 int ieee80211_sta_disassociate(struct net_device *dev, u16 reason);
 void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata,
@@ -940,7 +916,6 @@ void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid,
 
 void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da,
                                u16 tid, u16 initiator, u16 reason);
-void sta_rx_agg_session_timer_expired(unsigned long data);
 void sta_addba_resp_timer_expired(unsigned long data);
 void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr);
 u64 ieee80211_sta_get_rates(struct ieee80211_local *local,