linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* AR6k: to rfkill or not to rfkill ?
@ 2008-12-18 21:22 Werner Almesberger
  2008-12-18 22:20 ` Michael Buesch
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Werner Almesberger @ 2008-12-18 21:22 UTC (permalink / raw)
  To: linux-wireless

In Openmoko, we're wondering whether we should make the Atheros AR6k
driver register as an rfkill controller or not, and if we do it,
what semantics this should have. I'm looking for advice here.

The issue is that there's no real rfkill hardware in the sense of a
simple switch that cuts power to the transmitter. At least nothing
like this is visible from the kernel. Instead, there is a "fat" and
opaque firmware in the module that decides on such low-level actions
on its own.

There are currently two mechanisms which would fall into the domain
of WLAN APIs that control three operations:

- the possible operations are
  1) associate/de-associate with access point
  2) scan for access points
  3) return -EIO when attempting WLAN ioctls

- when 1) and 2) are applied together, the transmitter is supposed
  to be silent

- the mechanisms present so far are
  1) SIOCSIWTXPOW
  2) an Atheros-specific ioctl (AR6000_IOCTL_EXTENDED, sub-function
     AR6000_XIOCTRL_WMI_SET_WLAN_STATE)

- both mechanisms de-associate and stop scanning
- in the case of SIOCSIWTXPOW, setting the ESSID will re-associate
- in the case of AR6000_XIOCTRL_WMI_SET_WLAN_STATE, most ioctls will
  return -EIO until another AR6000_XIOCTRL_WMI_SET_WLAN_STATE is
  issued that re-enables WLAN

So, first of all, given that TX power is controlled only indirectly
anyway, should we implement rfkill control or not ? There is no kill
switch, so there would be no rfkill input.

If the answer is "yes", would the following semantics be right for
the disabled state ?

- we de-associate
- we stop scanning
- all ioctls still work as usual, but they have no effect on
  association and scanning until rfkill re-enables the device

Thanks,
- Werner

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-12-22 23:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-18 21:22 AR6k: to rfkill or not to rfkill ? Werner Almesberger
2008-12-18 22:20 ` Michael Buesch
2008-12-18 23:59   ` Werner Almesberger
2008-12-19  9:54     ` Michael Buesch
2008-12-18 22:28 ` AR6k: to rfkill Andy Green
2008-12-18 22:37   ` Michael Buesch
2008-12-18 22:44     ` Andy Green
2008-12-18 22:43       ` Michael Buesch
2008-12-18 22:49         ` Andy Green
2008-12-20 20:15 ` AR6k: to rfkill or not to rfkill ? Henrique de Moraes Holschuh
2008-12-22 19:50   ` Werner Almesberger
2008-12-22 23:59     ` Henrique de Moraes Holschuh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).