rt2500pci: turn on led_qual for default LED mode
RFC 1/1 rt2500pci: turn on led_qual for default LED mode
Add a check for LED_MODE_DEFAULT so that we initialise the link LED.
---
I'm submitting this patch just as an RFC as I have no idea whether it works with all rt2500pci devices. With my card, value holds 0 after the call to rt2x00_get_field16() and so the added check for LED_MODE_DEFAULT (which is 0) is needed for the link LED to work.
My card is a "RaLink RT2500 802.11g Cardbus/mini-PCI [1814:0201]" Belkin F5D7010 according to lspci.
Any advice would be much appreciated. Does this patch look reasonable? Are there any docs/specs which I could read to learn how this should be handled?
P.S. This is not related to my previous LED patch. This one is for the other LED which has never worked as far as I can remember, until now :-)
drivers/net/wireless/rt2x00/rt2500pci.c +1 -1
@@ -1524,7 +1524,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */
Signature · 1 line
1.5.6.5
Hi,
Quoted 10 lines
Add a check for
LED_MODE_DEFAULTso that we initialise the link LED.Signed-off-by Andrew Price <[email protected]>---
I'm submitting this patch just as an RFC as I have no idea whether it works with all rt2500pci devices. With my card, value holds 0 after the call to
rt2x00_get_field16()and so the added check forLED_MODE_DEFAULT(which is 0) is needed for the link LED to work.
Quoted 5 lines
My card is a "RaLink RT2500 802.11g Cardbus/mini-PCI [1814:0201]" Belkin F5D7010 according to lspci.
Any advice would be much appreciated. Does this patch look reasonable? Are there any docs/specs which I could read to learn how this should be handled?
You raise a very good point with this patch, I need to double check what the legacy drivers actually do with LED_MODE_DEFAULT and if it is similar as your approach this patch should be done for all rt2x00 drivers.
I'll get back on this patch as soon as possible.
Thanks,
Ivo
Quoted 13 lines
drivers/net/wireless/rt2x00/rt2500pci.c +1
-1@@ -1524,7 +1524,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */
Quoted 10 lines · Andrew Price
Add a check for
LED_MODE_DEFAULTso that we initialise the link LED.Signed-off-by Andrew Price <[email protected]>---
I'm submitting this patch just as an RFC as I have no idea whether it works with all rt2500pci devices. With my card, value holds 0 after the call to
rt2x00_get_field16()and so the added check forLED_MODE_DEFAULT(which is 0) is needed for the link LED to work.
Quoted 8 lines
My card is a "RaLink RT2500 802.11g Cardbus/mini-PCI [1814:0201]" Belkin F5D7010 according to lspci.
Any advice would be much appreciated. Does this patch look reasonable? Are there any docs/specs which I could read to learn how this should be handled?
P.S. This is not related to my previous LED patch. This one is for the other LED which has never worked as far as I can remember, until now :-)
Ok, I just checked legacy driver and LED_MODE_DEFAULT indeed can be considered as LED_MODE_TXRX_ACTIVITY. Could you resend this patch as normal patch, but with the same change for rt2400pci and rt2500usb.
Thanks,
Quoted 13 lines
drivers/net/wireless/rt2x00/rt2500pci.c +1
-1@@ -1524,7 +1524,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */
PATCH 1/1 rt2400,rt2500: init led_qual for LED_MODE_DEFAULT
Add a check for LED_MODE_DEFAULT so that we use the link LED for rt2400 and rt2500 devices.
drivers/net/wireless/rt2x00/rt2400pci.c +1 -1
@@ -1365,7 +1365,7 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2400pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2400pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */
drivers/net/wireless/rt2x00/rt2500pci.c +1 -1
@@ -1524,7 +1524,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */
drivers/net/wireless/rt2x00/rt2500usb.c +1 -1
@@ -1569,7 +1569,7 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500usb_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500usb_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */
Signature · 1 line
1.5.6.5
Re: [PATCH] rt2400,rt2500: init led_qual for LED_MODE_DEFAULT
Quoted 4 lines · Andrew Price
Add a check for
LED_MODE_DEFAULTso that we use the link LED for rt2400 and rt2500 devices.Signed-off-by Andrew Price <[email protected]>
Quoted 39 lines
drivers/net/wireless/rt2x00/rt2400pci.c +1
-1@@ -1365,7 +1365,7 @@ static int rt2400pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2400pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2400pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */ drivers/net/wireless/rt2x00/rt2500pci.c +1
-1@@ -1524,7 +1524,7 @@ static int rt2500pci_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500pci_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */ drivers/net/wireless/rt2x00/rt2500usb.c +1
-1@@ -1569,7 +1569,7 @@ static int rt2500usb_init_eeprom(struct rt2x00_dev *rt2x00dev) value =rt2x00_get_field16 (eeprom,EEPROM_ANTENNA_LED_MODE );rt2500usb_init_led (rt2x00dev, &rt2x00dev->led_radio,LED_TYPE_RADIO ); -if (value ==LED_MODE_TXRX_ACTIVITY ) +if (value ==LED_MODE_TXRX_ACTIVITY || value ==LED_MODE_DEFAULT )rt2500usb_init_led (rt2x00dev, &rt2x00dev->led_qual,LED_TYPE_ACTIVITY );#endif /* CONFIG_RT2X00_LIB_LEDS */