|
@@ -341,7 +341,15 @@ static void __rfkill_switch_all(const enum rfkill_type type, bool blocked)
|
|
{
|
|
{
|
|
struct rfkill *rfkill;
|
|
struct rfkill *rfkill;
|
|
|
|
|
|
- rfkill_global_states[type].cur = blocked;
|
|
|
|
|
|
+ if (type == RFKILL_TYPE_ALL) {
|
|
|
|
+ int i;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < NUM_RFKILL_TYPES; i++)
|
|
|
|
+ rfkill_global_states[i].cur = blocked;
|
|
|
|
+ } else {
|
|
|
|
+ rfkill_global_states[type].cur = blocked;
|
|
|
|
+ }
|
|
|
|
+
|
|
list_for_each_entry(rfkill, &rfkill_list, node) {
|
|
list_for_each_entry(rfkill, &rfkill_list, node) {
|
|
if (rfkill->type != type && type != RFKILL_TYPE_ALL)
|
|
if (rfkill->type != type && type != RFKILL_TYPE_ALL)
|
|
continue;
|
|
continue;
|