aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2009-04-09 23:14:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:45 -0400
commit492301fb5d12e4a77a1010ad2b6f1ed306014123 (patch)
treeed8432de55f5b3b53fe6f7b113344354a5ce5e3a /net
parent137907287789607f2a2586ad625e7b8c646b3425 (diff)
rfkill: Fix broken rfkill LED in 2.6.30-rc1
The rfkill system fails to issue a LED trigger event when the rfkill state changes. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/rfkill/rfkill.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index df1269c5ca70..e2d4510623f2 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -96,6 +96,7 @@ static void update_rfkill_state(struct rfkill *rfkill)
96 } 96 }
97 mutex_unlock(&rfkill->mutex); 97 mutex_unlock(&rfkill->mutex);
98 } 98 }
99 rfkill_led_trigger(rfkill, rfkill->state);
99} 100}
100 101
101/** 102/**
@@ -136,8 +137,9 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
136 oldstate = rfkill->state; 137 oldstate = rfkill->state;
137 138
138 if (rfkill->get_state && !force && 139 if (rfkill->get_state && !force &&
139 !rfkill->get_state(rfkill->data, &newstate)) 140 !rfkill->get_state(rfkill->data, &newstate)) {
140 rfkill->state = newstate; 141 rfkill->state = newstate;
142 }
141 143
142 switch (state) { 144 switch (state) {
143 case RFKILL_STATE_HARD_BLOCKED: 145 case RFKILL_STATE_HARD_BLOCKED:
@@ -172,6 +174,7 @@ static int rfkill_toggle_radio(struct rfkill *rfkill,
172 if (force || rfkill->state != oldstate) 174 if (force || rfkill->state != oldstate)
173 rfkill_uevent(rfkill); 175 rfkill_uevent(rfkill);
174 176
177 rfkill_led_trigger(rfkill, rfkill->state);
175 return retval; 178 return retval;
176} 179}
177 180
@@ -204,6 +207,7 @@ static void __rfkill_switch_all(const enum rfkill_type type,
204 mutex_lock(&rfkill->mutex); 207 mutex_lock(&rfkill->mutex);
205 rfkill_toggle_radio(rfkill, state, 0); 208 rfkill_toggle_radio(rfkill, state, 0);
206 mutex_unlock(&rfkill->mutex); 209 mutex_unlock(&rfkill->mutex);
210 rfkill_led_trigger(rfkill, rfkill->state);
207 } 211 }
208 } 212 }
209} 213}
@@ -256,6 +260,7 @@ void rfkill_epo(void)
256 RFKILL_STATE_SOFT_BLOCKED; 260 RFKILL_STATE_SOFT_BLOCKED;
257 } 261 }
258 mutex_unlock(&rfkill_global_mutex); 262 mutex_unlock(&rfkill_global_mutex);
263 rfkill_led_trigger(rfkill, rfkill->state);
259} 264}
260EXPORT_SYMBOL_GPL(rfkill_epo); 265EXPORT_SYMBOL_GPL(rfkill_epo);
261 266
@@ -358,6 +363,7 @@ int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state)
358 rfkill_uevent(rfkill); 363 rfkill_uevent(rfkill);
359 364
360 mutex_unlock(&rfkill->mutex); 365 mutex_unlock(&rfkill->mutex);
366 rfkill_led_trigger(rfkill, rfkill->state);
361 367
362 return 0; 368 return 0;
363} 369}
@@ -520,6 +526,7 @@ static int rfkill_resume(struct device *dev)
520 1); 526 1);
521 527
522 mutex_unlock(&rfkill->mutex); 528 mutex_unlock(&rfkill->mutex);
529 rfkill_led_trigger(rfkill, rfkill->state);
523 } 530 }
524 531
525 return 0; 532 return 0;