Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 96f7c213 authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Ralf Baechle
Browse files

MIPS: BCM47XX: Fix detecting Microsoft MN-700 & Asus WL500G



Since the day of adding this code it was broken. We were iterating over
a wrong array and checking for wrong NVRAM entry.

Signed-off-by: default avatarRafał Miłecki <zajec5@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Patchwork: https://patchwork.linux-mips.org/patch/9654/


Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 6ca716f2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -247,8 +247,8 @@ static __init const struct bcm47xx_board_type *bcm47xx_board_get_nvram(void)
	}
	}


	if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 &&
	if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0 &&
	    bcm47xx_nvram_getenv("boardtype", buf2, sizeof(buf2)) >= 0) {
	    bcm47xx_nvram_getenv("boardnum", buf2, sizeof(buf2)) >= 0) {
		for (e2 = bcm47xx_board_list_boot_hw; e2->value1; e2++) {
		for (e2 = bcm47xx_board_list_hw_version_num; e2->value1; e2++) {
			if (!strstarts(buf1, e2->value1) &&
			if (!strstarts(buf1, e2->value1) &&
			    !strcmp(buf2, e2->value2))
			    !strcmp(buf2, e2->value2))
				return &e2->board;
				return &e2->board;