1: #!/bin/sh
2:
3: IFACE="wlan1"
4: WIFIDEV="ath0"
5: CLONEOPTS=""
6:
7: REGDOMAIN=""
8: COUNTRY=""
9:
10: SSID="dwds"
11: CHAN="-1"
12: BINT="100"
13: WIFIOPTS="dwds -bgscan -tso -ampdu"
14:
15: OPTS=""
16: IP="172.31.1.2/30"
17:
18: [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit
19:
20: echo "Config wireless DWDS (Client) interface $IFACE ..."
21:
22: ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode sta -beacons || exit
23: if [ -n "$REGDOMAIN" ]; then
24: ifconfig $IFACE regdomain $REGDOMAIN
25: fi
26: if [ -n "$COUNTRY" ]; then
27: ifconfig $IFACE country $COUNTRY
28: fi
29: if [ -n "$WIFIOPTS" ]; then
30: ifconfig $IFACE $WIFIOPTS
31: fi
32: if [ -n "$BINT" ]; then
33: ifconfig $IFACE bintval $BINT
34: fi
35: if [ -n "$CHAN" ]; then
36: ifconfig $IFACE channel $CHAN
37: fi
38: if [ -n "$SSID" ]; then
39: ifconfig $IFACE ssid $SSID
40: fi
41: if [ -n "$IP" ]; then
42: ifconfig $IFACE inet $IP
43: fi
44: ifconfig $IFACE $OPTS up
45:
46: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
47:
48: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
49:
50: #wlandebug -i $IFACE state+assoc+auth+wds+scan+11n
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>