Skip to content

Commit 4bff3f3

Browse files
realmicumkresin
authored andcommitted
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: 1f5ea4e ("ar71xx: add correct named default wireless led by using platform leds") Signed-off-by: Michal Cieslakiewicz <[email protected]> [trimmed commit message] Signed-off-by: Mathias Kresin <[email protected]>
1 parent e302272 commit 4bff3f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2000-v3.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ static struct gpio_led wnr612v2_leds_gpio[] __initdata = {
197197
}
198198
};
199199

200-
static struct gpio_led wnr612v2_wmac_leds_gpio[] __initdata = {
200+
static struct gpio_led wnr612v2_wmac_leds_gpio[] = {
201201
{
202202
.name = "netgear:green:wlan",
203203
.gpio = WNR612V2_GPIO_WMAC_LED_WLAN_GREEN,
@@ -561,7 +561,7 @@ static void __init wnr612v2_setup(void)
561561
wnr612v2_leds_gpio);
562562

563563
ap9x_pci_setup_wmac_leds(0, wnr612v2_wmac_leds_gpio,
564-
ARRAY_SIZE(wnr612v2_leds_gpio));
564+
ARRAY_SIZE(wnr612v2_wmac_leds_gpio));
565565

566566
ap9x_pci_setup_wmac_btns(0, wnr612v2_wmac_keys_gpio,
567567
ARRAY_SIZE(wnr612v2_wmac_keys_gpio),

0 commit comments

Comments
 (0)