1*c1d255d3SCy Schubert /* 2*c1d255d3SCy Schubert * WPA Supplicant - driver_wext exported functions 3*c1d255d3SCy Schubert * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi> 4*c1d255d3SCy Schubert * 5*c1d255d3SCy Schubert * This software may be distributed under the terms of the BSD license. 6*c1d255d3SCy Schubert * See README for more details. 7*c1d255d3SCy Schubert */ 8*c1d255d3SCy Schubert 9*c1d255d3SCy Schubert #ifndef DRIVER_WEXT_H 10*c1d255d3SCy Schubert #define DRIVER_WEXT_H 11*c1d255d3SCy Schubert 12*c1d255d3SCy Schubert #include <net/if.h> 13*c1d255d3SCy Schubert 14*c1d255d3SCy Schubert struct wpa_driver_wext_data { 15*c1d255d3SCy Schubert void *ctx; 16*c1d255d3SCy Schubert struct netlink_data *netlink; 17*c1d255d3SCy Schubert int ioctl_sock; 18*c1d255d3SCy Schubert int mlme_sock; 19*c1d255d3SCy Schubert char ifname[IFNAMSIZ + 1]; 20*c1d255d3SCy Schubert char phyname[32]; 21*c1d255d3SCy Schubert int ifindex; 22*c1d255d3SCy Schubert int ifindex2; 23*c1d255d3SCy Schubert int if_removed; 24*c1d255d3SCy Schubert int if_disabled; 25*c1d255d3SCy Schubert struct rfkill_data *rfkill; 26*c1d255d3SCy Schubert u8 *assoc_req_ies; 27*c1d255d3SCy Schubert size_t assoc_req_ies_len; 28*c1d255d3SCy Schubert u8 *assoc_resp_ies; 29*c1d255d3SCy Schubert size_t assoc_resp_ies_len; 30*c1d255d3SCy Schubert struct wpa_driver_capa capa; 31*c1d255d3SCy Schubert int has_capability; 32*c1d255d3SCy Schubert int we_version_compiled; 33*c1d255d3SCy Schubert 34*c1d255d3SCy Schubert /* for set_auth_alg fallback */ 35*c1d255d3SCy Schubert int use_crypt; 36*c1d255d3SCy Schubert int auth_alg_fallback; 37*c1d255d3SCy Schubert 38*c1d255d3SCy Schubert int operstate; 39*c1d255d3SCy Schubert 40*c1d255d3SCy Schubert char mlmedev[IFNAMSIZ + 1]; 41*c1d255d3SCy Schubert 42*c1d255d3SCy Schubert int scan_complete_events; 43*c1d255d3SCy Schubert 44*c1d255d3SCy Schubert int cfg80211; /* whether driver is using cfg80211 */ 45*c1d255d3SCy Schubert 46*c1d255d3SCy Schubert u8 max_level; 47*c1d255d3SCy Schubert }; 48*c1d255d3SCy Schubert 49*c1d255d3SCy Schubert int wpa_driver_wext_get_bssid(void *priv, u8 *bssid); 50*c1d255d3SCy Schubert int wpa_driver_wext_set_bssid(void *priv, const u8 *bssid); 51*c1d255d3SCy Schubert int wpa_driver_wext_get_ssid(void *priv, u8 *ssid); 52*c1d255d3SCy Schubert int wpa_driver_wext_set_ssid(void *priv, const u8 *ssid, size_t ssid_len); 53*c1d255d3SCy Schubert int wpa_driver_wext_set_freq(void *priv, int freq); 54*c1d255d3SCy Schubert int wpa_driver_wext_set_mode(void *priv, int mode); 55*c1d255d3SCy Schubert int wpa_driver_wext_scan(void *priv, struct wpa_driver_scan_params *params); 56*c1d255d3SCy Schubert struct wpa_scan_results * wpa_driver_wext_get_scan_results(void *priv); 57*c1d255d3SCy Schubert 58*c1d255d3SCy Schubert void wpa_driver_wext_scan_timeout(void *eloop_ctx, void *timeout_ctx); 59*c1d255d3SCy Schubert 60*c1d255d3SCy Schubert int wpa_driver_wext_alternative_ifindex(struct wpa_driver_wext_data *drv, 61*c1d255d3SCy Schubert const char *ifname); 62*c1d255d3SCy Schubert 63*c1d255d3SCy Schubert void * wpa_driver_wext_init(void *ctx, const char *ifname); 64*c1d255d3SCy Schubert void wpa_driver_wext_deinit(void *priv); 65*c1d255d3SCy Schubert 66*c1d255d3SCy Schubert int wpa_driver_wext_set_operstate(void *priv, int state); 67*c1d255d3SCy Schubert int wpa_driver_wext_get_version(struct wpa_driver_wext_data *drv); 68*c1d255d3SCy Schubert 69*c1d255d3SCy Schubert int wpa_driver_wext_associate(void *priv, 70*c1d255d3SCy Schubert struct wpa_driver_associate_params *params); 71*c1d255d3SCy Schubert int wpa_driver_wext_get_capa(void *priv, struct wpa_driver_capa *capa); 72*c1d255d3SCy Schubert int wpa_driver_wext_set_auth_param(struct wpa_driver_wext_data *drv, 73*c1d255d3SCy Schubert int idx, u32 value); 74*c1d255d3SCy Schubert int wpa_driver_wext_cipher2wext(int cipher); 75*c1d255d3SCy Schubert int wpa_driver_wext_keymgmt2wext(int keymgmt); 76*c1d255d3SCy Schubert 77*c1d255d3SCy Schubert #endif /* DRIVER_WEXT_H */ 78