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