lkml.org 
[lkml]   [2012]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rfkill: Add handling when rfkill's type is RFKILL_TYPE_ALL.
Date
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


\
 
 \ /
  Last update: 2012-05-21 11:21    [W:0.101 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site