rf_kill interface not available for iwl3945, iwl4965 in 2.6.27

Bug #267875 reported by Steve Langasek
44
Affects Status Importance Assigned to Milestone
HAL
Fix Released
Medium
acpi-support (Ubuntu)
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned
hal (Ubuntu)
Fix Released
Undecided
Unassigned
Intrepid
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Invalid
Medium
Tim Gardner
Intrepid
Invalid
Medium
Tim Gardner

Bug Description

As of 2.6.27 in intrepid, the iwl3945 and iwl4965 drivers no longer provide /sys/class/net/$dev/device/rf_kill:

$ ls -ld /sys/class/net/*/device/rf*kill*
lrwxrwxrwx 1 root root 0 2008-09-08 11:29 /sys/class/net/wlan0/device/rfkill:rfkill1 -> ../../../../class/rfkill/rfkill1
lrwxrwxrwx 1 root root 0 2008-09-08 11:29 /sys/class/net/wmaster0/device/rfkill:rfkill1 -> ../../../../class/rfkill/rfkill1
$

This is with iwl3945 on my system; mdz has confirmed equivalent behavior with iwl4965.

The device/rf_kill interface is the one that acpi-support relies on in order to toggle the antenna state via the soft switch, so I think this is fairly important to resolve for intrepid. If this interface is deprecated for 2.6.27, please reassign to acpi-support and let us know what interface should be used instead for toggling the antenna in software.

Revision history for this message
In , Danny Kukawka (danny-kukawka) wrote :

*** Bug 10985 has been marked as a duplicate of this bug. ***

Revision history for this message
Steve Langasek (vorlon) wrote :

As of 2.6.27 in intrepid, the iwl3945 and iwl4965 drivers no longer provide /sys/class/net/$dev/device/rf_kill:

$ ls -ld /sys/class/net/*/device/rf*kill*
lrwxrwxrwx 1 root root 0 2008-09-08 11:29 /sys/class/net/wlan0/device/rfkill:rfkill1 -> ../../../../class/rfkill/rfkill1
lrwxrwxrwx 1 root root 0 2008-09-08 11:29 /sys/class/net/wmaster0/device/rfkill:rfkill1 -> ../../../../class/rfkill/rfkill1
$

This is with iwl3945 on my system; mdz has confirmed equivalent behavior with iwl4965.

The device/rf_kill interface is the one that acpi-support relies on in order to toggle the antenna state via the soft switch, so I think this is fairly important to resolve for intrepid. If this interface is deprecated for 2.6.27, please reassign to acpi-support and let us know what interface should be used instead for toggling the antenna in software.

Changed in linux:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Matt Zimmerman (mdz) wrote :

Is this why Network Manager doesn't seem to notice (and take down the interface) when I turn the kill switch off?

Revision history for this message
Steve Langasek (vorlon) wrote :

Yes: network-manager looks for rfkill information from hal, which looks at /sys/class/net/%s/device/rf_kill.

So if this regression in the sysfs interface is going to stand, we have at least two packages that need to be fixed to handle it.

Pete Graner (pgraner)
Changed in linux:
assignee: nobody → timg-tpi
Revision history for this message
Matt Zimmerman (mdz) wrote :

Scott seemed to think that this had something to do with the state of the interface (up vs. down). I've checked it, though, and it's up in both cases (working and non-working).

Revision history for this message
Steve Langasek (vorlon) wrote :

In speaking with the kernel team, I understand that this was a deliberate change to harmonize the iwl* drivers with a new generic rf_kill interface, /sys/class/rfkill. It appears that the correct interface now for toggling/querying antenna state is /sys/class/rfkill/rfkill<n>/state (though back-associating this with a network interface is extremely sysfs-y). I'd like to get hard confirmation of this from the kernel team that this is the right interface, but in the meantime since it's an easy change I'm going to implement that in acpi-support.

Steve Langasek (vorlon)
Changed in acpi-support:
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpi-support - 0.113

---------------
acpi-support (0.113) intrepid; urgency=low

  * lib/state-funcs: add support for checking the new /sys/class/rfkill
    interface for toggling wireless antennas. LP: #267875

 -- Steve Langasek <email address hidden> Sat, 11 Oct 2008 19:18:10 +0000

Changed in acpi-support:
status: In Progress → Fix Released
Revision history for this message
Matt Zimmerman (mdz) wrote : Re: [Bug 267875] Re: rf_kill interface not available for iwl3945, iwl4965 in 2.6.27

On Sat, Oct 11, 2008 at 07:50:05PM -0000, Launchpad Bug Tracker wrote:
> This bug was fixed in the package acpi-support - 0.113
>
> ---------------
> acpi-support (0.113) intrepid; urgency=low
>
> * lib/state-funcs: add support for checking the new /sys/class/rfkill
> interface for toggling wireless antennas. LP: #267875
>
> -- Steve Langasek <email address hidden> Sat, 11 Oct 2008
> 19:18:10 +0000
>
> ** Changed in: acpi-support (Ubuntu Intrepid)
> Status: In Progress => Fix Released

How much of the problem does this fix? I assume it means that "soft" rfkill
keys will now correctly switch the radio off and on, but will Network
Manager take notice?

--
 - mdz

Revision history for this message
Steve Langasek (vorlon) wrote :

Network Manager needs a separate hal fix to be able to see changes in the rf_kill setting (whether the hardware or software switch).

Revision history for this message
In , Maciej Grela (thermal) wrote :
Download full text (4.1 KiB)

What is the status on this ? hal-0.5.11 I have still cannot use the rfkill devices in /sys/class/rfkill/. This breaks support for IWL4965 + hal + networkmanager as it tries to open the nonexisting /sys/class/net/*/device/rf_kill file. System info (I`m using Gentoo):

Portage 2.2_rc12 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.26-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.26-gentoo-r1-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7300_@_2.00GHz-with-glibc2.2.5
Timestamp of tree: Mon, 13 Oct 2008 15:45:01 +0000
app-shells/bash: 3.2_p39
dev-lang/python: 2.4.4-r13, 2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc: 0.3.0-r1
sys-apps/sandbox: 1.2.18.1-r3
sys-devel/autoconf: 2.13, 2.63
sys-devel/automake: 1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils: 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.26
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=nocona"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://src.gentoo.pl"
LANG="pl_PL.utf8"
LC_ALL="pl_PL.utf8"
LDFLAGS="-Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 berkdb bluetooth branding bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox fortran gdbm gif gnome gpm gstreamer gtk hal iconv ipv6 isdnlog jpeg kde kerberos ldap libnotify mad midi mikmod mmx mp3 mpeg mudflap multilib ncurses nls nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3 qt3support qt4 quicktime readline reflection sdl session spell spl sse sse2 ssl startup-notification svg sysfs tcpd tiff truetype unicode usb visibility vorbis xml xorg xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_mag...

Read more...

Steve Langasek (vorlon)
Changed in hal:
status: New → Confirmed
Changed in linux:
status: Confirmed → Invalid
Revision history for this message
In , Steve Langasek (vorlon) wrote :

Created an attachment (id=19658)
patch to support the kernel's new rfkill interface

please find attached a patch that adds support for the kernel's new generic rfkill interface. Tested here on Ubuntu 8.10 beta; (very ugly) backwards compatibility is maintained for the old ipw/iwl interface.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hal - 0.5.11-4ubuntu3

---------------
hal (0.5.11-4ubuntu3) intrepid; urgency=low

  * 99_new-kernel-rfkill-interface.patch: use
    /sys/class/net/$device/rfkill/rfkill<n>/state to detect that an
    antenna has been powered off. LP: #267875.

 -- Steve Langasek <email address hidden> Tue, 14 Oct 2008 21:48:23 +0000

Changed in hal:
status: Confirmed → Fix Released
Changed in hal:
status: Unknown → Confirmed
Revision history for this message
In , Maciej Grela (maciej-grela) wrote :

(In reply to comment #3)
> Created an attachment (id=19658) [details]
> patch to support the kernel's new rfkill interface
>
> please find attached a patch that adds support for the kernel's new generic
> rfkill interface. Tested here on Ubuntu 8.10 beta; (very ugly) backwards
> compatibility is maintained for the old ipw/iwl interface.
>

Thanks, the patch works, kind of. I had to add a check for it not to return an error back to HAL when some of the device UDIs it tries to process are not network interfaces. Patch attached.

Revision history for this message
In , Maciej Grela (maciej-grela) wrote :

Created an attachment (id=19665)
Add a check for hal-ipw-killswitch-linux.c to skip devices which aren`t network interfaces.

Revision history for this message
Colin Watson (cjwatson) wrote :

Also relevant:

 acpi-support (0.114) intrepid; urgency=low

  * The rfkill interface has changed again in the 2.6.27 release(!), so
    play catch-up once more.

 -- Steve Langasek <email address hidden> Wed, 15 Oct 2008 03:08:58 +0000

Revision history for this message
Pau Ruŀlan Ferragut (paurullan) wrote :

I can confirm the hal upgrade solves the problem.

Revision history for this message
In , Danny Kukawka (danny-kukawka) wrote :
Changed in hal:
status: Confirmed → Fix Released
Changed in hal:
importance: Unknown → Medium
Changed in hal:
importance: Medium → Unknown
Changed in hal:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.