3 # Script for testing WPA2 w/ AES.
5 # $FreeBSD: src/tools/tools/net80211/scripts/setup.wpa2,v 1.1 2008/04/20 20:43:42 sam Exp $
13 CONF=$TMPDIR/bsd-$WLAN.conf
21 ctrl_interface=$HOSTAPD_CTRL_INTERFACE
29 wpa_passphrase=$WPA_PASSPHRASE
34 trap "ifconfig $BRIDGE destroy; ifconfig $WLAN destroy; \
37 #mwldebug -i $WIRELESS hal
38 ifconfig $WLAN create wlandev $WIRELESS wlanmode hostap
39 #wlandebug -i $WLAN assoc+crypto
40 wlandebug -i $WLAN assoc
41 ifconfig $WLAN ssid $SSID
42 ifconfig $WLAN channel $CHANNEL
43 ifconfig $WLAN mtu 1500 # NB: if_bridge requires matching mtu's
45 ifconfig $BRIDGE create
46 ifconfig $BRIDGE addm $WIRED addm $WLAN up
53 #mwldebug -i $WIRELESS keycache
54 start_hostapd -K $CONF