Annotation of elwix/config/etc/uboot/rc.d/011.ap_wpa.stop, revision 1.2.2.1
1.2 misho 1: #!/bin/sh
2:
3: IFACE="wlan0"
4: WIFIDEV="ath0"
1.2.2.1 ! misho 5: CLONEOPTS=""
1.2 misho 6:
7: REGDOMAIN=""
8: COUNTRY=""
9:
10: SSID="wpa-ap"
11: CHAN="36:a"
12: BINT="100"
13: WIFIOPTS="-bgscan"
14:
15: WPAPASS="wpa_go"
16:
1.2.2.1 ! misho 17: OPTS=""
1.2 misho 18: IP="172.31.1.1/30"
19:
20: [ -r /etc/rc.wifi ] && . /etc/rc.wifi
21:
1.2.2.1 ! misho 22: [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit
1.2 misho 23:
1.2.2.1 ! misho 24: echo "Config wireless AP (WPA) interface $IFACE ..."
1.2 misho 25:
1.2.2.1 ! misho 26: ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode hostap || exit
! 27: if [ -n "$REGDOMAIN" ]; then
! 28: ifconfig $IFACE regdomain $REGDOMAIN
! 29: fi
! 30: if [ -n "$COUNTRY" ]; then
! 31: ifconfig $IFACE country $COUNTRY
! 32: fi
! 33: if [ -n "$WIFIOPTS" ]; then
! 34: ifconfig $IFACE $WIFIOPTS
! 35: fi
! 36: if [ -n "$BINT" ]; then
! 37: ifconfig $IFACE bintval $BINT
! 38: fi
! 39: if [ -n "$CHAN" ]; then
! 40: ifconfig $IFACE channel $CHAN
! 41: fi
! 42: if [ -n "$SSID" ]; then
! 43: ifconfig $IFACE ssid $SSID
! 44: fi
! 45: if [ -n "$IP" ]; then
! 46: ifconfig $IFACE inet $IP
! 47: fi
1.2 misho 48: mkhostconf $IFACE wpa "$WPAPASS"
1.2.2.1 ! misho 49: ifconfig $IFACE $OPTS up
1.2 misho 50:
51: [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE
52:
53: [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 &
54:
55: [ -r /var/tmp/hostapd_$IFACE.conf ] && hostapd -B -K -P /var/run/hostapd_$IFACE.pid /var/tmp/hostapd_$IFACE.conf
56:
57: #wlandebug -i $IFACE state+scan+assoc+crypto+11n
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>