[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 1.1.1-23-g9cbb172

Damyan Ivanov dmn at debian.org
Thu Aug 13 19:55:16 UTC 2009


The following commit has been merged in the master branch:
commit 9cbb1729cb8a40fad31ec567593cee3fdd9e7227
Author: Alan Jenkins <alan-jenkins at tuffmail.co.uk>
Date:   Thu Aug 13 19:30:03 2009 +0100

    Remove old hacks for wireless toggle key
    
    There is no need to load/unload modules and ifconfig up/down the
    wireless interface.  PCI hotplug takes care of it.
    
    Tested on 2.6.26-2 (with MadWifi and pciehp.pciehp_force=1)
    and 2.6.30-1 (with ath5k and hotplug support in eeepc-laptop)

diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
index ff714a0..3bc2d08 100755
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -23,24 +23,10 @@ case "$cmd" in
     on|enable|1)
 	if [ "$STATE" = 0 ]; then
 	    echo 1 > $wlan_control
-            detect_wlan
-	    if [ "$WLAN_MOD" = 'ath_pci' ] || [ "$WLAN_MOD" = 'ath5k' ]; then
-		# Atheros needs some handholding
-		modprobe $WLAN_MOD
-		# adding a sleep here, due to some bug the driver loading is not atomic here
-		# and could cause ifconfig to fail (at least madwifi, untested with ath5k)
-		sleep 1
-		if ! ifconfig $WLAN_IF up; then exec $0 off; fi
-	    fi
 	fi
 	;;
     off|disable|0)
 	if [ "$STATE" = 1 ]; then
-            detect_wlan
-	    if [ "$WLAN_MOD" = 'ath_pci' ] || [ "$WLAN_MOD" = 'ath5k' ]; then
-		ifdown --force $WLAN_IF
-		modprobe -r $WLAN_MOD
-	    fi
 	    echo 0 > $wlan_control
 	fi
 	;;
diff --git a/functions.sh b/functions.sh
index 264af54..838bd84 100644
--- a/functions.sh
+++ b/functions.sh
@@ -1,24 +1,5 @@
 # common eeepc-acpi-scripts functions
 
-# detect the name of the WLAN interface and kernel module
-detect_wlan()
-{
-    if lspci|grep -i 'network controller'|grep -q 'RaLink'; then
-        WLAN_IF=ra0
-        WLAN_MOD=rt2860sta
-    elif lspci|grep -i 'atheros'|grep -q -i 'wireless'; then
-        if lspci -v|grep -q -i 'ath_pci'; then
-            WLAN_IF=ath0
-            WLAN_MOD=ath_pci
-        else
-            WLAN_IF=wlan0
-            WLAN_MOD=ath5k
-        fi
-    fi
-
-    echo "Detected WLAN module $WLAN_MOD on $WLAN_IF" >&2
-}
-
 # detect which rfkill has name=$1
 detect_rfkill()
 {

-- 
Maintenance of eeepc-acpi-scripts debian package



More information about the Debian-eeepc-commits mailing list