2 * hostapd / Initialization and configuration
3 * Host AP kernel driver
4 * Copyright (c) 2002-2008, Jouni Malinen <j@w1.fi>
5 * Copyright (c) 2007-2008, Intel Corporation
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Alternatively, this software may be distributed under the terms of BSD
14 * See README and COPYING for more details.
22 #include "hostapd_defs.h"
25 extern unsigned char rfc1042_header[6];
27 struct wpa_driver_ops;
29 struct radius_server_data;
31 #ifdef CONFIG_FULL_DYNAMIC_VLAN
32 struct full_dynamic_vlan;
33 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
36 * struct hostapd_data - hostapd per-BSS data structure
39 struct hostapd_iface *iface;
40 struct hostapd_config *iconf;
41 struct hostapd_bss_config *conf;
42 int interface_added; /* virtual interface added for this BSS */
44 u8 own_addr[ETH_ALEN];
46 int num_sta; /* number of entries in sta_list */
47 struct sta_info *sta_list; /* STA info list head */
48 struct sta_info *sta_hash[STA_HASH_SIZE];
50 /* pointers to STA info; based on allocated AID or NULL if AID free
51 * AID is in the range 1-2007, so sta_aid[0] corresponders to AID 1
54 struct sta_info *sta_aid[MAX_AID_TABLE_SIZE];
56 const struct wpa_driver_ops *driver;
60 u8 default_wep_key_idx;
62 struct radius_client_data *radius;
63 int radius_client_reconfigured;
64 u32 acct_session_id_hi, acct_session_id_lo;
66 struct iapp_data *iapp;
68 struct hostapd_cached_radius_acl *acl_cache;
69 struct hostapd_acl_query_data *acl_queries;
71 struct wpa_authenticator *wpa_auth;
72 struct eapol_authenticator *eapol_auth;
74 struct rsn_preauth_interface *preauth_iface;
75 time_t michael_mic_failure;
76 int michael_mic_failures;
77 int tkip_countermeasures;
80 struct wpa_ctrl_dst *ctrl_dst;
83 void *eap_sim_db_priv;
84 struct radius_server_data *radius_srv;
86 int parameter_set_count;
88 #ifdef CONFIG_FULL_DYNAMIC_VLAN
89 struct full_dynamic_vlan *full_dynamic_vlan;
90 #endif /* CONFIG_FULL_DYNAMIC_VLAN */
92 struct l2_packet_data *l2;
93 struct wps_context *wps;
97 size_t wps_beacon_ie_len;
98 u8 *wps_probe_resp_ie;
99 size_t wps_probe_resp_ie_len;
100 #endif /* CONFIG_WPS */
105 * struct hostapd_iface - hostapd per-interface data structure
107 struct hostapd_iface {
109 struct hostapd_config *conf;
112 struct hostapd_data **bss;
114 int num_ap; /* number of entries in ap_list */
115 struct ap_info *ap_list; /* AP info list head */
116 struct ap_info *ap_hash[STA_HASH_SIZE];
117 struct ap_info *ap_iter_list;
119 struct hostapd_hw_modes *hw_features;
121 struct hostapd_hw_modes *current_mode;
122 /* Rates that are currently used (i.e., filtered copy of
123 * current_mode->channels */
125 struct hostapd_rate_data *current_rates;
129 /* Number of associated Non-ERP stations (i.e., stations using 802.11b
133 /* Number of associated stations that do not support Short Slot Time */
134 int num_sta_no_short_slot_time;
136 /* Number of associated stations that do not support Short Preamble */
137 int num_sta_no_short_preamble;
139 int olbc; /* Overlapping Legacy BSS Condition */
141 /* Number of HT associated stations that do not support greenfield */
142 int num_sta_ht_no_gf;
144 /* Number of associated non-HT stations */
147 /* Number of HT associated stations 20 MHz */
148 int num_sta_ht_20mhz;
150 /* Overlapping BSS information */
153 #ifdef CONFIG_IEEE80211N
155 #endif /* CONFIG_IEEE80211N */
158 int hostapd_reload_config(struct hostapd_iface *iface);
160 #endif /* HOSTAPD_H */