* [PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL.
@ 2012-05-21 8:37 Alex Hung
[not found] ` <1337589439-14605-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Alex Hung @ 2012-05-21 8:37 UTC (permalink / raw)
To: linville, johannes, davem, linux-wireless, netdev, linux-kernel,
alex.hung
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
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1337589439-14605-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>]
* Re: [PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL. [not found] ` <1337589439-14605-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org> @ 2012-05-22 18:46 ` Johannes Berg 2012-05-23 6:12 ` Alex Hung 0 siblings, 1 reply; 3+ messages in thread From: Johannes Berg @ 2012-05-22 18:46 UTC (permalink / raw) To: Alex Hung Cc: linville-2XuSBdqkA4R54TAoqtyWWQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q, linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA On Mon, 2012-05-21 at 16:37 +0800, Alex Hung wrote: > 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-Z7WLFzj8eWMS+FvcfC7Uqw@public•gmane.org> > --- > 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; Sorry, I accidentally replied to this in private and then Alex replied but it all got lost. He said he was going to change the eeepc use KEY_RFKILL instead of KEY_WLAN to switch all types... So I guess what this change really does is make __rfkill_switch_all() be able to not only switch all devices of a given type, but also be able to switch all devices of all types. Alex, can you please rewrite the commit log to make that clearer? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public•gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL. 2012-05-22 18:46 ` Johannes Berg @ 2012-05-23 6:12 ` Alex Hung 0 siblings, 0 replies; 3+ messages in thread From: Alex Hung @ 2012-05-23 6:12 UTC (permalink / raw) To: Johannes Berg; +Cc: linville, davem, linux-wireless, netdev, linux-kernel On 05/23/2012 02:46 AM, Johannes Berg wrote: > On Mon, 2012-05-21 at 16:37 +0800, Alex Hung wrote: >> 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; > > Sorry, I accidentally replied to this in private and then Alex replied > but it all got lost. > > He said he was going to change the eeepc use KEY_RFKILL instead of > KEY_WLAN to switch all types... > > So I guess what this change really does is make __rfkill_switch_all() be > able to not only switch all devices of a given type, but also be able to > switch all devices of all types. > > Alex, can you please rewrite the commit log to make that clearer? > > johannes > Thanks for your feedback, I re-wrote the comments to clarify the changes and re-submitted. Cheers, Alex Hung ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-23 6:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-21 8:37 [PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL Alex Hung
[not found] ` <1337589439-14605-1-git-send-email-alex.hung-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>
2012-05-22 18:46 ` Johannes Berg
2012-05-23 6:12 ` Alex Hung
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox