p54: more SoftLED updates
PATCH 2/3 p54: more SoftLED updates
This patch hopefully finishes the SoftLED code:
- It adds two more LEDs (rx and radio).
(the FW claims it can support up to 16 LEDs,
but I doubt that any vendor put more than 4 on a board)
- update the LEDs in a _delayed_ workqueue.
No one reported any more crashes.
(see: "PATCH] p54: fix race condition in memory management") So we can stop burning the mm code.
---
drivers/net/wireless/p54/p54.h +3 -2
@@ -125,6 +125,7 @@ struct p54_led_dev {struct led_classdev led_dev;char name[P54_LED_MAX_NAME_LEN +1 ]; +unsigned int toggled;unsigned int index;unsigned int registered; };
@@ -187,8 +188,8 @@ struct p54_common {/* LED management */ #ifdef CONFIG_P54_LEDS -struct p54_led_dev assoc_led; -struct p54_led_dev tx_led; +struct p54_led_dev leds[4 ]; +struct delayed_work led_work;#endif /* CONFIG_P54_LEDS */ u16 softled_state;/* bit field of glowing LEDs */
drivers/net/wireless/p54/p54common.c +65 -19
135 lines not on this page · raw message
Quoted 11 lines · Christian Lamparter
This patch hopefully finishes the SoftLED code:
- It adds two more LEDs (rx and radio).
(the FW claims it can support up to 16 LEDs,
but I doubt that any vendor put more than 4 on a board)
- update the LEDs in a _delayed_ workqueue.
No one reported any more crashes.
(see: "PATCH] p54: fix race condition in memory management") So we can stop burning the mm code.Signed-off-by Christian Lamparter <[email protected]>---
My device has 2 LED's - one for power and one blinks on TX(?). No messages in logs.
Quoted 8 lines · Christian Lamparter
This patch hopefully finishes the SoftLED code:
- It adds two more LEDs (rx and radio).
(the FW claims it can support up to 16 LEDs,
but I doubt that any vendor put more than 4 on a board)
- update the LEDs in a _delayed_ workqueue.
No one reported any more crashes.
(see: "PATCH] p54: fix race condition in memory management") So we can stop burning the mm code.
My device has 2 LEDs and I can see 4 registrations (assoc, tx, rx and radio). Does it make sense to register LEDs which are not available?
Fabio
Quoted 11 lines · On Tuesday 14 April 2009 17:12:33 Fabio Rossi wrote:
Quoted 8 lines · Christian Lamparter
This patch hopefully finishes the SoftLED code:
- It adds two more LEDs (rx and radio).
(the FW claims it can support up to 16 LEDs,
but I doubt that any vendor put more than 4 on a board)
- update the LEDs in a _delayed_ workqueue.
No one reported any more crashes.
(see: "PATCH] p54: fix race condition in memory management") So we can stop burning the mm code.
Quoted 2 lines
My device has 2 LEDs and I can see 4 registrations (assoc, tx, rx and radio). Does it make sense to register LEDs which are not available?
Well, trouble is that you can look (with your eyes) at your device and see the number of LEDs... This is something we cannot do with the driver. (Unless we find a EEPROM field which stores the # of LEDs and maybe even what they are used for?)
4 is just a "save" guess which should cover most - if not all - customer devices.
Regards,
Chr