mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-05 05:24:20 +00:00
439ac8104b
Import patches from upstream to sync 19.07 with master: 9f3e3323e996 rt2x00: allow to specify watchdog interval 2034afe4db4a rt2800: add helpers for reading dma done index 759c5b599cf4 rt2800: initial watchdog implementation 09db3b000619 rt2800: add pre_reset_hw callback 710e6cc1595e rt2800: do not nullify initialization vector data e403fa31ed71 rt2x00: add restart hw 0f47aeeada2a rt2800: do not enable watchdog by default 41a531ffa4c5 rt2x00usb: fix rx queue hang 3b902fa811cf rt2x00usb: remove unnecessary rx flag checks 1dc244064c47 rt2x00: no need to check return value of debugfs_create functions 706f0182b1ad rt2800usb: Add new rt2800usb device PLANEX GW-USMicroN 95844124385e rt2x00: clear IV's on start to fix AP mode regression 567a9b766b47 rt2x00: do not set IEEE80211_TX_STAT_AMPDU_NO_BACK on tx status 14d5e14c8a6c rt2x00: clear up IV's on key removal 13fa451568ab Revert "rt2800: enable TX_PIN_CFG_LNA_PE_ bits per band" --pending-- rt2800: remove errornous duplicate condition Signed-off-by: Daniel Golle <daniel@makrotopia.org>
41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
--- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c
|
|
@@ -36,6 +36,7 @@
|
|
#include <linux/kernel.h>
|
|
#include <linux/module.h>
|
|
#include <linux/slab.h>
|
|
+#include <linux/of.h>
|
|
|
|
#include "rt2x00.h"
|
|
#include "rt2800lib.h"
|
|
@@ -9542,6 +9543,17 @@ static int rt2800_init_eeprom(struct rt2
|
|
rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC);
|
|
rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY);
|
|
|
|
+ {
|
|
+ struct device_node *np = rt2x00dev->dev->of_node;
|
|
+ unsigned int led_polarity;
|
|
+
|
|
+ /* Allow overriding polarity from OF */
|
|
+ if (!of_property_read_u32(np, "ralink,led-polarity",
|
|
+ &led_polarity))
|
|
+ rt2x00_set_field16(&eeprom, EEPROM_FREQ_LED_POLARITY,
|
|
+ led_polarity);
|
|
+ }
|
|
+
|
|
rt2x00dev->led_mcu_reg = eeprom;
|
|
#endif /* CPTCFG_RT2X00_LIB_LEDS */
|
|
|
|
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c
|
|
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00leds.c
|
|
@@ -109,6 +109,9 @@ static int rt2x00leds_register_led(struc
|
|
led->led_dev.name = name;
|
|
led->led_dev.brightness = LED_OFF;
|
|
|
|
+ if (rt2x00_is_soc(rt2x00dev))
|
|
+ led->led_dev.brightness_set(&led->led_dev, LED_OFF);
|
|
+
|
|
retval = led_classdev_register(device, &led->led_dev);
|
|
if (retval) {
|
|
rt2x00_err(rt2x00dev, "Failed to register led handler\n");
|