9 #ifndef DRIVER_NL80211_H
10 #define DRIVER_NL80211_H
12 #include "nl80211_copy.h"
18 #define nl_handle nl_sock
19 #define nl80211_handle_alloc nl_socket_alloc_cb
20 #define nl80211_handle_destroy nl_socket_free
27 int if_add_wdevid_set;
34 struct nl_handle *nl_event;
42 struct nl_handle *nl_beacons;
54 char ifname[IFNAMSIZ + 1];
55 char brname[IFNAMSIZ];
56 unsigned int beacon_set:1;
57 unsigned int added_if_into_bridge:1;
58 unsigned int added_bridge:1;
59 unsigned int in_deinit:1;
60 unsigned int wdev_id_set:1;
61 unsigned int added_if:1;
62 unsigned int static_ap:1;
71 struct nl_handle *nl_preq, *nl_mgmt;
83 u8 perm_addr[ETH_ALEN];
88 int ignore_if_down_event;
92 unsigned int extended_capa_len;
97 int scan_complete_events;
99 NO_SCAN, SCAN_REQUESTED, SCAN_STARTED, SCAN_COMPLETED,
100 SCAN_ABORTED, SCHED_SCAN_STARTED, SCHED_SCAN_STOPPED,
104 u8 auth_bssid[ETH_ALEN];
105 u8 auth_attempt_bssid[ETH_ALEN];
107 u8 prev_bssid[ETH_ALEN];
109 u8 ssid[SSID_MAX_LEN];
111 enum nl80211_iftype nlmode;
112 enum nl80211_iftype ap_scan_as_station;
113 unsigned int assoc_freq;
117 int monitor_refcount;
119 unsigned int disabled_11b_rates:1;
120 unsigned int pending_remain_on_chan:1;
121 unsigned int in_interface_list:1;
122 unsigned int device_ap_sme:1;
123 unsigned int poll_command_supported:1;
124 unsigned int data_tx_status:1;
125 unsigned int scan_for_auth:1;
126 unsigned int retry_auth:1;
127 unsigned int use_monitor:1;
128 unsigned int ignore_next_local_disconnect:1;
129 unsigned int ignore_next_local_deauth:1;
130 unsigned int hostapd:1;
131 unsigned int start_mode_ap:1;
132 unsigned int start_iface_up:1;
133 unsigned int test_use_roc_tx:1;
134 unsigned int ignore_deauth_event:1;
135 unsigned int vendor_cmd_test_avail:1;
136 unsigned int roaming_vendor_cmd_avail:1;
137 unsigned int dfs_vendor_cmd_avail:1;
138 unsigned int have_low_prio_scan:1;
139 unsigned int force_connect_cmd:1;
140 unsigned int addr_changed:1;
141 unsigned int get_features_vendor_cmd_avail:1;
142 unsigned int set_rekey_offload:1;
143 unsigned int p2p_go_ctwindow_supported:1;
144 unsigned int setband_vendor_cmd_avail:1;
145 unsigned int get_pref_freq_list:1;
146 unsigned int set_prob_oper_freq:1;
148 u64 remain_on_chan_cookie;
149 u64 send_action_cookie;
151 unsigned int last_mgmt_freq;
153 struct wpa_driver_scan_filter *filter_ssids;
154 size_t num_filter_ssids;
162 struct nl_handle *rtnl_sk;
164 int default_if_indices[16];
170 u8 auth_bssid_[ETH_ALEN];
171 u8 auth_ssid[SSID_MAX_LEN];
172 size_t auth_ssid_len;
176 u8 auth_wep_key[4][16];
177 size_t auth_wep_key_len[4];
178 int auth_wep_tx_keyidx;
179 int auth_local_state_change;
186 struct nl_msg *msg,
int flags, uint8_t cmd);
187 struct nl_msg * nl80211_cmd_msg(
struct i802_bss *bss,
int flags, uint8_t cmd);
190 struct nl_msg * nl80211_bss_msg(
struct i802_bss *bss,
int flags, uint8_t cmd);
192 int (*valid_handler)(
struct nl_msg *,
void *),
195 const char *ifname,
enum nl80211_iftype iftype,
196 const u8 *addr,
int wds,
197 int (*handler)(
struct nl_msg *,
void *),
198 void *arg,
int use_existing);
201 enum chan_width convert2width(
int width);
205 int is_ap_interface(
enum nl80211_iftype nlmode);
206 int is_sta_interface(
enum nl80211_iftype nlmode);
212 int nl80211_get_wiphy_index(
struct i802_bss *bss);
213 int wpa_driver_nl80211_set_mode(
struct i802_bss *bss,
214 enum nl80211_iftype nlmode);
216 const u8 *addr,
int cmd, u16 reason_code,
217 int local_state_change);
222 const void *data,
size_t len,
223 int encrypt,
int noack);
227 nl80211_get_hw_feature_data(
void *priv, u16 *num_modes, u16 *flags);
229 int process_global_event(
struct nl_msg *msg,
void *arg);
230 int process_bss_event(
struct nl_msg *msg,
void *arg);
233 int android_nl_socket_set_nonblocking(
struct nl_handle *handle);
234 int android_pno_start(
struct i802_bss *bss,
236 int android_pno_stop(
struct i802_bss *bss);
237 extern int wpa_driver_nl80211_driver_cmd(
void *priv,
char *cmd,
char *buf,
241 int wpa_driver_set_p2p_noa(
void *priv, u8 count,
int start,
int duration);
242 int wpa_driver_get_p2p_noa(
void *priv, u8 *buf,
size_t len);
243 int wpa_driver_set_p2p_ps(
void *priv,
int legacy_ps,
int opp_ps,
int ctwindow);
244 int wpa_driver_set_ap_wps_p2p_ie(
void *priv,
const struct wpabuf *beacon,
245 const struct wpabuf *proberesp,
246 const struct wpabuf *assocresp);
256 unsigned int assoc_freq;
257 unsigned int ibss_freq;
258 u8 assoc_bssid[ETH_ALEN];
261 int bss_info_handler(
struct nl_msg *msg,
void *arg);
271 const u8 * nl80211_get_ie(
const u8 *ies,
size_t ies_len, u8 ie);
void wpa_driver_nl80211_scan_timeout(void *eloop_ctx, void *timeout_ctx)
Scan timeout to report scan completion.
Definition: driver_nl80211_scan.c:89
Definition: driver_nl80211.h:37
int wpa_driver_nl80211_scan(struct i802_bss *bss, struct wpa_driver_scan_params *params)
Request the driver to initiate scan.
Definition: driver_nl80211_scan.c:210
Driver interface definition.
Scan parameters Data for struct wpa_driver_ops::scan2().
Definition: driver.h:306
const u8 * extended_capa
extended capabilities in driver/device
Definition: driver.h:1384
Definition: driver_nl80211.h:48
int wpa_driver_nl80211_stop_sched_scan(void *priv)
Stop a scheduled scan.
Definition: driver_nl80211_scan.c:408
Supported hardware mode information.
Definition: driver.h:132
Definition: driver_nl80211.h:23
Doubly-linked list.
Definition: list.h:12
int wpa_driver_nl80211_sched_scan(void *priv, struct wpa_driver_scan_params *params, u32 interval)
Initiate a scheduled scan.
Definition: driver_nl80211_scan.c:310
struct wpa_scan_results * wpa_driver_nl80211_get_scan_results(void *priv)
Fetch the latest scan results.
Definition: driver_nl80211_scan.c:746
Definition: driver_nl80211.h:253
Scan results.
Definition: driver.h:277
Information about channel signal quality.
Definition: driver.h:1607
Driver capability information.
Definition: driver.h:1196
Definition: driver_nl80211.h:78