3 # Script for testing multi-bss open+WPA1+WPA2.
5 # $FreeBSD: src/tools/tools/net80211/scripts/setup.mixed,v 1.1 2008/04/20 20:43:42 sam Exp $
12 CONF=$TMPDIR/bsd-$WPA_WLAN.conf
22 ctrl_interface=$HOSTAPD_CTRL_INTERFACE
30 wpa_passphrase=$WPA_PASSPHRASE
35 trap "ifconfig $BRIDGE destroy; ifconfig $WPA_WLAN destroy; \
36 ifconfig $OPEN_WLAN destroy; rm -f $CONF" 2
38 ifconfig $WPA_WLAN create wlandev $WIRELESS wlanmode hostap bssid
39 #wlandebug -i $WPA_WLAN assoc+crypto
40 wlandebug -i $WPA_WLAN state+assoc+11n
41 ifconfig $WPA_WLAN ssid $WPA_SSID
42 ifconfig $WPA_WLAN channel $CHANNEL
43 ifconfig $WPA_WLAN mtu 1500 # NB: if_bridge requires matching mtu's
45 ifconfig $OPEN_WLAN create wlandev $WIRELESS wlanmode hostap bssid
46 #wlandebug -i $OPEN_WLAN assoc+crypto
47 wlandebug -i $OPEN_WLAN state+assoc+11n
48 ifconfig $OPEN_WLAN ssid $SSID
49 ifconfig $OPEN_WLAN channel $CHANNEL
50 ifconfig $OPEN_WLAN mtu 1500 # NB: if_bridge requires matching mtu's
52 ifconfig $BRIDGE create
53 ifconfig $BRIDGE addm $WIRED addm $WPA_WLAN addm $OPEN_WLAN up
55 ifconfig $OPEN_WLAN up
60 makeconf $CONF $WPA_WLAN
61 #athdebug -i $WIRELESS keycache
62 start_hostapd -K $CONF