aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/ieee80211_i.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r--net/mac80211/ieee80211_i.h81
1 files changed, 40 insertions, 41 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index eaf3603862b7..2cb743ed9f9c 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -57,6 +57,8 @@ struct ieee80211_local;
57 */ 57 */
58#define IEEE80211_SCAN_RESULT_EXPIRE (10 * HZ) 58#define IEEE80211_SCAN_RESULT_EXPIRE (10 * HZ)
59 59
60#define TU_TO_EXP_TIME(x) (jiffies + usecs_to_jiffies((x) * 1024))
61
60struct ieee80211_fragment_entry { 62struct ieee80211_fragment_entry {
61 unsigned long first_frag_time; 63 unsigned long first_frag_time;
62 unsigned int seq; 64 unsigned int seq;
@@ -70,43 +72,36 @@ struct ieee80211_fragment_entry {
70 72
71 73
72struct ieee80211_bss { 74struct ieee80211_bss {
73 struct list_head list; 75 /* Yes, this is a hack */
74 struct ieee80211_bss *hnext; 76 struct cfg80211_bss cbss;
75 size_t ssid_len;
76 77
77 atomic_t users; 78 /* don't want to look up all the time */
78 79 size_t ssid_len;
79 u8 bssid[ETH_ALEN];
80 u8 ssid[IEEE80211_MAX_SSID_LEN]; 80 u8 ssid[IEEE80211_MAX_SSID_LEN];
81
81 u8 dtim_period; 82 u8 dtim_period;
82 u16 capability; /* host byte order */ 83
83 enum ieee80211_band band;
84 int freq;
85 int signal, noise, qual;
86 u8 *ies; /* all information elements from the last Beacon or Probe
87 * Response frames; note Beacon frame is not allowed to
88 * override values from Probe Response */
89 size_t ies_len;
90 bool wmm_used; 84 bool wmm_used;
85
86 unsigned long last_probe_resp;
87
91#ifdef CONFIG_MAC80211_MESH 88#ifdef CONFIG_MAC80211_MESH
92 u8 *mesh_id; 89 u8 *mesh_id;
93 size_t mesh_id_len; 90 size_t mesh_id_len;
94 u8 *mesh_cfg; 91 u8 *mesh_cfg;
95#endif 92#endif
93
96#define IEEE80211_MAX_SUPP_RATES 32 94#define IEEE80211_MAX_SUPP_RATES 32
97 u8 supp_rates[IEEE80211_MAX_SUPP_RATES]; 95 u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
98 size_t supp_rates_len; 96 size_t supp_rates_len;
99 u64 timestamp;
100 int beacon_int;
101 97
102 unsigned long last_probe_resp; 98 /*
103 unsigned long last_update; 99 * During assocation, we save an ERP value from a probe response so
104
105 /* during assocation, we save an ERP value from a probe response so
106 * that we can feed ERP info to the driver when handling the 100 * that we can feed ERP info to the driver when handling the
107 * association completes. these fields probably won't be up-to-date 101 * association completes. these fields probably won't be up-to-date
108 * otherwise, you probably don't want to use them. */ 102 * otherwise, you probably don't want to use them.
109 int has_erp_value; 103 */
104 bool has_erp_value;
110 u8 erp_value; 105 u8 erp_value;
111}; 106};
112 107
@@ -292,8 +287,6 @@ struct ieee80211_if_sta {
292 u8 ssid[IEEE80211_MAX_SSID_LEN]; 287 u8 ssid[IEEE80211_MAX_SSID_LEN];
293 enum ieee80211_sta_mlme_state state; 288 enum ieee80211_sta_mlme_state state;
294 size_t ssid_len; 289 size_t ssid_len;
295 u8 scan_ssid[IEEE80211_MAX_SSID_LEN];
296 size_t scan_ssid_len;
297 u16 aid; 290 u16 aid;
298 u16 ap_capab, capab; 291 u16 ap_capab, capab;
299 u8 *extra_ie; /* to be added to the end of AssocReq */ 292 u8 *extra_ie; /* to be added to the end of AssocReq */
@@ -599,7 +592,6 @@ struct ieee80211_local {
599 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss; 592 int fif_fcsfail, fif_plcpfail, fif_control, fif_other_bss;
600 unsigned int filter_flags; /* FIF_* */ 593 unsigned int filter_flags; /* FIF_* */
601 struct iw_statistics wstats; 594 struct iw_statistics wstats;
602 u8 wstats_flags;
603 bool tim_in_locked_section; /* see ieee80211_beacon_get() */ 595 bool tim_in_locked_section; /* see ieee80211_beacon_get() */
604 int tx_headroom; /* required headroom for hardware/radiotap */ 596 int tx_headroom; /* required headroom for hardware/radiotap */
605 597
@@ -656,20 +648,18 @@ struct ieee80211_local {
656 648
657 /* Scanning and BSS list */ 649 /* Scanning and BSS list */
658 bool sw_scanning, hw_scanning; 650 bool sw_scanning, hw_scanning;
651 struct cfg80211_ssid scan_ssid;
652 struct cfg80211_scan_request int_scan_req;
653 struct cfg80211_scan_request *scan_req;
654 struct ieee80211_channel *scan_channel;
659 int scan_channel_idx; 655 int scan_channel_idx;
660 enum ieee80211_band scan_band;
661 656
662 enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state; 657 enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state;
663 unsigned long last_scan_completed; 658 unsigned long last_scan_completed;
664 struct delayed_work scan_work; 659 struct delayed_work scan_work;
665 struct ieee80211_sub_if_data *scan_sdata; 660 struct ieee80211_sub_if_data *scan_sdata;
666 struct ieee80211_channel *oper_channel, *scan_channel, *csa_channel;
667 enum nl80211_channel_type oper_channel_type; 661 enum nl80211_channel_type oper_channel_type;
668 u8 scan_ssid[IEEE80211_MAX_SSID_LEN]; 662 struct ieee80211_channel *oper_channel, *csa_channel;
669 size_t scan_ssid_len;
670 struct list_head bss_list;
671 struct ieee80211_bss *bss_hash[STA_HASH_SIZE];
672 spinlock_t bss_lock;
673 663
674 /* SNMP counters */ 664 /* SNMP counters */
675 /* dot11CountersTable */ 665 /* dot11CountersTable */
@@ -728,6 +718,7 @@ struct ieee80211_local {
728 unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */ 718 unsigned int wmm_acm; /* bit field of ACM bits (BIT(802.1D tag)) */
729 719
730 bool powersave; 720 bool powersave;
721 bool pspolling;
731 struct work_struct dynamic_ps_enable_work; 722 struct work_struct dynamic_ps_enable_work;
732 struct work_struct dynamic_ps_disable_work; 723 struct work_struct dynamic_ps_disable_work;
733 struct timer_list dynamic_ps_timer; 724 struct timer_list dynamic_ps_timer;
@@ -921,10 +912,12 @@ u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
921 enum ieee80211_band band); 912 enum ieee80211_band band);
922void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst, 913void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
923 u8 *ssid, size_t ssid_len); 914 u8 *ssid, size_t ssid_len);
915void ieee80211_send_pspoll(struct ieee80211_local *local,
916 struct ieee80211_sub_if_data *sdata);
924 917
925/* scan/BSS handling */ 918/* scan/BSS handling */
926int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata, 919int ieee80211_request_scan(struct ieee80211_sub_if_data *sdata,
927 u8 *ssid, size_t ssid_len); 920 struct cfg80211_scan_request *req);
928int ieee80211_scan_results(struct ieee80211_local *local, 921int ieee80211_scan_results(struct ieee80211_local *local,
929 struct iw_request_info *info, 922 struct iw_request_info *info,
930 char *buf, size_t len); 923 char *buf, size_t len);
@@ -932,29 +925,27 @@ ieee80211_rx_result
932ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata, 925ieee80211_scan_rx(struct ieee80211_sub_if_data *sdata,
933 struct sk_buff *skb, 926 struct sk_buff *skb,
934 struct ieee80211_rx_status *rx_status); 927 struct ieee80211_rx_status *rx_status);
935void ieee80211_rx_bss_list_init(struct ieee80211_local *local);
936void ieee80211_rx_bss_list_deinit(struct ieee80211_local *local);
937int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata, 928int ieee80211_sta_set_extra_ie(struct ieee80211_sub_if_data *sdata,
938 char *ie, size_t len); 929 char *ie, size_t len);
939 930
940void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local); 931void ieee80211_mlme_notify_scan_completed(struct ieee80211_local *local);
941int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata, 932int ieee80211_start_scan(struct ieee80211_sub_if_data *scan_sdata,
942 u8 *ssid, size_t ssid_len); 933 struct cfg80211_scan_request *req);
943struct ieee80211_bss * 934struct ieee80211_bss *
944ieee80211_bss_info_update(struct ieee80211_local *local, 935ieee80211_bss_info_update(struct ieee80211_local *local,
945 struct ieee80211_rx_status *rx_status, 936 struct ieee80211_rx_status *rx_status,
946 struct ieee80211_mgmt *mgmt, 937 struct ieee80211_mgmt *mgmt,
947 size_t len, 938 size_t len,
948 struct ieee802_11_elems *elems, 939 struct ieee802_11_elems *elems,
949 int freq, bool beacon); 940 struct ieee80211_channel *channel,
950struct ieee80211_bss * 941 bool beacon);
951ieee80211_rx_bss_add(struct ieee80211_local *local, u8 *bssid, int freq,
952 u8 *ssid, u8 ssid_len);
953struct ieee80211_bss * 942struct ieee80211_bss *
954ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq, 943ieee80211_rx_bss_get(struct ieee80211_local *local, u8 *bssid, int freq,
955 u8 *ssid, u8 ssid_len); 944 u8 *ssid, u8 ssid_len);
956void ieee80211_rx_bss_put(struct ieee80211_local *local, 945void ieee80211_rx_bss_put(struct ieee80211_local *local,
957 struct ieee80211_bss *bss); 946 struct ieee80211_bss *bss);
947void ieee80211_rx_bss_remove(struct ieee80211_sub_if_data *sdata, u8 *bssid,
948 int freq, u8 *ssid, u8 ssid_len);
958 949
959/* interface handling */ 950/* interface handling */
960int ieee80211_if_add(struct ieee80211_local *local, const char *name, 951int ieee80211_if_add(struct ieee80211_local *local, const char *name,
@@ -980,10 +971,15 @@ u32 ieee80211_enable_ht(struct ieee80211_sub_if_data *sdata,
980 struct ieee80211_ht_info *hti, 971 struct ieee80211_ht_info *hti,
981 u16 ap_ht_cap_flags); 972 u16 ap_ht_cap_flags);
982void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn); 973void ieee80211_send_bar(struct ieee80211_sub_if_data *sdata, u8 *ra, u16 tid, u16 ssn);
974void ieee80211_send_delba(struct ieee80211_sub_if_data *sdata,
975 const u8 *da, u16 tid,
976 u16 initiator, u16 reason_code);
983 977
984void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *da, 978void ieee80211_sta_stop_rx_ba_session(struct ieee80211_sub_if_data *sdata, u8 *da,
985 u16 tid, u16 initiator, u16 reason); 979 u16 tid, u16 initiator, u16 reason);
986void ieee80211_sta_tear_down_BA_sessions(struct ieee80211_sub_if_data *sdata, u8 *addr); 980void __ieee80211_stop_rx_ba_session(struct sta_info *sta, u16 tid,
981 u16 initiator, u16 reason);
982void ieee80211_sta_tear_down_BA_sessions(struct sta_info *sta);
987void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata, 983void ieee80211_process_delba(struct ieee80211_sub_if_data *sdata,
988 struct sta_info *sta, 984 struct sta_info *sta,
989 struct ieee80211_mgmt *mgmt, size_t len); 985 struct ieee80211_mgmt *mgmt, size_t len);
@@ -996,6 +992,9 @@ void ieee80211_process_addba_request(struct ieee80211_local *local,
996 struct ieee80211_mgmt *mgmt, 992 struct ieee80211_mgmt *mgmt,
997 size_t len); 993 size_t len);
998 994
995int __ieee80211_stop_tx_ba_session(struct sta_info *sta, u16 tid,
996 enum ieee80211_back_parties initiator);
997
999/* Spectrum management */ 998/* Spectrum management */
1000void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata, 999void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
1001 struct ieee80211_mgmt *mgmt, 1000 struct ieee80211_mgmt *mgmt,