lkml.org 
[lkml]   [2008]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: eeepc-laptop rfkill, stupid question #4
On Mon, 03 Nov 2008, Alan Jenkins wrote:
> >> Can you read the state? If so, you need to unconditionally do so on resume
> >> (from sleep or hibernation) and rfkill_force_state() it.
> >
> > The rfkill core actually forces the state on resume, so I think we're
> > fine.

Not if you can enter or exit HARD_BLOCK, you're not. If you cannot it is
fine. But if you can, you really need to rfkill_force_state() on resume,
even if you have a get_state() hook.

This might be something that needs explicit documentation, or something
wanting a fix.

> I think the reason it works is because eeepc-laptop provides a
> "get_state" callback. rfkill can call get_state on resume, and if the

It doesn't call get_state on resume right now, because rfkill_toggle_radio()
optimizes that away when called in forced mode.

I will think about removing that "optimization".

> state has changed, force it back to the old value. So I think it's ok
> as is.

And the rfkill core seems to be buggy when you call force_state() on resume,
which you guys didn't hit because you're not doing it yet. See my other
email...

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh


\
 
 \ /
  Last update: 2008-11-03 15:55    [from the cache]
©2003-2011 Jasper Spaans