diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-03 09:53:40 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:00 -0500 |
commit | a9450b70a755abf093600035ef5361c53343fe9a (patch) | |
tree | 94b509ea1e73454d327f805273a1fce994d95b1b /drivers/net/wireless/rt2x00/rt2x00dev.c | |
parent | f2a3c7f5c8e3c1356dbbce1e9ac2e7f4d5365ba9 (diff) |
rt2x00: Make use of MAC80211_LED_TRIGGERS
Make use of the led triggers provided by mac80211 to control
the led status. This can be enabled through a per-driver
configuration option which will automatically enable the
generic handler in rt2x00lib.
This has been enabled for rt2500usb and rt73usb for the moment
since the led class will call set_brightness in irq context which
will not work correctly with the usb drivers who need to sleep.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00dev.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00dev.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c index 2b99f22ef036..23dc566b26fd 100644 --- a/drivers/net/wireless/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/rt2x00/rt2x00dev.c | |||
@@ -379,6 +379,11 @@ static void rt2x00lib_link_tuner(struct work_struct *work) | |||
379 | rt2x00lib_precalculate_link_signal(&rt2x00dev->link.qual); | 379 | rt2x00lib_precalculate_link_signal(&rt2x00dev->link.qual); |
380 | 380 | ||
381 | /* | 381 | /* |
382 | * Send a signal to the led to update the led signal strength. | ||
383 | */ | ||
384 | rt2x00leds_led_quality(rt2x00dev, rt2x00dev->link.qual.avg_rssi); | ||
385 | |||
386 | /* | ||
382 | * Evaluate antenna setup, make this the last step since this could | 387 | * Evaluate antenna setup, make this the last step since this could |
383 | * possibly reset some statistics. | 388 | * possibly reset some statistics. |
384 | */ | 389 | */ |
@@ -1140,6 +1145,11 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev) | |||
1140 | } | 1145 | } |
1141 | 1146 | ||
1142 | /* | 1147 | /* |
1148 | * Register LED. | ||
1149 | */ | ||
1150 | rt2x00leds_register(rt2x00dev); | ||
1151 | |||
1152 | /* | ||
1143 | * Allocatie rfkill. | 1153 | * Allocatie rfkill. |
1144 | */ | 1154 | */ |
1145 | retval = rt2x00rfkill_allocate(rt2x00dev); | 1155 | retval = rt2x00rfkill_allocate(rt2x00dev); |
@@ -1187,6 +1197,11 @@ void rt2x00lib_remove_dev(struct rt2x00_dev *rt2x00dev) | |||
1187 | rt2x00rfkill_free(rt2x00dev); | 1197 | rt2x00rfkill_free(rt2x00dev); |
1188 | 1198 | ||
1189 | /* | 1199 | /* |
1200 | * Free LED. | ||
1201 | */ | ||
1202 | rt2x00leds_unregister(rt2x00dev); | ||
1203 | |||
1204 | /* | ||
1190 | * Free ieee80211_hw memory. | 1205 | * Free ieee80211_hw memory. |
1191 | */ | 1206 | */ |
1192 | rt2x00lib_remove_hw(rt2x00dev); | 1207 | rt2x00lib_remove_hw(rt2x00dev); |
@@ -1227,6 +1242,7 @@ int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev, pm_message_t state) | |||
1227 | */ | 1242 | */ |
1228 | rt2x00lib_stop(rt2x00dev); | 1243 | rt2x00lib_stop(rt2x00dev); |
1229 | rt2x00lib_uninitialize(rt2x00dev); | 1244 | rt2x00lib_uninitialize(rt2x00dev); |
1245 | rt2x00leds_suspend(rt2x00dev); | ||
1230 | rt2x00debug_deregister(rt2x00dev); | 1246 | rt2x00debug_deregister(rt2x00dev); |
1231 | 1247 | ||
1232 | exit: | 1248 | exit: |
@@ -1270,9 +1286,10 @@ int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev) | |||
1270 | NOTICE(rt2x00dev, "Waking up.\n"); | 1286 | NOTICE(rt2x00dev, "Waking up.\n"); |
1271 | 1287 | ||
1272 | /* | 1288 | /* |
1273 | * Open the debugfs entry. | 1289 | * Open the debugfs entry and restore led handling. |
1274 | */ | 1290 | */ |
1275 | rt2x00debug_register(rt2x00dev); | 1291 | rt2x00debug_register(rt2x00dev); |
1292 | rt2x00leds_resume(rt2x00dev); | ||
1276 | 1293 | ||
1277 | /* | 1294 | /* |
1278 | * Only continue if mac80211 had open interfaces. | 1295 | * Only continue if mac80211 had open interfaces. |