#!/bin/sh IFACE="wlan1" WIFIDEV="ath0" CLONEOPTS="" REGDOMAIN="" COUNTRY="" SSID="dwds" CHAN="-1" BINT="100" WIFIOPTS="dwds -bgscan -tso -ampdu" OPTS="" IP="172.31.1.2/30" [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit echo "Config wireless DWDS (Client) interface $IFACE ..." ifconfig $IFACE create wlandev $WIFIDEV $CLONEOPTS wlanmode sta -beacons || exit if [ -n "$REGDOMAIN" ]; then ifconfig $IFACE regdomain $REGDOMAIN fi if [ -n "$COUNTRY" ]; then ifconfig $IFACE country $COUNTRY fi if [ -n "$WIFIOPTS" ]; then ifconfig $IFACE $WIFIOPTS fi if [ -n "$BINT" ]; then ifconfig $IFACE bintval $BINT fi if [ -n "$CHAN" ]; then ifconfig $IFACE channel $CHAN fi if [ -n "$SSID" ]; then ifconfig $IFACE ssid $SSID fi if [ -n "$IP" ]; then ifconfig $IFACE inet $IP fi ifconfig $IFACE $OPTS up [ -x /etc/sysctl.$IFACE ] && /etc/sysctl.$IFACE [ -x /etc/wifi_up.sh ] && /etc/wifi_up.sh $IFACE >/dev/null 2>&1 & #wlandebug -i $IFACE state+assoc+auth+wds+scan+11n