From: Johannes Berg <johannes@sipsolutions.net>
To: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: rfkill rewrite bug
Date: Sat, 18 Apr 2009 19:57:01 +0200 [thread overview]
Message-ID: <1240077421.25100.0.camel@johannes.local> (raw)
In-Reply-To: <49EA125F.5060303@tuffmail.co.uk> (sfid-20090418_194847_597250_4374CFCF)
[-- Attachment #1: Type: text/plain, Size: 1171 bytes --]
On Sat, 2009-04-18 at 18:48 +0100, Alan Jenkins wrote:
> Ah, I think I see it now.
>
> Um, what's the use-case for calling set_sw_state() before registration?
> Is it actually needed?
Probably not. I thought you would use it to update the core's idea of
your state. But the core always forces you to its idea of the state :)
> I think it was doing _something_. If the initial wireless state is
> soft-blocked, but rfkill.default_state = 1 (unblocked), then without the
> set_sw_state() call, the wireless would remain soft blocked. When the
> first sync_work calls rfkill_set_block(false), the "prev" value would
> also be false, so it would return without calling .set_block(). And
> you'd have an inconsistency, because "/sys/class/rfkill/rfkill0/state"
> would say "1" (unblocked).
>
> You'd have a similar problem the other way around, if the wireless was
> initially enabled, but the user specified rfkill.default_state = 0.
>
> So maybe you need a "first time, force sync" flag instead. That would
> also help if you had a write-only rfkill line, no?
Not sure what you mean -- the sync is always done on register()?
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2009-04-18 17:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49DCA88E.6060400@tuffmail.co.uk>
[not found] ` <1239204090.16477.1.camel@johannes.local>
[not found] ` <49DCDD2E.80705@tuffmail.co.uk>
[not found] ` <49E38BBC.5010708@tuffmail.co.uk>
[not found] ` <1239741968.4205.1.camel@johannes.local>
[not found] ` <49E98C86.2040308@tuffmail.co.uk>
[not found] ` <1240043283.5792.0.camel@johannes.local>
2009-04-18 9:43 ` rfkill rewrite bug Alan Jenkins
2009-04-18 12:24 ` Johannes Berg
2009-04-18 13:29 ` Rfkill rewrite: eeepc-laptop resume Alan Jenkins
2009-04-18 13:33 ` Johannes Berg
2009-04-18 14:02 ` Alan Jenkins
2009-04-18 14:10 ` Johannes Berg
2009-04-18 15:49 ` rfkill rewrite bug Alan Jenkins
2009-04-18 15:57 ` Johannes Berg
2009-04-18 17:48 ` Alan Jenkins
2009-04-18 17:57 ` Johannes Berg [this message]
2009-04-18 18:03 ` Alan Jenkins
2009-04-18 17:42 ` Alan Jenkins
2009-04-18 17:59 ` Johannes Berg
2009-04-20 8:33 ` Alan Jenkins
2009-04-20 8:44 ` Johannes Berg
2009-04-20 9:20 ` Alan Jenkins
2009-04-20 11:28 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1240077421.25100.0.camel@johannes.local \
--to=johannes@sipsolutions.net \
--cc=alan-jenkins@tuffmail.co.uk \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).