1: #!/bin/sh
2:
3: IFACE="wlan0"
4: WIFIDEV="ath0"
5:
6: REGDOMAIN=""
7: COUNTRY=""
8:
9: SSID="ap"
10: BINT="100"
11: WIFIOPTS=""
12:
13: OPT=""
14: IP="172.31.1.2/30"
15:
16: echo "Config wireless Station interface $IFACE ..."
17:
18: ifconfig $IFACE create wlandev $WIFIDEV wlanmode sta
19: #ifconfig $IFACE regdomain $REGDOMAIN
20: #ifconfig $IFACE country $COUNTRY
21: ifconfig $IFACE $WIFIOPTS
22: ifconfig $IFACE bintval $BINT
23:
24: ifconfig $IFACE ssid $SSID
25: ifconfig $IFACE inet ${IP} ${OPT} up
26:
27: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
28:
29: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
30:
31: #wlandebug -i $IFACE state+scan+assoc+auth+11n
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>