Changeset 35492


Ignore:
Timestamp:
2013-02-04T23:49:05+01:00 (5 years ago)
Author:
hauke
Message:

brcm47xx: fix detection of Asus RT-N16

This fixes #12936.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/brcm47xx/patches-3.6/260-MIPS-BCM47XX-add-board-detection.patch

    r35322 r35492  
    99--- /dev/null 
    1010+++ b/arch/mips/bcm47xx/board.c 
    11 @@ -0,0 +1,218 @@ 
     11@@ -0,0 +1,219 @@ 
    1212+#include <linux/export.h> 
    1313+#include <linux/string.h> 
     
    4040+ 
    4141+static const struct bcm47xx_board_type_list bcm47xx_board_list_hardware_version[] = { 
     42+       {{BCM47XX_BOARD_ASUS_RTN16, "Asus RT-N16"}, "RT-N16-",}, 
    4243+       {{BCM47XX_BOARD_ASUS_WL330GE, "Asus WL330GE"}, "WL330GE-",}, 
    4344+       {{BCM47XX_BOARD_ASUS_WL500GPV1, "Asus WL500GPV1"}, "WL500gp-",}, 
     
    149150+       if (bcm47xx_nvram_getenv("model_no", buf1, sizeof(buf1)) >= 0) { 
    150151+               for (e = bcm47xx_board_list_model_no; e->value1; e++) { 
    151 +                       if (!strcmp(buf1, e->value1)) 
     152+                       if (strstarts(buf1, e->value1)) 
    152153+                               return &e->board; 
    153154+               } 
     
    156157+       if (bcm47xx_nvram_getenv("hardware_version", buf1, sizeof(buf1)) >= 0) { 
    157158+               for (e = bcm47xx_board_list_hardware_version; e->value1; e++) { 
    158 +                       if (!strcmp(buf1, e->value1)) 
     159+                       if (strstarts(buf1, e->value1)) 
    159160+                               return &e->board; 
    160161+               } 
Note: See TracChangeset for help on using the changeset viewer.