Your message dated Fri, 25 Dec 2009 13:47:09 +0000
with message-id <[email protected]>
and subject line Bug#561953: fixed in acpi-support 0.131-3
has caused the Debian Bug report #561953,
regarding acpi-support: wireless control button does not work on Asus A3A
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
561953: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561953
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Subject: acpi-support: wireless control button does not work on Asus A3A
Package: acpi-support
Version: 0.130-1
Severity: normal
Tags: patch

Hi,

I had some trouble get wireless control button (Fn+F2) on my Asus A3A laptop to 
work and managed to wrote a patch for this functionality,
hope you find it useful.

I use ipw2200 driver with my wifi.

Basic changes done:

/usr/share/acpi-support/state-funcs
- /sys/class/net/*/wireless directory does not exist in my system, reading 
through some forum posts I found that this interface is deprecated,
so probably it was removed some time ago. As a workaround, I obtained names of 
wireless interfaces by parsing /proc/net/wireless file.

added new file /etc/acpi/events/asus-wireless-toggle
- event generated by the button was not recognized by acpid, this file handles 
the event calling /etc/acpi/asus-wireless.sh with no arguments


--- /usr/share/acpi-support/state-funcs 2009-12-20 21:45:57.000000000 +0100
+++ /home/haakon/state-funcs    2009-12-21 14:30:57.000000000 +0100
@@ -1,28 +1,30 @@
 # Paul Sladen, 2006-03-28, 2007-03-26
 # Library functions to check/change status of wireless

+IFACE_NAMES=`cut -d: -f1 -s /proc/net/wireless`
+
 # Return 0 if there is, allowing you to write   if isAnyWirelessPoweredOn; 
then ...
 isAnyWirelessPoweredOn()
 {
-    for DEVICE in /sys/class/net/* ; do
-       if [ -d $DEVICE/wireless ]; then
-           for RFKILL in $DEVICE/phy80211/rfkill*/state 
$DEVICE/device/rfkill/rfkill*/state
-           do
-               if [ -r "$RFKILL" ] && [ "$(cat "$RFKILL")" -eq 1 ]
-               then
-                   return 0
-               fi
-           done
-           # if any of the wireless devices are turned on then return success
-           if [ -r $DEVICE/device/power/state ] && [ "`cat 
$DEVICE/device/power/state`" -eq 0 ]
-           then
-               return 0
-           fi
-           if [ -r $DEVICE/device/rf_kill ] && [ "`cat 
$DEVICE/device/rf_kill`" -eq 0 ]
-           then
-               return 0
-           fi
-       fi
+    for NET_IF in $IFACE_NAMES ; do
+        DEVICE=/sys/class/net/$NET_IF
+
+        for RFKILL in $DEVICE/phy80211/rfkill*/state 
$DEVICE/device/rfkill/rfkill*/state
+        do
+            if [ -r "$RFKILL" ] && [ "$(cat "$RFKILL")" -eq 1 ]
+            then
+                return 0
+            fi
+        done
+        # if any of the wireless devices are turned on then return success
+        if [ -r $DEVICE/device/power/state ] && [ "`cat 
$DEVICE/device/power/state`" -eq 0 ]
+        then
+            return 0
+        fi
+        if [ -r $DEVICE/device/rf_kill ] && [ "`cat $DEVICE/device/rf_kill`" 
-eq 0 ]
+        then
+            return 0
+        fi
     done

     # otherwise return failure
@@ -35,75 +37,72 @@
 # will fail on >=2.6.18 kernels since upstream removed the functionality...
 toggleAllWirelessStates()
 {
-    for DEVICE in /sys/class/net/* ; do
-       if [ -d $DEVICE/wireless ] ; then
-           # $DEVICE is a wireless device.
-           NET_IF=`echo $DEVICE | cut -d \/ -f 5`
-
-           FOUND=
-           # Yes, that's right... the new interface reverses the truth values.
-           ON=1
-           OFF=0
-           for CONTROL in $DEVICE/phy80211/rfkill*/state 
$DEVICE/device/rfkill/rfkill*/state; do
-               if [ -w "$CONTROL" ]; then
-                   FOUND=1
-
-                   if [ "$(cat "$CONTROL")" = "$ON" ] ; then
-                       # It's powered on. Switch it off.
-                       echo -n "$OFF" > "$CONTROL"
-                   else
-                       # It's powered off. Switch it on.
-                       echo -n "$ON" > "$CONTROL"
-                   fi
-               fi
-           done
-           # it might be safe to assume that a device only supports one
-           # interface at a time; but just in case, we short-circuit
-           # here to avoid toggling the power twice
-           if [ -n "$FOUND" ]; then
-               continue
-           fi
-
-           ON=0
-           OFF=1  # 1 for rf_kill, 2 for power/state
-           for CONTROL in $DEVICE/device/rf_kill $DEVICE/device/power/state ; 
do
-               if [ -w $CONTROL ] ; then
-                   # We have a way of controlling the device, lets try
-                   if [ "`cat $CONTROL`" = 0 ] ; then
-                       # It's powered on. Switch it off.
-                       if echo -n $OFF > $CONTROL ; then
-                           ifdown "${NET_IF}"
-                           break
-                       else
-                           OFF=2 # for power/state, second time around
-                       fi
-                   else
-                       # It's powered off. Switch it on.
-                       if echo -n $ON > $CONTROL ; then
-                           ifup "${NET_IF}"
-                           if [ -x /sbin/wpa_cli ]; then
-                               wpa_cli scan
-                           fi
-                           break
-                       fi
-                   fi
-               fi
-           done
-
-            # For madwifi we need to check "operstate" instead.
-           if [ -w $DEVICE/operstate ] ; then
-               if [ "`cat $DEVICE/operstate`" = "up" ] ; then
-                   # It's powered on. Switch it off.
-                   ifdown $NET_IF
-               else
-                   # It's powered off. Switch it on.
-                   ifup $NET_IF
-                   if [ -x /sbin/wpa_cli ] ; then
-                       wpa_cli scan
-                   fi
-               fi
-           fi
-       fi
+    for NET_IF in $IFACE_NAMES ; do
+        DEVICE=/sys/class/net/$NET_IF
+
+        FOUND=
+        # Yes, that's right... the new interface reverses the truth values.
+        ON=1
+        OFF=0
+        for CONTROL in $DEVICE/phy80211/rfkill*/state 
$DEVICE/device/rfkill/rfkill*/state; do
+            if [ -w "$CONTROL" ]; then
+                FOUND=1
+
+                if [ "$(cat "$CONTROL")" = "$ON" ] ; then
+                    # It's powered on. Switch it off.
+                    echo -n "$OFF" > "$CONTROL"
+                else
+                    # It's powered off. Switch it on.
+                    echo -n "$ON" > "$CONTROL"
+                fi
+            fi
+        done
+        # it might be safe to assume that a device only supports one
+        # interface at a time; but just in case, we short-circuit
+        # here to avoid toggling the power twice
+        if [ -n "$FOUND" ]; then
+            continue
+        fi
+
+        ON=0
+        OFF=1  # 1 for rf_kill, 2 for power/state
+        for CONTROL in $DEVICE/device/rf_kill $DEVICE/device/power/state ; do
+            if [ -w $CONTROL ] ; then
+                # We have a way of controlling the device, lets try
+                if [ "`cat $CONTROL`" = 0 ] ; then
+                    # It's powered on. Switch it off.
+                    if echo -n $OFF > $CONTROL ; then
+                        ifdown "${NET_IF}"
+                        break
+                    else
+                        OFF=2 # for power/state, second time around
+                    fi
+                else
+                    # It's powered off. Switch it on.
+                    if echo -n $ON > $CONTROL ; then
+                        ifup "${NET_IF}"
+                        if [ -x /sbin/wpa_cli ]; then
+                            wpa_cli scan
+                        fi
+                        break
+                    fi
+                fi
+            fi
+        done
+
+        # For madwifi we need to check "operstate" instead.
+        if [ -w $DEVICE/operstate ] ; then
+            if [ "`cat $DEVICE/operstate`" = "up" ] ; then
+                # It's powered on. Switch it off.
+                ifdown $NET_IF
+            else
+                # It's powered off. Switch it on.
+                ifup $NET_IF
+                if [ -x /sbin/wpa_cli ] ; then
+                    wpa_cli scan
+                fi
+            fi
+        fi
     done
 }




Contents of /etc/acpi/asus-wireless.sh:

event=button/wlan WLAN 00000080
action=/etc/acpi/asus-wireless.sh



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages acpi-support depends on:
ii  acpi-support-base             0.130-1    scripts for handling base ACPI eve
ii  acpid                         1.0.10-5   Advanced Configuration and Power I
ii  dmidecode                     2.9-1.1    Dump Desktop Management Interface
ii  finger                        0.17-13    user information lookup program
ii  hdparm                        9.15-1     tune hard disk parameters for high
ii  laptop-detect                 0.13.7     attempt to detect a laptop
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
ii  lsb-base                      3.2-23     Linux Standard Base 3.2 init scrip
ii  pm-utils                      1.2.6.1-3  utilities and scripts for power ma
ii  powermgmt-base                1.30+nmu1  Common utils and configs for power
ii  x11-xserver-utils             7.5+1      X server utilities

Versions of packages acpi-support recommends:
ii  dbus                          1.2.16-2   simple interprocess messaging syst
ii  hal                           0.5.13-6   Hardware Abstraction Layer
ii  nvclock                       0.8b4-1    Allows you to overclock your nVidi
ii  radeontool                    1.5-5      utility to control ATI Radeon back
ii  toshset                       1.75-1     Access much of the Toshiba laptop

acpi-support suggests no packages.

-- no debconf information

<<attachment: jakub_adam.vcf>>


--- End Message ---
--- Begin Message ---
Source: acpi-support
Source-Version: 0.131-3

We believe that the bug you reported is fixed in the latest version of
acpi-support, which is due to be installed in the Debian FTP archive:

acpi-support-base_0.131-3_all.deb
  to main/a/acpi-support/acpi-support-base_0.131-3_all.deb
acpi-support_0.131-3.diff.gz
  to main/a/acpi-support/acpi-support_0.131-3.diff.gz
acpi-support_0.131-3.dsc
  to main/a/acpi-support/acpi-support_0.131-3.dsc
acpi-support_0.131-3_amd64.deb
  to main/a/acpi-support/acpi-support_0.131-3_amd64.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Meskes <[email protected]> (supplier of updated acpi-support package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Fri, 25 Dec 2009 14:23:17 +0100
Source: acpi-support
Binary: acpi-support acpi-support-base
Architecture: source amd64 all
Version: 0.131-3
Distribution: unstable
Urgency: low
Maintainer: Debian Acpi Team <[email protected]>
Changed-By: Michael Meskes <[email protected]>
Description: 
 acpi-support - scripts for handling many ACPI events
 acpi-support-base - scripts for handling base ACPI events such as the power 
button
Closes: 482349 561953
Changes: 
 acpi-support (0.131-3) unstable; urgency=low
 .
   * It seems that on some Asus systems at least this script breaks
     wireless completely. Therefore we remove it for now. If we find a
     way to do it right on all systems we can re-enable it. (Closes:
     #482349)
   * Made wireless control button work on Asus A3A and other similar
     systems. In the process updated state-funcs to not use deprecated
     /sys/class/net/*/wireless directory anymore. (Closes: #561953) -
     thanks to Jakub Adam <[email protected]>
Checksums-Sha1: 
 7b5bd240d18b161a8d0b1fc0f913a9cf1a0a1d29 1220 acpi-support_0.131-3.dsc
 b38632949c9f9162005412ec3d4ea43614f1787e 38135 acpi-support_0.131-3.diff.gz
 30fb30406dc32f031ddf74daa6cf70a102b24266 52358 acpi-support_0.131-3_amd64.deb
 eb43f6e8e2a73ff8e4c16848f63444cf51a9350a 17082 
acpi-support-base_0.131-3_all.deb
Checksums-Sha256: 
 f1e0f3f8d9f1f0273db9210bc535d95db579018595da7905b14f9cec37227f64 1220 
acpi-support_0.131-3.dsc
 15f175f8ef4569e84a86f5fc233bbb86a065df714babf30011394bb36faf49c4 38135 
acpi-support_0.131-3.diff.gz
 dc10aa996237603e905d6cff7ea315329e3cbcf03ff8ca16da902516375c96b4 52358 
acpi-support_0.131-3_amd64.deb
 007129833f5458ee4be57e71ac1b42dc1731bb8ddd1fa77e4603f40104e0c062 17082 
acpi-support-base_0.131-3_all.deb
Files: 
 0f4da38d8c37b5788121717f7861916b 1220 admin optional acpi-support_0.131-3.dsc
 94bc000cdd5395dd89403f61ab11b943 38135 admin optional 
acpi-support_0.131-3.diff.gz
 146f9915db9c40c9f5627b7ae4256647 52358 admin optional 
acpi-support_0.131-3_amd64.deb
 9a37803e152dc9077fefff906bd290f7 17082 admin optional 
acpi-support-base_0.131-3_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFLNL3XVkEm8inxm9ERAoQ7AJ94z+XECzg9Z2COnIJxF3jikgf2vwCfWZIQ
T2B8r9h7QTFIG1YNfmq/1qI=
=hyaH
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to