#!/bin/bash

ifconfig wlan0 down
SYSTEM=`uname -r|cut -d. -f1,2`

if [ $SYSTEM = 2.4 ]
then
rmmod r8187
rmmod ieee80211-rtl
rmmod ieee80211_crypt_ccmp-rtl
rmmod ieee80211_crypt_tkip-rtl
rmmod ieee80211_crypt_wep-rtl
rmmod aes-rtl
rmmod michael_mic-rtl
rmmod crypto-rtl
rmmod ieee80211_crypt-rtl
else
rmmod r8187.ko
rmmod ieee80211-rtl.ko
rmmod ieee80211_crypt_ccmp-rtl.ko
rmmod ieee80211_crypt_tkip-rtl.ko
rmmod ieee80211_crypt_wep-rtl.ko
rmmod ieee80211_crypt-rtl.ko
fi

