#!/bin/sh
##
## Compatability scripts for older versions
##

. /etc/ath/apcfg
WPS_LED_OFF=1
echo $WPS_LED_OFF  > /proc/simple_config/simple_config_led

#Finally, unload all modules

wsupp=`ps | grep atd_wsupp_bridge | cut -b 1-5`
for i in $wsupp
do
kill $wsupp
done
sleep 1

killVAP all
sleep 3

/etc/rc.d/rc.wlan down
rm -f /tmp/.apup
rm /tmp/sec*
rm /tmp/conf*
rm -rf /tmp/hostapd

# Configure vlans for pb9x offload.
# This will revert any switch settings made
# specifically for multivlan startup mode.
if [ "${AP_STARTMODE}" = "multivlan" ]; then
    echo Resetting multivlan mode specific configuration...
    . /etc/vlan-pb9x-offload.sh
    ifconfig ${WAN_IF} 0.0.0.0 up
    ifconfig br0 $AP_IPADDR up
fi

