From: Alex Hung <alex.hung@canonical.com>
To: linville@tuxdriver.com, johannes@sipsolutions.net,
davem@davemloft.net, linux-wireless@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
alex.hung@canonical.com
Subject: [PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL.
Date: Mon, 21 May 2012 16:37:19 +0800 [thread overview]
Message-ID: <1337589439-14605-1-git-send-email-alex.hung@canonical.com> (raw)
This rfkill type is supposed to be able to toggles the status of all wireless
devices; however, no wireless devices will register itself with type
RFKILL_TYPE_ALL and thus it was previously ignored in __rfkill_switch_all.
Signed-off-by: Alex Hung <alex.hung@canonical.com>
---
net/rfkill/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 5be1957..84dd71a 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -324,7 +324,7 @@ static void __rfkill_switch_all(const enum rfkill_type type, bool blocked)
rfkill_global_states[type].cur = blocked;
list_for_each_entry(rfkill, &rfkill_list, node) {
- if (rfkill->type != type)
+ if (rfkill->type != type && type != RFKILL_TYPE_ALL)
continue;
rfkill_set_block(rfkill, blocked);
--
1.7.0.4
next reply other threads:[~2012-05-21 8:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-21 8:37 Alex Hung [this message]
[not found] ` <1337589439-14605-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-05-22 18:46 ` [PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL Johannes Berg
2012-05-23 6:12 ` Alex Hung
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=1337589439-14605-1-git-send-email-alex.hung@canonical.com \
--to=alex.hung@canonical.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@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).