aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files
diff options
context:
space:
mode:
authorMichal Cieslakiewicz <michal.cieslakiewicz@wp.pl>2018-08-27 20:24:04 +0200
committerMathias Kresin <dev@kresin.me>2018-08-28 07:21:01 +0200
commit2e3e0fd94c69239caba1296665a5f1efd3aba4d9 (patch)
treea8c22b9cbd8e64a2d13120dcb59822c1aeccce29 /target/linux/ar71xx/files
parenta4f4ddba61e61d3f15d19c4e57733a9e44ec8d09 (diff)
downloadupstream-2e3e0fd94c69239caba1296665a5f1efd3aba4d9.tar.gz
upstream-2e3e0fd94c69239caba1296665a5f1efd3aba4d9.tar.bz2
upstream-2e3e0fd94c69239caba1296665a5f1efd3aba4d9.zip
ar71xx: WNR612v2: fix kernel panic due to wrong Wifi LED init
Netgear WNR612v2 flashed with recent OpenWrt builds suffers from kernel panic at boot during wireless chip initialization, making device unusable: ath: phy0: Ignoring endianness difference in EEPROM magic bytes. ath: phy0: Enable LNA combining CPU 0 Unable to handle kernel paging request at virtual address 1000fee1, epc == 801d08f0, ra == 801d0d90 Oops[#1]: CPU: 0 PID: 469 Comm: kmodloader Not tainted 4.9.120 #0 [ ... register dump etc ... ] Kernel panic - not syncing: Fatal exception Rebooting in 1 seconds.. This simple patch fixes above error. It keeps LED table in memory after kernel init phase for ath9k driver to operate correctly (__initdata removed). Also, another bug is fixed - correct array size is provided to function that adds platform LEDs (this device has only 1 connected to Wifi chip) preventing code from going outside array bounds. Fixes: 1f5ea4eae46e ("ar71xx: add correct named default wireless led by using platform leds") Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl> [trimmed commit message] Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/ar71xx/files')
-rw-r--r--target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
index 6c18dc6d90..76c9cb99c9 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c
@@ -197,7 +197,7 @@ static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
}
};
-static struct gpio_led wnr612v2_wmac_leds_gpio[] __initdata = {
+static struct gpio_led wnr612v2_wmac_leds_gpio[] = {
{
.name = "netgear:green:wlan",
.gpio = WNR612V2_GPIO_WMAC_LED_WLAN_GREEN,
@@ -561,7 +561,7 @@ static void __init wnr612v2_setup(void)
wnr612v2_leds_gpio);
ap9x_pci_setup_wmac_leds(0, wnr612v2_wmac_leds_gpio,
- ARRAY_SIZE(wnr612v2_leds_gpio));
+ ARRAY_SIZE(wnr612v2_wmac_leds_gpio));
ap9x_pci_setup_wmac_btns(0, wnr612v2_wmac_keys_gpio,
ARRAY_SIZE(wnr612v2_wmac_keys_gpio),