[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, master, updated. 911a5e5b77e5426d1564e4abef82c6b7b84b400e
Ben Armstrong
synrg at debian.org
Tue Feb 3 21:16:54 UTC 2009
The following commit has been merged in the master branch:
commit 911a5e5b77e5426d1564e4abef82c6b7b84b400e
Author: Ben Armstrong <synrg at debian.org>
Date: Tue Feb 3 17:16:44 2009 -0400
Support ath5k wifi toggling
diff --git a/debian/changelog b/debian/changelog
index 54158ae..0ad9982 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,7 +14,10 @@ eeepc-acpi-scripts (1.0.12) UNRELEASED; urgency=low
* Auto detect the playback devices and the playback switches
Closes: #513552 -- Please auto detect the sound devices
- -- Darren Salt <linux at youmustbejoking.demon.co.uk> Mon, 02 Feb 2009 16:55:55 +0000
+ [ Ben Armstrong ]
+ * Support ath5k wifi toggling and default to using it if ath_pci is not present.
+
+ -- Ben Armstrong <synrg at sanctuary.nslug.ns.ca> Tue, 03 Feb 2009 17:14:46 -0400
eeepc-acpi-scripts (1.0.11) unstable; urgency=low
diff --git a/etc/acpi/actions/wireless.sh b/etc/acpi/actions/wireless.sh
index 3d4798d..0b7f125 100755
--- a/etc/acpi/actions/wireless.sh
+++ b/etc/acpi/actions/wireless.sh
@@ -19,11 +19,11 @@ case "$cmd" in
if [ $(cat $wlan_control) = 0 ]; then
echo 1 > $wlan_control
detect_wlan
- if [ "$WLAN_MOD" = 'ath_pci' ]; then
- # madwifi needs some handholding
+ 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
+ # 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
@@ -32,7 +32,7 @@ case "$cmd" in
off|disable|0)
if [ $(cat $wlan_control) = 1 ]; then
detect_wlan
- if [ "$WLAN_MOD" = 'ath_pci' ]; then
+ if [ "$WLAN_MOD" = 'ath_pci' ] || [ "$WLAN_MOD" = 'ath5k' ]; then
ifdown --force $WLAN_IF
modprobe -r $WLAN_MOD
fi
diff --git a/functions.sh b/functions.sh
index dad8f34..815f7d0 100644
--- a/functions.sh
+++ b/functions.sh
@@ -7,8 +7,13 @@ detect_wlan()
WLAN_IF=ra0
WLAN_MOD=rt2860sta
elif lspci|grep -i 'atheros'|grep -q -i 'wireless'; then
- WLAN_IF=ath0
- WLAN_MOD=ath_pci
+ 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
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list