diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 71 |
1 files changed, 23 insertions, 48 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 006486b2672..884be4d100f 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright 2002-2005, Instant802 Networks, Inc. | 2 | * Copyright 2002-2005, Instant802 Networks, Inc. |
3 | * Copyright 2005, Devicescape Software, Inc. | 3 | * Copyright 2005, Devicescape Software, Inc. |
4 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> | 4 | * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> |
5 | * Copyright 2007-2008 Johannes Berg <johannes@sipsolutions.net> | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 8 | * it under the terms of the GNU General Public License version 2 as |
@@ -82,7 +83,7 @@ struct ieee80211_sta_bss { | |||
82 | u16 capability; /* host byte order */ | 83 | u16 capability; /* host byte order */ |
83 | enum ieee80211_band band; | 84 | enum ieee80211_band band; |
84 | int freq; | 85 | int freq; |
85 | int rssi, signal, noise; | 86 | int signal, noise, qual; |
86 | u8 *wpa_ie; | 87 | u8 *wpa_ie; |
87 | size_t wpa_ie_len; | 88 | size_t wpa_ie_len; |
88 | u8 *rsn_ie; | 89 | u8 *rsn_ie; |
@@ -91,6 +92,8 @@ struct ieee80211_sta_bss { | |||
91 | size_t wmm_ie_len; | 92 | size_t wmm_ie_len; |
92 | u8 *ht_ie; | 93 | u8 *ht_ie; |
93 | size_t ht_ie_len; | 94 | size_t ht_ie_len; |
95 | u8 *ht_add_ie; | ||
96 | size_t ht_add_ie_len; | ||
94 | #ifdef CONFIG_MAC80211_MESH | 97 | #ifdef CONFIG_MAC80211_MESH |
95 | u8 *mesh_id; | 98 | u8 *mesh_id; |
96 | size_t mesh_id_len; | 99 | size_t mesh_id_len; |
@@ -147,7 +150,6 @@ typedef unsigned __bitwise__ ieee80211_tx_result; | |||
147 | #define IEEE80211_TX_UNICAST BIT(1) | 150 | #define IEEE80211_TX_UNICAST BIT(1) |
148 | #define IEEE80211_TX_PS_BUFFERED BIT(2) | 151 | #define IEEE80211_TX_PS_BUFFERED BIT(2) |
149 | #define IEEE80211_TX_PROBE_LAST_FRAG BIT(3) | 152 | #define IEEE80211_TX_PROBE_LAST_FRAG BIT(3) |
150 | #define IEEE80211_TX_INJECTED BIT(4) | ||
151 | 153 | ||
152 | struct ieee80211_tx_data { | 154 | struct ieee80211_tx_data { |
153 | struct sk_buff *skb; | 155 | struct sk_buff *skb; |
@@ -157,13 +159,12 @@ struct ieee80211_tx_data { | |||
157 | struct sta_info *sta; | 159 | struct sta_info *sta; |
158 | struct ieee80211_key *key; | 160 | struct ieee80211_key *key; |
159 | 161 | ||
160 | struct ieee80211_tx_control *control; | ||
161 | struct ieee80211_channel *channel; | 162 | struct ieee80211_channel *channel; |
162 | struct ieee80211_rate *rate; | 163 | s8 rate_idx; |
163 | /* use this rate (if set) for last fragment; rate can | 164 | /* use this rate (if set) for last fragment; rate can |
164 | * be set to lower rate for the first fragments, e.g., | 165 | * be set to lower rate for the first fragments, e.g., |
165 | * when using CTS protection with IEEE 802.11g. */ | 166 | * when using CTS protection with IEEE 802.11g. */ |
166 | struct ieee80211_rate *last_frag_rate; | 167 | s8 last_frag_rate_idx; |
167 | 168 | ||
168 | /* Extra fragments (in addition to the first fragment | 169 | /* Extra fragments (in addition to the first fragment |
169 | * in skb) */ | 170 | * in skb) */ |
@@ -202,32 +203,16 @@ struct ieee80211_rx_data { | |||
202 | unsigned int flags; | 203 | unsigned int flags; |
203 | int sent_ps_buffered; | 204 | int sent_ps_buffered; |
204 | int queue; | 205 | int queue; |
205 | int load; | ||
206 | u32 tkip_iv32; | 206 | u32 tkip_iv32; |
207 | u16 tkip_iv16; | 207 | u16 tkip_iv16; |
208 | }; | 208 | }; |
209 | 209 | ||
210 | /* flags used in struct ieee80211_tx_packet_data.flags */ | ||
211 | #define IEEE80211_TXPD_REQ_TX_STATUS BIT(0) | ||
212 | #define IEEE80211_TXPD_DO_NOT_ENCRYPT BIT(1) | ||
213 | #define IEEE80211_TXPD_REQUEUE BIT(2) | ||
214 | #define IEEE80211_TXPD_EAPOL_FRAME BIT(3) | ||
215 | #define IEEE80211_TXPD_AMPDU BIT(4) | ||
216 | /* Stored in sk_buff->cb */ | ||
217 | struct ieee80211_tx_packet_data { | ||
218 | int ifindex; | ||
219 | unsigned long jiffies; | ||
220 | unsigned int flags; | ||
221 | u8 queue; | ||
222 | }; | ||
223 | |||
224 | struct ieee80211_tx_stored_packet { | 210 | struct ieee80211_tx_stored_packet { |
225 | struct ieee80211_tx_control control; | ||
226 | struct sk_buff *skb; | 211 | struct sk_buff *skb; |
227 | struct sk_buff **extra_frag; | 212 | struct sk_buff **extra_frag; |
228 | struct ieee80211_rate *last_frag_rate; | 213 | s8 last_frag_rate_idx; |
229 | int num_extra_frag; | 214 | int num_extra_frag; |
230 | unsigned int last_frag_rate_ctrl_probe; | 215 | bool last_frag_rate_ctrl_probe; |
231 | }; | 216 | }; |
232 | 217 | ||
233 | struct beacon_data { | 218 | struct beacon_data { |
@@ -464,14 +449,11 @@ struct ieee80211_sub_if_data { | |||
464 | struct ieee80211_if_sta sta; | 449 | struct ieee80211_if_sta sta; |
465 | u32 mntr_flags; | 450 | u32 mntr_flags; |
466 | } u; | 451 | } u; |
467 | int channel_use; | ||
468 | int channel_use_raw; | ||
469 | 452 | ||
470 | #ifdef CONFIG_MAC80211_DEBUGFS | 453 | #ifdef CONFIG_MAC80211_DEBUGFS |
471 | struct dentry *debugfsdir; | 454 | struct dentry *debugfsdir; |
472 | union { | 455 | union { |
473 | struct { | 456 | struct { |
474 | struct dentry *channel_use; | ||
475 | struct dentry *drop_unencrypted; | 457 | struct dentry *drop_unencrypted; |
476 | struct dentry *state; | 458 | struct dentry *state; |
477 | struct dentry *bssid; | 459 | struct dentry *bssid; |
@@ -490,7 +472,6 @@ struct ieee80211_sub_if_data { | |||
490 | struct dentry *num_beacons_sta; | 472 | struct dentry *num_beacons_sta; |
491 | } sta; | 473 | } sta; |
492 | struct { | 474 | struct { |
493 | struct dentry *channel_use; | ||
494 | struct dentry *drop_unencrypted; | 475 | struct dentry *drop_unencrypted; |
495 | struct dentry *num_sta_ps; | 476 | struct dentry *num_sta_ps; |
496 | struct dentry *dtim_count; | 477 | struct dentry *dtim_count; |
@@ -500,12 +481,10 @@ struct ieee80211_sub_if_data { | |||
500 | struct dentry *num_buffered_multicast; | 481 | struct dentry *num_buffered_multicast; |
501 | } ap; | 482 | } ap; |
502 | struct { | 483 | struct { |
503 | struct dentry *channel_use; | ||
504 | struct dentry *drop_unencrypted; | 484 | struct dentry *drop_unencrypted; |
505 | struct dentry *peer; | 485 | struct dentry *peer; |
506 | } wds; | 486 | } wds; |
507 | struct { | 487 | struct { |
508 | struct dentry *channel_use; | ||
509 | struct dentry *drop_unencrypted; | 488 | struct dentry *drop_unencrypted; |
510 | } vlan; | 489 | } vlan; |
511 | struct { | 490 | struct { |
@@ -610,8 +589,8 @@ struct ieee80211_local { | |||
610 | struct sta_info *sta_hash[STA_HASH_SIZE]; | 589 | struct sta_info *sta_hash[STA_HASH_SIZE]; |
611 | struct timer_list sta_cleanup; | 590 | struct timer_list sta_cleanup; |
612 | 591 | ||
613 | unsigned long state[NUM_TX_DATA_QUEUES_AMPDU]; | 592 | unsigned long queues_pending[BITS_TO_LONGS(IEEE80211_MAX_QUEUES)]; |
614 | struct ieee80211_tx_stored_packet pending_packet[NUM_TX_DATA_QUEUES_AMPDU]; | 593 | struct ieee80211_tx_stored_packet pending_packet[IEEE80211_MAX_QUEUES]; |
615 | struct tasklet_struct tx_pending_tasklet; | 594 | struct tasklet_struct tx_pending_tasklet; |
616 | 595 | ||
617 | /* number of interfaces with corresponding IFF_ flags */ | 596 | /* number of interfaces with corresponding IFF_ flags */ |
@@ -677,9 +656,6 @@ struct ieee80211_local { | |||
677 | assoc_led_name[32], radio_led_name[32]; | 656 | assoc_led_name[32], radio_led_name[32]; |
678 | #endif | 657 | #endif |
679 | 658 | ||
680 | u32 channel_use; | ||
681 | u32 channel_use_raw; | ||
682 | |||
683 | #ifdef CONFIG_MAC80211_DEBUGFS | 659 | #ifdef CONFIG_MAC80211_DEBUGFS |
684 | struct work_struct sta_debugfs_add; | 660 | struct work_struct sta_debugfs_add; |
685 | #endif | 661 | #endif |
@@ -705,8 +681,6 @@ struct ieee80211_local { | |||
705 | unsigned int rx_expand_skb_head2; | 681 | unsigned int rx_expand_skb_head2; |
706 | unsigned int rx_handlers_fragments; | 682 | unsigned int rx_handlers_fragments; |
707 | unsigned int tx_status_drop; | 683 | unsigned int tx_status_drop; |
708 | unsigned int wme_rx_queue[NUM_RX_DATA_QUEUES]; | ||
709 | unsigned int wme_tx_queue[NUM_RX_DATA_QUEUES]; | ||
710 | #define I802_DEBUG_INC(c) (c)++ | 684 | #define I802_DEBUG_INC(c) (c)++ |
711 | #else /* CONFIG_MAC80211_DEBUG_COUNTERS */ | 685 | #else /* CONFIG_MAC80211_DEBUG_COUNTERS */ |
712 | #define I802_DEBUG_INC(c) do { } while (0) | 686 | #define I802_DEBUG_INC(c) do { } while (0) |
@@ -764,8 +738,6 @@ struct ieee80211_local { | |||
764 | struct dentry *rx_expand_skb_head2; | 738 | struct dentry *rx_expand_skb_head2; |
765 | struct dentry *rx_handlers_fragments; | 739 | struct dentry *rx_handlers_fragments; |
766 | struct dentry *tx_status_drop; | 740 | struct dentry *tx_status_drop; |
767 | struct dentry *wme_tx_queue; | ||
768 | struct dentry *wme_rx_queue; | ||
769 | #endif | 741 | #endif |
770 | struct dentry *dot11ACKFailureCount; | 742 | struct dentry *dot11ACKFailureCount; |
771 | struct dentry *dot11RTSFailureCount; | 743 | struct dentry *dot11RTSFailureCount; |
@@ -778,6 +750,15 @@ struct ieee80211_local { | |||
778 | #endif | 750 | #endif |
779 | }; | 751 | }; |
780 | 752 | ||
753 | static inline int ieee80211_is_multiqueue(struct ieee80211_local *local) | ||
754 | { | ||
755 | #ifdef CONFIG_MAC80211_QOS | ||
756 | return netif_is_multiqueue(local->mdev); | ||
757 | #else | ||
758 | return 0; | ||
759 | #endif | ||
760 | } | ||
761 | |||
781 | /* this struct represents 802.11n's RA/TID combination */ | 762 | /* this struct represents 802.11n's RA/TID combination */ |
782 | struct ieee80211_ra_tid { | 763 | struct ieee80211_ra_tid { |
783 | u8 ra[ETH_ALEN]; | 764 | u8 ra[ETH_ALEN]; |
@@ -847,11 +828,6 @@ static inline struct ieee80211_hw *local_to_hw( | |||
847 | return &local->hw; | 828 | return &local->hw; |
848 | } | 829 | } |
849 | 830 | ||
850 | enum ieee80211_link_state_t { | ||
851 | IEEE80211_LINK_STATE_XOFF = 0, | ||
852 | IEEE80211_LINK_STATE_PENDING, | ||
853 | }; | ||
854 | |||
855 | struct sta_attribute { | 831 | struct sta_attribute { |
856 | struct attribute attr; | 832 | struct attribute attr; |
857 | ssize_t (*show)(const struct sta_info *, char *buf); | 833 | ssize_t (*show)(const struct sta_info *, char *buf); |
@@ -878,7 +854,6 @@ u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht, | |||
878 | /* ieee80211_ioctl.c */ | 854 | /* ieee80211_ioctl.c */ |
879 | extern const struct iw_handler_def ieee80211_iw_handler_def; | 855 | extern const struct iw_handler_def ieee80211_iw_handler_def; |
880 | 856 | ||
881 | |||
882 | /* Least common multiple of the used rates (in 100 kbps). This is used to | 857 | /* Least common multiple of the used rates (in 100 kbps). This is used to |
883 | * calculate rate_inv values for each rate so that only integers are needed. */ | 858 | * calculate rate_inv values for each rate so that only integers are needed. */ |
884 | #define CHAN_UTIL_RATE_LCM 95040 | 859 | #define CHAN_UTIL_RATE_LCM 95040 |
@@ -900,6 +875,7 @@ extern const struct iw_handler_def ieee80211_iw_handler_def; | |||
900 | 875 | ||
901 | /* ieee80211_ioctl.c */ | 876 | /* ieee80211_ioctl.c */ |
902 | int ieee80211_set_freq(struct net_device *dev, int freq); | 877 | int ieee80211_set_freq(struct net_device *dev, int freq); |
878 | |||
903 | /* ieee80211_sta.c */ | 879 | /* ieee80211_sta.c */ |
904 | void ieee80211_sta_timer(unsigned long data); | 880 | void ieee80211_sta_timer(unsigned long data); |
905 | void ieee80211_sta_work(struct work_struct *work); | 881 | void ieee80211_sta_work(struct work_struct *work); |
@@ -919,9 +895,9 @@ ieee80211_rx_result ieee80211_sta_rx_scan( | |||
919 | void ieee80211_rx_bss_list_init(struct net_device *dev); | 895 | void ieee80211_rx_bss_list_init(struct net_device *dev); |
920 | void ieee80211_rx_bss_list_deinit(struct net_device *dev); | 896 | void ieee80211_rx_bss_list_deinit(struct net_device *dev); |
921 | int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len); | 897 | int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len); |
922 | struct sta_info * ieee80211_ibss_add_sta(struct net_device *dev, | 898 | struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, |
923 | struct sk_buff *skb, u8 *bssid, | 899 | struct sk_buff *skb, u8 *bssid, |
924 | u8 *addr); | 900 | u8 *addr); |
925 | int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); | 901 | int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); |
926 | int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); | 902 | int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); |
927 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | 903 | 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, | |||
940 | 916 | ||
941 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da, | 917 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da, |
942 | u16 tid, u16 initiator, u16 reason); | 918 | u16 tid, u16 initiator, u16 reason); |
943 | void sta_rx_agg_session_timer_expired(unsigned long data); | ||
944 | void sta_addba_resp_timer_expired(unsigned long data); | 919 | void sta_addba_resp_timer_expired(unsigned long data); |
945 | void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr); | 920 | void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr); |
946 | u64 ieee80211_sta_get_rates(struct ieee80211_local *local, | 921 | u64 ieee80211_sta_get_rates(struct ieee80211_local *local, |