diff options
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 179 |
1 files changed, 72 insertions, 107 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 006486b26726..a4f9a832722a 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 |
@@ -23,6 +24,8 @@ | |||
23 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
24 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
25 | #include <net/wireless.h> | 26 | #include <net/wireless.h> |
27 | #include <net/iw_handler.h> | ||
28 | #include <net/mac80211.h> | ||
26 | #include "key.h" | 29 | #include "key.h" |
27 | #include "sta_info.h" | 30 | #include "sta_info.h" |
28 | 31 | ||
@@ -82,7 +85,7 @@ struct ieee80211_sta_bss { | |||
82 | u16 capability; /* host byte order */ | 85 | u16 capability; /* host byte order */ |
83 | enum ieee80211_band band; | 86 | enum ieee80211_band band; |
84 | int freq; | 87 | int freq; |
85 | int rssi, signal, noise; | 88 | int signal, noise, qual; |
86 | u8 *wpa_ie; | 89 | u8 *wpa_ie; |
87 | size_t wpa_ie_len; | 90 | size_t wpa_ie_len; |
88 | u8 *rsn_ie; | 91 | u8 *rsn_ie; |
@@ -91,6 +94,8 @@ struct ieee80211_sta_bss { | |||
91 | size_t wmm_ie_len; | 94 | size_t wmm_ie_len; |
92 | u8 *ht_ie; | 95 | u8 *ht_ie; |
93 | size_t ht_ie_len; | 96 | size_t ht_ie_len; |
97 | u8 *ht_add_ie; | ||
98 | size_t ht_add_ie_len; | ||
94 | #ifdef CONFIG_MAC80211_MESH | 99 | #ifdef CONFIG_MAC80211_MESH |
95 | u8 *mesh_id; | 100 | u8 *mesh_id; |
96 | size_t mesh_id_len; | 101 | size_t mesh_id_len; |
@@ -147,7 +152,6 @@ typedef unsigned __bitwise__ ieee80211_tx_result; | |||
147 | #define IEEE80211_TX_UNICAST BIT(1) | 152 | #define IEEE80211_TX_UNICAST BIT(1) |
148 | #define IEEE80211_TX_PS_BUFFERED BIT(2) | 153 | #define IEEE80211_TX_PS_BUFFERED BIT(2) |
149 | #define IEEE80211_TX_PROBE_LAST_FRAG BIT(3) | 154 | #define IEEE80211_TX_PROBE_LAST_FRAG BIT(3) |
150 | #define IEEE80211_TX_INJECTED BIT(4) | ||
151 | 155 | ||
152 | struct ieee80211_tx_data { | 156 | struct ieee80211_tx_data { |
153 | struct sk_buff *skb; | 157 | struct sk_buff *skb; |
@@ -157,13 +161,12 @@ struct ieee80211_tx_data { | |||
157 | struct sta_info *sta; | 161 | struct sta_info *sta; |
158 | struct ieee80211_key *key; | 162 | struct ieee80211_key *key; |
159 | 163 | ||
160 | struct ieee80211_tx_control *control; | ||
161 | struct ieee80211_channel *channel; | 164 | struct ieee80211_channel *channel; |
162 | struct ieee80211_rate *rate; | 165 | s8 rate_idx; |
163 | /* use this rate (if set) for last fragment; rate can | 166 | /* use this rate (if set) for last fragment; rate can |
164 | * be set to lower rate for the first fragments, e.g., | 167 | * be set to lower rate for the first fragments, e.g., |
165 | * when using CTS protection with IEEE 802.11g. */ | 168 | * when using CTS protection with IEEE 802.11g. */ |
166 | struct ieee80211_rate *last_frag_rate; | 169 | s8 last_frag_rate_idx; |
167 | 170 | ||
168 | /* Extra fragments (in addition to the first fragment | 171 | /* Extra fragments (in addition to the first fragment |
169 | * in skb) */ | 172 | * in skb) */ |
@@ -202,32 +205,16 @@ struct ieee80211_rx_data { | |||
202 | unsigned int flags; | 205 | unsigned int flags; |
203 | int sent_ps_buffered; | 206 | int sent_ps_buffered; |
204 | int queue; | 207 | int queue; |
205 | int load; | ||
206 | u32 tkip_iv32; | 208 | u32 tkip_iv32; |
207 | u16 tkip_iv16; | 209 | u16 tkip_iv16; |
208 | }; | 210 | }; |
209 | 211 | ||
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 { | 212 | struct ieee80211_tx_stored_packet { |
225 | struct ieee80211_tx_control control; | ||
226 | struct sk_buff *skb; | 213 | struct sk_buff *skb; |
227 | struct sk_buff **extra_frag; | 214 | struct sk_buff **extra_frag; |
228 | struct ieee80211_rate *last_frag_rate; | 215 | s8 last_frag_rate_idx; |
229 | int num_extra_frag; | 216 | int num_extra_frag; |
230 | unsigned int last_frag_rate_ctrl_probe; | 217 | bool last_frag_rate_ctrl_probe; |
231 | }; | 218 | }; |
232 | 219 | ||
233 | struct beacon_data { | 220 | struct beacon_data { |
@@ -251,8 +238,6 @@ struct ieee80211_if_ap { | |||
251 | struct sk_buff_head ps_bc_buf; | 238 | struct sk_buff_head ps_bc_buf; |
252 | atomic_t num_sta_ps; /* number of stations in PS mode */ | 239 | atomic_t num_sta_ps; /* number of stations in PS mode */ |
253 | int dtim_count; | 240 | int dtim_count; |
254 | int force_unicast_rateidx; /* forced TX rateidx for unicast frames */ | ||
255 | int max_ratectrl_rateidx; /* max TX rateidx for rate control */ | ||
256 | int num_beacons; /* number of TXed beacon frames for this BSS */ | 241 | int num_beacons; /* number of TXed beacon frames for this BSS */ |
257 | }; | 242 | }; |
258 | 243 | ||
@@ -262,7 +247,6 @@ struct ieee80211_if_wds { | |||
262 | }; | 247 | }; |
263 | 248 | ||
264 | struct ieee80211_if_vlan { | 249 | struct ieee80211_if_vlan { |
265 | struct ieee80211_sub_if_data *ap; | ||
266 | struct list_head list; | 250 | struct list_head list; |
267 | }; | 251 | }; |
268 | 252 | ||
@@ -436,8 +420,6 @@ struct ieee80211_sub_if_data { | |||
436 | */ | 420 | */ |
437 | u64 basic_rates; | 421 | u64 basic_rates; |
438 | 422 | ||
439 | u16 sequence; | ||
440 | |||
441 | /* Fragment table for host-based reassembly */ | 423 | /* Fragment table for host-based reassembly */ |
442 | struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX]; | 424 | struct ieee80211_fragment_entry fragments[IEEE80211_FRAGMENT_MAX]; |
443 | unsigned int fragment_next; | 425 | unsigned int fragment_next; |
@@ -446,16 +428,18 @@ struct ieee80211_sub_if_data { | |||
446 | struct ieee80211_key *keys[NUM_DEFAULT_KEYS]; | 428 | struct ieee80211_key *keys[NUM_DEFAULT_KEYS]; |
447 | struct ieee80211_key *default_key; | 429 | struct ieee80211_key *default_key; |
448 | 430 | ||
431 | /* BSS configuration for this interface. */ | ||
432 | struct ieee80211_bss_conf bss_conf; | ||
433 | |||
449 | /* | 434 | /* |
450 | * BSS configuration for this interface. | 435 | * AP this belongs to: self in AP mode and |
451 | * | 436 | * corresponding AP in VLAN mode, NULL for |
452 | * FIXME: I feel bad putting this here when we already have a | 437 | * all others (might be needed later in IBSS) |
453 | * bss pointer, but the bss pointer is just wrong when | ||
454 | * you have multiple virtual STA mode interfaces... | ||
455 | * This needs to be fixed. | ||
456 | */ | 438 | */ |
457 | struct ieee80211_bss_conf bss_conf; | 439 | struct ieee80211_if_ap *bss; |
458 | struct ieee80211_if_ap *bss; /* BSS that this device belongs to */ | 440 | |
441 | int force_unicast_rateidx; /* forced TX rateidx for unicast frames */ | ||
442 | int max_ratectrl_rateidx; /* max TX rateidx for rate control */ | ||
459 | 443 | ||
460 | union { | 444 | union { |
461 | struct ieee80211_if_ap ap; | 445 | struct ieee80211_if_ap ap; |
@@ -464,14 +448,11 @@ struct ieee80211_sub_if_data { | |||
464 | struct ieee80211_if_sta sta; | 448 | struct ieee80211_if_sta sta; |
465 | u32 mntr_flags; | 449 | u32 mntr_flags; |
466 | } u; | 450 | } u; |
467 | int channel_use; | ||
468 | int channel_use_raw; | ||
469 | 451 | ||
470 | #ifdef CONFIG_MAC80211_DEBUGFS | 452 | #ifdef CONFIG_MAC80211_DEBUGFS |
471 | struct dentry *debugfsdir; | 453 | struct dentry *debugfsdir; |
472 | union { | 454 | union { |
473 | struct { | 455 | struct { |
474 | struct dentry *channel_use; | ||
475 | struct dentry *drop_unencrypted; | 456 | struct dentry *drop_unencrypted; |
476 | struct dentry *state; | 457 | struct dentry *state; |
477 | struct dentry *bssid; | 458 | struct dentry *bssid; |
@@ -490,7 +471,6 @@ struct ieee80211_sub_if_data { | |||
490 | struct dentry *num_beacons_sta; | 471 | struct dentry *num_beacons_sta; |
491 | } sta; | 472 | } sta; |
492 | struct { | 473 | struct { |
493 | struct dentry *channel_use; | ||
494 | struct dentry *drop_unencrypted; | 474 | struct dentry *drop_unencrypted; |
495 | struct dentry *num_sta_ps; | 475 | struct dentry *num_sta_ps; |
496 | struct dentry *dtim_count; | 476 | struct dentry *dtim_count; |
@@ -500,12 +480,10 @@ struct ieee80211_sub_if_data { | |||
500 | struct dentry *num_buffered_multicast; | 480 | struct dentry *num_buffered_multicast; |
501 | } ap; | 481 | } ap; |
502 | struct { | 482 | struct { |
503 | struct dentry *channel_use; | ||
504 | struct dentry *drop_unencrypted; | 483 | struct dentry *drop_unencrypted; |
505 | struct dentry *peer; | 484 | struct dentry *peer; |
506 | } wds; | 485 | } wds; |
507 | struct { | 486 | struct { |
508 | struct dentry *channel_use; | ||
509 | struct dentry *drop_unencrypted; | 487 | struct dentry *drop_unencrypted; |
510 | } vlan; | 488 | } vlan; |
511 | struct { | 489 | struct { |
@@ -553,8 +531,6 @@ struct ieee80211_sub_if_data *vif_to_sdata(struct ieee80211_vif *p) | |||
553 | return container_of(p, struct ieee80211_sub_if_data, vif); | 531 | return container_of(p, struct ieee80211_sub_if_data, vif); |
554 | } | 532 | } |
555 | 533 | ||
556 | #define IEEE80211_DEV_TO_SUB_IF(dev) netdev_priv(dev) | ||
557 | |||
558 | enum { | 534 | enum { |
559 | IEEE80211_RX_MSG = 1, | 535 | IEEE80211_RX_MSG = 1, |
560 | IEEE80211_TX_STATUS_MSG = 2, | 536 | IEEE80211_TX_STATUS_MSG = 2, |
@@ -562,6 +538,9 @@ enum { | |||
562 | IEEE80211_ADDBA_MSG = 4, | 538 | IEEE80211_ADDBA_MSG = 4, |
563 | }; | 539 | }; |
564 | 540 | ||
541 | /* maximum number of hardware queues we support. */ | ||
542 | #define QD_MAX_QUEUES (IEEE80211_MAX_AMPDU_QUEUES + IEEE80211_MAX_QUEUES) | ||
543 | |||
565 | struct ieee80211_local { | 544 | struct ieee80211_local { |
566 | /* embed the driver visible part. | 545 | /* embed the driver visible part. |
567 | * don't cast (use the static inlines below), but we keep | 546 | * don't cast (use the static inlines below), but we keep |
@@ -570,6 +549,8 @@ struct ieee80211_local { | |||
570 | 549 | ||
571 | const struct ieee80211_ops *ops; | 550 | const struct ieee80211_ops *ops; |
572 | 551 | ||
552 | unsigned long queue_pool[BITS_TO_LONGS(QD_MAX_QUEUES)]; | ||
553 | |||
573 | struct net_device *mdev; /* wmaster# - "master" 802.11 device */ | 554 | struct net_device *mdev; /* wmaster# - "master" 802.11 device */ |
574 | int open_count; | 555 | int open_count; |
575 | int monitors, cooked_mntrs; | 556 | int monitors, cooked_mntrs; |
@@ -581,12 +562,6 @@ struct ieee80211_local { | |||
581 | bool tim_in_locked_section; /* see ieee80211_beacon_get() */ | 562 | bool tim_in_locked_section; /* see ieee80211_beacon_get() */ |
582 | int tx_headroom; /* required headroom for hardware/radiotap */ | 563 | int tx_headroom; /* required headroom for hardware/radiotap */ |
583 | 564 | ||
584 | enum { | ||
585 | IEEE80211_DEV_UNINITIALIZED = 0, | ||
586 | IEEE80211_DEV_REGISTERED, | ||
587 | IEEE80211_DEV_UNREGISTERED, | ||
588 | } reg_state; | ||
589 | |||
590 | /* Tasklet and skb queue to process calls from IRQ mode. All frames | 565 | /* Tasklet and skb queue to process calls from IRQ mode. All frames |
591 | * added to skb_queue will be processed, but frames in | 566 | * added to skb_queue will be processed, but frames in |
592 | * skb_queue_unreliable may be dropped if the total length of these | 567 | * skb_queue_unreliable may be dropped if the total length of these |
@@ -610,8 +585,8 @@ struct ieee80211_local { | |||
610 | struct sta_info *sta_hash[STA_HASH_SIZE]; | 585 | struct sta_info *sta_hash[STA_HASH_SIZE]; |
611 | struct timer_list sta_cleanup; | 586 | struct timer_list sta_cleanup; |
612 | 587 | ||
613 | unsigned long state[NUM_TX_DATA_QUEUES_AMPDU]; | 588 | unsigned long queues_pending[BITS_TO_LONGS(IEEE80211_MAX_QUEUES)]; |
614 | struct ieee80211_tx_stored_packet pending_packet[NUM_TX_DATA_QUEUES_AMPDU]; | 589 | struct ieee80211_tx_stored_packet pending_packet[IEEE80211_MAX_QUEUES]; |
615 | struct tasklet_struct tx_pending_tasklet; | 590 | struct tasklet_struct tx_pending_tasklet; |
616 | 591 | ||
617 | /* number of interfaces with corresponding IFF_ flags */ | 592 | /* number of interfaces with corresponding IFF_ flags */ |
@@ -677,9 +652,6 @@ struct ieee80211_local { | |||
677 | assoc_led_name[32], radio_led_name[32]; | 652 | assoc_led_name[32], radio_led_name[32]; |
678 | #endif | 653 | #endif |
679 | 654 | ||
680 | u32 channel_use; | ||
681 | u32 channel_use_raw; | ||
682 | |||
683 | #ifdef CONFIG_MAC80211_DEBUGFS | 655 | #ifdef CONFIG_MAC80211_DEBUGFS |
684 | struct work_struct sta_debugfs_add; | 656 | struct work_struct sta_debugfs_add; |
685 | #endif | 657 | #endif |
@@ -705,8 +677,6 @@ struct ieee80211_local { | |||
705 | unsigned int rx_expand_skb_head2; | 677 | unsigned int rx_expand_skb_head2; |
706 | unsigned int rx_handlers_fragments; | 678 | unsigned int rx_handlers_fragments; |
707 | unsigned int tx_status_drop; | 679 | 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)++ | 680 | #define I802_DEBUG_INC(c) (c)++ |
711 | #else /* CONFIG_MAC80211_DEBUG_COUNTERS */ | 681 | #else /* CONFIG_MAC80211_DEBUG_COUNTERS */ |
712 | #define I802_DEBUG_INC(c) do { } while (0) | 682 | #define I802_DEBUG_INC(c) do { } while (0) |
@@ -764,8 +734,6 @@ struct ieee80211_local { | |||
764 | struct dentry *rx_expand_skb_head2; | 734 | struct dentry *rx_expand_skb_head2; |
765 | struct dentry *rx_handlers_fragments; | 735 | struct dentry *rx_handlers_fragments; |
766 | struct dentry *tx_status_drop; | 736 | struct dentry *tx_status_drop; |
767 | struct dentry *wme_tx_queue; | ||
768 | struct dentry *wme_rx_queue; | ||
769 | #endif | 737 | #endif |
770 | struct dentry *dot11ACKFailureCount; | 738 | struct dentry *dot11ACKFailureCount; |
771 | struct dentry *dot11RTSFailureCount; | 739 | struct dentry *dot11RTSFailureCount; |
@@ -778,6 +746,16 @@ struct ieee80211_local { | |||
778 | #endif | 746 | #endif |
779 | }; | 747 | }; |
780 | 748 | ||
749 | static inline struct ieee80211_sub_if_data * | ||
750 | IEEE80211_DEV_TO_SUB_IF(struct net_device *dev) | ||
751 | { | ||
752 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | ||
753 | |||
754 | BUG_ON(!local || local->mdev == dev); | ||
755 | |||
756 | return netdev_priv(dev); | ||
757 | } | ||
758 | |||
781 | /* this struct represents 802.11n's RA/TID combination */ | 759 | /* this struct represents 802.11n's RA/TID combination */ |
782 | struct ieee80211_ra_tid { | 760 | struct ieee80211_ra_tid { |
783 | u8 ra[ETH_ALEN]; | 761 | u8 ra[ETH_ALEN]; |
@@ -809,6 +787,10 @@ struct ieee802_11_elems { | |||
809 | u8 *preq; | 787 | u8 *preq; |
810 | u8 *prep; | 788 | u8 *prep; |
811 | u8 *perr; | 789 | u8 *perr; |
790 | u8 *ch_switch_elem; | ||
791 | u8 *country_elem; | ||
792 | u8 *pwr_constr_elem; | ||
793 | u8 *quiet_elem; /* first quite element */ | ||
812 | 794 | ||
813 | /* length of them, respectively */ | 795 | /* length of them, respectively */ |
814 | u8 ssid_len; | 796 | u8 ssid_len; |
@@ -833,6 +815,11 @@ struct ieee802_11_elems { | |||
833 | u8 preq_len; | 815 | u8 preq_len; |
834 | u8 prep_len; | 816 | u8 prep_len; |
835 | u8 perr_len; | 817 | u8 perr_len; |
818 | u8 ch_switch_elem_len; | ||
819 | u8 country_elem_len; | ||
820 | u8 pwr_constr_elem_len; | ||
821 | u8 quiet_elem_len; | ||
822 | u8 num_of_quiet_elem; /* can be more the one */ | ||
836 | }; | 823 | }; |
837 | 824 | ||
838 | static inline struct ieee80211_local *hw_to_local( | 825 | static inline struct ieee80211_local *hw_to_local( |
@@ -847,11 +834,6 @@ static inline struct ieee80211_hw *local_to_hw( | |||
847 | return &local->hw; | 834 | return &local->hw; |
848 | } | 835 | } |
849 | 836 | ||
850 | enum ieee80211_link_state_t { | ||
851 | IEEE80211_LINK_STATE_XOFF = 0, | ||
852 | IEEE80211_LINK_STATE_PENDING, | ||
853 | }; | ||
854 | |||
855 | struct sta_attribute { | 837 | struct sta_attribute { |
856 | struct attribute attr; | 838 | struct attribute attr; |
857 | ssize_t (*show)(const struct sta_info *, char *buf); | 839 | ssize_t (*show)(const struct sta_info *, char *buf); |
@@ -867,39 +849,16 @@ static inline int ieee80211_bssid_match(const u8 *raddr, const u8 *addr) | |||
867 | 849 | ||
868 | /* ieee80211.c */ | 850 | /* ieee80211.c */ |
869 | int ieee80211_hw_config(struct ieee80211_local *local); | 851 | int ieee80211_hw_config(struct ieee80211_local *local); |
870 | int ieee80211_if_config(struct net_device *dev); | 852 | int ieee80211_if_config(struct ieee80211_sub_if_data *sdata, u32 changed); |
871 | int ieee80211_if_config_beacon(struct net_device *dev); | ||
872 | void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); | 853 | void ieee80211_tx_set_protected(struct ieee80211_tx_data *tx); |
873 | void ieee80211_if_setup(struct net_device *dev); | ||
874 | u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht, | 854 | u32 ieee80211_handle_ht(struct ieee80211_local *local, int enable_ht, |
875 | struct ieee80211_ht_info *req_ht_cap, | 855 | struct ieee80211_ht_info *req_ht_cap, |
876 | struct ieee80211_ht_bss_info *req_bss_cap); | 856 | struct ieee80211_ht_bss_info *req_bss_cap); |
877 | 857 | ||
878 | /* ieee80211_ioctl.c */ | 858 | /* ieee80211_ioctl.c */ |
879 | extern const struct iw_handler_def ieee80211_iw_handler_def; | 859 | extern const struct iw_handler_def ieee80211_iw_handler_def; |
880 | |||
881 | |||
882 | /* 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. */ | ||
884 | #define CHAN_UTIL_RATE_LCM 95040 | ||
885 | /* 1 usec is 1/8 * (95040/10) = 1188 */ | ||
886 | #define CHAN_UTIL_PER_USEC 1188 | ||
887 | /* Amount of bits to shift the result right to scale the total utilization | ||
888 | * to values that will not wrap around 32-bit integers. */ | ||
889 | #define CHAN_UTIL_SHIFT 9 | ||
890 | /* Theoretical maximum of channel utilization counter in 10 ms (stat_time=1): | ||
891 | * (CHAN_UTIL_PER_USEC * 10000) >> CHAN_UTIL_SHIFT = 23203. So dividing the | ||
892 | * raw value with about 23 should give utilization in 10th of a percentage | ||
893 | * (1/1000). However, utilization is only estimated and not all intervals | ||
894 | * between frames etc. are calculated. 18 seems to give numbers that are closer | ||
895 | * to the real maximum. */ | ||
896 | #define CHAN_UTIL_PER_10MS 18 | ||
897 | #define CHAN_UTIL_HDR_LONG (202 * CHAN_UTIL_PER_USEC) | ||
898 | #define CHAN_UTIL_HDR_SHORT (40 * CHAN_UTIL_PER_USEC) | ||
899 | |||
900 | |||
901 | /* ieee80211_ioctl.c */ | ||
902 | int ieee80211_set_freq(struct net_device *dev, int freq); | 860 | int ieee80211_set_freq(struct net_device *dev, int freq); |
861 | |||
903 | /* ieee80211_sta.c */ | 862 | /* ieee80211_sta.c */ |
904 | void ieee80211_sta_timer(unsigned long data); | 863 | void ieee80211_sta_timer(unsigned long data); |
905 | void ieee80211_sta_work(struct work_struct *work); | 864 | void ieee80211_sta_work(struct work_struct *work); |
@@ -912,21 +871,23 @@ int ieee80211_sta_set_bssid(struct net_device *dev, u8 *bssid); | |||
912 | int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len); | 871 | int ieee80211_sta_req_scan(struct net_device *dev, u8 *ssid, size_t ssid_len); |
913 | void ieee80211_sta_req_auth(struct net_device *dev, | 872 | void ieee80211_sta_req_auth(struct net_device *dev, |
914 | struct ieee80211_if_sta *ifsta); | 873 | struct ieee80211_if_sta *ifsta); |
915 | int ieee80211_sta_scan_results(struct net_device *dev, char *buf, size_t len); | 874 | int ieee80211_sta_scan_results(struct net_device *dev, |
875 | struct iw_request_info *info, | ||
876 | char *buf, size_t len); | ||
916 | ieee80211_rx_result ieee80211_sta_rx_scan( | 877 | ieee80211_rx_result ieee80211_sta_rx_scan( |
917 | struct net_device *dev, struct sk_buff *skb, | 878 | struct net_device *dev, struct sk_buff *skb, |
918 | struct ieee80211_rx_status *rx_status); | 879 | struct ieee80211_rx_status *rx_status); |
919 | void ieee80211_rx_bss_list_init(struct net_device *dev); | 880 | void ieee80211_rx_bss_list_init(struct ieee80211_local *local); |
920 | void ieee80211_rx_bss_list_deinit(struct net_device *dev); | 881 | void ieee80211_rx_bss_list_deinit(struct ieee80211_local *local); |
921 | int ieee80211_sta_set_extra_ie(struct net_device *dev, char *ie, size_t len); | 882 | 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, | 883 | struct sta_info *ieee80211_ibss_add_sta(struct net_device *dev, |
923 | struct sk_buff *skb, u8 *bssid, | 884 | struct sk_buff *skb, u8 *bssid, |
924 | u8 *addr); | 885 | u8 *addr, u64 supp_rates); |
925 | int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); | 886 | int ieee80211_sta_deauthenticate(struct net_device *dev, u16 reason); |
926 | int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); | 887 | int ieee80211_sta_disassociate(struct net_device *dev, u16 reason); |
927 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, | 888 | void ieee80211_bss_info_change_notify(struct ieee80211_sub_if_data *sdata, |
928 | u32 changed); | 889 | u32 changed); |
929 | void ieee80211_reset_erp_info(struct net_device *dev); | 890 | u32 ieee80211_reset_erp_info(struct net_device *dev); |
930 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, | 891 | int ieee80211_ht_cap_ie_to_ht_info(struct ieee80211_ht_cap *ht_cap_ie, |
931 | struct ieee80211_ht_info *ht_info); | 892 | struct ieee80211_ht_info *ht_info); |
932 | int ieee80211_ht_addt_info_ie_to_ht_bss_info( | 893 | int ieee80211_ht_addt_info_ie_to_ht_bss_info( |
@@ -937,10 +898,10 @@ void ieee80211_send_addba_request(struct net_device *dev, const u8 *da, | |||
937 | u16 agg_size, u16 timeout); | 898 | u16 agg_size, u16 timeout); |
938 | void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, | 899 | void ieee80211_send_delba(struct net_device *dev, const u8 *da, u16 tid, |
939 | u16 initiator, u16 reason_code); | 900 | u16 initiator, u16 reason_code); |
901 | void ieee80211_send_bar(struct net_device *dev, u8 *ra, u16 tid, u16 ssn); | ||
940 | 902 | ||
941 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da, | 903 | void ieee80211_sta_stop_rx_ba_session(struct net_device *dev, u8 *da, |
942 | u16 tid, u16 initiator, u16 reason); | 904 | 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); | 905 | void sta_addba_resp_timer_expired(unsigned long data); |
945 | void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr); | 906 | void ieee80211_sta_tear_down_BA_sessions(struct net_device *dev, u8 *addr); |
946 | u64 ieee80211_sta_get_rates(struct ieee80211_local *local, | 907 | u64 ieee80211_sta_get_rates(struct ieee80211_local *local, |
@@ -958,17 +919,15 @@ static inline void ieee80211_start_mesh(struct net_device *dev) | |||
958 | {} | 919 | {} |
959 | #endif | 920 | #endif |
960 | 921 | ||
961 | /* ieee80211_iface.c */ | 922 | /* interface handling */ |
962 | int ieee80211_if_add(struct net_device *dev, const char *name, | 923 | void ieee80211_if_setup(struct net_device *dev); |
963 | struct net_device **new_dev, int type, | 924 | int ieee80211_if_add(struct ieee80211_local *local, const char *name, |
925 | struct net_device **new_dev, enum ieee80211_if_types type, | ||
964 | struct vif_params *params); | 926 | struct vif_params *params); |
965 | void ieee80211_if_set_type(struct net_device *dev, int type); | 927 | int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata, |
966 | void ieee80211_if_reinit(struct net_device *dev); | 928 | enum ieee80211_if_types type); |
967 | void __ieee80211_if_del(struct ieee80211_local *local, | 929 | void ieee80211_if_remove(struct net_device *dev); |
968 | struct ieee80211_sub_if_data *sdata); | 930 | void ieee80211_remove_interfaces(struct ieee80211_local *local); |
969 | int ieee80211_if_remove(struct net_device *dev, const char *name, int id); | ||
970 | void ieee80211_if_free(struct net_device *dev); | ||
971 | void ieee80211_if_sdata_init(struct ieee80211_sub_if_data *sdata); | ||
972 | 931 | ||
973 | /* tx handling */ | 932 | /* tx handling */ |
974 | void ieee80211_clear_tx_pending(struct ieee80211_local *local); | 933 | void ieee80211_clear_tx_pending(struct ieee80211_local *local); |
@@ -988,4 +947,10 @@ int ieee80211_frame_duration(struct ieee80211_local *local, size_t len, | |||
988 | void mac80211_ev_michael_mic_failure(struct net_device *dev, int keyidx, | 947 | void mac80211_ev_michael_mic_failure(struct net_device *dev, int keyidx, |
989 | struct ieee80211_hdr *hdr); | 948 | struct ieee80211_hdr *hdr); |
990 | 949 | ||
950 | #ifdef CONFIG_MAC80211_NOINLINE | ||
951 | #define debug_noinline noinline | ||
952 | #else | ||
953 | #define debug_noinline | ||
954 | #endif | ||
955 | |||
991 | #endif /* IEEE80211_I_H */ | 956 | #endif /* IEEE80211_I_H */ |