[oe-commits] org.oe.dev wpa-supplicant: added 0.4.8 from .oz354x

hrw commit openembedded-commits at lists.openembedded.org
Thu Oct 12 10:49:05 UTC 2006


wpa-supplicant: added 0.4.8 from .oz354x

Author: hrw at openembedded.org
Branch: org.openembedded.dev
Revision: 60605dfd26307f8e6c10619a67ff31ca6dead66e
ViewMTN: http://monotone.openembedded.org/revision.psp?id=60605dfd26307f8e6c10619a67ff31ca6dead66e
Files:
1
packages/wpa-supplicant/wpa-supplicant-0.4.8
packages/wpa-supplicant/files/wpa-supplicant.sh
packages/wpa-supplicant/wpa-supplicant-0.4.8/defconfig
packages/wpa-supplicant/wpa-supplicant-0.4.8/driver-hermes.patch
packages/wpa-supplicant/wpa-supplicant-0.4.8/driver-zd1211.patch
packages/wpa-supplicant/wpa-supplicant-0.4.8/madwifi-bsd-fix.diff
packages/wpa-supplicant/wpa-supplicant-0.4.8/wpa_supplicant.conf
packages/wpa-supplicant/wpa-supplicant_0.4.8.bb
packages/wpa-supplicant/wpa-gui_0.4.8.bb
Diffs:

#
# mt diff -r361b631061a11e5d15012aa0cf357cd63be8e732 -r60605dfd26307f8e6c10619a67ff31ca6dead66e
#
# 
# 
# add_dir "packages/wpa-supplicant/wpa-supplicant-0.4.8"
# 
# add_file "packages/wpa-supplicant/files/wpa-supplicant.sh"
#  content [2ed6d1620c862189152f3473b35f90fc606034f9]
# 
# add_file "packages/wpa-supplicant/wpa-supplicant-0.4.8/defconfig"
#  content [ff6f5010927ec3379d28f0bff1bbd91a7c2af51e]
# 
# add_file "packages/wpa-supplicant/wpa-supplicant-0.4.8/driver-hermes.patch"
#  content [765f5931495dbe83f2bf5d49f9358237476cbdbb]
# 
# add_file "packages/wpa-supplicant/wpa-supplicant-0.4.8/driver-zd1211.patch"
#  content [3cb07060d00e24b6212acd6c731db003a5819f21]
# 
# add_file "packages/wpa-supplicant/wpa-supplicant-0.4.8/madwifi-bsd-fix.diff"
#  content [f81ef6e2abefc19080ec9ccd87757855060dbab8]
# 
# add_file "packages/wpa-supplicant/wpa-supplicant-0.4.8/wpa_supplicant.conf"
#  content [d2c6a774e1a182f6b4fe3d209a5f21823fbf4160]
# 
# add_file "packages/wpa-supplicant/wpa-supplicant_0.4.8.bb"
#  content [1e767932209e4ed0a3d3f7145aca07421d8b0eb0]
# 
# patch "packages/wpa-supplicant/wpa-gui_0.4.8.bb"
#  from [12367d3cec0fbeacc064eaab322166f06c0936b6]
#    to [af2dab35456f68ade6fb102970b28d8cce237e2b]
# 
============================================================
--- packages/wpa-supplicant/files/wpa-supplicant.sh	2ed6d1620c862189152f3473b35f90fc606034f9
+++ packages/wpa-supplicant/files/wpa-supplicant.sh	2ed6d1620c862189152f3473b35f90fc606034f9
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+
+WPA_SUP_BIN="/usr/sbin/wpa_supplicant"
+WPA_SUP_PNAME="wpa_supplicant"
+WPA_SUP_PIDFILE="/var/run/wpa_supplicant.$IFACE.pid"
+WPA_SUP_OPTIONS="-B -P $WPA_SUP_PIDFILE -i $IFACE"
+
+VERBOSITY=0
+
+
+if [ -s "$IF_WPA_CONF" ]; then
+	WPA_SUP_CONF="-c $IF_WPA_CONF"
+else
+	exit 0
+fi
+
+if [ ! -x "$WPA_SUP_BIN" ]; then
+	
+	if [ "$VERBOSITY" = "1" ]; then
+		echo "$WPA_SUP_PNAME: binaries not executable or missing from $WPA_SUP_BIN"
+	fi
+	
+	exit 1
+fi
+
+if [ "$MODE" = "start" ] ; then
+	# driver type of interface, defaults to wext when undefined
+	if [ -s "/etc/wpa_supplicant/driver.$IFACE" ]; then
+		IF_WPA_DRIVER=$(cat "/etc/wpa_supplicant/driver.$IFACE")
+	elif [ -z "$IF_WPA_DRIVER" ]; then
+		
+		if [ "$VERBOSITY" = "1" ]; then
+			echo "$WPA_SUP_PNAME: wpa-driver not provided, using \"wext\""
+		fi
+		
+		IF_WPA_DRIVER="wext"
+	fi
+	
+	# if we have passed the criteria, start wpa_supplicant
+	if [ -n "$WPA_SUP_CONF" ]; then
+		
+		if [ "$VERBOSITY" = "1" ]; then
+			echo "$WPA_SUP_PNAME: $WPA_SUP_BIN $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER"
+		fi
+		
+		start-stop-daemon --start --quiet \
+			--name $WPA_SUP_PNAME --startas $WPA_SUP_BIN --pidfile $WPA_SUP_PIDFILE \
+			--  $WPA_SUP_OPTIONS $WPA_SUP_CONF -D $IF_WPA_DRIVER
+	fi
+
+	# if the interface socket exists, then wpa_supplicant was invoked successfully
+	if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
+	
+		if [ "$VERBOSITY" = "1" ]; then
+			echo "$WPA_SUP_PNAME: ctrl_interface socket located at $WPA_COMMON_CTRL_IFACE/$IFACE"
+		fi
+
+		exit 0
+		
+	fi
+	
+elif [ "$MODE" = "stop" ]; then
+
+	if [ -f "$WPA_SUP_PIDFILE" ]; then
+		
+		if [ "$VERBOSITY" = "1" ]; then
+			echo "$WPA_SUP_PNAME: terminating $WPA_SUP_PNAME daemon"
+		fi
+		
+		start-stop-daemon --stop --quiet \
+			--name $WPA_SUP_PNAME --pidfile	$WPA_SUP_PIDFILE
+			
+		if [ -S "$WPA_COMMON_CTRL_IFACE/$IFACE" ]; then
+			rm -f $WPA_COMMON_CTRL_IFACE/$IFACE
+		fi
+			
+		if [ -f "$WPA_SUP_PIDFILE" ]; then
+			rm -f $WPA_SUP_PIDFILE
+		fi
+	fi
+
+fi
+
+exit 0
============================================================
--- packages/wpa-supplicant/wpa-supplicant-0.4.8/defconfig	ff6f5010927ec3379d28f0bff1bbd91a7c2af51e
+++ packages/wpa-supplicant/wpa-supplicant-0.4.8/defconfig	ff6f5010927ec3379d28f0bff1bbd91a7c2af51e
@@ -0,0 +1,160 @@
+# This file lists the configuration options that are used when building the
+# hostapd binary. All lines starting with # are ignored. Configuration option
+# lines must be commented out complete, if they are not to be included, i.e.,
+# just setting VARIABLE=n is not disabling that variable.
+#
+# This file is included in Makefile, so variables like CFLAGS and LIBS can also
+# be modified from here. In most cass, these lines should use += in order not
+# to override previous values of the variables.
+
+CFLAGS = $(TARGET_CFLAGS) -I../hostapd -I../utils -I../driver/modules -Wall -MMD
+
+# for wpa_supplicant, wpa_cli
+LIBS = $(TARGET_LDFLAGS)
+
+# for wpa_passphrase:
+LIBS_p = $(TARGET_LDFLAGS)
+
+
+# Uncomment following two lines and fix the paths if you have installed openssl
+# in non-default location
+#CFLAGS += -I/usr/local/openssl/include
+#LIBS += -L/usr/local/openssl/lib
+
+# Example configuration for various cross-compilation platforms
+
+#### sveasoft (e.g., for Linksys WRT54G) ######################################
+#CC=mipsel-uclibc-gcc
+#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
+#CFLAGS += -Os
+#CPPFLAGS += -I../src/include -I../../src/router/openssl/include
+#LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl
+###############################################################################
+
+#### openwrt (e.g., for Linksys WRT54G) #######################################
+#CC=mipsel-uclibc-gcc
+#CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc
+#CFLAGS += -Os
+#CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \
+#	-I../WRT54GS/release/src/include
+#LIBS = -lssl
+###############################################################################
+
+
+# Driver interface for Host AP driver
+CONFIG_DRIVER_HOSTAP=y
+
+# Driver interface for Agere driver
+CONFIG_DRIVER_HERMES=y
+
+# Driver interface for madwifi driver
+#CONFIG_DRIVER_MADWIFI=y
+# Change include directories to match with the local setup
+#CFLAGS += -I../madwifi/wpa
+
+# Driver interface for Prism54 driver
+#CONFIG_DRIVER_PRISM54=y
+
+# Driver interface for ndiswrapper
+#CONFIG_DRIVER_NDISWRAPPER=y
+
+# Driver interface for Atmel driver
+#CONFIG_DRIVER_ATMEL=y
+
+# Driver interface for Broadcom driver
+#CONFIG_DRIVER_BROADCOM=y
+# Example path for wlioctl.h; change to match your configuration
+#CFLAGS += -I/opt/WRT54GS/release/src/include
+
+# Driver interface for Intel ipw2100 driver
+#CONFIG_DRIVER_IPW2100=y
+
+# Driver interface for the Zydas zd1211 driver
+CONFIG_DRIVER_ZD1211=y
+
+# Driver interface for generic Linux wireless extensions
+CONFIG_DRIVER_WEXT=y
+
+# Driver interface for FreeBSD net80211 layer (e.g., Atheros driver)
+#CONFIG_DRIVER_BSD=y
+#CFLAGS += -I/usr/local/include
+#LIBS += -L/usr/local/lib
+
+# Driver interface for Windows NDIS
+#CONFIG_DRIVER_NDIS=y
+#CFLAGS += -I/usr/include/w32api/ddk
+#LIBS += -L/usr/local/lib
+# For native build using mingw
+#CONFIG_NATIVE_WINDOWS=y
+# Additional directories for cross-compilation on Linux host for mingw target
+#CFLAGS += -I/opt/mingw/mingw32/include/ddk
+#LIBS += -L/opt/mingw/mingw32/lib
+#CC=mingw32-gcc
+
+# Driver interface for development testing
+#CONFIG_DRIVER_TEST=y
+
+# Enable IEEE 802.1X Supplicant (automatically included if any EAP method is
+# included)
+CONFIG_IEEE8021X_EAPOL=y
+
+# EAP-MD5 (automatically included if EAP-TTLS is enabled)
+CONFIG_EAP_MD5=y
+
+# EAP-MSCHAPv2 (automatically included if EAP-PEAP is enabled)
+CONFIG_EAP_MSCHAPV2=y
+
+# EAP-TLS
+CONFIG_EAP_TLS=y
+
+# EAL-PEAP
+CONFIG_EAP_PEAP=y
+
+# EAP-TTLS
+CONFIG_EAP_TTLS=y
+
+# EAP-GTC
+CONFIG_EAP_GTC=y
+
+# EAP-OTP
+CONFIG_EAP_OTP=y
+
+# EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used)
+#CONFIG_EAP_SIM=y
+
+# EAP-PSK (experimental; this is _not_ needed for WPA-PSK)
+#CONFIG_EAP_PSK=y
+
+# LEAP
+CONFIG_EAP_LEAP=y
+
+# EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used)
+#CONFIG_EAP_AKA=y
+
+# PKCS#12 (PFX) support (used to read private key and certificate file from
+# a file that usually has extension .p12 or .pfx)
+CONFIG_PKCS12=y
+
+# PC/SC interface for smartcards (USIM, GSM SIM)
+# Enable this if EAP-SIM or EAP-AKA is included
+#CONFIG_PCSC=y
+
+# Development testing
+#CONFIG_EAPOL_TEST=y
+
+# Replace native Linux implementation of packet sockets with libdnet/libpcap.
+# This will be automatically set for non-Linux OS.
+#CONFIG_DNET_PCAP=y
+
+# Include control interface for external programs, e.g, wpa_cli
+CONFIG_CTRL_IFACE=y
+
+# Include interface for using external supplicant (Xsupplicant) for EAP
+# authentication
+#CONFIG_XSUPPLICANT_IFACE=y
+
+# Include support for GNU Readline and History Libraries in wpa_cli.
+# When building a wpa_cli binary for distribution, please note that these
+# libraries are licensed under GPL and as such, BSD license may not apply for
+# the resulting binary.
+#CONFIG_READLINE=y
============================================================
--- packages/wpa-supplicant/wpa-supplicant-0.4.8/driver-hermes.patch	765f5931495dbe83f2bf5d49f9358237476cbdbb
+++ packages/wpa-supplicant/wpa-supplicant-0.4.8/driver-hermes.patch	765f5931495dbe83f2bf5d49f9358237476cbdbb
@@ -0,0 +1,889 @@
+
+#
+# Patch managed by http://www.holgerschurig.de/patcher.html
+#
+
+--- /dev/null
++++ wpa_supplicant/driver_hermes.c
+@@ -0,0 +1,705 @@
++/*
++ * WPA Supplicant - testing driver interface
++ * Copyright (c) 2004-2005, Jouni Malinen <jkmaline at cc.hut.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 <stdlib.h>
++#include <stdio.h>
++#include <unistd.h>
++#include <string.h>
++#include <sys/ioctl.h>
++#include <errno.h>
++#include <net/if_arp.h>
++
++#include "wireless_copy.h"
++#include "common.h"
++#include "driver.h"
++
++#include "eloop.h"
++#include "wpa_supplicant.h"
++#include "priv_netlink.h"
++
++#include "driver_wext.h"
++#include "driver_hermes.h"
++
++#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5] 
++#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
++
++/* Enumeration for supported Hermes Types */
++enum
++{
++    WL_HERMES_UNKNOWN = 0,
++    WL_HERMES_1       = 1,
++    WL_HERMES_2       = 2,
++    WL_HERMES_25      = 3
++};
++
++
++
++
++struct wpa_driver_hermes_data {
++	void *wext; /* private data for driver_wext */
++	void *ctx;
++	char ifname[IFNAMSIZ + 1];
++	int sock;
++	int type;
++};
++
++
++
++/****************************************************************************/
++/*                                                                          */
++/* Routines for basic device access to Agere Hermes-I/Hermes-II via the UIL */
++/*                                                                          */
++/****************************************************************************/
++
++IFBP _connect(void *priv)
++{
++        struct wpa_driver_hermes_data *drv = priv;
++	int		result = 0;
++	IFBP		ifbp = NULL;
++	struct uilreq	urq;
++
++	//wpa_printf(MSG_DEBUG, "%s: %s %d", __FUNCTION__, drv->ifname, drv->sock);
++
++	memset(&urq, 0, sizeof(urq));
++
++	strcpy(urq.ifr_name, drv->ifname);
++	urq.command = UIL_FUN_CONNECT;
++	
++	result = ioctl(drv->sock, WVLAN2_IOCTL_UIL, &urq);
++	if (result == 0 && urq.result == UIL_SUCCESS) {
++		ifbp = urq.hcfCtx;
++	} else {
++		wpa_printf(MSG_DEBUG, "%s: could not set IFBP, result %d", __FUNCTION__, result);
++	}
++	
++	return ifbp;
++}
++
++
++void _disconnect(void *priv, IFBP ifbp)
++{
++        struct wpa_driver_hermes_data *drv = priv;
++	int result = 0;
++	struct uilreq urq;
++
++	//wpa_printf(MSG_DEBUG, "%s: %s", __FUNCTION__, drv->ifname);
++
++	if (ifbp != NULL) {
++		memset(&urq, 0, sizeof(struct uilreq));
++
++		strcpy(urq.ifr_name, drv->ifname);
++		urq.command = UIL_FUN_DISCONNECT;
++		urq.hcfCtx = ifbp;
++
++		result = ioctl(drv->sock, WVLAN2_IOCTL_UIL, &urq);
++	
++		if (result != 0 || urq.result != UIL_SUCCESS) {
++			wpa_printf( MSG_WARNING, "wl_disconnect(): ioctl() failed, errno: %d", errno );
++			wpa_printf( MSG_WARNING, "wl_disconnect(): urq.result: %d", urq.result );
++		}
++	} else {
++		wpa_printf(MSG_WARNING, "wl_disconnect(): called with NULL ifbp");
++	}
++
++	return;
++}
++
++int _get_info(void *priv, ltv_t *ltv)
++{
++        struct wpa_driver_hermes_data *drv = priv;
++	int result = 0;
++	IFBP ifbp = NULL;
++	struct uilreq urq;
++
++	//wpa_printf(MSG_DEBUG, "%s: %s", __FUNCTION__, drv->ifname);
++
++	/* First, connect to the device */
++	ifbp = _connect(priv);
++	if (ifbp != NULL && ltv != NULL) {
++		memset(&urq, 0, sizeof(struct uilreq));
++
++		strcpy(urq.ifr_name, drv->ifname);
++		urq.hcfCtx = ifbp;
++		urq.command = UIL_FUN_GET_INFO;
++		urq.len = sizeof(ltv_t);
++		urq.data = ltv;
++		
++		result = ioctl(drv->sock, WVLAN2_IOCTL_UIL, &urq);
++
++		if (result != 0 || urq.result != UIL_SUCCESS) {
++			wpa_printf(MSG_WARNING, "wl_disconnect(): ioctl() failed, errno: %d", errno);
++			wpa_printf(MSG_WARNING, "wl_disconnect(): urq.result: %d", urq.result);
++		}
++		_disconnect(priv, ifbp);
++	} else {
++		wpa_printf( MSG_WARNING, "Could not connect to the device, or LTV NULL");
++		result = -1;
++	}
++	
++	return result;
++}
++
++int _put_info(void *priv, ltv_t *ltv)
++{
++	struct wpa_driver_hermes_data *drv = priv;
++	int result = 0;
++	IFBP ifbp = NULL;
++	struct uilreq  urq;
++
++	//wpa_printf(MSG_DEBUG, "%s: %s", __FUNCTION__, drv->ifname);
++
++	/* First, connect to the device */
++	ifbp = _connect(priv);
++	if (ifbp != NULL && ltv != NULL) {
++		memset(&urq, 0, sizeof(struct uilreq));
++
++		strcpy(urq.ifr_name, drv->ifname);
++		urq.hcfCtx = ifbp;
++		urq.command = UIL_FUN_PUT_INFO;
++		urq.len = sizeof( ltv_t );
++		urq.data = ltv;
++		
++		result = ioctl(drv->sock, WVLAN2_IOCTL_UIL, &urq);
++		
++		if (result != 0 || urq.result != UIL_SUCCESS) {
++			wpa_printf(MSG_WARNING, "_put_info(): ioctl() failed, errno: %d", errno);
++			wpa_printf(MSG_WARNING, "_put_info(): urq.result: %d", urq.result);
++		}
++
++		_disconnect(priv, ifbp);
++	} else {
++		wpa_printf(MSG_WARNING, "%s: could not connect to the device, or LTV NULL", __FUNCTION__ );
++		result = -1;
++	}
++	
++	return result;
++}
++
++
++static void _detect_hermes_type(void *priv)
++{
++        struct wpa_driver_hermes_data *drv = priv;
++	CFG_FW_IDENTITY_STRCT *fw_id;
++	ltv_t ltv;
++	int result;
++
++	//wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
++
++	drv->type = WL_HERMES_UNKNOWN;
++
++	if (drv->sock >= 0) {
++		fw_id = (CFG_FW_IDENTITY_STRCT *)&ltv;
++		fw_id->len = ( sizeof(CFG_FW_IDENTITY_STRCT) / sizeof( hcf_16 )) - 1;
++		fw_id->typ = CFG_FW_IDENTITY;
++
++		result = _get_info(priv, (ltv_t *)fw_id);
++		if (result == HCF_SUCCESS) {
++			//wpa_printf(MSG_DEBUG, "PRI CompID  : %d", fw_id->comp_id);
++			//wpa_printf(MSG_DEBUG, "PRI Variant : %d", fw_id->variant);
++			//wpa_printf(MSG_DEBUG, "PRI Version : %d.%02d", fw_id->version_major, fw_id->version_minor);
++
++			switch(fw_id->comp_id) {
++			case COMP_ID_FW_STA:
++				switch (fw_id->variant) {
++				case 1:
++				case 2:
++					wpa_printf(MSG_DEBUG, "found Hermes 1 STA");
++					drv->type = WL_HERMES_1;
++					break;
++
++				case 3:
++					wpa_printf(MSG_DEBUG, "found Hermes 2 STA");
++					drv->type = WL_HERMES_2;
++					break;
++				case 4:
++					wpa_printf(MSG_DEBUG, "found Hermes 2.5 STA");
++					drv->type = WL_HERMES_25;
++					break;
++				}
++				break;
++
++			case COMP_ID_FW_AP:
++				switch (fw_id->variant) {
++				case 1:
++					wpa_printf(MSG_DEBUG, "found Hermes 1 AP");
++					drv->type = WL_HERMES_1;
++					break;
++
++				case 2:
++					wpa_printf(MSG_DEBUG, "found Hermes 2 AP" );
++					drv->type = WL_HERMES_2;
++					break;
++				}
++				break;
++
++			default:
++				wpa_printf(MSG_WARNING, "could not detect Hermes type!");
++				break;
++			}
++		}
++	}
++}
++
++
++
++/****************************************************************************/
++
++
++static int wpa_driver_hermes_set_wpa_ie(void *priv, const char *wpa_ie,
++                                        size_t wpa_ie_len)
++{
++        struct wpa_driver_hermes_data *drv = priv;
++	ltv_t   ltv;
++
++	wpa_printf(MSG_DEBUG, "%s", __FUNCTION__);
++
++	ltv.len = 2;
++	ltv.typ = CFG_SET_WPA_AUTH_KEY_MGMT_SUITE;
++
++	switch(drv->type) {
++	case WL_HERMES_1:
++		ltv.u.u16[0] = 2;
++		break;
++
++	case WL_HERMES_2:
++	case WL_HERMES_25:
++		ltv.u.u16[0] = 4;
++		break;
++
++	default:
++		ltv.u.u16[0] = 0;
++		break;
++	}
++
++	return _put_info(priv, &ltv);
++}
++
%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list