diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 90 |
1 files changed, 34 insertions, 56 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 156e42a003ae..f3eec989662b 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/types.h> | 23 | #include <linux/types.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
26 | #include <net/cfg80211.h> | ||
26 | #include <net/wireless.h> | 27 | #include <net/wireless.h> |
27 | #include <net/iw_handler.h> | 28 | #include <net/iw_handler.h> |
28 | #include <net/mac80211.h> | 29 | #include <net/mac80211.h> |
@@ -142,7 +143,6 @@ typedef unsigned __bitwise__ ieee80211_tx_result; | |||
142 | #define IEEE80211_TX_FRAGMENTED BIT(0) | 143 | #define IEEE80211_TX_FRAGMENTED BIT(0) |
143 | #define IEEE80211_TX_UNICAST BIT(1) | 144 | #define IEEE80211_TX_UNICAST BIT(1) |
144 | #define IEEE80211_TX_PS_BUFFERED BIT(2) | 145 | #define IEEE80211_TX_PS_BUFFERED BIT(2) |
145 | #define IEEE80211_TX_PROBE_LAST_FRAG BIT(3) | ||
146 | 146 | ||
147 | struct ieee80211_tx_data { | 147 | struct ieee80211_tx_data { |
148 | struct sk_buff *skb; | 148 | struct sk_buff *skb; |
@@ -153,11 +153,6 @@ struct ieee80211_tx_data { | |||
153 | struct ieee80211_key *key; | 153 | struct ieee80211_key *key; |
154 | 154 | ||
155 | struct ieee80211_channel *channel; | 155 | struct ieee80211_channel *channel; |
156 | s8 rate_idx; | ||
157 | /* use this rate (if set) for last fragment; rate can | ||
158 | * be set to lower rate for the first fragments, e.g., | ||
159 | * when using CTS protection with IEEE 802.11g. */ | ||
160 | s8 last_frag_rate_idx; | ||
161 | 156 | ||
162 | /* Extra fragments (in addition to the first fragment | 157 | /* Extra fragments (in addition to the first fragment |
163 | * in skb) */ | 158 | * in skb) */ |
@@ -192,7 +187,6 @@ struct ieee80211_rx_data { | |||
192 | struct ieee80211_rx_status *status; | 187 | struct ieee80211_rx_status *status; |
193 | struct ieee80211_rate *rate; | 188 | struct ieee80211_rate *rate; |
194 | 189 | ||
195 | u16 ethertype; | ||
196 | unsigned int flags; | 190 | unsigned int flags; |
197 | int sent_ps_buffered; | 191 | int sent_ps_buffered; |
198 | int queue; | 192 | int queue; |
@@ -203,9 +197,7 @@ struct ieee80211_rx_data { | |||
203 | struct ieee80211_tx_stored_packet { | 197 | struct ieee80211_tx_stored_packet { |
204 | struct sk_buff *skb; | 198 | struct sk_buff *skb; |
205 | struct sk_buff **extra_frag; | 199 | struct sk_buff **extra_frag; |
206 | s8 last_frag_rate_idx; | ||
207 | int num_extra_frag; | 200 | int num_extra_frag; |
208 | bool last_frag_rate_ctrl_probe; | ||
209 | }; | 201 | }; |
210 | 202 | ||
211 | struct beacon_data { | 203 | struct beacon_data { |
@@ -219,9 +211,6 @@ struct ieee80211_if_ap { | |||
219 | 211 | ||
220 | struct list_head vlans; | 212 | struct list_head vlans; |
221 | 213 | ||
222 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | ||
223 | size_t ssid_len; | ||
224 | |||
225 | /* yes, this looks ugly, but guarantees that we can later use | 214 | /* yes, this looks ugly, but guarantees that we can later use |
226 | * bitmap_empty :) | 215 | * bitmap_empty :) |
227 | * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */ | 216 | * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */ |
@@ -255,26 +244,6 @@ struct mesh_preq_queue { | |||
255 | u8 flags; | 244 | u8 flags; |
256 | }; | 245 | }; |
257 | 246 | ||
258 | struct mesh_config { | ||
259 | /* Timeouts in ms */ | ||
260 | /* Mesh plink management parameters */ | ||
261 | u16 dot11MeshRetryTimeout; | ||
262 | u16 dot11MeshConfirmTimeout; | ||
263 | u16 dot11MeshHoldingTimeout; | ||
264 | u16 dot11MeshMaxPeerLinks; | ||
265 | u8 dot11MeshMaxRetries; | ||
266 | u8 dot11MeshTTL; | ||
267 | bool auto_open_plinks; | ||
268 | /* HWMP parameters */ | ||
269 | u8 dot11MeshHWMPmaxPREQretries; | ||
270 | u32 path_refresh_time; | ||
271 | u16 min_discovery_timeout; | ||
272 | u32 dot11MeshHWMPactivePathTimeout; | ||
273 | u16 dot11MeshHWMPpreqMinInterval; | ||
274 | u16 dot11MeshHWMPnetDiameterTraversalTime; | ||
275 | }; | ||
276 | |||
277 | |||
278 | /* flags used in struct ieee80211_if_sta.flags */ | 247 | /* flags used in struct ieee80211_if_sta.flags */ |
279 | #define IEEE80211_STA_SSID_SET BIT(0) | 248 | #define IEEE80211_STA_SSID_SET BIT(0) |
280 | #define IEEE80211_STA_BSSID_SET BIT(1) | 249 | #define IEEE80211_STA_BSSID_SET BIT(1) |
@@ -438,8 +407,7 @@ struct ieee80211_sub_if_data { | |||
438 | struct ieee80211_key *keys[NUM_DEFAULT_KEYS]; | 407 | struct ieee80211_key *keys[NUM_DEFAULT_KEYS]; |
439 | struct ieee80211_key *default_key; | 408 | struct ieee80211_key *default_key; |
440 | 409 | ||
441 | /* BSS configuration for this interface. */ | 410 | u16 sequence_number; |
442 | struct ieee80211_bss_conf bss_conf; | ||
443 | 411 | ||
444 | /* | 412 | /* |
445 | * AP this belongs to: self in AP mode and | 413 | * AP this belongs to: self in AP mode and |
@@ -570,6 +538,11 @@ enum { | |||
570 | IEEE80211_ADDBA_MSG = 4, | 538 | IEEE80211_ADDBA_MSG = 4, |
571 | }; | 539 | }; |
572 | 540 | ||
541 | enum queue_stop_reason { | ||
542 | IEEE80211_QUEUE_STOP_REASON_DRIVER, | ||
543 | IEEE80211_QUEUE_STOP_REASON_PS, | ||
544 | }; | ||
545 | |||
573 | /* maximum number of hardware queues we support. */ | 546 | /* maximum number of hardware queues we support. */ |
574 | #define QD_MAX_QUEUES (IEEE80211_MAX_AMPDU_QUEUES + IEEE80211_MAX_QUEUES) | 547 | #define QD_MAX_QUEUES (IEEE80211_MAX_AMPDU_QUEUES + IEEE80211_MAX_QUEUES) |
575 | 548 | ||
@@ -586,7 +559,8 @@ struct ieee80211_local { | |||
586 | const struct ieee80211_ops *ops; | 559 | const struct ieee80211_ops *ops; |
587 | 560 | ||
588 | unsigned long queue_pool[BITS_TO_LONGS(QD_MAX_QUEUES)]; | 561 | unsigned long queue_pool[BITS_TO_LONGS(QD_MAX_QUEUES)]; |
589 | 562 | unsigned long queue_stop_reasons[IEEE80211_MAX_QUEUES]; | |
563 | spinlock_t queue_stop_reason_lock; | ||
590 | struct net_device *mdev; /* wmaster# - "master" 802.11 device */ | 564 | struct net_device *mdev; /* wmaster# - "master" 802.11 device */ |
591 | int open_count; | 565 | int open_count; |
592 | int monitors, cooked_mntrs; | 566 | int monitors, cooked_mntrs; |
@@ -633,8 +607,6 @@ struct ieee80211_local { | |||
633 | 607 | ||
634 | int rts_threshold; | 608 | int rts_threshold; |
635 | int fragmentation_threshold; | 609 | int fragmentation_threshold; |
636 | int short_retry_limit; /* dot11ShortRetryLimit */ | ||
637 | int long_retry_limit; /* dot11LongRetryLimit */ | ||
638 | 610 | ||
639 | struct crypto_blkcipher *wep_tx_tfm; | 611 | struct crypto_blkcipher *wep_tx_tfm; |
640 | struct crypto_blkcipher *wep_rx_tfm; | 612 | struct crypto_blkcipher *wep_rx_tfm; |
@@ -659,6 +631,7 @@ struct ieee80211_local { | |||
659 | struct delayed_work scan_work; | 631 | struct delayed_work scan_work; |
660 | struct ieee80211_sub_if_data *scan_sdata; | 632 | struct ieee80211_sub_if_data *scan_sdata; |
661 | struct ieee80211_channel *oper_channel, *scan_channel; | 633 | struct ieee80211_channel *oper_channel, *scan_channel; |
634 | enum nl80211_channel_type oper_channel_type; | ||
662 | u8 scan_ssid[IEEE80211_MAX_SSID_LEN]; | 635 | u8 scan_ssid[IEEE80211_MAX_SSID_LEN]; |
663 | size_t scan_ssid_len; | 636 | size_t scan_ssid_len; |
664 | struct list_head bss_list; | 637 | struct list_head bss_list; |
@@ -722,13 +695,17 @@ struct ieee80211_local { | |||
722 | int wifi_wme_noack_test; | 695 | int wifi_wme_noack_test; |
723 | unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ | 696 | unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ |
724 | 697 | ||
698 | bool powersave; | ||
699 | int dynamic_ps_timeout; | ||
700 | struct work_struct dynamic_ps_enable_work; | ||
701 | struct work_struct dynamic_ps_disable_work; | ||
702 | struct timer_list dynamic_ps_timer; | ||
703 | |||
725 | #ifdef CONFIG_MAC80211_DEBUGFS | 704 | #ifdef CONFIG_MAC80211_DEBUGFS |
726 | struct local_debugfsdentries { | 705 | struct local_debugfsdentries { |
727 | struct dentry *rcdir; | 706 | struct dentry *rcdir; |
728 | struct dentry *rcname; | 707 | struct dentry *rcname; |
729 | struct dentry *frequency; | 708 | struct dentry *frequency; |
730 | struct dentry *antenna_sel_tx; | ||
731 | struct dentry *antenna_sel_rx; | ||
732 | struct dentry *rts_threshold; | 709 | struct dentry *rts_threshold; |
733 | struct dentry *fragmentation_threshold; | 710 | struct dentry *fragmentation_threshold; |
734 | struct dentry *short_retry_limit; | 711 | struct dentry *short_retry_limit; |
@@ -817,7 +794,7 @@ struct ieee802_11_elems { | |||
817 | u8 *wmm_info; | 794 | u8 *wmm_info; |
818 | u8 *wmm_param; | 795 | u8 *wmm_param; |
819 | struct ieee80211_ht_cap *ht_cap_elem; | 796 | struct ieee80211_ht_cap *ht_cap_elem; |
820 | struct ieee80211_ht_addt_info *ht_info_elem; | 797 | struct ieee80211_ht_info *ht_info_elem; |
821 | u8 *mesh_config; | 798 | u8 *mesh_config; |
822 | u8 *mesh_id; | 799 | u8 *mesh_id; |
823 | u8 *peer_link; | 800 | u8 *peer_link; |
@@ -869,11 +846,6 @@ static inline struct ieee80211_hw *local_to_hw( | |||
869 | return &local->hw; | 846 | return &local->hw; |
870 | } | 847 | } |
871 | 848 | ||
872 | struct sta_attribute { | ||
873 | struct attribute attr; | ||
874 | ssize_t (*show)(const struct sta_info *, char *buf); | ||
875 | ssize_t (*store)(struct sta_info *, const char *buf, size_t count); | ||
876 | }; | ||
877 | 849 | ||
878 | static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) | 850 | static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) |
879 | { | 851 | { |
@@ -882,12 +854,9 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) | |||
882 | } | 854 | } |
883 | 855 | ||
884 | 856 | ||
885 | int ieee80211_hw_config(struct ieee80211_local *local); | 857 | int ieee80211_hw_config(struct ieee80211_local *local, u32 changed); |
886 | int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed); | 858 | int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed); |
887 | void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); | 859 | void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); |
888 | u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht, | ||
889 | struct ieee80211_ht_info *req_ht_cap, | ||
890 | struct ieee80211_ht_bss_info *req_bss_cap); | ||
891 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | 860 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, |
892 | u32 changed); | 861 | u32 changed); |
893 | void ieee80211_configure_filter(struct ieee80211_local *local); | 862 | void ieee80211_configure_filter(struct ieee80211_local *local); |
@@ -906,8 +875,7 @@ int ieee80211_sta_set_bssid(struct ieee80211_sub_if_data *sdata, u8 *bssid); | |||
906 | void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata, | 875 | void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata, |
907 | struct ieee80211_if_sta *ifsta); | 876 | struct ieee80211_if_sta *ifsta); |
908 | struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | 877 | struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, |
909 | struct sk_buff *skb, u8 *bssid, | 878 | u8 *bssid, u8 *addr, u64 supp_rates); |
910 | u8 *addr, u64 supp_rates); | ||
911 | int ieee80211_sta_deauthenticate(struct ieee80211_sub_if_data *sdata, u16 reason); | 879 | int ieee80211_sta_deauthenticate(struct ieee80211_sub_if_data *sdata, u16 reason); |
912 | int ieee80211_sta_disassociate(struct ieee80211_sub_if_data *sdata, u16 reason); | 880 | int ieee80211_sta_disassociate(struct ieee80211_sub_if_data *sdata, u16 reason); |
913 | u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata); | 881 | u32 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata); |
@@ -968,11 +936,12 @@ int ieee80211_monitor_start_xmit(struct sk_buff *skb, struct net_device *dev); | |||
968 | int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev); | 936 | int ieee80211_subif_start_xmit(struct sk_buff *skb, struct net_device *dev); |
969 | 937 | ||
970 | /* HT */ | 938 | /* HT */ |
971 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, | 939 | void ieee80211_ht_cap_ie_to_sta_ht_cap(struct ieee80211_supported_band *sband, |
972 | struct ieee80211_ht_info *ht_info); | 940 | struct ieee80211_ht_cap *ht_cap_ie, |
973 | int ieee80211_ht_addt_info_ie_to_ht_bss_info( | 941 | struct ieee80211_sta_ht_cap *ht_cap); |
974 | struct ieee80211_ht_addt_info *ht_add_info_ie, | 942 | u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata, |
975 | struct ieee80211_ht_bss_info *bss_info); | 943 | struct ieee80211_ht_info *hti, |
944 | u16 ap_ht_cap_flags); | ||
976 | void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn); | 945 | void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn); |
977 | 946 | ||
978 | void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *da, | 947 | void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *da, |
@@ -1014,6 +983,15 @@ int ieee80211_set_freq(struct ieee80211_sub_if_data *sdata, int freq); | |||
1014 | u64 ieee80211_mandatory_rates(struct ieee80211_local *local, | 983 | u64 ieee80211_mandatory_rates(struct ieee80211_local *local, |
1015 | enum ieee80211_band band); | 984 | enum ieee80211_band band); |
1016 | 985 | ||
986 | void ieee80211_dynamic_ps_enable_work(struct work_struct *work); | ||
987 | void ieee80211_dynamic_ps_disable_work(struct work_struct *work); | ||
988 | void ieee80211_dynamic_ps_timer(unsigned long data); | ||
989 | |||
990 | void ieee80211_wake_queues_by_reason(struct ieee80211_hw *hw, | ||
991 | enum queue_stop_reason reason); | ||
992 | void ieee80211_stop_queues_by_reason(struct ieee80211_hw *hw, | ||
993 | enum queue_stop_reason reason); | ||
994 | |||
1017 | #ifdef CONFIG_MAC80211_NOINLINE | 995 | #ifdef CONFIG_MAC80211_NOINLINE |
1018 | #define debug_noinline noinline | 996 | #define debug_noinline noinline |
1019 | #else | 997 | #else |