1#! /bin/sh 2# 3# Script for testing TSN support. 4# 5# $FreeBSD: src/tools/tools/net80211/scripts/setup.tsn,v 1.1 2008/04/20 20:43:42 sam Exp $ 6# 7PATH=.:$PATH 8. config 9 10BRIDGE=bridge0 11SSID=$SSID-tsn 12WLAN=wlan0 13CONF=$TMPDIR/tsn-$WLAN.conf 14 15makeconf() 16{ 17 conf=$1 18 rm -f $conf 19 cat >$1 <<EOF 20interface=$WLAN 21logger_syslog=-1 22logger_syslog_level=0 23logger_stdout=-1 24logger_stdout_level=0 25debug=4 26wpa=1 27wpa_pairwise=TKIP 28wpa_key_mgmt=WPA-PSK 29wpa_passphrase=$WPA_PASSPHRASE 30tsn=1 31wep_key0=0123456789 32EOF 33} 34 35trap "ifconfig $BRIDGE destroy; ifconfig $WLAN destroy; \ 36 rm -f $CONF" 0 37 38ifconfig $WLAN create wlandev $WIRELESS wlanmode hostap 39#wlandebug -i $WLAN assoc+crypto 40wlandebug -i $WLAN state+assoc+11n+crypto 41ifconfig $WLAN ssid $SSID 42ifconfig $WLAN channel $CHANNEL 43ifconfig $WLAN mtu 1500 # NB: if_bridge requires matching mtu's 44ifconfig $WLAN tsn 45 46ifconfig $BRIDGE create 47ifconfig $BRIDGE addm $WIRED addm $WLAN up 48ifconfig $WLAN up 49ifconfig $WIRED up 50 51ifconfig 52 53makeconf $CONF 54#mwldebug -i $WIRELESS keycache 55start_hostapd -K $CONF 56