aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/drivers/Apple80211.h156
-rw-r--r--src/drivers/MobileApple80211.c189
-rw-r--r--src/drivers/MobileApple80211.h43
-rw-r--r--src/drivers/driver_broadcom.c599
-rw-r--r--src/drivers/driver_iphone.m466
-rw-r--r--src/drivers/driver_osx.m459
-rw-r--r--src/drivers/driver_ralink.c1498
-rw-r--r--src/drivers/driver_ralink.h383
-rw-r--r--src/drivers/drivers.c24
-rw-r--r--src/drivers/drivers.mak26
-rw-r--r--src/drivers/drivers.mk26
-rw-r--r--wpa_supplicant/README20
-rw-r--r--wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj513
13 files changed, 0 insertions, 4402 deletions
diff --git a/src/drivers/Apple80211.h b/src/drivers/Apple80211.h
deleted file mode 100644
index 2a612e7..0000000
--- a/src/drivers/Apple80211.h
+++ /dev/null
@@ -1,156 +0,0 @@
-#ifndef APPLE80211_H
-#define APPLE80211_H
-
-/*
- * Apple80211 framework definitions
- * This is an undocumented interface and the definitions here are based on
- * information from MacStumbler (http://www.macstumbler.com/Apple80211.h) and
- * whatever related information can be found with google and experiments ;-).
- */
-
-typedef struct __WirelessRef *WirelessRef;
-typedef SInt32 WirelessError;
-#define errWirelessNoError 0
-
-typedef struct WirelessInfo {
- UInt16 link_qual;
- UInt16 comms_qual;
- UInt16 signal;
- UInt16 noise;
- UInt16 port_stat;
- UInt16 client_mode;
- UInt16 res1;
- UInt16 power;
- UInt16 res2;
- UInt8 bssID[6];
- UInt8 ssid[34];
-} WirelessInfo;
-
-typedef struct WirelessInfo2 {
- /* TODO - these are probably not in correct order or complete */
- WirelessInfo info1;
- UInt8 macAddress[6];
-} WirelessInfo2;
-
-typedef struct WirelessNetworkInfo {
- UInt16 channel;
- UInt16 noise;
- UInt16 signal;
- UInt8 bssid[6];
- UInt16 beacon_int;
- UInt16 capability;
- UInt16 ssid_len;
- UInt8 ssid[32];
-} WirelessNetworkInfo;
-
-typedef int wirelessKeyType; /* TODO */
-
-int WirelessIsAvailable(void);
-WirelessError WirelessAttach(WirelessRef *ref, UInt32 res);
-WirelessError WirelessDetach(WirelessRef ref);
-WirelessError WirelessPrivate(WirelessRef ref, void *in_ptr, int in_bytes,
- void *out_ptr, int out_bytes);
-WirelessError WirelessSetEnabled(WirelessRef ref, UInt8 enabled);
-WirelessError WirelessGetEnabled(WirelessRef ref, UInt8 *enabled);
-WirelessError WirelessSetPower(WirelessRef ref, UInt8 power);
-WirelessError WirelessGetPower(WirelessRef ref, UInt8 *power);
-WirelessError WirelessGetInfo(WirelessRef ref, WirelessInfo *info);
-WirelessError WirelessGetInfo2(WirelessRef ref, WirelessInfo2 *info);
-WirelessError WirelessScan(WirelessRef ref, CFArrayRef *results,
- UInt32 strip_dups);
-WirelessError WirelessScanSplit(WirelessRef ref, CFArrayRef *ap_results,
- CFArrayRef *ibss_results, UInt32 strip_dups);
-WirelessError WirelessDirectedScan(WirelessRef ref, CFArrayRef *results,
- UInt32 strip_dups, CFStringRef ssid);
-WirelessError WirelessDirectedScan2(WirelessRef ref, CFDataRef ssid,
- UInt32 strip_dups, CFArrayRef *results);
-WirelessError WirelessJoin(WirelessRef ref, CFStringRef ssid);
-WirelessError WirelessJoinWEP(WirelessRef ref, CFStringRef ssid,
- CFStringRef passwd);
-WirelessError WirelessJoin8021x(WirelessRef ref, CFStringRef ssid);
-/*
- * Set WEP key
- * ref: wireless reference from WirelessAttach()
- * type: ?
- * key_idx: 0..3
- * key_len: 13 for WEP-104 or 0 for clearing the key
- * key: Pointer to the key or %NULL if key_len = 0
- */
-WirelessError WirelessSetKey(WirelessRef ref, wirelessKeyType type,
- int key_idx, int key_len,
- const unsigned char *key);
-/*
- * Set WPA key (e.g., PMK for 4-way handshake)
- * ref: wireless reference from WirelessAttach()
- * type: 0..4; 1 = PMK
- * key_len: 16, 32, or 0
- * key: Pointer to the key or %NULL if key_len = 0
- */
-WirelessError WirelessSetWPAKey(WirelessRef ref, wirelessKeyType type,
- int key_len, const unsigned char *key);
-WirelessError WirelessAssociate(WirelessRef ref, int type, CFDataRef ssid,
- CFStringRef key);
-WirelessError WirelessAssociate2(WirelessRef ref, CFDictionaryRef scan_res,
- CFStringRef key);
-WirelessError WirelessDisassociate(WirelessRef ref);
-
-/*
- * Get a copy of scan results for the given SSID
- * The returned dictionary includes following entries:
- * beaconInterval: CFNumber(kCFNumberSInt32Type)
- * SSID: CFData buffer of the SSID
- * isWPA: CFNumber(kCFNumberSInt32Type); 0 = not used, 1 = WPA, -128 = WPA2
- * name: Name of the network (SSID string)
- * BSSID: CFData buffer of the BSSID
- * channel: CFNumber(kCFNumberSInt32Type)
- * signal: CFNumber(kCFNumberSInt32Type)
- * appleIE: CFData
- * WPSNOPINRequired: CFBoolean
- * noise: CFNumber(kCFNumberSInt32Type)
- * capability: CFNumber(kCFNumberSInt32Type)
- * uniCipher: CFArray of CFNumber(kCFNumberSInt32Type)
- * appleIE_Version: CFNumber(kCFNumberSInt32Type)
- * appleIE_Robust: CFBoolean
- * WPSConfigured: CFBoolean
- * scanWasDirected: CFBoolean
- * appleIE_Product: CFNumber(kCFNumberSInt32Type)
- * authModes: CFArray of CFNumber(kCFNumberSInt32Type)
- * multiCipher: CFNumber(kCFNumberSInt32Type)
- */
-CFDictionaryRef WirelessSafeDirectedScanCopy(WirelessRef ref, CFDataRef ssid);
-
-/*
- * Get information about the current association
- * The returned dictionary includes following entries:
- * keyData: CFData buffer of the key (e.g., 32-octet PSK)
- * multiCipher: CFNumber(kCFNumberSInt32Type); 0 = none, 5 = CCMP?
- * channel: CFNumber(kCFNumberSInt32Type)
- * isIBSS: CFBoolean
- * authMode: CFNumber(kCFNumberSInt32Type); 2 = WPA-Personal; 3 = open,
- * 129 = WPA2-Enterprise
- * isWPA: CFNumber(kCFNumberSInt32Type); 0 = not used, 1 = WPA, -128 == WPA2
- * SSID: CFData buffer of the SSID
- * cipherMode: CFNumber(kCFNumberSInt32Type); 0 = none, 4 = CCMP?
- */
-CFDictionaryRef WirelessGetAssociationInfo(WirelessRef ref);
-
-WirelessError WirelessConfigure(WirelessRef ref);
-
-/*
- * Get ASP information
- * The returned dictionary includes following entries:
- * Version: version number (e.g., 3.0)
- * Channel: channel (e.g., 1)
- * Vendor: vendor (e.g., 2)
- */
-CFDictionaryRef WirelessGetInfoASP(void);
-
-/*
- * Get a copy of the interface dictionary
- * The returned dictionary has a key,value pairs for wireless interfaces.
- * The key is the interface name and the value is the driver identifier, e.g.,
- * en1: com.apple.driver.AirPort.Atheros
- */
-CFDictionaryRef WirelessCopyInterfaceDict(void);
-
-#endif /* APPLE80211_H */
diff --git a/src/drivers/MobileApple80211.c b/src/drivers/MobileApple80211.c
deleted file mode 100644
index ce004fe..0000000
--- a/src/drivers/MobileApple80211.c
+++ /dev/null
@@ -1,189 +0,0 @@
-#include "includes.h"
-#include <dlfcn.h>
-
-#include "common.h"
-
-#include <CoreFoundation/CoreFoundation.h>
-#include "MobileApple80211.h"
-
-/*
- * Code for dynamically loading Apple80211 functions from Aeropuerto to avoid
- * having to link with full Preferences.framework.
- */
-
-static void *aeropuerto = NULL;
-
-
-int _Apple80211Initialized(void)
-{
- return aeropuerto ? 1 : 0;
-}
-
-
-static int (*__Apple80211Open)(Apple80211Ref *ctx) = NULL;
-
-int Apple80211Open(Apple80211Ref *ctx)
-{
- return __Apple80211Open(ctx);
-}
-
-
-static int (*__Apple80211Close)(Apple80211Ref ctx) = NULL;
-
-int Apple80211Close(Apple80211Ref ctx)
-{
- return __Apple80211Close(ctx);
-}
-
-
-static int (*__Apple80211GetIfListCopy)(Apple80211Ref handle, CFArrayRef *list)
- = NULL;
-
-int Apple80211GetIfListCopy(Apple80211Ref handle, CFArrayRef *list)
-{
- return __Apple80211GetIfListCopy(handle, list);
-}
-
-
-static int (*__Apple80211BindToInterface)(Apple80211Ref handle,
- CFStringRef interface) = NULL;
-
-int Apple80211BindToInterface(Apple80211Ref handle,
- CFStringRef interface)
-{
- return __Apple80211BindToInterface(handle, interface);
-}
-
-
-static int (*__Apple80211GetInterfaceNameCopy)(Apple80211Ref handle,
- CFStringRef *name) = NULL;
-
-int Apple80211GetInterfaceNameCopy(Apple80211Ref handle,
- CFStringRef *name)
-{
- return __Apple80211GetInterfaceNameCopy(handle, name);
-}
-
-
-static int (*__Apple80211GetInfoCopy)(Apple80211Ref handle,
- CFDictionaryRef *info) = NULL;
-
-int Apple80211GetInfoCopy(Apple80211Ref handle,
- CFDictionaryRef *info)
-{
- return __Apple80211GetInfoCopy(handle, info);
-}
-
-
-static int (*__Apple80211GetPower)(Apple80211Ref handle, char *pwr) = NULL;
-
-int Apple80211GetPower(Apple80211Ref handle, char *pwr)
-{
- return __Apple80211GetPower(handle, pwr);
-}
-
-
-static int (*__Apple80211SetPower)(Apple80211Ref handle, char pwr) = NULL;
-
-int Apple80211SetPower(Apple80211Ref handle, char pwr)
-{
- return __Apple80211SetPower(handle, pwr);
-}
-
-
-static int (*__Apple80211Scan)(Apple80211Ref handle, CFArrayRef *list,
- CFDictionaryRef parameters) = NULL;
-
-int Apple80211Scan(Apple80211Ref handle, CFArrayRef *list,
- CFDictionaryRef parameters)
-{
- return __Apple80211Scan(handle, list, parameters);
-}
-
-
-static int (*__Apple80211Associate)(Apple80211Ref handle, CFDictionaryRef bss,
- CFStringRef password) = NULL;
-
-int Apple80211Associate(Apple80211Ref handle, CFDictionaryRef bss,
- CFStringRef password)
-{
- return __Apple80211Associate(handle, bss, password);
-}
-
-
-static int (*__Apple80211AssociateAndCopyInfo)(Apple80211Ref handle,
- CFDictionaryRef bss,
- CFStringRef password,
- CFDictionaryRef *info) =
- NULL;
-
-int Apple80211AssociateAndCopyInfo(Apple80211Ref handle, CFDictionaryRef bss,
- CFStringRef password, CFDictionaryRef *info)
-{
- return __Apple80211AssociateAndCopyInfo(handle, bss, password, info);
-}
-
-
-static int (*__Apple80211CopyValue)(Apple80211Ref handle, int field,
- CFDictionaryRef arg2, void *value) = NULL;
-
-int Apple80211CopyValue(Apple80211Ref handle, int field, CFDictionaryRef arg2,
- void *value)
-{
- return __Apple80211CopyValue(handle, field, arg2, value);
-}
-
-
-#define DLSYM(s) \
-do { \
- __ ## s = dlsym(aeropuerto, #s); \
- if (__ ## s == NULL) { \
- wpa_printf(MSG_ERROR, "MobileApple80211: Could not resolve " \
- "symbol '" #s "' (%s)", dlerror()); \
- err = 1; \
- } \
-} while (0)
-
-
-__attribute__ ((constructor))
-void _Apple80211_constructor(void)
-{
- const char *fname = "/System/Library/SystemConfiguration/"
- "Aeropuerto.bundle/Aeropuerto";
- int err = 0;
-
- aeropuerto = dlopen(fname, RTLD_LAZY);
- if (!aeropuerto) {
- wpa_printf(MSG_ERROR, "MobileApple80211: Failed to open %s "
- "for symbols", fname);
- return;
- }
-
- DLSYM(Apple80211Open);
- DLSYM(Apple80211Close);
- DLSYM(Apple80211GetIfListCopy);
- DLSYM(Apple80211BindToInterface);
- DLSYM(Apple80211GetInterfaceNameCopy);
- DLSYM(Apple80211GetInfoCopy);
- DLSYM(Apple80211GetPower);
- DLSYM(Apple80211SetPower);
- DLSYM(Apple80211Scan);
- DLSYM(Apple80211Associate);
- DLSYM(Apple80211AssociateAndCopyInfo);
- DLSYM(Apple80211CopyValue);
-
- if (err) {
- dlclose(aeropuerto);
- aeropuerto = NULL;
- }
-}
-
-
-__attribute__ ((destructor))
-void _Apple80211_destructor(void)
-{
- if (aeropuerto) {
- dlclose(aeropuerto);
- aeropuerto = NULL;
- }
-}
diff --git a/src/drivers/MobileApple80211.h b/src/drivers/MobileApple80211.h
deleted file mode 100644
index 64d439d..0000000
--- a/src/drivers/MobileApple80211.h
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef MOBILEAPPLE80211_H
-#define MOBILEAPPLE80211_H
-
-/*
- * MobileApple80211 interface for iPhone/iPod touch
- * These functions are available from Aeropuerto.
- */
-
-struct Apple80211;
-typedef struct Apple80211 *Apple80211Ref;
-
-int Apple80211Open(Apple80211Ref *ctx);
-int Apple80211Close(Apple80211Ref ctx);
-int Apple80211GetIfListCopy(Apple80211Ref handle, CFArrayRef *list);
-int Apple80211BindToInterface(Apple80211Ref handle,
- CFStringRef interface);
-int Apple80211GetInterfaceNameCopy(Apple80211Ref handle,
- CFStringRef *name);
-int Apple80211GetInfoCopy(Apple80211Ref handle,
- CFDictionaryRef *info);
-int Apple80211GetPower(Apple80211Ref handle, char *pwr);
-int Apple80211SetPower(Apple80211Ref handle, char pwr);
-
-/* parameters can be NULL; returns scan results in CFArrayRef *list;
- * caller will need to free with CFRelease() */
-int Apple80211Scan(Apple80211Ref handle, CFArrayRef *list,
- CFDictionaryRef parameters);
-
-int Apple80211Associate(Apple80211Ref handle, CFDictionaryRef bss,
- CFStringRef password);
-int Apple80211AssociateAndCopyInfo(Apple80211Ref handle, CFDictionaryRef bss,
- CFStringRef password,
- CFDictionaryRef *info);
-
-enum {
- APPLE80211_VALUE_SSID = 1,
- APPLE80211_VALUE_BSSID = 9
-};
-
-int Apple80211CopyValue(Apple80211Ref handle, int field, CFDictionaryRef arg2,
- void *value);
-
-#endif /* MOBILEAPPLE80211_H */
diff --git a/src/drivers/driver_broadcom.c b/src/drivers/driver_broadcom.c
deleted file mode 100644
index cb88543..0000000
--- a/src/drivers/driver_broadcom.c
+++ /dev/null
@@ -1,599 +0,0 @@
-/*
- * WPA Supplicant - driver interaction with old Broadcom wl.o driver
- * Copyright (c) 2004, Nikki Chumkov <nikki@gattaca.ru>
- * Copyright (c) 2004, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- *
- * Please note that the newer Broadcom driver ("hybrid Linux driver") supports
- * Linux wireless extensions and does not need (or even work) with this old
- * driver wrapper. Use driver_wext.c with that driver.
- */
-
-#include "includes.h"
-
-#include <sys/ioctl.h>
-
-#include "common.h"
-
-#if 0
-#include <netpacket/packet.h>
-#include <net/ethernet.h> /* the L2 protocols */
-#else
-#include <linux/if_packet.h>
-#include <linux/if_ether.h> /* The L2 protocols */
-#endif
-#include <net/if.h>
-#include <typedefs.h>
-
-/* wlioctl.h is a Broadcom header file and it is available, e.g., from Linksys
- * WRT54G GPL tarball. */
-#include <wlioctl.h>
-
-#include "driver.h"
-#include "eloop.h"
-
-struct wpa_driver_broadcom_data {
- void *ctx;
- int ioctl_sock;
- int event_sock;
- char ifname[IFNAMSIZ + 1];
-};
-
-
-#ifndef WLC_DEAUTHENTICATE
-#define WLC_DEAUTHENTICATE 143
-#endif
-#ifndef WLC_DEAUTHENTICATE_WITH_REASON
-#define WLC_DEAUTHENTICATE_WITH_REASON 201
-#endif
-#ifndef WLC_SET_TKIP_COUNTERMEASURES
-#define WLC_SET_TKIP_COUNTERMEASURES 202
-#endif
-
-#if !defined(PSK_ENABLED) /* NEW driver interface */
-#define WL_VERSION 360130
-/* wireless authentication bit vector */
-#define WPA_ENABLED 1
-#define PSK_ENABLED 2
-
-#define WAUTH_WPA_ENABLED(wauth) ((wauth) & WPA_ENABLED)
-#define WAUTH_PSK_ENABLED(wauth) ((wauth) & PSK_ENABLED)
-#define WAUTH_ENABLED(wauth) ((wauth) & (WPA_ENABLED | PSK_ENABLED))
-
-#define WSEC_PRIMARY_KEY WL_PRIMARY_KEY
-
-typedef wl_wsec_key_t wsec_key_t;
-#endif
-
-typedef struct {
- uint32 val;
- struct ether_addr ea;
- uint16 res;
-} wlc_deauth_t;
-
-
-static void wpa_driver_broadcom_scan_timeout(void *eloop_ctx,
- void *timeout_ctx);
-
-static int broadcom_ioctl(struct wpa_driver_broadcom_data *drv, int cmd,
- void *buf, int len)
-{
- struct ifreq ifr;
- wl_ioctl_t ioc;
- int ret = 0;
-
- wpa_printf(MSG_MSGDUMP, "BROADCOM: wlioctl(%s,%d,len=%d,val=%p)",
- drv->ifname, cmd, len, buf);
- /* wpa_hexdump(MSG_MSGDUMP, "BROADCOM: wlioctl buf", buf, len); */
-
- ioc.cmd = cmd;
- ioc.buf = buf;
- ioc.len = len;
- os_strlcpy(ifr.ifr_name, drv->ifname, IFNAMSIZ);
- ifr.ifr_data = (caddr_t) &ioc;
- if ((ret = ioctl(drv->ioctl_sock, SIOCDEVPRIVATE, &ifr)) < 0) {
- if (cmd != WLC_GET_MAGIC)
- perror(ifr.ifr_name);
- wpa_printf(MSG_MSGDUMP, "BROADCOM: wlioctl cmd=%d res=%d",
- cmd, ret);
- }
-
- return ret;
-}
-
-static int wpa_driver_broadcom_get_bssid(void *priv, u8 *bssid)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- if (broadcom_ioctl(drv, WLC_GET_BSSID, bssid, ETH_ALEN) == 0)
- return 0;
-
- os_memset(bssid, 0, ETH_ALEN);
- return -1;
-}
-
-static int wpa_driver_broadcom_get_ssid(void *priv, u8 *ssid)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- wlc_ssid_t s;
-
- if (broadcom_ioctl(drv, WLC_GET_SSID, &s, sizeof(s)) == -1)
- return -1;
-
- os_memcpy(ssid, s.SSID, s.SSID_len);
- return s.SSID_len;
-}
-
-static int wpa_driver_broadcom_set_wpa(void *priv, int enable)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- unsigned int wauth, wsec;
- struct ether_addr ea;
-
- os_memset(&ea, enable ? 0xff : 0, sizeof(ea));
- if (broadcom_ioctl(drv, WLC_GET_WPA_AUTH, &wauth, sizeof(wauth)) ==
- -1 ||
- broadcom_ioctl(drv, WLC_GET_WSEC, &wsec, sizeof(wsec)) == -1)
- return -1;
-
- if (enable) {
- wauth = PSK_ENABLED;
- wsec = TKIP_ENABLED;
- } else {
- wauth = 255;
- wsec &= ~(TKIP_ENABLED | AES_ENABLED);
- }
-
- if (broadcom_ioctl(drv, WLC_SET_WPA_AUTH, &wauth, sizeof(wauth)) ==
- -1 ||
- broadcom_ioctl(drv, WLC_SET_WSEC, &wsec, sizeof(wsec)) == -1)
- return -1;
-
- /* FIX: magic number / error handling? */
- broadcom_ioctl(drv, 122, &ea, sizeof(ea));
-
- return 0;
-}
-
-static int wpa_driver_broadcom_set_key(const char *ifname, void *priv,
- enum wpa_alg alg,
- const u8 *addr, int key_idx, int set_tx,
- const u8 *seq, size_t seq_len,
- const u8 *key, size_t key_len)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- int ret;
- wsec_key_t wkt;
-
- os_memset(&wkt, 0, sizeof wkt);
- wpa_printf(MSG_MSGDUMP, "BROADCOM: SET %sKEY[%d] alg=%d",
- set_tx ? "PRIMARY " : "", key_idx, alg);
- if (key && key_len > 0)
- wpa_hexdump_key(MSG_MSGDUMP, "BROADCOM: key", key, key_len);
-
- switch (alg) {
- case WPA_ALG_NONE:
- wkt.algo = CRYPTO_ALGO_OFF;
- break;
- case WPA_ALG_WEP:
- wkt.algo = CRYPTO_ALGO_WEP128; /* CRYPTO_ALGO_WEP1? */
- break;
- case WPA_ALG_TKIP:
- wkt.algo = 0; /* CRYPTO_ALGO_TKIP? */
- break;
- case WPA_ALG_CCMP:
- wkt.algo = 0; /* CRYPTO_ALGO_AES_CCM;
- * AES_OCB_MSDU, AES_OCB_MPDU? */
- break;
- default:
- wkt.algo = CRYPTO_ALGO_NALG;
- break;
- }
-
- if (seq && seq_len > 0)
- wpa_hexdump(MSG_MSGDUMP, "BROADCOM: SEQ", seq, seq_len);
-
- if (addr)
- wpa_hexdump(MSG_MSGDUMP, "BROADCOM: addr", addr, ETH_ALEN);
-
- wkt.index = key_idx;
- wkt.len = key_len;
- if (key && key_len > 0) {
- os_memcpy(wkt.data, key, key_len);
- if (key_len == 32) {
- /* hack hack hack XXX */
- os_memcpy(&wkt.data[16], &key[24], 8);
- os_memcpy(&wkt.data[24], &key[16], 8);
- }
- }
- /* wkt.algo = CRYPTO_ALGO_...; */
- wkt.flags = set_tx ? 0 : WSEC_PRIMARY_KEY;
- if (addr && set_tx)
- os_memcpy(&wkt.ea, addr, sizeof(wkt.ea));
- ret = broadcom_ioctl(drv, WLC_SET_KEY, &wkt, sizeof(wkt));
- if (addr && set_tx) {
- /* FIX: magic number / error handling? */
- broadcom_ioctl(drv, 121, &wkt.ea, sizeof(wkt.ea));
- }
- return ret;
-}
-
-
-static void wpa_driver_broadcom_event_receive(int sock, void *ctx,
- void *sock_ctx)
-{
- char buf[8192];
- int left;
- wl_wpa_header_t *wwh;
- union wpa_event_data data;
- u8 *resp_ies = NULL;
-
- if ((left = recv(sock, buf, sizeof buf, 0)) < 0)
- return;
-
- wpa_hexdump(MSG_DEBUG, "RECEIVE EVENT", (u8 *) buf, left);
-
- if ((size_t) left < sizeof(wl_wpa_header_t))
- return;
-
- wwh = (wl_wpa_header_t *) buf;
-
- if (wwh->snap.type != WL_WPA_ETHER_TYPE)
- return;
- if (os_memcmp(&wwh->snap, wl_wpa_snap_template, 6) != 0)
- return;
-
- os_memset(&data, 0, sizeof(data));
-
- switch (wwh->type) {
- case WLC_ASSOC_MSG:
- left -= WL_WPA_HEADER_LEN;
- wpa_printf(MSG_DEBUG, "BROADCOM: ASSOC MESSAGE (left: %d)",
- left);
- if (left > 0) {
- resp_ies = os_malloc(left);
- if (resp_ies == NULL)
- return;
- os_memcpy(resp_ies, buf + WL_WPA_HEADER_LEN, left);
- data.assoc_info.resp_ies = resp_ies;
- data.assoc_info.resp_ies_len = left;
- }
-
- wpa_supplicant_event(ctx, EVENT_ASSOC, &data);
- os_free(resp_ies);
- break;
- case WLC_DISASSOC_MSG:
- wpa_printf(MSG_DEBUG, "BROADCOM: DISASSOC MESSAGE");
- wpa_supplicant_event(ctx, EVENT_DISASSOC, NULL);
- break;
- case WLC_PTK_MIC_MSG:
- wpa_printf(MSG_DEBUG, "BROADCOM: PTK MIC MSG MESSAGE");
- data.michael_mic_failure.unicast = 1;
- wpa_supplicant_event(ctx, EVENT_MICHAEL_MIC_FAILURE, &data);
- break;
- case WLC_GTK_MIC_MSG:
- wpa_printf(MSG_DEBUG, "BROADCOM: GTK MIC MSG MESSAGE");
- data.michael_mic_failure.unicast = 0;
- wpa_supplicant_event(ctx, EVENT_MICHAEL_MIC_FAILURE, &data);
- break;
- default:
- wpa_printf(MSG_DEBUG, "BROADCOM: UNKNOWN MESSAGE (%d)",
- wwh->type);
- break;
- }
-}
-
-static void * wpa_driver_broadcom_init(void *ctx, const char *ifname)
-{
- int s;
- struct sockaddr_ll ll;
- struct wpa_driver_broadcom_data *drv;
- struct ifreq ifr;
-
- /* open socket to kernel */
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- perror("socket");
- return NULL;
- }
- /* do it */
- os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
- if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
- perror(ifr.ifr_name);
- return NULL;
- }
-
-
- drv = os_zalloc(sizeof(*drv));
- if (drv == NULL)
- return NULL;
- drv->ctx = ctx;
- os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
- drv->ioctl_sock = s;
-
- s = socket(PF_PACKET, SOCK_RAW, ntohs(ETH_P_802_2));
- if (s < 0) {
- perror("socket(PF_PACKET, SOCK_RAW, ntohs(ETH_P_802_2))");
- close(drv->ioctl_sock);
- os_free(drv);
- return NULL;
- }
-
- os_memset(&ll, 0, sizeof(ll));
- ll.sll_family = AF_PACKET;
- ll.sll_protocol = ntohs(ETH_P_802_2);
- ll.sll_ifindex = ifr.ifr_ifindex;
- ll.sll_hatype = 0;
- ll.sll_pkttype = PACKET_HOST;
- ll.sll_halen = 0;
-
- if (bind(s, (struct sockaddr *) &ll, sizeof(ll)) < 0) {
- perror("bind(netlink)");
- close(s);
- close(drv->ioctl_sock);
- os_free(drv);
- return NULL;
- }
-
- eloop_register_read_sock(s, wpa_driver_broadcom_event_receive, ctx,
- NULL);
- drv->event_sock = s;
- wpa_driver_broadcom_set_wpa(drv, 1);
-
- return drv;
-}
-
-static void wpa_driver_broadcom_deinit(void *priv)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- wpa_driver_broadcom_set_wpa(drv, 0);
- eloop_cancel_timeout(wpa_driver_broadcom_scan_timeout, drv, drv->ctx);
- eloop_unregister_read_sock(drv->event_sock);
- close(drv->event_sock);
- close(drv->ioctl_sock);
- os_free(drv);
-}
-
-static int wpa_driver_broadcom_set_countermeasures(void *priv,
- int enabled)
-{
-#if 0
- struct wpa_driver_broadcom_data *drv = priv;
- /* FIX: ? */
- return broadcom_ioctl(drv, WLC_SET_TKIP_COUNTERMEASURES, &enabled,
- sizeof(enabled));
-#else
- return 0;
-#endif
-}
-
-static int wpa_driver_broadcom_set_drop_unencrypted(void *priv, int enabled)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- /* SET_EAP_RESTRICT, SET_WEP_RESTRICT */
- int _restrict = (enabled ? 1 : 0);
-
- if (broadcom_ioctl(drv, WLC_SET_WEP_RESTRICT,
- &_restrict, sizeof(_restrict)) < 0 ||
- broadcom_ioctl(drv, WLC_SET_EAP_RESTRICT,
- &_restrict, sizeof(_restrict)) < 0)
- return -1;
-
- return 0;
-}
-
-static void wpa_driver_broadcom_scan_timeout(void *eloop_ctx,
- void *timeout_ctx)
-{
- wpa_printf(MSG_DEBUG, "Scan timeout - try to get results");
- wpa_supplicant_event(timeout_ctx, EVENT_SCAN_RESULTS, NULL);
-}
-
-static int wpa_driver_broadcom_scan(void *priv,
- struct wpa_driver_scan_params *params)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- wlc_ssid_t wst = { 0, "" };
- const u8 *ssid = params->ssids[0].ssid;
- size_t ssid_len = params->ssids[0].ssid_len;
-
- if (ssid && ssid_len > 0 && ssid_len <= sizeof(wst.SSID)) {
- wst.SSID_len = ssid_len;
- os_memcpy(wst.SSID, ssid, ssid_len);
- }
-
- if (broadcom_ioctl(drv, WLC_SCAN, &wst, sizeof(wst)) < 0)
- return -1;
-
- eloop_cancel_timeout(wpa_driver_broadcom_scan_timeout, drv, drv->ctx);
- eloop_register_timeout(3, 0, wpa_driver_broadcom_scan_timeout, drv,
- drv->ctx);
- return 0;
-}
-
-
-static const int frequency_list[] = {
- 2412, 2417, 2422, 2427, 2432, 2437, 2442,
- 2447, 2452, 2457, 2462, 2467, 2472, 2484
-};
-
-struct bss_ie_hdr {
- u8 elem_id;
- u8 len;
- u8 oui[3];
- /* u8 oui_type; */
- /* u16 version; */
-} __attribute__ ((packed));
-
-static struct wpa_scan_results *
-wpa_driver_broadcom_get_scan_results(void *priv)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- char *buf;
- wl_scan_results_t *wsr;
- wl_bss_info_t *wbi;
- size_t ap_num;
- struct wpa_scan_results *res;
-
- buf = os_malloc(WLC_IOCTL_MAXLEN);
- if (buf == NULL)
- return NULL;
-
- wsr = (wl_scan_results_t *) buf;
-
- wsr->buflen = WLC_IOCTL_MAXLEN - sizeof(wsr);
- wsr->version = 107;
- wsr->count = 0;
-
- if (broadcom_ioctl(drv, WLC_SCAN_RESULTS, buf, WLC_IOCTL_MAXLEN) < 0) {
- os_free(buf);
- return NULL;
- }
-
- res = os_zalloc(sizeof(*res));
- if (res == NULL) {
- os_free(buf);
- return NULL;
- }
-
- res->res = os_zalloc(wsr->count * sizeof(struct wpa_scan_res *));
- if (res->res == NULL) {
- os_free(res);
- os_free(buf);
- return NULL;
- }
-
- for (ap_num = 0, wbi = wsr->bss_info; ap_num < wsr->count; ++ap_num) {
- struct wpa_scan_res *r;
- r = os_malloc(sizeof(*r) + wbi->ie_length);
- if (r == NULL)
- break;
- res->res[res->num++] = r;
-
- os_memcpy(r->bssid, &wbi->BSSID, ETH_ALEN);
- r->freq = frequency_list[wbi->channel - 1];
- /* get ie's */
- os_memcpy(r + 1, wbi + 1, wbi->ie_length);
- r->ie_len = wbi->ie_length;
-
- wbi = (wl_bss_info_t *) ((u8 *) wbi + wbi->length);
- }
-
- wpa_printf(MSG_MSGDUMP, "Received %d bytes of scan results (%lu "
- "BSSes)",
- wsr->buflen, (unsigned long) ap_num);
-
- os_free(buf);
- return res;
- }
-
-static int wpa_driver_broadcom_deauthenticate(void *priv, const u8 *addr,
- int reason_code)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- wlc_deauth_t wdt;
- wdt.val = reason_code;
- os_memcpy(&wdt.ea, addr, sizeof wdt.ea);
- wdt.res = 0x7fff;
- return broadcom_ioctl(drv, WLC_DEAUTHENTICATE_WITH_REASON, &wdt,
- sizeof(wdt));
-}
-
-static int wpa_driver_broadcom_disassociate(void *priv, const u8 *addr,
- int reason_code)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- return broadcom_ioctl(drv, WLC_DISASSOC, NULL, 0);
-}
-
-static int
-wpa_driver_broadcom_associate(void *priv,
- struct wpa_driver_associate_params *params)
-{
- struct wpa_driver_broadcom_data *drv = priv;
- wlc_ssid_t s;
- int infra = 1;
- int auth = 0;
- int wsec = 4;
- int dummy;
- int wpa_auth;
- int ret;
-
- ret = wpa_driver_broadcom_set_drop_unencrypted(
- drv, params->drop_unencrypted);
-
- s.SSID_len = params->ssid_len;
- os_memcpy(s.SSID, params->ssid, params->ssid_len);
-
- switch (params->pairwise_suite) {
- case CIPHER_WEP40:
- case CIPHER_WEP104:
- wsec = 1;
- break;
-
- case CIPHER_TKIP:
- wsec = 2;
- break;
-
- case CIPHER_CCMP:
- wsec = 4;
- break;
-
- default:
- wsec = 0;
- break;
- }
-
- switch (params->key_mgmt_suite) {
- case KEY_MGMT_802_1X:
- wpa_auth = 1;
- break;
-
- case KEY_MGMT_PSK:
- wpa_auth = 2;
- break;
-
- default:
- wpa_auth = 255;
- break;
- }
-
- /* printf("broadcom_associate: %u %u %u\n", pairwise_suite,
- * group_suite, key_mgmt_suite);
- * broadcom_ioctl(ifname, WLC_GET_WSEC, &wsec, sizeof(wsec));
- * wl join uses wlc_sec_wep here, not wlc_set_wsec */
-
- if (broadcom_ioctl(drv, WLC_SET_WSEC, &wsec, sizeof(wsec)) < 0 ||
- broadcom_ioctl(drv, WLC_SET_WPA_AUTH, &wpa_auth,
- sizeof(wpa_auth)) < 0 ||
- broadcom_ioctl(drv, WLC_GET_WEP, &dummy, sizeof(dummy)) < 0 ||
- broadcom_ioctl(drv, WLC_SET_INFRA, &infra, sizeof(infra)) < 0 ||
- broadcom_ioctl(drv, WLC_SET_AUTH, &auth, sizeof(auth)) < 0 ||
- broadcom_ioctl(drv, WLC_SET_WEP, &wsec, sizeof(wsec)) < 0 ||
- broadcom_ioctl(drv, WLC_SET_SSID, &s, sizeof(s)) < 0)
- return -1;
-
- return ret;
-}
-
-const struct wpa_driver_ops wpa_driver_broadcom_ops = {
- .name = "broadcom",
- .desc = "Broadcom wl.o driver",
- .get_bssid = wpa_driver_broadcom_get_bssid,
- .get_ssid = wpa_driver_broadcom_get_ssid,
- .set_key = wpa_driver_broadcom_set_key,
- .init = wpa_driver_broadcom_init,
- .deinit = wpa_driver_broadcom_deinit,
- .set_countermeasures = wpa_driver_broadcom_set_countermeasures,
- .scan2 = wpa_driver_broadcom_scan,
- .get_scan_results2 = wpa_driver_broadcom_get_scan_results,
- .deauthenticate = wpa_driver_broadcom_deauthenticate,
- .disassociate = wpa_driver_broadcom_disassociate,
- .associate = wpa_driver_broadcom_associate,
-};
diff --git a/src/drivers/driver_iphone.m b/src/drivers/driver_iphone.m
deleted file mode 100644
index 8213fda..0000000
--- a/src/drivers/driver_iphone.m
+++ /dev/null
@@ -1,466 +0,0 @@
-/*
- * WPA Supplicant - iPhone/iPod touch Apple80211 driver interface
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#include "includes.h"
-#define Boolean __DummyBoolean
-#include <CoreFoundation/CoreFoundation.h>
-#undef Boolean
-
-#include "common.h"
-#include "driver.h"
-#include "eloop.h"
-#include "common/ieee802_11_defs.h"
-
-#include "MobileApple80211.h"
-
-struct wpa_driver_iphone_data {
- void *ctx;
- Apple80211Ref wireless_ctx;
- CFArrayRef scan_results;
- int ctrl_power;
-};
-
-
-static const void * cfdict_get_key_str(CFDictionaryRef dict, const char *key)
-{
- const void *res;
- CFStringRef str = CFStringCreateWithCString(kCFAllocatorDefault, key,
- kCFStringEncodingMacRoman);
- if (str == NULL)
- return NULL;
-
- res = CFDictionaryGetValue(dict, str);
- CFRelease(str);
- return res;
-}
-
-
-static int wpa_driver_iphone_get_ssid(void *priv, u8 *ssid)
-{
- struct wpa_driver_iphone_data *drv = priv;
- CFDataRef data;
- int err, len;
-
- err = Apple80211CopyValue(drv->wireless_ctx, APPLE80211_VALUE_SSID, 0,
- &data);
- if (err != 0) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211CopyValue(SSID) "
- "failed: %d", err);
- return -1;
- }
-
- len = CFDataGetLength(data);
- if (len > 32) {
- CFRelease(data);
- return -1;
- }
- os_memcpy(ssid, CFDataGetBytePtr(data), len);
- CFRelease(data);
-
- return len;
-}
-
-
-static int wpa_driver_iphone_get_bssid(void *priv, u8 *bssid)
-{
- struct wpa_driver_iphone_data *drv = priv;
- CFStringRef data;
- int err;
- int a1, a2, a3, a4, a5, a6;
-
- err = Apple80211CopyValue(drv->wireless_ctx, APPLE80211_VALUE_BSSID, 0,
- &data);
- if (err != 0) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211CopyValue(BSSID) "
- "failed: %d", err);
- return -1;
- }
-
- sscanf(CFStringGetCStringPtr(data, kCFStringEncodingMacRoman),
- "%x:%x:%x:%x:%x:%x", &a1, &a2, &a3, &a4, &a5, &a6);
- bssid[0] = a1;
- bssid[1] = a2;
- bssid[2] = a3;
- bssid[3] = a4;
- bssid[4] = a5;
- bssid[5] = a6;
-
- CFRelease(data);
-
- return 0;
-}
-
-
-static void wpa_driver_iphone_scan_timeout(void *eloop_ctx, void *timeout_ctx)
-{
- wpa_supplicant_event(timeout_ctx, EVENT_SCAN_RESULTS, NULL);
-}
-
-
-static int wpa_driver_iphone_scan(void *priv, const u8 *ssid, size_t ssid_len)
-{
- struct wpa_driver_iphone_data *drv = priv;
- int err;
-
- if (drv->scan_results) {
- CFRelease(drv->scan_results);
- drv->scan_results = NULL;
- }
-
- err = Apple80211Scan(drv->wireless_ctx, &drv->scan_results, NULL);
- if (err) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211Scan failed: %d",
- err);
- return -1;
- }
-
- eloop_register_timeout(0, 0, wpa_driver_iphone_scan_timeout, drv,
- drv->ctx);
- return 0;
-}
-
-
-static int wpa_driver_iphone_get_scan_results(void *priv,
- struct wpa_scan_result *results,
- size_t max_size)
-{
- struct wpa_driver_iphone_data *drv = priv;
- size_t i, num;
-
- if (drv->scan_results == NULL)
- return 0;
-
- num = CFArrayGetCount(drv->scan_results);
- if (num > max_size)
- num = max_size;
- os_memset(results, 0, num * sizeof(struct wpa_scan_result));
-
- for (i = 0; i < num; i++) {
- struct wpa_scan_result *res = &results[i];
- CFDictionaryRef dict =
- CFArrayGetValueAtIndex(drv->scan_results, i);
- CFDataRef data;
- CFStringRef str;
- CFNumberRef num;
- int val;
-
- data = cfdict_get_key_str(dict, "SSID");
- if (data) {
- res->ssid_len = CFDataGetLength(data);
- if (res->ssid_len > 32)
- res->ssid_len = 32;
- os_memcpy(res->ssid, CFDataGetBytePtr(data),
- res->ssid_len);
- }
-
- str = cfdict_get_key_str(dict, "BSSID");
- if (str) {
- int a1, a2, a3, a4, a5, a6;
- sscanf(CFStringGetCStringPtr(
- str, kCFStringEncodingMacRoman),
- "%x:%x:%x:%x:%x:%x",
- &a1, &a2, &a3, &a4, &a5, &a6);
- res->bssid[0] = a1;
- res->bssid[1] = a2;
- res->bssid[2] = a3;
- res->bssid[3] = a4;
- res->bssid[4] = a5;
- res->bssid[5] = a6;
- }
-
- num = cfdict_get_key_str(dict, "CAPABILITIES");
- if (num) {
- if (CFNumberGetValue(num, kCFNumberSInt32Type, &val))
- res->caps = val;
- }
-
- num = cfdict_get_key_str(dict, "CHANNEL");
- if (num) {
- if (CFNumberGetValue(num, kCFNumberSInt32Type, &val))
- res->freq = 2407 + val * 5;
- }
-
- num = cfdict_get_key_str(dict, "RSSI");
- if (num) {
- if (CFNumberGetValue(num, kCFNumberSInt32Type, &val))
- res->level = val;
- }
-
- num = cfdict_get_key_str(dict, "NOISE");
- if (num) {
- if (CFNumberGetValue(num, kCFNumberSInt32Type, &val))
- res->noise = val;
- }
-
- data = cfdict_get_key_str(dict, "IE");
- if (data) {
- u8 *ptr = (u8 *) CFDataGetBytePtr(data);
- int len = CFDataGetLength(data);
- u8 *pos = ptr, *end = ptr + len;
-
- while (pos + 2 < end) {
- if (pos + 2 + pos[1] > end)
- break;
- if (pos[0] == WLAN_EID_RSN &&
- pos[1] <= SSID_MAX_WPA_IE_LEN) {
- os_memcpy(res->rsn_ie, pos,
- 2 + pos[1]);
- res->rsn_ie_len = 2 + pos[1];
- }
- if (pos[0] == WLAN_EID_VENDOR_SPECIFIC &&
- pos[1] > 4 && pos[2] == 0x00 &&
- pos[3] == 0x50 && pos[4] == 0xf2 &&
- pos[5] == 0x01) {
- os_memcpy(res->wpa_ie, pos,
- 2 + pos[1]);
- res->wpa_ie_len = 2 + pos[1];
- }
-
- pos = pos + 2 + pos[1];
- }
- }
- }
-
- return num;
-}
-
-
-static void wpa_driver_iphone_assoc_timeout(void *eloop_ctx, void *timeout_ctx)
-{
- struct wpa_driver_iphone_data *drv = eloop_ctx;
- u8 bssid[ETH_ALEN];
-
- if (wpa_driver_iphone_get_bssid(drv, bssid) != 0) {
- eloop_register_timeout(1, 0, wpa_driver_iphone_assoc_timeout,
- drv, drv->ctx);
- return;
- }
-
- wpa_supplicant_event(timeout_ctx, EVENT_ASSOC, NULL);
-}
-
-
-static int wpa_driver_iphone_associate(
- void *priv, struct wpa_driver_associate_params *params)
-{
- struct wpa_driver_iphone_data *drv = priv;
- int i, num, err;
- size_t ssid_len;
- CFDictionaryRef bss = NULL;
-
- /*
- * TODO: Consider generating parameters instead of just using an entry
- * from scan results in order to support ap_scan=2.
- */
-
- if (drv->scan_results == NULL) {
- wpa_printf(MSG_DEBUG, "iPhone: No scan results - cannot "
- "associate");
- return -1;
- }
-
- num = CFArrayGetCount(drv->scan_results);
-
- for (i = 0; i < num; i++) {
- CFDictionaryRef dict =
- CFArrayGetValueAtIndex(drv->scan_results, i);
- CFDataRef data;
-
- data = cfdict_get_key_str(dict, "SSID");
- if (data == NULL)
- continue;
-
- ssid_len = CFDataGetLength(data);
- if (ssid_len != params->ssid_len ||
- os_memcmp(CFDataGetBytePtr(data), params->ssid, ssid_len)
- != 0)
- continue;
-
- bss = dict;
- break;
- }
-
- if (bss == NULL) {
- wpa_printf(MSG_DEBUG, "iPhone: Could not find SSID from scan "
- "results - cannot associate");
- return -1;
- }
-
- wpa_printf(MSG_DEBUG, "iPhone: Trying to associate with a BSS found "
- "from scan results");
-
- err = Apple80211Associate(drv->wireless_ctx, bss, NULL);
- if (err) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211Associate() failed: "
- "%d", err);
- return -1;
- }
-
- /*
- * Driver is actually already associated; report association from an
- * eloop callback.
- */
- eloop_cancel_timeout(wpa_driver_iphone_assoc_timeout, drv, drv->ctx);
- eloop_register_timeout(0, 0, wpa_driver_iphone_assoc_timeout, drv,
- drv->ctx);
-
- return 0;
-}
-
-
-static int wpa_driver_iphone_set_key(void *priv, wpa_alg alg, const u8 *addr,
- int key_idx, int set_tx, const u8 *seq,
- size_t seq_len, const u8 *key,
- size_t key_len)
-{
- /*
- * TODO: Need to either support configuring PMK for 4-way handshake or
- * PTK for TKIP/CCMP.
- */
- return -1;
-}
-
-
-static int wpa_driver_iphone_get_capa(void *priv, struct wpa_driver_capa *capa)
-{
- os_memset(capa, 0, sizeof(*capa));
-
- capa->key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA |
- WPA_DRIVER_CAPA_KEY_MGMT_WPA2 |
- WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK |
- WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
- capa->enc = WPA_DRIVER_CAPA_ENC_WEP40 | WPA_DRIVER_CAPA_ENC_WEP104 |
- WPA_DRIVER_CAPA_ENC_TKIP | WPA_DRIVER_CAPA_ENC_CCMP;
- capa->auth = WPA_DRIVER_AUTH_OPEN | WPA_DRIVER_AUTH_SHARED |
- WPA_DRIVER_AUTH_LEAP;
- capa->flags = WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
-
- return 0;
-}
-
-
-static void * wpa_driver_iphone_init(void *ctx, const char *ifname)
-{
- struct wpa_driver_iphone_data *drv;
- int err;
- char power;
- CFStringRef name;
- CFDictionaryRef dict;
-
- drv = os_zalloc(sizeof(*drv));
- if (drv == NULL)
- return NULL;
- drv->ctx = ctx;
- err = Apple80211Open(&drv->wireless_ctx);
- if (err) {
- wpa_printf(MSG_ERROR, "iPhone: Apple80211Open failed: %d",
- err);
- os_free(drv);
- return NULL;
- }
-
- name = CFStringCreateWithCString(kCFAllocatorDefault, ifname,
- kCFStringEncodingISOLatin1);
- if (name == NULL) {
- wpa_printf(MSG_ERROR, "iPhone: ifname -> CFString failed");
- Apple80211Close(drv->wireless_ctx);
- os_free(drv);
- return NULL;
- }
-
- err = Apple80211BindToInterface(drv->wireless_ctx, name);
- CFRelease(name);
-
- if (err) {
- wpa_printf(MSG_ERROR, "iPhone: Apple80211BindToInterface "
- "failed: %d", err);
- Apple80211Close(drv->wireless_ctx);
- os_free(drv);
- return NULL;
- }
-
- err = Apple80211GetPower(drv->wireless_ctx, &power);
- if (err)
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211GetPower failed: %d",
- err);
-
- wpa_printf(MSG_DEBUG, "iPhone: Power=%d", power);
-
- if (!power) {
- drv->ctrl_power = 1;
- err = Apple80211SetPower(drv->wireless_ctx, 1);
- if (err) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211SetPower "
- "failed: %d", err);
- Apple80211Close(drv->wireless_ctx);
- os_free(drv);
- return NULL;
- }
- }
-
- err = Apple80211GetInfoCopy(drv->wireless_ctx, &dict);
- if (err == 0) {
- CFShow(dict);
- CFRelease(dict);
- } else {
- printf("Apple80211GetInfoCopy: %d\n", err);
- }
-
- return drv;
-}
-
-
-static void wpa_driver_iphone_deinit(void *priv)
-{
- struct wpa_driver_iphone_data *drv = priv;
- int err;
-
- eloop_cancel_timeout(wpa_driver_iphone_scan_timeout, drv, drv->ctx);
- eloop_cancel_timeout(wpa_driver_iphone_assoc_timeout, drv, drv->ctx);
-
- if (drv->ctrl_power) {
- wpa_printf(MSG_DEBUG, "iPhone: Power down the interface");
- err = Apple80211SetPower(drv->wireless_ctx, 0);
- if (err) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211SetPower(0) "
- "failed: %d", err);
- }
- }
-
- err = Apple80211Close(drv->wireless_ctx);
- if (err) {
- wpa_printf(MSG_DEBUG, "iPhone: Apple80211Close failed: %d",
- err);
- }
-
- if (drv->scan_results)
- CFRelease(drv->scan_results);
-
- os_free(drv);
-}
-
-
-const struct wpa_driver_ops wpa_driver_iphone_ops = {
- .name = "iphone",
- .desc = "iPhone/iPod touch Apple80211 driver",
- .get_ssid = wpa_driver_iphone_get_ssid,
- .get_bssid = wpa_driver_iphone_get_bssid,
- .init = wpa_driver_iphone_init,
- .deinit = wpa_driver_iphone_deinit,
- .scan = wpa_driver_iphone_scan,
- .get_scan_results = wpa_driver_iphone_get_scan_results,
- .associate = wpa_driver_iphone_associate,
- .set_key = wpa_driver_iphone_set_key,
- .get_capa = wpa_driver_iphone_get_capa,
-};
diff --git a/src/drivers/driver_osx.m b/src/drivers/driver_osx.m
deleted file mode 100644
index 69ca4b5..0000000
--- a/src/drivers/driver_osx.m
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- * WPA Supplicant - Mac OS X Apple80211 driver interface
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-#include "includes.h"
-#define Boolean __DummyBoolean
-#include <CoreFoundation/CoreFoundation.h>
-#undef Boolean
-
-#include "common.h"
-#include "driver.h"
-#include "eloop.h"
-#include "common/ieee802_11_defs.h"
-
-#include "Apple80211.h"
-
-struct wpa_driver_osx_data {
- void *ctx;
- WirelessRef wireless_ctx;
- CFArrayRef scan_results;
-};
-
-
-#ifndef CONFIG_NO_STDOUT_DEBUG
-extern int wpa_debug_level;
-
-static void dump_dict_cb(const void *key, const void *value, void *context)
-{
- if (MSG_DEBUG < wpa_debug_level)
- return;
-
- wpa_printf(MSG_DEBUG, "Key:");
- CFShow(key);
- wpa_printf(MSG_DEBUG, "Value:");
- CFShow(value);
-}
-#endif /* CONFIG_NO_STDOUT_DEBUG */
-
-
-static void wpa_driver_osx_dump_dict(CFDictionaryRef dict, const char *title)
-{
-#ifndef CONFIG_NO_STDOUT_DEBUG
- wpa_printf(MSG_DEBUG, "OSX: Dump dictionary %s - %u entries",
- title, (unsigned int) CFDictionaryGetCount(dict));
- CFDictionaryApplyFunction(dict, dump_dict_cb, NULL);
-#endif /* CONFIG_NO_STDOUT_DEBUG */
-}
-
-
-static int wpa_driver_osx_get_ssid(void *priv, u8 *ssid)
-{
- struct wpa_driver_osx_data *drv = priv;
- WirelessError err;
- WirelessInfo info;
- int len;
-
- err = WirelessGetInfo(drv->wireless_ctx, &info);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessGetInfo failed: %d",
- (int) err);
- return -1;
- }
- if (!info.power) {
- wpa_printf(MSG_DEBUG, "OSX: Wireless device power off");
- return -1;
- }
-
- for (len = 0; len < 32; len++)
- if (info.ssid[len] == 0)
- break;
-
- os_memcpy(ssid, info.ssid, len);
- return len;
-}
-
-
-static int wpa_driver_osx_get_bssid(void *priv, u8 *bssid)
-{
- struct wpa_driver_osx_data *drv = priv;
- WirelessError err;
- WirelessInfo info;
-
- err = WirelessGetInfo(drv->wireless_ctx, &info);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessGetInfo failed: %d",
- (int) err);
- return -1;
- }
- if (!info.power) {
- wpa_printf(MSG_DEBUG, "OSX: Wireless device power off");
- return -1;
- }
-
- os_memcpy(bssid, info.bssID, ETH_ALEN);
- return 0;
-}
-
-
-static void wpa_driver_osx_scan_timeout(void *eloop_ctx, void *timeout_ctx)
-{
- wpa_supplicant_event(timeout_ctx, EVENT_SCAN_RESULTS, NULL);
-}
-
-
-static int wpa_driver_osx_scan(void *priv, struct wpa_driver_scan_params *params)
-{
- struct wpa_driver_osx_data *drv = priv;
- WirelessError err;
- const u8 *ssid = params->ssids[0].ssid;
- size_t ssid_len = params->ssids[0].ssid_len;
-
- if (drv->scan_results) {
- CFRelease(drv->scan_results);
- drv->scan_results = NULL;
- }
-
- if (ssid) {
- CFStringRef data;
- data = CFStringCreateWithBytes(kCFAllocatorDefault,
- ssid, ssid_len,
- kCFStringEncodingISOLatin1,
- FALSE);
- if (data == NULL) {
- wpa_printf(MSG_DEBUG, "CFStringCreateWithBytes "
- "failed");
- return -1;
- }
-
- err = WirelessDirectedScan(drv->wireless_ctx,
- &drv->scan_results, 0, data);
- CFRelease(data);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessDirectedScan "
- "failed: 0x%08x", (unsigned int) err);
- return -1;
- }
- } else {
- err = WirelessScan(drv->wireless_ctx, &drv->scan_results, 0);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessScan failed: "
- "0x%08x", (unsigned int) err);
- return -1;
- }
- }
-
- eloop_register_timeout(0, 0, wpa_driver_osx_scan_timeout, drv,
- drv->ctx);
- return 0;
-}
-
-
-static void wpa_driver_osx_add_scan_entry(struct wpa_scan_results *res,
- WirelessNetworkInfo *info)
-{
- struct wpa_scan_res *result, **tmp;
- size_t extra_len;
- u8 *pos;
-
- extra_len = 2 + info->ssid_len;
-
- result = os_zalloc(sizeof(*result) + extra_len);
- if (result == NULL)
- return;
- os_memcpy(result->bssid, info->bssid, ETH_ALEN);
- result->freq = 2407 + info->channel * 5;
- //result->beacon_int =;
- result->caps = info->capability;
- //result->qual = info->signal;
- result->noise = info->noise;
-
- pos = (u8 *)(result + 1);
-
- *pos++ = WLAN_EID_SSID;
- *pos++ = info->ssid_len;
- os_memcpy(pos, info->ssid, info->ssid_len);
- pos += info->ssid_len;
-
- result->ie_len = pos - (u8 *)(result + 1);
-
- tmp = os_realloc(res->res,
- (res->num + 1) * sizeof(struct wpa_scan_res *));
- if (tmp == NULL) {
- os_free(result);
- return;
- }
- tmp[res->num++] = result;
- res->res = tmp;
-}
-
-
-static struct wpa_scan_results * wpa_driver_osx_get_scan_results(void *priv)
-{
- struct wpa_driver_osx_data *drv = priv;
- struct wpa_scan_results *res;
- size_t i, num;
-
- if (drv->scan_results == NULL)
- return 0;
-
- num = CFArrayGetCount(drv->scan_results);
-
- res = os_zalloc(sizeof(*res));
- if (res == NULL)
- return NULL;
-
- for (i = 0; i < num; i++)
- wpa_driver_osx_add_scan_entry(res, (WirelessNetworkInfo *)
- CFDataGetBytePtr(CFArrayGetValueAtIndex(
- drv->scan_results, i)));
-
- return res;
-}
-
-
-static void wpa_driver_osx_assoc_timeout(void *eloop_ctx, void *timeout_ctx)
-{
- struct wpa_driver_osx_data *drv = eloop_ctx;
- u8 bssid[ETH_ALEN];
- CFDictionaryRef ai;
-
- if (wpa_driver_osx_get_bssid(drv, bssid) != 0) {
- eloop_register_timeout(1, 0, wpa_driver_osx_assoc_timeout,
- drv, drv->ctx);
- return;
- }
-
- ai = WirelessGetAssociationInfo(drv->wireless_ctx);
- if (ai) {
- wpa_driver_osx_dump_dict(ai, "WirelessGetAssociationInfo");
- CFRelease(ai);
- } else {
- wpa_printf(MSG_DEBUG, "OSX: Failed to get association info");
- }
-
- wpa_supplicant_event(timeout_ctx, EVENT_ASSOC, NULL);
-}
-
-
-static int wpa_driver_osx_associate(void *priv,
- struct wpa_driver_associate_params *params)
-{
- struct wpa_driver_osx_data *drv = priv;
- WirelessError err;
- CFDataRef ssid;
- CFStringRef key;
- int assoc_type;
-
- ssid = CFDataCreate(kCFAllocatorDefault, params->ssid,
- params->ssid_len);
- if (ssid == NULL)
- return -1;
-
- /* TODO: support for WEP */
- if (params->key_mgmt_suite == KEY_MGMT_PSK) {
- if (params->passphrase == NULL)
- return -1;
- key = CFStringCreateWithCString(kCFAllocatorDefault,
- params->passphrase,
- kCFStringEncodingISOLatin1);
- if (key == NULL) {
- CFRelease(ssid);
- return -1;
- }
- } else
- key = NULL;
-
- if (params->key_mgmt_suite == KEY_MGMT_NONE)
- assoc_type = 0;
- else
- assoc_type = 4;
-
- wpa_printf(MSG_DEBUG, "OSX: WirelessAssociate(type=%d key=%p)",
- assoc_type, key);
- err = WirelessAssociate(drv->wireless_ctx, assoc_type, ssid, key);
- CFRelease(ssid);
- if (key)
- CFRelease(key);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessAssociate failed: 0x%08x",
- (unsigned int) err);
- return -1;
- }
-
- /*
- * Driver is actually already associated; report association from an
- * eloop callback.
- */
- eloop_cancel_timeout(wpa_driver_osx_assoc_timeout, drv, drv->ctx);
- eloop_register_timeout(0, 0, wpa_driver_osx_assoc_timeout, drv,
- drv->ctx);
-
- return 0;
-}
-
-
-static int wpa_driver_osx_set_key(const char *ifname, void *priv,
- enum wpa_alg alg, const u8 *addr,
- int key_idx, int set_tx, const u8 *seq,
- size_t seq_len, const u8 *key,
- size_t key_len)
-{
- struct wpa_driver_osx_data *drv = priv;
- WirelessError err;
-
- if (alg == WPA_ALG_WEP) {
- err = WirelessSetKey(drv->wireless_ctx, 1, key_idx, key_len,
- key);
- if (err != 0) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessSetKey failed: "
- "0x%08x", (unsigned int) err);
- return -1;
- }
-
- return 0;
- }
-
- if (alg == WPA_ALG_PMK) {
- err = WirelessSetWPAKey(drv->wireless_ctx, 1, key_len, key);
- if (err != 0) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessSetWPAKey failed: "
- "0x%08x", (unsigned int) err);
- return -1;
- }
- return 0;
- }
-
- wpa_printf(MSG_DEBUG, "OSX: Unsupported set_key alg %d", alg);
- return -1;
-}
-
-
-static int wpa_driver_osx_get_capa(void *priv, struct wpa_driver_capa *capa)
-{
- os_memset(capa, 0, sizeof(*capa));
-
- capa->key_mgmt = WPA_DRIVER_CAPA_KEY_MGMT_WPA |
- WPA_DRIVER_CAPA_KEY_MGMT_WPA2 |
- WPA_DRIVER_CAPA_KEY_MGMT_WPA_PSK |
- WPA_DRIVER_CAPA_KEY_MGMT_WPA2_PSK;
- capa->enc = WPA_DRIVER_CAPA_ENC_WEP40 | WPA_DRIVER_CAPA_ENC_WEP104 |
- WPA_DRIVER_CAPA_ENC_TKIP | WPA_DRIVER_CAPA_ENC_CCMP;
- capa->auth = WPA_DRIVER_AUTH_OPEN | WPA_DRIVER_AUTH_SHARED |
- WPA_DRIVER_AUTH_LEAP;
- capa->flags = WPA_DRIVER_FLAGS_4WAY_HANDSHAKE;
-
- return 0;
-}
-
-
-static void * wpa_driver_osx_init(void *ctx, const char *ifname)
-{
- struct wpa_driver_osx_data *drv;
- WirelessError err;
- u8 enabled, power;
-
- if (!WirelessIsAvailable()) {
- wpa_printf(MSG_ERROR, "OSX: No wireless interface available");
- return NULL;
- }
-
- drv = os_zalloc(sizeof(*drv));
- if (drv == NULL)
- return NULL;
- drv->ctx = ctx;
- err = WirelessAttach(&drv->wireless_ctx, 0);
- if (err) {
- wpa_printf(MSG_ERROR, "OSX: WirelessAttach failed: %d",
- (int) err);
- os_free(drv);
- return NULL;
- }
-
- err = WirelessGetEnabled(drv->wireless_ctx, &enabled);
- if (err)
- wpa_printf(MSG_DEBUG, "OSX: WirelessGetEnabled failed: 0x%08x",
- (unsigned int) err);
- err = WirelessGetPower(drv->wireless_ctx, &power);
- if (err)
- wpa_printf(MSG_DEBUG, "OSX: WirelessGetPower failed: 0x%08x",
- (unsigned int) err);
-
- wpa_printf(MSG_DEBUG, "OSX: Enabled=%d Power=%d", enabled, power);
-
- if (!enabled) {
- err = WirelessSetEnabled(drv->wireless_ctx, 1);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessSetEnabled failed:"
- " 0x%08x", (unsigned int) err);
- WirelessDetach(drv->wireless_ctx);
- os_free(drv);
- return NULL;
- }
- }
-
- if (!power) {
- err = WirelessSetPower(drv->wireless_ctx, 1);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessSetPower failed: "
- "0x%08x", (unsigned int) err);
- WirelessDetach(drv->wireless_ctx);
- os_free(drv);
- return NULL;
- }
- }
-
- return drv;
-}
-
-
-static void wpa_driver_osx_deinit(void *priv)
-{
- struct wpa_driver_osx_data *drv = priv;
- WirelessError err;
-
- eloop_cancel_timeout(wpa_driver_osx_scan_timeout, drv, drv->ctx);
- eloop_cancel_timeout(wpa_driver_osx_assoc_timeout, drv, drv->ctx);
-
- err = WirelessSetPower(drv->wireless_ctx, 0);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessSetPower(0) failed: "
- "0x%08x", (unsigned int) err);
- }
-
- err = WirelessDetach(drv->wireless_ctx);
- if (err) {
- wpa_printf(MSG_DEBUG, "OSX: WirelessDetach failed: 0x%08x",
- (unsigned int) err);
- }
-
- if (drv->scan_results)
- CFRelease(drv->scan_results);
-
- os_free(drv);
-}
-
-
-const struct wpa_driver_ops wpa_driver_osx_ops = {
- .name = "osx",
- .desc = "Mac OS X Apple80211 driver",
- .get_ssid = wpa_driver_osx_get_ssid,
- .get_bssid = wpa_driver_osx_get_bssid,
- .init = wpa_driver_osx_init,
- .deinit = wpa_driver_osx_deinit,
- .scan2 = wpa_driver_osx_scan,
- .get_scan_results2 = wpa_driver_osx_get_scan_results,
- .associate = wpa_driver_osx_associate,
- .set_key = wpa_driver_osx_set_key,
- .get_capa = wpa_driver_osx_get_capa,
-};
diff --git a/src/drivers/driver_ralink.c b/src/drivers/driver_ralink.c
deleted file mode 100644
index a1e27be..0000000
--- a/src/drivers/driver_ralink.c
+++ /dev/null
@@ -1,1498 +0,0 @@
-/*
- * WPA Supplicant - driver interaction with Ralink Wireless Client
- * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>
- * Copyright (c) 2007, Snowpin Lee <snowpin_lee@ralinktech.com.tw>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- *
- */
-
-#include "includes.h"
-#include <sys/ioctl.h>
-
-#include "wireless_copy.h"
-#include "common.h"
-#include "driver.h"
-#include "l2_packet/l2_packet.h"
-#include "eloop.h"
-#include "common/ieee802_11_defs.h"
-#include "priv_netlink.h"
-#include "netlink.h"
-#include "linux_ioctl.h"
-#include "driver_ralink.h"
-
-static void wpa_driver_ralink_scan_timeout(void *eloop_ctx, void *timeout_ctx);
-
-#define MAX_SSID_LEN 32
-
-struct wpa_driver_ralink_data {
- void *ctx;
- int ioctl_sock;
- struct netlink_data *netlink;
- char ifname[IFNAMSIZ + 1];
- u8 *assoc_req_ies;
- size_t assoc_req_ies_len;
- u8 *assoc_resp_ies;
- size_t assoc_resp_ies_len;
- int no_of_pmkid;
- struct ndis_pmkid_entry *pmkid;
- int we_version_compiled;
- int ap_scan;
- int scanning_done;
- u8 g_driver_down;
- BOOLEAN bAddWepKey;
-};
-
-static int ralink_set_oid(struct wpa_driver_ralink_data *drv,
- unsigned short oid, char *data, int len)
-{
- char *buf;
- struct iwreq iwr;
-
- buf = os_zalloc(len);
- if (buf == NULL)
- return -1;
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- iwr.u.data.flags = oid;
- iwr.u.data.flags |= OID_GET_SET_TOGGLE;
-
- if (data)
- os_memcpy(buf, data, len);
-
- iwr.u.data.pointer = (caddr_t) buf;
- iwr.u.data.length = len;
-
- if (ioctl(drv->ioctl_sock, RT_PRIV_IOCTL, &iwr) < 0) {
- wpa_printf(MSG_DEBUG, "%s: oid=0x%x len (%d) failed",
- __func__, oid, len);
- os_free(buf);
- return -1;
- }
- os_free(buf);
- return 0;
-}
-
-static int
-ralink_get_new_driver_flag(struct wpa_driver_ralink_data *drv)
-{
- struct iwreq iwr;
- UCHAR enabled = 0;
-
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- iwr.u.data.pointer = (UCHAR*) &enabled;
- iwr.u.data.flags = RT_OID_NEW_DRIVER;
-
- if (ioctl(drv->ioctl_sock, RT_PRIV_IOCTL, &iwr) < 0) {
- wpa_printf(MSG_DEBUG, "%s: failed", __func__);
- return 0;
- }
-
- return (enabled == 1) ? 1 : 0;
-}
-
-static int wpa_driver_ralink_get_bssid(void *priv, u8 *bssid)
-{
- struct wpa_driver_ralink_data *drv = priv;
- struct iwreq iwr;
- int ret = 0;
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-
- if (ioctl(drv->ioctl_sock, SIOCGIWAP, &iwr) < 0) {
- perror("ioctl[SIOCGIWAP]");
- ret = -1;
- }
- os_memcpy(bssid, iwr.u.ap_addr.sa_data, ETH_ALEN);
-
- return ret;
-}
-
-static int wpa_driver_ralink_get_ssid(void *priv, u8 *ssid)
-{
- struct wpa_driver_ralink_data *drv = priv;
-#if 0
- struct wpa_supplicant *wpa_s = drv->ctx;
- struct wpa_ssid *entry;
-#endif
- int ssid_len;
- u8 bssid[ETH_ALEN];
- u8 ssid_str[MAX_SSID_LEN];
- struct iwreq iwr;
-#if 0
- int result = 0;
-#endif
- int ret = 0;
-#if 0
- BOOLEAN ieee8021x_mode = FALSE;
- BOOLEAN ieee8021x_required_key = FALSE;
-#endif
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- iwr.u.essid.pointer = (caddr_t) ssid;
- iwr.u.essid.length = 32;
-
- if (ioctl(drv->ioctl_sock, SIOCGIWESSID, &iwr) < 0) {
- perror("ioctl[SIOCGIWESSID]");
- ret = -1;
- } else
- ret = iwr.u.essid.length;
-
- if (ret <= 0)
- return ret;
-
- ssid_len = ret;
- os_memset(ssid_str, 0, MAX_SSID_LEN);
- os_memcpy(ssid_str, ssid, ssid_len);
-
- if (drv->ap_scan == 0) {
- /* Read BSSID form driver */
- if (wpa_driver_ralink_get_bssid(priv, bssid) < 0) {
- wpa_printf(MSG_WARNING, "Could not read BSSID from "
- "driver.");
- return ret;
- }
-
-#if 0
- entry = wpa_s->conf->ssid;
- while (entry) {
- if (!entry->disabled && ssid_len == entry->ssid_len &&
- os_memcmp(ssid_str, entry->ssid, ssid_len) == 0 &&
- (!entry->bssid_set ||
- os_memcmp(bssid, entry->bssid, ETH_ALEN) == 0)) {
- /* match the config of driver */
- result = 1;
- break;
- }
- entry = entry->next;
- }
-
- if (result) {
- wpa_printf(MSG_DEBUG, "Ready to set 802.1x mode and "
- "ieee_required_keys parameters to driver");
-
- /* set 802.1x mode and ieee_required_keys parameter */
- if (entry->key_mgmt == WPA_KEY_MGMT_IEEE8021X_NO_WPA) {
- if ((entry->eapol_flags & (EAPOL_FLAG_REQUIRE_KEY_UNICAST | EAPOL_FLAG_REQUIRE_KEY_BROADCAST)))
- ieee8021x_required_key = TRUE;
- ieee8021x_mode = TRUE;
- }
-
- if (ralink_set_oid(drv, OID_802_11_SET_IEEE8021X, (char *) &ieee8021x_mode, sizeof(BOOLEAN)) < 0)
- {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set OID_802_11_SET_IEEE8021X(%d)", (int) ieee8021x_mode);
- }
- else
- {
- wpa_printf(MSG_DEBUG, "ieee8021x_mode is %s", ieee8021x_mode ? "TRUE" : "FALSE");
- }
-
- if (ralink_set_oid(drv, OID_802_11_SET_IEEE8021X_REQUIRE_KEY, (char *) &ieee8021x_required_key, sizeof(BOOLEAN)) < 0)
- {
- wpa_printf(MSG_DEBUG, "ERROR: Failed to set OID_802_11_SET_IEEE8021X_REQUIRE_KEY(%d)", (int) ieee8021x_required_key);
- }
- else
- {
- wpa_printf(MSG_DEBUG, "ieee8021x_required_key is %s and eapol_flag(%d)", ieee8021x_required_key ? "TRUE" : "FALSE",
- entry->eapol_flags);
- }
- }
-#endif
- }
-
- return ret;
-}
-
-static int wpa_driver_ralink_set_ssid(struct wpa_driver_ralink_data *drv,
- const u8 *ssid, size_t ssid_len)
-{
- NDIS_802_11_SSID *buf;
- int ret = 0;
- struct iwreq iwr;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- buf = os_zalloc(sizeof(NDIS_802_11_SSID));
- if (buf == NULL)
- return -1;
- os_memset(buf, 0, sizeof(buf));
- buf->SsidLength = ssid_len;
- os_memcpy(buf->Ssid, ssid, ssid_len);
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-
- iwr.u.data.flags = OID_802_11_SSID;
- iwr.u.data.flags |= OID_GET_SET_TOGGLE;
- iwr.u.data.pointer = (caddr_t) buf;
- iwr.u.data.length = sizeof(NDIS_802_11_SSID);
-
- if (ioctl(drv->ioctl_sock, RT_PRIV_IOCTL, &iwr) < 0) {
- perror("ioctl[RT_PRIV_IOCTL] -- OID_802_11_SSID");
- ret = -1;
- }
- os_free(buf);
- return ret;
-}
-
-static void wpa_driver_ralink_event_pmkid(struct wpa_driver_ralink_data *drv,
- const u8 *data, size_t data_len)
-{
- NDIS_802_11_PMKID_CANDIDATE_LIST *pmkid;
- size_t i;
- union wpa_event_data event;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (data_len < 8) {
- wpa_printf(MSG_DEBUG, "RALINK: Too short PMKID Candidate List "
- "Event (len=%lu)", (unsigned long) data_len);
- return;
- }
- pmkid = (NDIS_802_11_PMKID_CANDIDATE_LIST *) data;
- wpa_printf(MSG_DEBUG, "RALINK: PMKID Candidate List Event - Version %d"
- " NumCandidates %d",
- (int) pmkid->Version, (int) pmkid->NumCandidates);
-
- if (pmkid->Version != 1) {
- wpa_printf(MSG_DEBUG, "RALINK: Unsupported PMKID Candidate "
- "List Version %d", (int) pmkid->Version);
- return;
- }
-
- if (data_len < 8 + pmkid->NumCandidates * sizeof(PMKID_CANDIDATE)) {
- wpa_printf(MSG_DEBUG, "RALINK: PMKID Candidate List "
- "underflow");
-
- return;
- }
-
-
-
- os_memset(&event, 0, sizeof(event));
- for (i = 0; i < pmkid->NumCandidates; i++) {
- PMKID_CANDIDATE *p = &pmkid->CandidateList[i];
- wpa_printf(MSG_DEBUG, "RALINK: %lu: " MACSTR " Flags 0x%x",
- (unsigned long) i, MAC2STR(p->BSSID),
- (int) p->Flags);
- os_memcpy(event.pmkid_candidate.bssid, p->BSSID, ETH_ALEN);
- event.pmkid_candidate.index = i;
- event.pmkid_candidate.preauth =
- p->Flags & NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
- wpa_supplicant_event(drv->ctx, EVENT_PMKID_CANDIDATE,
- &event);
- }
-}
-
-static int wpa_driver_ralink_set_pmkid(struct wpa_driver_ralink_data *drv)
-{
- int len, count, i, ret;
- struct ndis_pmkid_entry *entry;
- NDIS_802_11_PMKID *p;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- count = 0;
- entry = drv->pmkid;
- while (entry) {
- count++;
- if (count >= drv->no_of_pmkid)
- break;
- entry = entry->next;
- }
- len = 8 + count * sizeof(BSSID_INFO);
- p = os_zalloc(len);
- if (p == NULL)
- return -1;
- p->Length = len;
- p->BSSIDInfoCount = count;
- entry = drv->pmkid;
- for (i = 0; i < count; i++) {
- os_memcpy(&p->BSSIDInfo[i].BSSID, entry->bssid, ETH_ALEN);
- os_memcpy(&p->BSSIDInfo[i].PMKID, entry->pmkid, 16);
- entry = entry->next;
- }
- wpa_hexdump(MSG_MSGDUMP, "NDIS: OID_802_11_PMKID",
- (const u8 *) p, len);
- ret = ralink_set_oid(drv, OID_802_11_PMKID, (char *) p, len);
- os_free(p);
- return ret;
-}
-
-static int wpa_driver_ralink_add_pmkid(void *priv, const u8 *bssid,
- const u8 *pmkid)
-{
- struct wpa_driver_ralink_data *drv = priv;
- struct ndis_pmkid_entry *entry, *prev;
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (drv->no_of_pmkid == 0)
- return 0;
-
- prev = NULL;
- entry = drv->pmkid;
- while (entry) {
- if (os_memcmp(entry->bssid, bssid, ETH_ALEN) == 0)
- break;
- prev = entry;
- entry = entry->next;
- }
-
- if (entry) {
- /* Replace existing entry for this BSSID and move it into the
- * beginning of the list. */
- os_memcpy(entry->pmkid, pmkid, 16);
- if (prev) {
- prev->next = entry->next;
- entry->next = drv->pmkid;
- drv->pmkid = entry;
- }
- } else {
- entry = os_malloc(sizeof(*entry));
- if (entry) {
- os_memcpy(entry->bssid, bssid, ETH_ALEN);
- os_memcpy(entry->pmkid, pmkid, 16);
- entry->next = drv->pmkid;
- drv->pmkid = entry;
- }
- }
-
- return wpa_driver_ralink_set_pmkid(drv);
-}
-
-
-static int wpa_driver_ralink_remove_pmkid(void *priv, const u8 *bssid,
- const u8 *pmkid)
-{
- struct wpa_driver_ralink_data *drv = priv;
- struct ndis_pmkid_entry *entry, *prev;
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (drv->no_of_pmkid == 0)
- return 0;
-
- entry = drv->pmkid;
- prev = NULL;
- drv->pmkid = NULL;
- while (entry) {
- if (os_memcmp(entry->bssid, bssid, ETH_ALEN) == 0 &&
- os_memcmp(entry->pmkid, pmkid, 16) == 0) {
- if (prev)
- prev->next = entry->next;
- else
- drv->pmkid = entry->next;
- os_free(entry);
- break;
- }
- prev = entry;
- entry = entry->next;
- }
- return wpa_driver_ralink_set_pmkid(drv);
-}
-
-
-static int wpa_driver_ralink_flush_pmkid(void *priv)
-{
- struct wpa_driver_ralink_data *drv = priv;
- NDIS_802_11_PMKID p;
- struct ndis_pmkid_entry *pmkid, *prev;
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (drv->no_of_pmkid == 0)
- return 0;
-
- pmkid = drv->pmkid;
- drv->pmkid = NULL;
- while (pmkid) {
- prev = pmkid;
- pmkid = pmkid->next;
- os_free(prev);
- }
-
- os_memset(&p, 0, sizeof(p));
- p.Length = 8;
- p.BSSIDInfoCount = 0;
- wpa_hexdump(MSG_MSGDUMP, "NDIS: OID_802_11_PMKID (flush)",
- (const u8 *) &p, 8);
- return ralink_set_oid(drv, OID_802_11_PMKID, (char *) &p, 8);
-}
-
-static void
-wpa_driver_ralink_event_wireless_custom(struct wpa_driver_ralink_data *drv,
- void *ctx, char *custom)
-{
- union wpa_event_data data;
- u8 *req_ies = NULL, *resp_ies = NULL;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- wpa_printf(MSG_DEBUG, "Custom wireless event: '%s'", custom);
-
- os_memset(&data, 0, sizeof(data));
- /* Host AP driver */
- if (os_strncmp(custom, "MLME-MICHAELMICFAILURE.indication", 33) == 0) {
- /* receive a MICFAILURE report */
- data.michael_mic_failure.unicast =
- os_strstr(custom, " unicast") != NULL;
- /* TODO: parse parameters(?) */
- wpa_supplicant_event(ctx, EVENT_MICHAEL_MIC_FAILURE, &data);
- } else if (os_strncmp(custom, "ASSOCINFO_ReqIEs=", 17) == 0) {
- /* receive assoc. req. IEs */
- char *spos;
- int bytes;
-
- spos = custom + 17;
- /*get IE's length */
- /*
- * bytes = strlen(spos); ==> bug, bytes may less than original
- * size by using this way to get size. snowpin 20070312
- * if (!bytes)
- * return;
- */
- bytes = drv->assoc_req_ies_len;
-
- req_ies = os_malloc(bytes);
- if (req_ies == NULL)
- return;
- os_memcpy(req_ies, spos, bytes);
- data.assoc_info.req_ies = req_ies;
- data.assoc_info.req_ies_len = bytes;
-
- /* skip the '\0' byte */
- spos += bytes + 1;
-
- data.assoc_info.resp_ies = NULL;
- data.assoc_info.resp_ies_len = 0;
-
- if (os_strncmp(spos, " RespIEs=", 9) == 0) {
- /* receive assoc. resp. IEs */
- spos += 9;
- /* get IE's length */
- bytes = os_strlen(spos);
- if (!bytes)
- goto done;
-
- resp_ies = os_malloc(bytes);
- if (resp_ies == NULL)
- goto done;
- os_memcpy(resp_ies, spos, bytes);
- data.assoc_info.resp_ies = resp_ies;
- data.assoc_info.resp_ies_len = bytes;
- }
-
- wpa_supplicant_event(ctx, EVENT_ASSOCINFO, &data);
-
- done:
- /* free allocated memory */
- os_free(resp_ies);
- os_free(req_ies);
- }
-}
-
-static void ralink_interface_up(struct wpa_driver_ralink_data *drv)
-{
- union wpa_event_data event;
- int enable_wpa_supplicant = 0;
- drv->g_driver_down = 0;
- os_memset(&event, 0, sizeof(event));
- os_snprintf(event.interface_status.ifname,
- sizeof(event.interface_status.ifname), "%s", drv->ifname);
-
- event.interface_status.ievent = EVENT_INTERFACE_ADDED;
- wpa_supplicant_event(drv->ctx, EVENT_INTERFACE_STATUS, &event);
-
- if (drv->ap_scan == 1)
- enable_wpa_supplicant = 1;
- else
- enable_wpa_supplicant = 2;
- /* trigger driver support wpa_supplicant */
- if (ralink_set_oid(drv, RT_OID_WPA_SUPPLICANT_SUPPORT,
- (PCHAR) &enable_wpa_supplicant, sizeof(UCHAR)) < 0)
- {
- wpa_printf(MSG_INFO, "RALINK: Failed to set "
- "RT_OID_WPA_SUPPLICANT_SUPPORT(%d)",
- (int) enable_wpa_supplicant);
- wpa_printf(MSG_ERROR, "ralink. Driver does not support "
- "wpa_supplicant");
- }
-}
-
-static void
-wpa_driver_ralink_event_wireless(struct wpa_driver_ralink_data *drv,
- void *ctx, char *data, int len)
-{
- struct iw_event iwe_buf, *iwe = &iwe_buf;
- char *pos, *end, *custom, *buf, *assoc_info_buf, *info_pos;
-#if 0
- BOOLEAN ieee8021x_required_key = FALSE;
-#endif
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- assoc_info_buf = info_pos = NULL;
- pos = data;
- end = data + len;
-
- while (pos + IW_EV_LCP_LEN <= end) {
- /* Event data may be unaligned, so make a local, aligned copy
- * before processing. */
- os_memcpy(&iwe_buf, pos, IW_EV_LCP_LEN);
- wpa_printf(MSG_DEBUG, "Wireless event: cmd=0x%x len=%d",
- iwe->cmd, iwe->len);
- if (iwe->len <= IW_EV_LCP_LEN)
- return;
-
- custom = pos + IW_EV_POINT_LEN;
-
- if (drv->we_version_compiled > 18 && iwe->cmd == IWEVCUSTOM) {
- /* WE-19 removed the pointer from struct iw_point */
- char *dpos = (char *) &iwe_buf.u.data.length;
- int dlen = dpos - (char *) &iwe_buf;
- os_memcpy(dpos, pos + IW_EV_LCP_LEN,
- sizeof(struct iw_event) - dlen);
- } else {
- os_memcpy(&iwe_buf, pos, sizeof(struct iw_event));
- custom += IW_EV_POINT_OFF;
- }
-
- switch (iwe->cmd) {
- case IWEVCUSTOM:
- if (custom + iwe->u.data.length > end)
- return;
- buf = os_malloc(iwe->u.data.length + 1);
- if (buf == NULL)
- return;
- os_memcpy(buf, custom, iwe->u.data.length);
- buf[iwe->u.data.length] = '\0';
-
- if (drv->ap_scan == 1) {
- if ((iwe->u.data.flags == RT_ASSOC_EVENT_FLAG)
- || (iwe->u.data.flags ==
- RT_REQIE_EVENT_FLAG) ||
- (iwe->u.data.flags == RT_RESPIE_EVENT_FLAG)
- || (iwe->u.data.flags ==
- RT_ASSOCINFO_EVENT_FLAG)) {
- if (drv->scanning_done == 0) {
- os_free(buf);
- return;
- }
- }
- }
-
- if (iwe->u.data.flags == RT_ASSOC_EVENT_FLAG) {
- wpa_supplicant_event(ctx, EVENT_ASSOC, NULL);
- wpa_printf(MSG_DEBUG, "Custom wireless event: "
- "receive ASSOCIATED_EVENT !!!");
- } else if (iwe->u.data.flags == RT_REQIE_EVENT_FLAG) {
- wpa_printf(MSG_DEBUG, "Custom wireless event: "
- "receive ReqIEs !!!");
- drv->assoc_req_ies =
- os_malloc(iwe->u.data.length);
- if (drv->assoc_req_ies == NULL) {
- os_free(buf);
- return;
- }
-
- drv->assoc_req_ies_len = iwe->u.data.length;
- os_memcpy(drv->assoc_req_ies, custom,
- iwe->u.data.length);
- } else if (iwe->u.data.flags == RT_RESPIE_EVENT_FLAG) {
- wpa_printf(MSG_DEBUG, "Custom wireless event: "
- "receive RespIEs !!!");
- drv->assoc_resp_ies =
- os_malloc(iwe->u.data.length);
- if (drv->assoc_resp_ies == NULL) {
- os_free(drv->assoc_req_ies);
- drv->assoc_req_ies = NULL;
- os_free(buf);
- return;
- }
-
- drv->assoc_resp_ies_len = iwe->u.data.length;
- os_memcpy(drv->assoc_resp_ies, custom,
- iwe->u.data.length);
- } else if (iwe->u.data.flags ==
- RT_ASSOCINFO_EVENT_FLAG) {
- wpa_printf(MSG_DEBUG, "Custom wireless event: "
- "receive ASSOCINFO_EVENT !!!");
-
- assoc_info_buf =
- os_zalloc(drv->assoc_req_ies_len +
- drv->assoc_resp_ies_len + 1);
-
- if (assoc_info_buf == NULL) {
- os_free(drv->assoc_req_ies);
- drv->assoc_req_ies = NULL;
- os_free(drv->assoc_resp_ies);
- drv->assoc_resp_ies = NULL;
- os_free(buf);
- return;
- }
-
- if (drv->assoc_req_ies) {
- os_memcpy(assoc_info_buf,
- drv->assoc_req_ies,
- drv->assoc_req_ies_len);
- }
- info_pos = assoc_info_buf +
- drv->assoc_req_ies_len;
- if (drv->assoc_resp_ies) {
- os_memcpy(info_pos,
- drv->assoc_resp_ies,
- drv->assoc_resp_ies_len);
- }
- assoc_info_buf[drv->assoc_req_ies_len +
- drv->assoc_resp_ies_len] = '\0';
- wpa_driver_ralink_event_wireless_custom(
- drv, ctx, assoc_info_buf);
- os_free(drv->assoc_req_ies);
- drv->assoc_req_ies = NULL;
- os_free(drv->assoc_resp_ies);
- drv->assoc_resp_ies = NULL;
- os_free(assoc_info_buf);
- } else if (iwe->u.data.flags == RT_DISASSOC_EVENT_FLAG)
- {
- wpa_printf(MSG_DEBUG, "Custom wireless event: "
- "receive DISASSOCIATED_EVENT !!!");
- wpa_supplicant_event(ctx, EVENT_DISASSOC,
- NULL);
- } else if (iwe->u.data.flags == RT_PMKIDCAND_FLAG) {
- wpa_printf(MSG_DEBUG, "Custom wireless event: "
- "receive PMKIDCAND_EVENT !!!");
- wpa_driver_ralink_event_pmkid(
- drv, (const u8 *) custom,
- iwe->u.data.length);
- } else if (iwe->u.data.flags == RT_INTERFACE_DOWN) {
- drv->g_driver_down = 1;
- eloop_terminate();
- } else if (iwe->u.data.flags == RT_INTERFACE_UP) {
- ralink_interface_up(drv);
- } else {
- wpa_driver_ralink_event_wireless_custom(
- drv, ctx, buf);
- }
- os_free(buf);
- break;
- }
-
- pos += iwe->len;
- }
-}
-
-static void
-wpa_driver_ralink_event_rtm_newlink(void *ctx, struct ifinfomsg *ifi,
- u8 *buf, size_t len)
-{
- struct wpa_driver_ralink_data *drv = ctx;
- int attrlen, rta_len;
- struct rtattr *attr;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- wpa_hexdump(MSG_DEBUG, "ifi: ", (u8 *) ifi, sizeof(struct ifinfomsg));
-
- attrlen = len;
- wpa_printf(MSG_DEBUG, "attrlen=%d", attrlen);
- attr = (struct rtattr *) buf;
- wpa_hexdump(MSG_DEBUG, "attr1: ", (u8 *) attr, sizeof(struct rtattr));
- rta_len = RTA_ALIGN(sizeof(struct rtattr));
- wpa_hexdump(MSG_DEBUG, "attr2: ", (u8 *)attr,rta_len);
- while (RTA_OK(attr, attrlen)) {
- wpa_printf(MSG_DEBUG, "rta_type=%02x\n", attr->rta_type);
- if (attr->rta_type == IFLA_WIRELESS) {
- wpa_driver_ralink_event_wireless(
- drv, ctx,
- ((char *) attr) + rta_len,
- attr->rta_len - rta_len);
- }
- attr = RTA_NEXT(attr, attrlen);
- wpa_hexdump(MSG_DEBUG, "attr3: ",
- (u8 *) attr, sizeof(struct rtattr));
- }
-}
-
-static int
-ralink_get_we_version_compiled(struct wpa_driver_ralink_data *drv)
-{
- struct iwreq iwr;
- UINT we_version_compiled = 0;
-
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- iwr.u.data.pointer = (caddr_t) &we_version_compiled;
- iwr.u.data.flags = RT_OID_WE_VERSION_COMPILED;
-
- if (ioctl(drv->ioctl_sock, RT_PRIV_IOCTL, &iwr) < 0) {
- wpa_printf(MSG_DEBUG, "%s: failed", __func__);
- return -1;
- }
-
- drv->we_version_compiled = we_version_compiled;
-
- return 0;
-}
-
-static void * wpa_driver_ralink_init(void *ctx, const char *ifname)
-{
- int s;
- struct wpa_driver_ralink_data *drv;
- struct ifreq ifr;
- UCHAR enable_wpa_supplicant = 0;
- struct netlink_config *cfg;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- /* open socket to kernel */
- if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- perror("socket");
- return NULL;
- }
- /* do it */
- os_strlcpy(ifr.ifr_name, ifname, IFNAMSIZ);
-
- if (ioctl(s, SIOCGIFINDEX, &ifr) < 0) {
- perror(ifr.ifr_name);
- return NULL;
- }
-
- drv = os_zalloc(sizeof(*drv));
- if (drv == NULL)
- return NULL;
-
- drv->scanning_done = 1;
- drv->ap_scan = 1; /* for now - let's assume ap_scan=1 is used */
- drv->ctx = ctx;
- os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
- drv->ioctl_sock = s;
- drv->g_driver_down = 0;
-
- cfg = os_zalloc(sizeof(*cfg));
- if (cfg == NULL) {
- close(drv->ioctl_sock);
- os_free(drv);
- return NULL;
- }
- cfg->ctx = drv;
- cfg->newlink_cb = wpa_driver_ralink_event_rtm_newlink;
- drv->netlink = netlink_init(cfg);
- if (drv->netlink == NULL) {
- os_free(cfg);
- close(drv->ioctl_sock);
- os_free(drv);
- return NULL;
- }
-
- drv->no_of_pmkid = 4; /* Number of PMKID saved supported */
-
- linux_set_iface_flags(drv->ioctl_sock, drv->ifname, 1);
- ralink_get_we_version_compiled(drv);
- wpa_driver_ralink_flush_pmkid(drv);
-
- if (drv->ap_scan == 1)
- enable_wpa_supplicant = 1;
- else
- enable_wpa_supplicant = 2;
- /* trigger driver support wpa_supplicant */
- if (ralink_set_oid(drv, RT_OID_WPA_SUPPLICANT_SUPPORT,
- (PCHAR) &enable_wpa_supplicant, sizeof(UCHAR)) < 0)
- {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "RT_OID_WPA_SUPPLICANT_SUPPORT(%d)",
- (int) enable_wpa_supplicant);
- wpa_printf(MSG_ERROR, "RALINK: Driver does not support "
- "wpa_supplicant");
- close(s);
- close(drv->ioctl_sock);
- os_free(drv);
- return NULL;
- }
-
- if (drv->ap_scan == 1)
- drv->scanning_done = 0;
-
- return drv;
-}
-
-static void wpa_driver_ralink_deinit(void *priv)
-{
- struct wpa_driver_ralink_data *drv = priv;
- UCHAR enable_wpa_supplicant;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- enable_wpa_supplicant = 0;
-
- if (drv->g_driver_down == 0) {
- /* trigger driver disable wpa_supplicant support */
- if (ralink_set_oid(drv, RT_OID_WPA_SUPPLICANT_SUPPORT,
- (char *) &enable_wpa_supplicant,
- sizeof(BOOLEAN)) < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "RT_OID_WPA_SUPPLICANT_SUPPORT(%d)",
- (int) enable_wpa_supplicant);
- }
-
- wpa_driver_ralink_flush_pmkid(drv);
-
- sleep(1);
- /* linux_set_iface_flags(drv->ioctl_sock, drv->ifname, 0); */
- }
-
- eloop_cancel_timeout(wpa_driver_ralink_scan_timeout, drv, drv->ctx);
- netlink_deinit(drv->netlink);
- close(drv->ioctl_sock);
- os_free(drv);
-}
-
-static void wpa_driver_ralink_scan_timeout(void *eloop_ctx, void *timeout_ctx)
-{
- struct wpa_driver_ralink_data *drv = eloop_ctx;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- wpa_printf(MSG_DEBUG, "Scan timeout - try to get results");
- wpa_supplicant_event(timeout_ctx, EVENT_SCAN_RESULTS, NULL);
-
- drv->scanning_done = 1;
-
-}
-
-static int wpa_driver_ralink_scan(void *priv,
- struct wpa_driver_scan_params *params)
-{
- struct wpa_driver_ralink_data *drv = priv;
- struct iwreq iwr;
- int ret = 0;
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
-#if 0
- if (ssid_len > IW_ESSID_MAX_SIZE) {
- wpa_printf(MSG_DEBUG, "%s: too long SSID (%lu)",
- __FUNCTION__, (unsigned long) ssid_len);
- return -1;
- }
-
- /* wpa_driver_ralink_set_ssid(drv, ssid, ssid_len); */
-#endif
-
- if (ralink_set_oid(drv, RT_OID_WPS_PROBE_REQ_IE,
- (char *) params->extra_ies, params->extra_ies_len) <
- 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "RT_OID_WPS_PROBE_REQ_IE");
- }
-
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
-
- if (ioctl(drv->ioctl_sock, SIOCSIWSCAN, &iwr) < 0) {
- perror("ioctl[SIOCSIWSCAN]");
- ret = -1;
- }
-
- /* Not all drivers generate "scan completed" wireless event, so try to
- * read results after a timeout. */
- eloop_cancel_timeout(wpa_driver_ralink_scan_timeout, drv, drv->ctx);
- eloop_register_timeout(4, 0, wpa_driver_ralink_scan_timeout, drv,
- drv->ctx);
-
- drv->scanning_done = 0;
-
- return ret;
-}
-
-static struct wpa_scan_results *
-wpa_driver_ralink_get_scan_results(void *priv)
-{
- struct wpa_driver_ralink_data *drv = priv;
- UCHAR *buf = NULL;
- size_t buf_len;
- NDIS_802_11_BSSID_LIST_EX *wsr;
- NDIS_WLAN_BSSID_EX *wbi;
- struct iwreq iwr;
- size_t ap_num;
- u8 *pos;
- struct wpa_scan_results *res;
-
- if (drv->g_driver_down == 1)
- return NULL;
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (drv->we_version_compiled >= 17)
- buf_len = 8192;
- else
- buf_len = 4096;
-
- for (;;) {
- buf = os_zalloc(buf_len);
- iwr.u.data.length = buf_len;
- if (buf == NULL)
- return NULL;
-
- wsr = (NDIS_802_11_BSSID_LIST_EX *) buf;
-
- wsr->NumberOfItems = 0;
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- iwr.u.data.pointer = (void *) buf;
- iwr.u.data.flags = OID_802_11_BSSID_LIST;
-
- if (ioctl(drv->ioctl_sock, RT_PRIV_IOCTL, &iwr) == 0)
- break;
-
- if (errno == E2BIG && buf_len < 65535) {
- os_free(buf);
- buf = NULL;
- buf_len *= 2;
- if (buf_len > 65535)
- buf_len = 65535; /* 16-bit length field */
- wpa_printf(MSG_DEBUG, "Scan results did not fit - "
- "trying larger buffer (%lu bytes)",
- (unsigned long) buf_len);
- } else {
- perror("ioctl[RT_PRIV_IOCTL]");
- os_free(buf);
- return NULL;
- }
- }
-
- res = os_zalloc(sizeof(*res));
- if (res == NULL) {
- os_free(buf);
- return NULL;
- }
-
- res->res = os_zalloc(wsr->NumberOfItems *
- sizeof(struct wpa_scan_res *));
- if (res->res == NULL) {
- os_free(res);
- os_free(buf);
- return NULL;
- }
-
- for (ap_num = 0, wbi = wsr->Bssid; ap_num < wsr->NumberOfItems;
- ++ap_num) {
- struct wpa_scan_res *r = NULL;
- size_t extra_len = 0, var_ie_len = 0;
- u8 *pos2;
-
- /* SSID data element */
- extra_len += 2 + wbi->Ssid.SsidLength;
- var_ie_len = wbi->IELength - sizeof(NDIS_802_11_FIXED_IEs);
- r = os_zalloc(sizeof(*r) + extra_len + var_ie_len);
- if (r == NULL)
- break;
- res->res[res->num++] = r;
-
- wpa_printf(MSG_DEBUG, "SSID - %s", wbi->Ssid.Ssid);
- /* get ie's */
- wpa_hexdump(MSG_DEBUG, "RALINK: AP IEs",
- (u8 *) &wbi->IEs[0], wbi->IELength);
-
- os_memcpy(r->bssid, wbi->MacAddress, ETH_ALEN);
-
- extra_len += (2 + wbi->Ssid.SsidLength);
- r->ie_len = extra_len + var_ie_len;
- pos2 = (u8 *) (r + 1);
-
- /*
- * Generate a fake SSID IE since the driver did not report
- * a full IE list.
- */
- *pos2++ = WLAN_EID_SSID;
- *pos2++ = wbi->Ssid.SsidLength;
- os_memcpy(pos2, wbi->Ssid.Ssid, wbi->Ssid.SsidLength);
- pos2 += wbi->Ssid.SsidLength;
-
- r->freq = (wbi->Configuration.DSConfig / 1000);
-
- pos = (u8 *) wbi + sizeof(*wbi) - 1;
-
- pos += sizeof(NDIS_802_11_FIXED_IEs) - 2;
- os_memcpy(&(r->caps), pos, 2);
- pos += 2;
-
- if (wbi->IELength > sizeof(NDIS_802_11_FIXED_IEs))
- os_memcpy(pos2, pos, var_ie_len);
-
- wbi = (NDIS_WLAN_BSSID_EX *) ((u8 *) wbi + wbi->Length);
- }
-
- os_free(buf);
- return res;
-}
-
-static int ralink_set_auth_mode(struct wpa_driver_ralink_data *drv,
- NDIS_802_11_AUTHENTICATION_MODE mode)
-{
- NDIS_802_11_AUTHENTICATION_MODE auth_mode = mode;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (ralink_set_oid(drv, OID_802_11_AUTHENTICATION_MODE,
- (char *) &auth_mode, sizeof(auth_mode)) < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "OID_802_11_AUTHENTICATION_MODE (%d)",
- (int) auth_mode);
- return -1;
- }
- return 0;
-}
-
-static int ralink_set_encr_type(struct wpa_driver_ralink_data *drv,
- NDIS_802_11_WEP_STATUS encr_type)
-{
- NDIS_802_11_WEP_STATUS wep_status = encr_type;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (ralink_set_oid(drv, OID_802_11_WEP_STATUS,
- (char *) &wep_status, sizeof(wep_status)) < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "OID_802_11_WEP_STATUS (%d)",
- (int) wep_status);
- return -1;
- }
- return 0;
-}
-
-
-static int wpa_driver_ralink_remove_key(struct wpa_driver_ralink_data *drv,
- int key_idx, const u8 *addr,
- const u8 *bssid, int pairwise)
-{
- NDIS_802_11_REMOVE_KEY rkey;
- NDIS_802_11_KEY_INDEX _index;
- int res, res2;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- os_memset(&rkey, 0, sizeof(rkey));
-
- rkey.Length = sizeof(rkey);
- rkey.KeyIndex = key_idx;
-
- if (pairwise)
- rkey.KeyIndex |= 1 << 30;
-
- os_memcpy(rkey.BSSID, bssid, ETH_ALEN);
-
- res = ralink_set_oid(drv, OID_802_11_REMOVE_KEY, (char *) &rkey,
- sizeof(rkey));
-
- /* AlbertY@20060210 removed it */
- if (0 /* !pairwise */) {
- res2 = ralink_set_oid(drv, OID_802_11_REMOVE_WEP,
- (char *) &_index, sizeof(_index));
- } else
- res2 = 0;
-
- if (res < 0 && res2 < 0)
- return res;
- return 0;
-}
-
-static int wpa_driver_ralink_add_wep(struct wpa_driver_ralink_data *drv,
- int pairwise, int key_idx, int set_tx,
- const u8 *key, size_t key_len)
-{
- NDIS_802_11_WEP *wep;
- size_t len;
- int res;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- len = 12 + key_len;
- wep = os_zalloc(len);
- if (wep == NULL)
- return -1;
-
- wep->Length = len;
- wep->KeyIndex = key_idx;
-
- if (set_tx)
- wep->KeyIndex |= 0x80000000;
-
- wep->KeyLength = key_len;
- os_memcpy(wep->KeyMaterial, key, key_len);
-
- wpa_hexdump_key(MSG_MSGDUMP, "RALINK: OID_802_11_ADD_WEP",
- (const u8 *) wep, len);
- res = ralink_set_oid(drv, OID_802_11_ADD_WEP, (char *) wep, len);
-
- os_free(wep);
-
- return res;
-}
-
-static int wpa_driver_ralink_set_key(const char *ifname, void *priv,
- enum wpa_alg alg, const u8 *addr,
- int key_idx, int set_tx,
- const u8 *seq, size_t seq_len,
- const u8 *key, size_t key_len)
-{
- struct wpa_driver_ralink_data *drv = priv;
- size_t len, i;
- NDIS_802_11_KEY *nkey;
- int res, pairwise;
- u8 bssid[ETH_ALEN];
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- drv->bAddWepKey = FALSE;
-
- if (addr == NULL || is_broadcast_ether_addr(addr)) {
- /* Group Key */
- pairwise = 0;
- wpa_driver_ralink_get_bssid(drv, bssid);
- } else {
- /* Pairwise Key */
- pairwise = 1;
- os_memcpy(bssid, addr, ETH_ALEN);
- }
-
- if (alg == WPA_ALG_NONE || key_len == 0) {
- return wpa_driver_ralink_remove_key(drv, key_idx, addr, bssid,
- pairwise);
- }
-
- if (alg == WPA_ALG_WEP) {
- drv->bAddWepKey = TRUE;
- return wpa_driver_ralink_add_wep(drv, pairwise, key_idx,
- set_tx, key, key_len);
- }
-
- len = 12 + 6 + 6 + 8 + key_len;
-
- nkey = os_zalloc(len);
- if (nkey == NULL)
- return -1;
-
- nkey->Length = len;
- nkey->KeyIndex = key_idx;
-
- if (set_tx)
- nkey->KeyIndex |= 1 << 31;
-
- if (pairwise)
- nkey->KeyIndex |= 1 << 30;
-
- if (seq && seq_len)
- nkey->KeyIndex |= 1 << 29;
-
- nkey->KeyLength = key_len;
- os_memcpy(nkey->BSSID, bssid, ETH_ALEN);
-
- if (seq && seq_len) {
- for (i = 0; i < seq_len; i++)
- nkey->KeyRSC |= seq[i] << (i * 8);
- }
- if (alg == WPA_ALG_TKIP && key_len == 32) {
- os_memcpy(nkey->KeyMaterial, key, 16);
- os_memcpy(nkey->KeyMaterial + 16, key + 24, 8);
- os_memcpy(nkey->KeyMaterial + 24, key + 16, 8);
- } else {
- os_memcpy(nkey->KeyMaterial, key, key_len);
- }
-
- wpa_printf(MSG_DEBUG, "%s: alg=%d key_idx=%d set_tx=%d seq_len=%lu "
- "key_len=%lu", __FUNCTION__, alg, key_idx, set_tx,
- (unsigned long) seq_len, (unsigned long) key_len);
-
- wpa_hexdump_key(MSG_MSGDUMP, "RALINK: OID_802_11_ADD_KEY",
- (const u8 *) nkey, len);
- res = ralink_set_oid(drv, OID_802_11_ADD_KEY, (char *) nkey, len);
- os_free(nkey);
-
- return res;
-}
-
-static int wpa_driver_ralink_disassociate(void *priv, const u8 *addr,
- int reason_code)
-{
- struct wpa_driver_ralink_data *drv = priv;
-
- if (drv->g_driver_down == 1)
- return -1;
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
- if (ralink_set_oid(drv, OID_802_11_DISASSOCIATE, " ", 4) < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "OID_802_11_DISASSOCIATE");
- }
-
- return 0;
-}
-
-static int wpa_driver_ralink_deauthenticate(void *priv, const u8 *addr,
- int reason_code)
-{
- struct wpa_driver_ralink_data *drv = priv;
-
- wpa_printf(MSG_DEBUG, "g_driver_down = %d", drv->g_driver_down);
-
- if (drv->g_driver_down == 1)
- return -1;
-
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
- if (ralink_get_new_driver_flag(drv) == 0) {
- return wpa_driver_ralink_disassociate(priv, addr, reason_code);
- } else {
- MLME_DEAUTH_REQ_STRUCT mlme;
- os_memset(&mlme, 0, sizeof(MLME_DEAUTH_REQ_STRUCT));
- mlme.Reason = reason_code;
- os_memcpy(mlme.Addr, addr, MAC_ADDR_LEN);
- return ralink_set_oid(drv, OID_802_11_DEAUTHENTICATION,
- (char *) &mlme,
- sizeof(MLME_DEAUTH_REQ_STRUCT));
- }
-}
-
-static int wpa_driver_ralink_set_gen_ie(void *priv, const u8 *ie,
- size_t ie_len)
-{
- struct wpa_driver_ralink_data *drv = priv;
- struct iwreq iwr;
- int ret = 0;
-
- os_memset(&iwr, 0, sizeof(iwr));
- os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- iwr.u.data.pointer = (caddr_t) ie;
- iwr.u.data.length = ie_len;
-
- wpa_hexdump(MSG_DEBUG, "wpa_driver_ralink_set_gen_ie: ",
- (u8 *) ie, ie_len);
-
- if (ioctl(drv->ioctl_sock, SIOCSIWGENIE, &iwr) < 0) {
- perror("ioctl[SIOCSIWGENIE]");
- ret = -1;
- }
-
- return ret;
-}
-
-static int
-wpa_driver_ralink_associate(void *priv,
- struct wpa_driver_associate_params *params)
-{
- struct wpa_driver_ralink_data *drv = priv;
-
- NDIS_802_11_NETWORK_INFRASTRUCTURE mode;
- NDIS_802_11_AUTHENTICATION_MODE auth_mode;
- NDIS_802_11_WEP_STATUS encr;
- BOOLEAN ieee8021xMode;
- BOOLEAN ieee8021x_required_key = TRUE;
-
- if (drv->g_driver_down == 1)
- return -1;
- wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
-
- if (params->mode == IEEE80211_MODE_IBSS)
- mode = Ndis802_11IBSS;
- else
- mode = Ndis802_11Infrastructure;
-
- if (ralink_set_oid(drv, OID_802_11_INFRASTRUCTURE_MODE,
- (char *) &mode, sizeof(mode)) < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "OID_802_11_INFRASTRUCTURE_MODE (%d)",
- (int) mode);
- /* Try to continue anyway */
- }
-
- if (params->key_mgmt_suite == KEY_MGMT_WPS) {
- UCHAR enable_wps = 0x80;
- /* trigger driver support wpa_supplicant */
- if (ralink_set_oid(drv, RT_OID_WPA_SUPPLICANT_SUPPORT,
- (PCHAR) &enable_wps, sizeof(UCHAR)) < 0) {
- wpa_printf(MSG_INFO, "RALINK: Failed to set "
- "RT_OID_WPA_SUPPLICANT_SUPPORT (%d)",
- (int) enable_wps);
- }
-
- wpa_driver_ralink_set_gen_ie(priv, params->wpa_ie,
- params->wpa_ie_len);
-
- ralink_set_auth_mode(drv, Ndis802_11AuthModeOpen);
-
- ralink_set_encr_type(drv, Ndis802_11EncryptionDisabled);
- } else {
-#ifdef CONFIG_WPS
- UCHAR enable_wpa_supplicant;
-
- if (drv->ap_scan == 1)
- enable_wpa_supplicant = 0x01;
- else
- enable_wpa_supplicant = 0x02;
-
- /* trigger driver support wpa_supplicant */
- if (ralink_set_oid(drv, RT_OID_WPA_SUPPLICANT_SUPPORT,
- (PCHAR) &enable_wpa_supplicant,
- sizeof(UCHAR)) < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "RT_OID_WPA_SUPPLICANT_SUPPORT (%d)",
- (int) enable_wpa_supplicant);
- }
-
- wpa_driver_ralink_set_gen_ie(priv, (u8 *) "", 0);
-#endif /* CONFIG_WPS */
-
- if (params->wpa_ie == NULL || params->wpa_ie_len == 0) {
- if (params->auth_alg & WPA_AUTH_ALG_SHARED) {
- if (params->auth_alg & WPA_AUTH_ALG_OPEN)
- auth_mode = Ndis802_11AuthModeAutoSwitch;
- else
- auth_mode = Ndis802_11AuthModeShared;
- } else
- auth_mode = Ndis802_11AuthModeOpen;
- } else if (params->wpa_ie[0] == WLAN_EID_RSN) {
- if (params->key_mgmt_suite == KEY_MGMT_PSK)
- auth_mode = Ndis802_11AuthModeWPA2PSK;
- else
- auth_mode = Ndis802_11AuthModeWPA2;
- } else {
- if (params->key_mgmt_suite == KEY_MGMT_WPA_NONE)
- auth_mode = Ndis802_11AuthModeWPANone;
- else if (params->key_mgmt_suite == KEY_MGMT_PSK)
- auth_mode = Ndis802_11AuthModeWPAPSK;
- else
- auth_mode = Ndis802_11AuthModeWPA;
- }
-
- switch (params->pairwise_suite) {
- case CIPHER_CCMP:
- encr = Ndis802_11Encryption3Enabled;
- break;
- case CIPHER_TKIP:
- encr = Ndis802_11Encryption2Enabled;
- break;
- case CIPHER_WEP40:
- case CIPHER_WEP104:
- encr = Ndis802_11Encryption1Enabled;
- break;
- case CIPHER_NONE:
- if (params->group_suite == CIPHER_CCMP)
- encr = Ndis802_11Encryption3Enabled;
- else if (params->group_suite == CIPHER_TKIP)
- encr = Ndis802_11Encryption2Enabled;
- else
- encr = Ndis802_11EncryptionDisabled;
- break;
- default:
- encr = Ndis802_11EncryptionDisabled;
- break;
- }
-
- ralink_set_auth_mode(drv, auth_mode);
-
- /* notify driver that IEEE8021x mode is enabled */
- if (params->key_mgmt_suite == KEY_MGMT_802_1X_NO_WPA) {
- ieee8021xMode = TRUE;
- if (drv->bAddWepKey)
- ieee8021x_required_key = FALSE;
- } else
- ieee8021xMode = FALSE;
-
- if (ralink_set_oid(drv, OID_802_11_SET_IEEE8021X_REQUIRE_KEY,
- (char *) &ieee8021x_required_key,
- sizeof(BOOLEAN)) < 0) {
- wpa_printf(MSG_DEBUG, "ERROR: Failed to set "
- "OID_802_11_SET_IEEE8021X_REQUIRE_KEY(%d)",
- (int) ieee8021x_required_key);
- } else {
- wpa_printf(MSG_DEBUG, "ieee8021x_required_key is %s",
- ieee8021x_required_key ? "TRUE" : "FALSE");
- }
-
- if (ralink_set_oid(drv, OID_802_11_SET_IEEE8021X,
- (char *) &ieee8021xMode, sizeof(BOOLEAN)) <
- 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "OID_802_11_SET_IEEE8021X(%d)",
- (int) ieee8021xMode);
- }
-
- ralink_set_encr_type(drv, encr);
-
- if ((ieee8021xMode == FALSE) &&
- (encr == Ndis802_11Encryption1Enabled)) {
- /* static WEP */
- int enabled = 0;
- if (ralink_set_oid(drv, OID_802_11_DROP_UNENCRYPTED,
- (char *) &enabled, sizeof(enabled))
- < 0) {
- wpa_printf(MSG_DEBUG, "RALINK: Failed to set "
- "OID_802_11_DROP_UNENCRYPTED(%d)",
- (int) encr);
- }
- }
- }
-
- return wpa_driver_ralink_set_ssid(drv, params->ssid, params->ssid_len);
-}
-
-static int
-wpa_driver_ralink_set_countermeasures(void *priv, int enabled)
-{
- struct wpa_driver_ralink_data *drv = priv;
- if (drv->g_driver_down == 1)
- return -1;
- wpa_printf(MSG_DEBUG, "%s: enabled=%d", __FUNCTION__, enabled);
- return ralink_set_oid(drv, OID_SET_COUNTERMEASURES, (char *) &enabled,
- sizeof(int));
-}
-
-const struct wpa_driver_ops wpa_driver_ralink_ops = {
- .name = "ralink",
- .desc = "Ralink Wireless Client driver",
- .get_bssid = wpa_driver_ralink_get_bssid,
- .get_ssid = wpa_driver_ralink_get_ssid,
- .set_key = wpa_driver_ralink_set_key,
- .init = wpa_driver_ralink_init,
- .deinit = wpa_driver_ralink_deinit,
- .set_countermeasures = wpa_driver_ralink_set_countermeasures,
- .scan2 = wpa_driver_ralink_scan,
- .get_scan_results2 = wpa_driver_ralink_get_scan_results,
- .deauthenticate = wpa_driver_ralink_deauthenticate,
- .disassociate = wpa_driver_ralink_disassociate,
- .associate = wpa_driver_ralink_associate,
- .add_pmkid = wpa_driver_ralink_add_pmkid,
- .remove_pmkid = wpa_driver_ralink_remove_pmkid,
- .flush_pmkid = wpa_driver_ralink_flush_pmkid,
-};
diff --git a/src/drivers/driver_ralink.h b/src/drivers/driver_ralink.h
deleted file mode 100644
index d13df28..0000000
--- a/src/drivers/driver_ralink.h
+++ /dev/null
@@ -1,383 +0,0 @@
-/*
- * WPA Supplicant - driver_ralink exported functions
- * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
- * Copyright (c) 2007, Snowpin Lee <snowpin_lee@ralinktech.com.tw>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
- */
-
-// Ralink defined OIDs
-#if WIRELESS_EXT <= 11
-#ifndef SIOCDEVPRIVATE
-#define SIOCDEVPRIVATE 0x8BE0
-#endif
-#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
-#endif
-
-#define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x0E)
-#define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
-
-// IEEE 802.11 OIDs & Ralink defined OIDs ******
-
-// (RaConfig Set/QueryInform) ==>
-#define OID_GET_SET_TOGGLE 0x8000
-
-#define OID_802_11_ADD_WEP 0x0112
-#define OID_802_11_REMOVE_WEP 0x0113
-#define OID_802_11_DISASSOCIATE 0x0114
-#define OID_802_11_PRIVACY_FILTER 0x0118
-#define OID_802_11_ASSOCIATION_INFORMATION 0x011E
-#define OID_802_11_BSSID_LIST_SCAN 0x0508
-#define OID_802_11_SSID 0x0509
-#define OID_802_11_BSSID 0x050A
-#define OID_802_11_WEP_STATUS 0x0510
-#define OID_802_11_AUTHENTICATION_MODE 0x0511
-#define OID_802_11_INFRASTRUCTURE_MODE 0x0512
-#define OID_802_11_TX_POWER_LEVEL 0x0517
-#define OID_802_11_REMOVE_KEY 0x0519
-#define OID_802_11_ADD_KEY 0x0520
-#define OID_802_11_DEAUTHENTICATION 0x0526
-#define OID_802_11_DROP_UNENCRYPTED 0x0527
-#define OID_802_11_BSSID_LIST 0x0609
-#define OID_802_3_CURRENT_ADDRESS 0x060A
-#define OID_SET_COUNTERMEASURES 0x0616
-#define OID_802_11_SET_IEEE8021X 0x0617 // For IEEE8021x mode
-#define OID_802_11_SET_IEEE8021X_REQUIRE_KEY 0x0618 // For DynamicWEP in IEEE802.1x mode
-#define OID_802_11_PMKID 0x0620
-#define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621 // for trigger driver enable/disable wpa_supplicant support
-#define RT_OID_WE_VERSION_COMPILED 0x0622
-#define RT_OID_NEW_DRIVER 0x0623
-#define RT_OID_WPS_PROBE_REQ_IE 0x0625
-
-#define PACKED __attribute__ ((packed))
-
-//wpa_supplicant event flags
-#define RT_ASSOC_EVENT_FLAG 0x0101
-#define RT_DISASSOC_EVENT_FLAG 0x0102
-#define RT_REQIE_EVENT_FLAG 0x0103
-#define RT_RESPIE_EVENT_FLAG 0x0104
-#define RT_ASSOCINFO_EVENT_FLAG 0x0105
-#define RT_PMKIDCAND_FLAG 0x0106
-#define RT_INTERFACE_DOWN 0x0107
-#define RT_INTERFACE_UP 0x0108
-
-//
-// IEEE 802.11 Structures and definitions
-//
-// new types for Media Specific Indications
-
-#ifndef ULONG
-#define CHAR char
-#define INT int
-#define SHORT int
-#define UINT u32
-#undef ULONG
-//#define ULONG u32
-#define ULONG unsigned long /* 32-bit in 32-bit CPU or 64-bit in 64-bit CPU */
-#define USHORT unsigned short
-#define UCHAR unsigned char
-
-#define uint32 u32
-#define uint8 u8
-
-
-#define BOOLEAN u8
-//#define LARGE_INTEGER s64
-#define VOID void
-#define LONG long
-#define LONGLONG s64
-#define ULONGLONG u64
-typedef VOID *PVOID;
-typedef CHAR *PCHAR;
-typedef UCHAR *PUCHAR;
-typedef USHORT *PUSHORT;
-typedef LONG *PLONG;
-typedef ULONG *PULONG;
-
-typedef union _LARGE_INTEGER {
- struct {
- ULONG LowPart;
- LONG HighPart;
- }vv;
- struct {
- ULONG LowPart;
- LONG HighPart;
- } u;
- s64 QuadPart;
-} LARGE_INTEGER;
-
-#endif
-
-#define NDIS_802_11_LENGTH_SSID 32
-#define NDIS_802_11_LENGTH_RATES 8
-#define NDIS_802_11_LENGTH_RATES_EX 16
-#define MAX_LEN_OF_SSID 32
-#define MAC_ADDR_LEN 6
-
-typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
-
-// mask for authentication/integrity fields
-#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
-
-#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
-#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
-#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
-#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
-
-// Added new types for OFDM 5G and 2.4G
-typedef enum _NDIS_802_11_NETWORK_TYPE
-{
- Ndis802_11FH,
- Ndis802_11DS,
- Ndis802_11OFDM5,
- Ndis802_11OFDM24,
- Ndis802_11Automode,
- Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
-} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
-
-//
-// Received Signal Strength Indication
-//
-typedef LONG NDIS_802_11_RSSI; // in dBm
-
-typedef struct _NDIS_802_11_CONFIGURATION_FH
-{
- ULONG Length; // Length of structure
- ULONG HopPattern; // As defined by 802.11, MSB set
- ULONG HopSet; // to one if non-802.11
- ULONG DwellTime; // units are Kusec
-} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
-
-typedef struct _NDIS_802_11_CONFIGURATION
-{
- ULONG Length; // Length of structure
- ULONG BeaconPeriod; // units are Kusec
- ULONG ATIMWindow; // units are Kusec
- ULONG DSConfig; // Frequency, units are kHz
- NDIS_802_11_CONFIGURATION_FH FHConfig;
-} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
-
-typedef ULONG NDIS_802_11_KEY_INDEX;
-typedef ULONGLONG NDIS_802_11_KEY_RSC;
-
-// Key mapping keys require a BSSID
-typedef struct _NDIS_802_11_KEY
-{
- UINT Length; // Length of this structure
- UINT KeyIndex;
- UINT KeyLength; // length of key in bytes
- NDIS_802_11_MAC_ADDRESS BSSID;
- NDIS_802_11_KEY_RSC KeyRSC;
- UCHAR KeyMaterial[1]; // variable length depending on above field
-} NDIS_802_11_KEY, *PNDIS_802_11_KEY;
-
-typedef struct _NDIS_802_11_REMOVE_KEY
-{
- UINT Length; // Length of this structure
- UINT KeyIndex;
- NDIS_802_11_MAC_ADDRESS BSSID;
-} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
-
-typedef struct PACKED _NDIS_802_11_WEP
-{
- UINT Length; // Length of this structure
- UINT KeyIndex; // 0 is the per-client key, 1-N are the
- // global keys
- UINT KeyLength; // length of key in bytes
- UCHAR KeyMaterial[1];// variable length depending on above field
-} NDIS_802_11_WEP, *PNDIS_802_11_WEP;
-
-
-typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
-{
- Ndis802_11IBSS,
- Ndis802_11Infrastructure,
- Ndis802_11AutoUnknown,
- Ndis802_11InfrastructureMax // Not a real value, defined as upper bound
-} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
-
-// PMKID Structures
-typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
-
-typedef struct _BSSID_INFO
-{
- NDIS_802_11_MAC_ADDRESS BSSID;
- NDIS_802_11_PMKID_VALUE PMKID;
-} BSSID_INFO, *PBSSID_INFO;
-
-typedef struct _NDIS_802_11_PMKID
-{
- ULONG Length;
- ULONG BSSIDInfoCount;
- BSSID_INFO BSSIDInfo[1];
-} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
-
-//Added new types for PMKID Candidate lists.
-typedef struct _PMKID_CANDIDATE {
- NDIS_802_11_MAC_ADDRESS BSSID;
- ULONG Flags;
-} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
-
-typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
-{
- ULONG Version; // Version of the structure
- ULONG NumCandidates; // No. of pmkid candidates
- PMKID_CANDIDATE CandidateList[1];
-} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
-
-//Flags for PMKID Candidate list structure
-#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
-
-// Add new authentication modes
-typedef enum _NDIS_802_11_AUTHENTICATION_MODE
-{
- Ndis802_11AuthModeOpen,
- Ndis802_11AuthModeShared,
- Ndis802_11AuthModeAutoSwitch,
- Ndis802_11AuthModeWPA,
- Ndis802_11AuthModeWPAPSK,
- Ndis802_11AuthModeWPANone,
- Ndis802_11AuthModeWPA2,
- Ndis802_11AuthModeWPA2PSK,
- Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
-} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
-
-typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
-typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
-
-typedef struct PACKED _NDIS_802_11_SSID
-{
- INT SsidLength; // length of SSID field below, in bytes;
- // this can be zero.
- UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; // SSID information field
-} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
-
-
-typedef struct PACKED _NDIS_WLAN_BSSID
-{
- ULONG Length; // Length of this structure
- NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
- UCHAR Reserved[2];
- NDIS_802_11_SSID Ssid; // SSID
- ULONG Privacy; // WEP encryption requirement
- NDIS_802_11_RSSI Rssi; // receive signal
- // strength in dBm
- NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
- NDIS_802_11_CONFIGURATION Configuration;
- NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
- NDIS_802_11_RATES SupportedRates;
-} NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
-
-typedef struct PACKED _NDIS_802_11_BSSID_LIST
-{
- UINT NumberOfItems; // in list below, at least 1
- NDIS_WLAN_BSSID Bssid[1];
-} NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
-
-// Added Capabilities, IELength and IEs for each BSSID
-typedef struct PACKED _NDIS_WLAN_BSSID_EX
-{
- ULONG Length; // Length of this structure
- NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
- UCHAR Reserved[2];
- NDIS_802_11_SSID Ssid; // SSID
- UINT Privacy; // WEP encryption requirement
- NDIS_802_11_RSSI Rssi; // receive signal
- // strength in dBm
- NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
- NDIS_802_11_CONFIGURATION Configuration;
- NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
- NDIS_802_11_RATES_EX SupportedRates;
- ULONG IELength;
- UCHAR IEs[1];
-} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
-
-typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX
-{
- UINT NumberOfItems; // in list below, at least 1
- NDIS_WLAN_BSSID_EX Bssid[1];
-} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
-
-typedef struct PACKED _NDIS_802_11_FIXED_IEs
-{
- UCHAR Timestamp[8];
- USHORT BeaconInterval;
- USHORT Capabilities;
-} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
-
-// Added new encryption types
-// Also aliased typedef to new name
-typedef enum _NDIS_802_11_WEP_STATUS
-{
- Ndis802_11WEPEnabled,
- Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
- Ndis802_11WEPDisabled,
- Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
- Ndis802_11WEPKeyAbsent,
- Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
- Ndis802_11WEPNotSupported,
- Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
- Ndis802_11Encryption2Enabled,
- Ndis802_11Encryption2KeyAbsent,
- Ndis802_11Encryption3Enabled,
- Ndis802_11Encryption3KeyAbsent
-} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
- NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
-
-typedef enum _NDIS_802_11_RELOAD_DEFAULTS
-{
- Ndis802_11ReloadWEPKeys
-} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
-
-#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
-#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
-#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
-
-#define NDIS_802_11_AI_RESFI_CAPABILITIES 1
-#define NDIS_802_11_AI_RESFI_STATUSCODE 2
-#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
-
-typedef struct _NDIS_802_11_AI_REQFI
-{
- USHORT Capabilities;
- USHORT ListenInterval;
- NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
-} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
-
-typedef struct _NDIS_802_11_AI_RESFI
-{
- USHORT Capabilities;
- USHORT StatusCode;
- USHORT AssociationId;
-} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
-
-typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
-{
- ULONG Length;
- USHORT AvailableRequestFixedIEs;
- NDIS_802_11_AI_REQFI RequestFixedIEs;
- ULONG RequestIELength;
- ULONG OffsetRequestIEs;
- USHORT AvailableResponseFixedIEs;
- NDIS_802_11_AI_RESFI ResponseFixedIEs;
- ULONG ResponseIELength;
- ULONG OffsetResponseIEs;
-} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
-
-struct ndis_pmkid_entry {
- struct ndis_pmkid_entry *next;
- u8 bssid[ETH_ALEN];
- u8 pmkid[16];
-};
-
-typedef struct _MLME_DEAUTH_REQ_STRUCT {
- UCHAR Addr[MAC_ADDR_LEN];
- USHORT Reason;
-} MLME_DEAUTH_REQ_STRUCT, *PMLME_DEAUTH_REQ_STRUCT;
diff --git a/src/drivers/drivers.c b/src/drivers/drivers.c
index b710778..667ea22 100644
--- a/src/drivers/drivers.c
+++ b/src/drivers/drivers.c
@@ -27,9 +27,6 @@ extern struct wpa_driver_ops wpa_driver_hostap_ops; /* driver_hostap.c */
#ifdef CONFIG_DRIVER_MADWIFI
extern struct wpa_driver_ops wpa_driver_madwifi_ops; /* driver_madwifi.c */
#endif /* CONFIG_DRIVER_MADWIFI */
-#ifdef CONFIG_DRIVER_BROADCOM
-extern struct wpa_driver_ops wpa_driver_broadcom_ops; /* driver_broadcom.c */
-#endif /* CONFIG_DRIVER_BROADCOM */
#ifdef CONFIG_DRIVER_BSD
extern struct wpa_driver_ops wpa_driver_bsd_ops; /* driver_bsd.c */
#endif /* CONFIG_DRIVER_BSD */
@@ -42,15 +39,6 @@ extern struct wpa_driver_ops wpa_driver_wired_ops; /* driver_wired.c */
#ifdef CONFIG_DRIVER_TEST
extern struct wpa_driver_ops wpa_driver_test_ops; /* driver_test.c */
#endif /* CONFIG_DRIVER_TEST */
-#ifdef CONFIG_DRIVER_RALINK
-extern struct wpa_driver_ops wpa_driver_ralink_ops; /* driver_ralink.c */
-#endif /* CONFIG_DRIVER_RALINK */
-#ifdef CONFIG_DRIVER_OSX
-extern struct wpa_driver_ops wpa_driver_osx_ops; /* driver_osx.m */
-#endif /* CONFIG_DRIVER_OSX */
-#ifdef CONFIG_DRIVER_IPHONE
-extern struct wpa_driver_ops wpa_driver_iphone_ops; /* driver_iphone.m */
-#endif /* CONFIG_DRIVER_IPHONE */
#ifdef CONFIG_DRIVER_ROBOSWITCH
/* driver_roboswitch.c */
extern struct wpa_driver_ops wpa_driver_roboswitch_ops;
@@ -77,9 +65,6 @@ struct wpa_driver_ops *wpa_drivers[] =
#ifdef CONFIG_DRIVER_MADWIFI
&wpa_driver_madwifi_ops,
#endif /* CONFIG_DRIVER_MADWIFI */
-#ifdef CONFIG_DRIVER_BROADCOM
- &wpa_driver_broadcom_ops,
-#endif /* CONFIG_DRIVER_BROADCOM */
#ifdef CONFIG_DRIVER_BSD
&wpa_driver_bsd_ops,
#endif /* CONFIG_DRIVER_BSD */
@@ -92,15 +77,6 @@ struct wpa_driver_ops *wpa_drivers[] =
#ifdef CONFIG_DRIVER_TEST
&wpa_driver_test_ops,
#endif /* CONFIG_DRIVER_TEST */
-#ifdef CONFIG_DRIVER_RALINK
- &wpa_driver_ralink_ops,
-#endif /* CONFIG_DRIVER_RALINK */
-#ifdef CONFIG_DRIVER_OSX
- &wpa_driver_osx_ops,
-#endif /* CONFIG_DRIVER_OSX */
-#ifdef CONFIG_DRIVER_IPHONE
- &wpa_driver_iphone_ops,
-#endif /* CONFIG_DRIVER_IPHONE */
#ifdef CONFIG_DRIVER_ROBOSWITCH
&wpa_driver_roboswitch_ops,
#endif /* CONFIG_DRIVER_ROBOSWITCH */
diff --git a/src/drivers/drivers.mak b/src/drivers/drivers.mak
index ebf39c8..64896b7 100644
--- a/src/drivers/drivers.mak
+++ b/src/drivers/drivers.mak
@@ -97,18 +97,6 @@ NEED_LINUX_IOCTL=y
NEED_RFKILL=y
endif
-ifdef CONFIG_DRIVER_RALINK
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK
-DRV_WPA_OBJS += ../src/drivers/driver_ralink.o
-NEED_NETLINK=y
-NEED_LINUX_IOCTL=y
-endif
-
-ifdef CONFIG_DRIVER_BROADCOM
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_BROADCOM
-DRV_WPA_OBJS += ../src/drivers/driver_broadcom.o
-endif
-
ifdef CONFIG_DRIVER_NDIS
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
DRV_WPA_OBJS += ../src/drivers/driver_ndis.o
@@ -124,20 +112,6 @@ DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
endif
endif
-ifdef CONFIG_DRIVER_OSX
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_OSX
-DRV_WPA_OBJS += ../src/drivers/driver_osx.o
-DRV_WPA_LDFLAGS += -framework CoreFoundation
-DRV_WPA_LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211
-endif
-
-ifdef CONFIG_DRIVER_IPHONE
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPHONE
-DRV_WPA_OBJS += ../src/drivers/driver_iphone.o
-DRV_WPA_OBJS += ../src/drivers/MobileApple80211.o
-DRV_WPA_LDFLAGS += -framework CoreFoundation
-endif
-
ifdef CONFIG_DRIVER_ROBOSWITCH
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
DRV_WPA_OBJS += ../src/drivers/driver_roboswitch.o
diff --git a/src/drivers/drivers.mk b/src/drivers/drivers.mk
index c690e1c..d60ccdc 100644
--- a/src/drivers/drivers.mk
+++ b/src/drivers/drivers.mk
@@ -97,18 +97,6 @@ NEED_LINUX_IOCTL=y
NEED_RFKILL=y
endif
-ifdef CONFIG_DRIVER_RALINK
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_RALINK
-DRV_WPA_OBJS += src/drivers/driver_ralink.c
-NEED_NETLINK=y
-NEED_LINUX_IOCTL=y
-endif
-
-ifdef CONFIG_DRIVER_BROADCOM
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_BROADCOM
-DRV_WPA_OBJS += src/drivers/driver_broadcom.c
-endif
-
ifdef CONFIG_DRIVER_NDIS
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_NDIS
DRV_WPA_OBJS += src/drivers/driver_ndis.c
@@ -124,20 +112,6 @@ DRV_WPA_CFLAGS += -DCONFIG_USE_NDISUIO
endif
endif
-ifdef CONFIG_DRIVER_OSX
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_OSX
-DRV_WPA_OBJS += src/drivers/driver_osx.c
-DRV_WPA_LDFLAGS += -framework CoreFoundation
-DRV_WPA_LDFLAGS += -F/System/Library/PrivateFrameworks -framework Apple80211
-endif
-
-ifdef CONFIG_DRIVER_IPHONE
-DRV_WPA_CFLAGS += -DCONFIG_DRIVER_IPHONE
-DRV_WPA_OBJS += src/drivers/driver_iphone.c
-DRV_WPA_OBJS += src/drivers/MobileApple80211.c
-DRV_WPA_LDFLAGS += -framework CoreFoundation
-endif
-
ifdef CONFIG_DRIVER_ROBOSWITCH
DRV_WPA_CFLAGS += -DCONFIG_DRIVER_ROBOSWITCH
DRV_WPA_OBJS += src/drivers/driver_roboswitch.c
diff --git a/wpa_supplicant/README b/wpa_supplicant/README
index 506a907..9eb5636 100644
--- a/wpa_supplicant/README
+++ b/wpa_supplicant/README
@@ -156,21 +156,6 @@ Current hardware/software requirements:
Linux ndiswrapper (http://ndiswrapper.sourceforge.net/) with
Windows NDIS driver.
- Broadcom wl.o driver (old version only)
- This is a generic Linux driver for Broadcom IEEE 802.11a/g cards.
- However, it is proprietary driver that is not publicly available
- except for couple of exceptions, mainly Broadcom-based APs/wireless
- routers that use Linux. The driver binary can be downloaded, e.g.,
- from Linksys support site (http://www.linksys.com/support/gpl.asp)
- for Linksys WRT54G. The GPL tarball includes cross-compiler and
- the needed header file, wlioctl.h, for compiling wpa_supplicant.
- This driver support in wpa_supplicant is expected to work also with
- other devices based on Broadcom driver (assuming the driver includes
- client mode support). Please note that the newer Broadcom driver
- ("hybrid Linux driver") supports Linux wireless extensions and does
- not need (or even work) with the specific driver wrapper. Use -Dwext
- with that driver.
-
In theory, any driver that supports Linux wireless extensions can be
used with IEEE 802.1X (i.e., not WPA) when using ap_scan=0 option in
configuration file.
@@ -385,8 +370,6 @@ interfaces are included.
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_MADWIFI=y
CONFIG_DRIVER_WEXT=y
-CONFIG_DRIVER_RALINK=y
-CONFIG_DRIVER_BROADCOM=y
CONFIG_DRIVER_BSD=y
CONFIG_DRIVER_NDIS=y
@@ -396,7 +379,6 @@ included in the wpa_supplicant package:
CONFIG_DRIVER_HOSTAP=y
CONFIG_DRIVER_MADWIFI=y
CONFIG_DRIVER_WEXT=y
-CONFIG_DRIVER_BROADCOM=y
CONFIG_DRIVER_BSD=y
CONFIG_DRIVER_NDIS=y
CONFIG_IEEE8021X_EAPOL=y
@@ -493,8 +475,6 @@ drivers:
(this can also be used with Linuxant DriverLoader)
madwifi = MADWIFI 802.11 support (Atheros, etc.) (deprecated; use wext)
wext = Linux wireless extensions (generic)
- ralink = Ralink Client driver
- broadcom = Broadcom wl.o driver
wired = wpa_supplicant wired Ethernet driver
roboswitch = wpa_supplicant Broadcom switch driver
bsd = BSD 802.11 support (Atheros, etc.)
diff --git a/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj b/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj
deleted file mode 100644
index 6fea81b..0000000
--- a/wpa_supplicant/xcode/wpa_supplicant.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,513 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 45;
- objects = {
-
-/* Begin PBXBuildFile section */
- 881EED0F10DC14EF009E449F /* eap_register.c in Sources */ = {isa = PBXBuildFile; fileRef = 881EED0E10DC14EF009E449F /* eap_register.c */; };
- 8853CB17109F385C00358CEF /* libpcap.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB16109F385C00358CEF /* libpcap.dylib */; };
- 8853CB1B109F389800358CEF /* libcrypto.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB1A109F389800358CEF /* libcrypto.dylib */; };
- 8853CB1F109F38BD00358CEF /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB1E109F38BD00358CEF /* CoreFoundation.framework */; };
- 8853CB2E109F3A3900358CEF /* scan_helpers.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CB2D109F3A3900358CEF /* scan_helpers.c */; };
- 8853CB32109F3A9400358CEF /* wpa_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CB31109F3A9400358CEF /* wpa_common.c */; };
- 8853CB36109F3AC700358CEF /* md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CB35109F3AC700358CEF /* md5.c */; };
- 8853CB3C109F3B5800358CEF /* Apple80211.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CB3B109F3B5800358CEF /* Apple80211.framework */; };
- 8853CBFB109F4C6E00358CEF /* eap_gtc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBEC109F4C6E00358CEF /* eap_gtc.c */; };
- 8853CBFC109F4C6E00358CEF /* eap_leap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBED109F4C6E00358CEF /* eap_leap.c */; };
- 8853CBFD109F4C6E00358CEF /* eap_md5.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBEE109F4C6E00358CEF /* eap_md5.c */; };
- 8853CBFE109F4C6E00358CEF /* eap_methods.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBEF109F4C6E00358CEF /* eap_methods.c */; };
- 8853CBFF109F4C6E00358CEF /* eap_mschapv2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF0109F4C6E00358CEF /* eap_mschapv2.c */; };
- 8853CC00109F4C6E00358CEF /* eap_otp.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF1109F4C6E00358CEF /* eap_otp.c */; };
- 8853CC01109F4C6E00358CEF /* eap_peap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF2109F4C6E00358CEF /* eap_peap.c */; };
- 8853CC02109F4C6E00358CEF /* eap_tls_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF3109F4C6E00358CEF /* eap_tls_common.c */; };
- 8853CC03109F4C6E00358CEF /* eap_tls.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF4109F4C6E00358CEF /* eap_tls.c */; };
- 8853CC04109F4C6E00358CEF /* eap_tnc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF5109F4C6E00358CEF /* eap_tnc.c */; };
- 8853CC05109F4C6E00358CEF /* eap_ttls.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF6109F4C6E00358CEF /* eap_ttls.c */; };
- 8853CC06109F4C6E00358CEF /* eap_wsc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF7109F4C6E00358CEF /* eap_wsc.c */; };
- 8853CC07109F4C6E00358CEF /* eap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF8109F4C6E00358CEF /* eap.c */; };
- 8853CC08109F4C6E00358CEF /* mschapv2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBF9109F4C6E00358CEF /* mschapv2.c */; };
- 8853CC09109F4C6E00358CEF /* tncc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CBFA109F4C6E00358CEF /* tncc.c */; };
- 8853CC0E109F4CA100358CEF /* ctrl_iface_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC0C109F4CA100358CEF /* ctrl_iface_unix.c */; };
- 8853CC0F109F4CA100358CEF /* ctrl_iface.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC0D109F4CA100358CEF /* ctrl_iface.c */; };
- 8853CC11109F4CC800358CEF /* eapol_supp_sm.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC10109F4CC800358CEF /* eapol_supp_sm.c */; };
- 8853CC18109F4D0800358CEF /* chap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC14109F4D0800358CEF /* chap.c */; };
- 8853CC19109F4D0800358CEF /* eap_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC15109F4D0800358CEF /* eap_common.c */; };
- 8853CC1A109F4D0800358CEF /* eap_peap_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC16109F4D0800358CEF /* eap_peap_common.c */; };
- 8853CC1B109F4D0800358CEF /* eap_wsc_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC17109F4D0800358CEF /* eap_wsc_common.c */; };
- 8853CC26109F4D3500358CEF /* wps_attr_build.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC1E109F4D3500358CEF /* wps_attr_build.c */; };
- 8853CC27109F4D3500358CEF /* wps_attr_parse.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC1F109F4D3500358CEF /* wps_attr_parse.c */; };
- 8853CC28109F4D3500358CEF /* wps_attr_process.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC20109F4D3500358CEF /* wps_attr_process.c */; };
- 8853CC29109F4D3500358CEF /* wps_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC21109F4D3500358CEF /* wps_common.c */; };
- 8853CC2A109F4D3500358CEF /* wps_dev_attr.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC22109F4D3500358CEF /* wps_dev_attr.c */; };
- 8853CC2B109F4D3500358CEF /* wps_enrollee.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC23109F4D3500358CEF /* wps_enrollee.c */; };
- 8853CC2C109F4D3500358CEF /* wps_registrar.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC24109F4D3500358CEF /* wps_registrar.c */; };
- 8853CC2D109F4D3500358CEF /* wps.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC25109F4D3500358CEF /* wps.c */; };
- 8853CC34109F4DE200358CEF /* ms_funcs.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC32109F4DE200358CEF /* ms_funcs.c */; };
- 8853CC35109F4DE200358CEF /* tls_openssl.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC33109F4DE200358CEF /* tls_openssl.c */; };
- 8853CC3C109F4E1D00358CEF /* libssl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8853CC3B109F4E1D00358CEF /* libssl.dylib */; };
- 8853CC40109F4E3A00358CEF /* wps_supplicant.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC3F109F4E3A00358CEF /* wps_supplicant.c */; };
- 8853CC44109F4E6200358CEF /* uuid.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC43109F4E6200358CEF /* uuid.c */; };
- 8853CC48109F4E8700358CEF /* ieee802_11_common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC47109F4E8700358CEF /* ieee802_11_common.c */; };
- 8853CC4E109F4ED500358CEF /* sha256.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC4C109F4ED500358CEF /* sha256.c */; };
- 8853CC53109F4F3500358CEF /* aes-cbc.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC51109F4F3500358CEF /* aes-cbc.c */; };
- 8853CC54109F4F3500358CEF /* sha1-tlsprf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8853CC52109F4F3500358CEF /* sha1-tlsprf.c */; };
- 88950831109F2FAB004FB35D /* blacklist.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950828109F2FAB004FB35D /* blacklist.c */; };
- 88950832109F2FAB004FB35D /* config_file.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950829109F2FAB004FB35D /* config_file.c */; };
- 88950833109F2FAB004FB35D /* config.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082A109F2FAB004FB35D /* config.c */; };
- 88950834109F2FAB004FB35D /* events.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082B109F2FAB004FB35D /* events.c */; };
- 88950835109F2FAB004FB35D /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082C109F2FAB004FB35D /* main.c */; };
- 88950836109F2FAB004FB35D /* notify.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082D109F2FAB004FB35D /* notify.c */; };
- 88950837109F2FAB004FB35D /* scan.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082E109F2FAB004FB35D /* scan.c */; };
- 88950838109F2FAB004FB35D /* wpa_supplicant.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895082F109F2FAB004FB35D /* wpa_supplicant.c */; };
- 88950839109F2FAB004FB35D /* wpas_glue.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950830109F2FAB004FB35D /* wpas_glue.c */; };
- 88950840109F301A004FB35D /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083A109F301A004FB35D /* base64.c */; };
- 88950841109F301A004FB35D /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083B109F301A004FB35D /* common.c */; };
- 88950842109F301A004FB35D /* eloop.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083C109F301A004FB35D /* eloop.c */; };
- 88950843109F301A004FB35D /* os_unix.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083D109F301A004FB35D /* os_unix.c */; };
- 88950844109F301A004FB35D /* wpa_debug.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083E109F301A004FB35D /* wpa_debug.c */; };
- 88950845109F301A004FB35D /* wpabuf.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895083F109F301A004FB35D /* wpabuf.c */; };
- 88950864109F32D1004FB35D /* peerkey.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895085F109F32D1004FB35D /* peerkey.c */; };
- 88950865109F32D1004FB35D /* pmksa_cache.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950860109F32D1004FB35D /* pmksa_cache.c */; };
- 88950866109F32D1004FB35D /* preauth.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950861109F32D1004FB35D /* preauth.c */; };
- 88950867109F32D1004FB35D /* wpa_ie.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950862109F32D1004FB35D /* wpa_ie.c */; };
- 88950868109F32D1004FB35D /* wpa.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950863109F32D1004FB35D /* wpa.c */; };
- 8895086C109F3316004FB35D /* l2_packet_freebsd.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086B109F3316004FB35D /* l2_packet_freebsd.c */; };
- 88950871109F3367004FB35D /* aes-unwrap.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086D109F3367004FB35D /* aes-unwrap.c */; };
- 88950872109F3367004FB35D /* crypto_openssl.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086E109F3367004FB35D /* crypto_openssl.c */; };
- 88950873109F3367004FB35D /* sha1-pbkdf2.c in Sources */ = {isa = PBXBuildFile; fileRef = 8895086F109F3367004FB35D /* sha1-pbkdf2.c */; };
- 88950874109F3367004FB35D /* sha1.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950870109F3367004FB35D /* sha1.c */; };
- 88950885109F3538004FB35D /* driver_osx.m in Sources */ = {isa = PBXBuildFile; fileRef = 88950883109F3538004FB35D /* driver_osx.m */; };
- 88950886109F3538004FB35D /* drivers.c in Sources */ = {isa = PBXBuildFile; fileRef = 88950884109F3538004FB35D /* drivers.c */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
- 8DD76FAF0486AB0100D96B5E /* CopyFiles */ = {
- isa = PBXCopyFilesBuildPhase;
- buildActionMask = 8;
- dstPath = /usr/share/man/man1/;
- dstSubfolderSpec = 0;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 1;
- };
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
- 881EED0E10DC14EF009E449F /* eap_register.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_register.c; path = ../eap_register.c; sourceTree = SOURCE_ROOT; };
- 8853CB16109F385C00358CEF /* libpcap.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libpcap.dylib; path = usr/lib/libpcap.dylib; sourceTree = SDKROOT; };
- 8853CB1A109F389800358CEF /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; };
- 8853CB1E109F38BD00358CEF /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
- 8853CB2D109F3A3900358CEF /* scan_helpers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scan_helpers.c; path = ../../src/drivers/scan_helpers.c; sourceTree = SOURCE_ROOT; };
- 8853CB31109F3A9400358CEF /* wpa_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_common.c; path = ../../src/common/wpa_common.c; sourceTree = SOURCE_ROOT; };
- 8853CB35109F3AC700358CEF /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = ../../src/crypto/md5.c; sourceTree = SOURCE_ROOT; };
- 8853CB3B109F3B5800358CEF /* Apple80211.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Apple80211.framework; path = /System/Library/PrivateFrameworks/Apple80211.framework; sourceTree = "<absolute>"; };
- 8853CBEC109F4C6E00358CEF /* eap_gtc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_gtc.c; path = ../../src/eap_peer/eap_gtc.c; sourceTree = SOURCE_ROOT; };
- 8853CBED109F4C6E00358CEF /* eap_leap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_leap.c; path = ../../src/eap_peer/eap_leap.c; sourceTree = SOURCE_ROOT; };
- 8853CBEE109F4C6E00358CEF /* eap_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_md5.c; path = ../../src/eap_peer/eap_md5.c; sourceTree = SOURCE_ROOT; };
- 8853CBEF109F4C6E00358CEF /* eap_methods.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_methods.c; path = ../../src/eap_peer/eap_methods.c; sourceTree = SOURCE_ROOT; };
- 8853CBF0109F4C6E00358CEF /* eap_mschapv2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_mschapv2.c; path = ../../src/eap_peer/eap_mschapv2.c; sourceTree = SOURCE_ROOT; };
- 8853CBF1109F4C6E00358CEF /* eap_otp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_otp.c; path = ../../src/eap_peer/eap_otp.c; sourceTree = SOURCE_ROOT; };
- 8853CBF2109F4C6E00358CEF /* eap_peap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_peap.c; path = ../../src/eap_peer/eap_peap.c; sourceTree = SOURCE_ROOT; };
- 8853CBF3109F4C6E00358CEF /* eap_tls_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_tls_common.c; path = ../../src/eap_peer/eap_tls_common.c; sourceTree = SOURCE_ROOT; };
- 8853CBF4109F4C6E00358CEF /* eap_tls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_tls.c; path = ../../src/eap_peer/eap_tls.c; sourceTree = SOURCE_ROOT; };
- 8853CBF5109F4C6E00358CEF /* eap_tnc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_tnc.c; path = ../../src/eap_peer/eap_tnc.c; sourceTree = SOURCE_ROOT; };
- 8853CBF6109F4C6E00358CEF /* eap_ttls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_ttls.c; path = ../../src/eap_peer/eap_ttls.c; sourceTree = SOURCE_ROOT; };
- 8853CBF7109F4C6E00358CEF /* eap_wsc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_wsc.c; path = ../../src/eap_peer/eap_wsc.c; sourceTree = SOURCE_ROOT; };
- 8853CBF8109F4C6E00358CEF /* eap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap.c; path = ../../src/eap_peer/eap.c; sourceTree = SOURCE_ROOT; };
- 8853CBF9109F4C6E00358CEF /* mschapv2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mschapv2.c; path = ../../src/eap_peer/mschapv2.c; sourceTree = SOURCE_ROOT; };
- 8853CBFA109F4C6E00358CEF /* tncc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tncc.c; path = ../../src/eap_peer/tncc.c; sourceTree = SOURCE_ROOT; };
- 8853CC0C109F4CA100358CEF /* ctrl_iface_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ctrl_iface_unix.c; path = ../ctrl_iface_unix.c; sourceTree = SOURCE_ROOT; };
- 8853CC0D109F4CA100358CEF /* ctrl_iface.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ctrl_iface.c; path = ../ctrl_iface.c; sourceTree = SOURCE_ROOT; };
- 8853CC10109F4CC800358CEF /* eapol_supp_sm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eapol_supp_sm.c; path = ../../src/eapol_supp/eapol_supp_sm.c; sourceTree = SOURCE_ROOT; };
- 8853CC14109F4D0800358CEF /* chap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = chap.c; path = ../../src/eap_common/chap.c; sourceTree = SOURCE_ROOT; };
- 8853CC15109F4D0800358CEF /* eap_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_common.c; path = ../../src/eap_common/eap_common.c; sourceTree = SOURCE_ROOT; };
- 8853CC16109F4D0800358CEF /* eap_peap_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_peap_common.c; path = ../../src/eap_common/eap_peap_common.c; sourceTree = SOURCE_ROOT; };
- 8853CC17109F4D0800358CEF /* eap_wsc_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eap_wsc_common.c; path = ../../src/eap_common/eap_wsc_common.c; sourceTree = SOURCE_ROOT; };
- 8853CC1E109F4D3500358CEF /* wps_attr_build.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_attr_build.c; path = ../../src/wps/wps_attr_build.c; sourceTree = SOURCE_ROOT; };
- 8853CC1F109F4D3500358CEF /* wps_attr_parse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_attr_parse.c; path = ../../src/wps/wps_attr_parse.c; sourceTree = SOURCE_ROOT; };
- 8853CC20109F4D3500358CEF /* wps_attr_process.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_attr_process.c; path = ../../src/wps/wps_attr_process.c; sourceTree = SOURCE_ROOT; };
- 8853CC21109F4D3500358CEF /* wps_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_common.c; path = ../../src/wps/wps_common.c; sourceTree = SOURCE_ROOT; };
- 8853CC22109F4D3500358CEF /* wps_dev_attr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_dev_attr.c; path = ../../src/wps/wps_dev_attr.c; sourceTree = SOURCE_ROOT; };
- 8853CC23109F4D3500358CEF /* wps_enrollee.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_enrollee.c; path = ../../src/wps/wps_enrollee.c; sourceTree = SOURCE_ROOT; };
- 8853CC24109F4D3500358CEF /* wps_registrar.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_registrar.c; path = ../../src/wps/wps_registrar.c; sourceTree = SOURCE_ROOT; };
- 8853CC25109F4D3500358CEF /* wps.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps.c; path = ../../src/wps/wps.c; sourceTree = SOURCE_ROOT; };
- 8853CC32109F4DE200358CEF /* ms_funcs.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ms_funcs.c; path = ../../src/crypto/ms_funcs.c; sourceTree = SOURCE_ROOT; };
- 8853CC33109F4DE200358CEF /* tls_openssl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tls_openssl.c; path = ../../src/crypto/tls_openssl.c; sourceTree = SOURCE_ROOT; };
- 8853CC3B109F4E1D00358CEF /* libssl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libssl.dylib; path = usr/lib/libssl.dylib; sourceTree = SDKROOT; };
- 8853CC3F109F4E3A00358CEF /* wps_supplicant.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wps_supplicant.c; path = ../wps_supplicant.c; sourceTree = SOURCE_ROOT; };
- 8853CC43109F4E6200358CEF /* uuid.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = uuid.c; path = ../../src/utils/uuid.c; sourceTree = SOURCE_ROOT; };
- 8853CC47109F4E8700358CEF /* ieee802_11_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ieee802_11_common.c; path = ../../src/common/ieee802_11_common.c; sourceTree = SOURCE_ROOT; };
- 8853CC4C109F4ED500358CEF /* sha256.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha256.c; path = ../../src/crypto/sha256.c; sourceTree = SOURCE_ROOT; };
- 8853CC51109F4F3500358CEF /* aes-cbc.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "aes-cbc.c"; path = "../../src/crypto/aes-cbc.c"; sourceTree = SOURCE_ROOT; };
- 8853CC52109F4F3500358CEF /* sha1-tlsprf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sha1-tlsprf.c"; path = "../../src/crypto/sha1-tlsprf.c"; sourceTree = SOURCE_ROOT; };
- 88950828109F2FAB004FB35D /* blacklist.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blacklist.c; path = ../../wpa_supplicant/blacklist.c; sourceTree = SOURCE_ROOT; };
- 88950829109F2FAB004FB35D /* config_file.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config_file.c; path = ../../wpa_supplicant/config_file.c; sourceTree = SOURCE_ROOT; };
- 8895082A109F2FAB004FB35D /* config.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = config.c; path = ../../wpa_supplicant/config.c; sourceTree = SOURCE_ROOT; };
- 8895082B109F2FAB004FB35D /* events.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = events.c; path = ../../wpa_supplicant/events.c; sourceTree = SOURCE_ROOT; };
- 8895082C109F2FAB004FB35D /* main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = main.c; path = ../../wpa_supplicant/main.c; sourceTree = SOURCE_ROOT; };
- 8895082D109F2FAB004FB35D /* notify.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = notify.c; path = ../../wpa_supplicant/notify.c; sourceTree = SOURCE_ROOT; };
- 8895082E109F2FAB004FB35D /* scan.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = scan.c; path = ../../wpa_supplicant/scan.c; sourceTree = SOURCE_ROOT; };
- 8895082F109F2FAB004FB35D /* wpa_supplicant.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_supplicant.c; path = ../../wpa_supplicant/wpa_supplicant.c; sourceTree = SOURCE_ROOT; };
- 88950830109F2FAB004FB35D /* wpas_glue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpas_glue.c; path = ../../wpa_supplicant/wpas_glue.c; sourceTree = SOURCE_ROOT; };
- 8895083A109F301A004FB35D /* base64.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = base64.c; path = ../../src/utils/base64.c; sourceTree = SOURCE_ROOT; };
- 8895083B109F301A004FB35D /* common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = common.c; path = ../../src/utils/common.c; sourceTree = SOURCE_ROOT; };
- 8895083C109F301A004FB35D /* eloop.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = eloop.c; path = ../../src/utils/eloop.c; sourceTree = SOURCE_ROOT; };
- 8895083D109F301A004FB35D /* os_unix.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = os_unix.c; path = ../../src/utils/os_unix.c; sourceTree = SOURCE_ROOT; };
- 8895083E109F301A004FB35D /* wpa_debug.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_debug.c; path = ../../src/utils/wpa_debug.c; sourceTree = SOURCE_ROOT; };
- 8895083F109F301A004FB35D /* wpabuf.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpabuf.c; path = ../../src/utils/wpabuf.c; sourceTree = SOURCE_ROOT; };
- 8895085F109F32D1004FB35D /* peerkey.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = peerkey.c; path = ../../src/rsn_supp/peerkey.c; sourceTree = SOURCE_ROOT; };
- 88950860109F32D1004FB35D /* pmksa_cache.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pmksa_cache.c; path = ../../src/rsn_supp/pmksa_cache.c; sourceTree = SOURCE_ROOT; };
- 88950861109F32D1004FB35D /* preauth.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = preauth.c; path = ../../src/rsn_supp/preauth.c; sourceTree = SOURCE_ROOT; };
- 88950862109F32D1004FB35D /* wpa_ie.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa_ie.c; path = ../../src/rsn_supp/wpa_ie.c; sourceTree = SOURCE_ROOT; };
- 88950863109F32D1004FB35D /* wpa.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wpa.c; path = ../../src/rsn_supp/wpa.c; sourceTree = SOURCE_ROOT; };
- 8895086B109F3316004FB35D /* l2_packet_freebsd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = l2_packet_freebsd.c; path = ../../src/l2_packet/l2_packet_freebsd.c; sourceTree = SOURCE_ROOT; };
- 8895086D109F3367004FB35D /* aes-unwrap.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "aes-unwrap.c"; path = "../../src/crypto/aes-unwrap.c"; sourceTree = SOURCE_ROOT; };
- 8895086E109F3367004FB35D /* crypto_openssl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = crypto_openssl.c; path = ../../src/crypto/crypto_openssl.c; sourceTree = SOURCE_ROOT; };
- 8895086F109F3367004FB35D /* sha1-pbkdf2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "sha1-pbkdf2.c"; path = "../../src/crypto/sha1-pbkdf2.c"; sourceTree = SOURCE_ROOT; };
- 88950870109F3367004FB35D /* sha1.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = sha1.c; path = ../../src/crypto/sha1.c; sourceTree = SOURCE_ROOT; };
- 88950883109F3538004FB35D /* driver_osx.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = driver_osx.m; path = ../../src/drivers/driver_osx.m; sourceTree = SOURCE_ROOT; };
- 88950884109F3538004FB35D /* drivers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = drivers.c; path = ../../src/drivers/drivers.c; sourceTree = SOURCE_ROOT; };
- 8DD76FB20486AB0100D96B5E /* wpa_supplicant */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = wpa_supplicant; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 8DD76FAD0486AB0100D96B5E /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 8853CB17109F385C00358CEF /* libpcap.dylib in Frameworks */,
- 8853CB1B109F389800358CEF /* libcrypto.dylib in Frameworks */,
- 8853CB1F109F38BD00358CEF /* CoreFoundation.framework in Frameworks */,
- 8853CB3C109F3B5800358CEF /* Apple80211.framework in Frameworks */,
- 8853CC3C109F4E1D00358CEF /* libssl.dylib in Frameworks */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 08FB7794FE84155DC02AAC07 /* wpa_supplicant */ = {
- isa = PBXGroup;
- children = (
- 08FB7795FE84155DC02AAC07 /* Source */,
- C6A0FF2B0290797F04C91782 /* Documentation */,
- 1AB674ADFE9D54B511CA2CBB /* Products */,
- 8853CB16109F385C00358CEF /* libpcap.dylib */,
- 8853CB1A109F389800358CEF /* libcrypto.dylib */,
- 8853CB1E109F38BD00358CEF /* CoreFoundation.framework */,
- 8853CB3B109F3B5800358CEF /* Apple80211.framework */,
- 8853CC3B109F4E1D00358CEF /* libssl.dylib */,
- );
- name = wpa_supplicant;
- sourceTree = "<group>";
- };
- 08FB7795FE84155DC02AAC07 /* Source */ = {
- isa = PBXGroup;
- children = (
- 881EED0E10DC14EF009E449F /* eap_register.c */,
- 8853CC51109F4F3500358CEF /* aes-cbc.c */,
- 8853CC52109F4F3500358CEF /* sha1-tlsprf.c */,
- 8853CC4C109F4ED500358CEF /* sha256.c */,
- 8853CC47109F4E8700358CEF /* ieee802_11_common.c */,
- 8853CC43109F4E6200358CEF /* uuid.c */,
- 8853CC3F109F4E3A00358CEF /* wps_supplicant.c */,
- 8853CC32109F4DE200358CEF /* ms_funcs.c */,
- 8853CC33109F4DE200358CEF /* tls_openssl.c */,
- 8853CC1E109F4D3500358CEF /* wps_attr_build.c */,
- 8853CC1F109F4D3500358CEF /* wps_attr_parse.c */,
- 8853CC20109F4D3500358CEF /* wps_attr_process.c */,
- 8853CC21109F4D3500358CEF /* wps_common.c */,
- 8853CC22109F4D3500358CEF /* wps_dev_attr.c */,
- 8853CC23109F4D3500358CEF /* wps_enrollee.c */,
- 8853CC24109F4D3500358CEF /* wps_registrar.c */,
- 8853CC25109F4D3500358CEF /* wps.c */,
- 8853CC14109F4D0800358CEF /* chap.c */,
- 8853CC15109F4D0800358CEF /* eap_common.c */,
- 8853CC16109F4D0800358CEF /* eap_peap_common.c */,
- 8853CC17109F4D0800358CEF /* eap_wsc_common.c */,
- 8853CC10109F4CC800358CEF /* eapol_supp_sm.c */,
- 8853CC0C109F4CA100358CEF /* ctrl_iface_unix.c */,
- 8853CC0D109F4CA100358CEF /* ctrl_iface.c */,
- 8853CBEC109F4C6E00358CEF /* eap_gtc.c */,
- 8853CBED109F4C6E00358CEF /* eap_leap.c */,
- 8853CBEE109F4C6E00358CEF /* eap_md5.c */,
- 8853CBEF109F4C6E00358CEF /* eap_methods.c */,
- 8853CBF0109F4C6E00358CEF /* eap_mschapv2.c */,
- 8853CBF1109F4C6E00358CEF /* eap_otp.c */,
- 8853CBF2109F4C6E00358CEF /* eap_peap.c */,
- 8853CBF3109F4C6E00358CEF /* eap_tls_common.c */,
- 8853CBF4109F4C6E00358CEF /* eap_tls.c */,
- 8853CBF5109F4C6E00358CEF /* eap_tnc.c */,
- 8853CBF6109F4C6E00358CEF /* eap_ttls.c */,
- 8853CBF7109F4C6E00358CEF /* eap_wsc.c */,
- 8853CBF8109F4C6E00358CEF /* eap.c */,
- 8853CBF9109F4C6E00358CEF /* mschapv2.c */,
- 8853CBFA109F4C6E00358CEF /* tncc.c */,
- 8853CB35109F3AC700358CEF /* md5.c */,
- 8853CB31109F3A9400358CEF /* wpa_common.c */,
- 8853CB2D109F3A3900358CEF /* scan_helpers.c */,
- 88950883109F3538004FB35D /* driver_osx.m */,
- 88950884109F3538004FB35D /* drivers.c */,
- 8895086D109F3367004FB35D /* aes-unwrap.c */,
- 8895086E109F3367004FB35D /* crypto_openssl.c */,
- 8895086F109F3367004FB35D /* sha1-pbkdf2.c */,
- 88950870109F3367004FB35D /* sha1.c */,
- 8895086B109F3316004FB35D /* l2_packet_freebsd.c */,
- 8895085F109F32D1004FB35D /* peerkey.c */,
- 88950860109F32D1004FB35D /* pmksa_cache.c */,
- 88950861109F32D1004FB35D /* preauth.c */,
- 88950862109F32D1004FB35D /* wpa_ie.c */,
- 88950863109F32D1004FB35D /* wpa.c */,
- 8895083A109F301A004FB35D /* base64.c */,
- 8895083B109F301A004FB35D /* common.c */,
- 8895083C109F301A004FB35D /* eloop.c */,
- 8895083D109F301A004FB35D /* os_unix.c */,
- 8895083E109F301A004FB35D /* wpa_debug.c */,
- 8895083F109F301A004FB35D /* wpabuf.c */,
- 88950828109F2FAB004FB35D /* blacklist.c */,
- 88950829109F2FAB004FB35D /* config_file.c */,
- 8895082A109F2FAB004FB35D /* config.c */,
- 8895082B109F2FAB004FB35D /* events.c */,
- 8895082C109F2FAB004FB35D /* main.c */,
- 8895082D109F2FAB004FB35D /* notify.c */,
- 8895082E109F2FAB004FB35D /* scan.c */,
- 8895082F109F2FAB004FB35D /* wpa_supplicant.c */,
- 88950830109F2FAB004FB35D /* wpas_glue.c */,
- );
- name = Source;
- sourceTree = "<group>";
- };
- 1AB674ADFE9D54B511CA2CBB /* Products */ = {
- isa = PBXGroup;
- children = (
- 8DD76FB20486AB0100D96B5E /* wpa_supplicant */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- C6A0FF2B0290797F04C91782 /* Documentation */ = {
- isa = PBXGroup;
- children = (
- );
- name = Documentation;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
- 8DD76FA90486AB0100D96B5E /* wpa_supplicant */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "wpa_supplicant" */;
- buildPhases = (
- 8DD76FAB0486AB0100D96B5E /* Sources */,
- 8DD76FAD0486AB0100D96B5E /* Frameworks */,
- 8DD76FAF0486AB0100D96B5E /* CopyFiles */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = wpa_supplicant;
- productInstallPath = "$(HOME)/bin";
- productName = wpa_supplicant;
- productReference = 8DD76FB20486AB0100D96B5E /* wpa_supplicant */;
- productType = "com.apple.product-type.tool";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 08FB7793FE84155DC02AAC07 /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "wpa_supplicant" */;
- compatibilityVersion = "Xcode 3.1";
- hasScannedForEncodings = 1;
- mainGroup = 08FB7794FE84155DC02AAC07 /* wpa_supplicant */;
- projectDirPath = "";
- projectRoot = "";
- targets = (
- 8DD76FA90486AB0100D96B5E /* wpa_supplicant */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
- 8DD76FAB0486AB0100D96B5E /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 88950831109F2FAB004FB35D /* blacklist.c in Sources */,
- 88950832109F2FAB004FB35D /* config_file.c in Sources */,
- 88950833109F2FAB004FB35D /* config.c in Sources */,
- 88950834109F2FAB004FB35D /* events.c in Sources */,
- 88950835109F2FAB004FB35D /* main.c in Sources */,
- 88950836109F2FAB004FB35D /* notify.c in Sources */,
- 88950837109F2FAB004FB35D /* scan.c in Sources */,
- 88950838109F2FAB004FB35D /* wpa_supplicant.c in Sources */,
- 88950839109F2FAB004FB35D /* wpas_glue.c in Sources */,
- 88950840109F301A004FB35D /* base64.c in Sources */,
- 88950841109F301A004FB35D /* common.c in Sources */,
- 88950842109F301A004FB35D /* eloop.c in Sources */,
- 88950843109F301A004FB35D /* os_unix.c in Sources */,
- 88950844109F301A004FB35D /* wpa_debug.c in Sources */,
- 88950845109F301A004FB35D /* wpabuf.c in Sources */,
- 88950864109F32D1004FB35D /* peerkey.c in Sources */,
- 88950865109F32D1004FB35D /* pmksa_cache.c in Sources */,
- 88950866109F32D1004FB35D /* preauth.c in Sources */,
- 88950867109F32D1004FB35D /* wpa_ie.c in Sources */,
- 88950868109F32D1004FB35D /* wpa.c in Sources */,
- 8895086C109F3316004FB35D /* l2_packet_freebsd.c in Sources */,
- 88950871109F3367004FB35D /* aes-unwrap.c in Sources */,
- 88950872109F3367004FB35D /* crypto_openssl.c in Sources */,
- 88950873109F3367004FB35D /* sha1-pbkdf2.c in Sources */,
- 88950874109F3367004FB35D /* sha1.c in Sources */,
- 88950885109F3538004FB35D /* driver_osx.m in Sources */,
- 88950886109F3538004FB35D /* drivers.c in Sources */,
- 8853CB2E109F3A3900358CEF /* scan_helpers.c in Sources */,
- 8853CB32109F3A9400358CEF /* wpa_common.c in Sources */,
- 8853CB36109F3AC700358CEF /* md5.c in Sources */,
- 8853CBFB109F4C6E00358CEF /* eap_gtc.c in Sources */,
- 8853CBFC109F4C6E00358CEF /* eap_leap.c in Sources */,
- 8853CBFD109F4C6E00358CEF /* eap_md5.c in Sources */,
- 8853CBFE109F4C6E00358CEF /* eap_methods.c in Sources */,
- 8853CBFF109F4C6E00358CEF /* eap_mschapv2.c in Sources */,
- 8853CC00109F4C6E00358CEF /* eap_otp.c in Sources */,
- 8853CC01109F4C6E00358CEF /* eap_peap.c in Sources */,
- 8853CC02109F4C6E00358CEF /* eap_tls_common.c in Sources */,
- 8853CC03109F4C6E00358CEF /* eap_tls.c in Sources */,
- 8853CC04109F4C6E00358CEF /* eap_tnc.c in Sources */,
- 8853CC05109F4C6E00358CEF /* eap_ttls.c in Sources */,
- 8853CC06109F4C6E00358CEF /* eap_wsc.c in Sources */,
- 8853CC07109F4C6E00358CEF /* eap.c in Sources */,
- 8853CC08109F4C6E00358CEF /* mschapv2.c in Sources */,
- 8853CC09109F4C6E00358CEF /* tncc.c in Sources */,
- 8853CC0E109F4CA100358CEF /* ctrl_iface_unix.c in Sources */,
- 8853CC0F109F4CA100358CEF /* ctrl_iface.c in Sources */,
- 8853CC11109F4CC800358CEF /* eapol_supp_sm.c in Sources */,
- 8853CC18109F4D0800358CEF /* chap.c in Sources */,
- 8853CC19109F4D0800358CEF /* eap_common.c in Sources */,
- 8853CC1A109F4D0800358CEF /* eap_peap_common.c in Sources */,
- 8853CC1B109F4D0800358CEF /* eap_wsc_common.c in Sources */,
- 8853CC26109F4D3500358CEF /* wps_attr_build.c in Sources */,
- 8853CC27109F4D3500358CEF /* wps_attr_parse.c in Sources */,
- 8853CC28109F4D3500358CEF /* wps_attr_process.c in Sources */,
- 8853CC29109F4D3500358CEF /* wps_common.c in Sources */,
- 8853CC2A109F4D3500358CEF /* wps_dev_attr.c in Sources */,
- 8853CC2B109F4D3500358CEF /* wps_enrollee.c in Sources */,
- 8853CC2C109F4D3500358CEF /* wps_registrar.c in Sources */,
- 8853CC2D109F4D3500358CEF /* wps.c in Sources */,
- 8853CC34109F4DE200358CEF /* ms_funcs.c in Sources */,
- 8853CC35109F4DE200358CEF /* tls_openssl.c in Sources */,
- 8853CC40109F4E3A00358CEF /* wps_supplicant.c in Sources */,
- 8853CC44109F4E6200358CEF /* uuid.c in Sources */,
- 8853CC48109F4E8700358CEF /* ieee802_11_common.c in Sources */,
- 8853CC4E109F4ED500358CEF /* sha256.c in Sources */,
- 8853CC53109F4F3500358CEF /* aes-cbc.c in Sources */,
- 8853CC54109F4F3500358CEF /* sha1-tlsprf.c in Sources */,
- 881EED0F10DC14EF009E449F /* eap_register.c in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 1DEB928608733DD80010E9CD /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- COPY_PHASE_STRIP = NO;
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
- );
- GCC_DYNAMIC_NO_PIC = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_MODEL_TUNING = G5;
- GCC_OPTIMIZATION_LEVEL = 0;
- INSTALL_PATH = /usr/local/bin;
- PRODUCT_NAME = wpa_supplicant;
- };
- name = Debug;
- };
- 1DEB928708733DD80010E9CD /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ALWAYS_SEARCH_USER_PATHS = NO;
- DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
- FRAMEWORK_SEARCH_PATHS = (
- "$(inherited)",
- "\"$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks\"",
- );
- GCC_MODEL_TUNING = G5;
- INSTALL_PATH = /usr/local/bin;
- PRODUCT_NAME = wpa_supplicant;
- };
- name = Release;
- };
- 1DEB928A08733DD80010E9CD /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- ../../src,
- ../../src/utils,
- );
- ONLY_ACTIVE_ARCH = YES;
- OTHER_CFLAGS = "-DCONFIG_XCODE_DEFAULTS";
- PREBINDING = NO;
- PRELINK_LIBS = "";
- RUN_CLANG_STATIC_ANALYZER = YES;
- SDKROOT = macosx10.6;
- };
- name = Debug;
- };
- 1DEB928B08733DD80010E9CD /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
- FRAMEWORK_SEARCH_PATHS = /System/Library/PrivateFrameworks;
- GCC_C_LANGUAGE_STANDARD = gnu99;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- HEADER_SEARCH_PATHS = (
- ../../src,
- ../../src/utils,
- );
- OTHER_CFLAGS = "-DCONFIG_XCODE_DEFAULTS";
- PREBINDING = NO;
- SDKROOT = macosx10.6;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 1DEB928508733DD80010E9CD /* Build configuration list for PBXNativeTarget "wpa_supplicant" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 1DEB928608733DD80010E9CD /* Debug */,
- 1DEB928708733DD80010E9CD /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 1DEB928908733DD80010E9CD /* Build configuration list for PBXProject "wpa_supplicant" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 1DEB928A08733DD80010E9CD /* Debug */,
- 1DEB928B08733DD80010E9CD /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
-}