fix detection of motorola wr850g, thanks to Vinicius Fonseca, (#4710)
[openwrt/openwrt.git] / package / broadcom-diag / src / diag.c
index e47f28101b80ab3d6f0a5c2d29087abea84470c1..c8c0e34abebed486fc8bd6c0ccb897f0ee06557e 100644 (file)
@@ -19,7 +19,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  *
- * $Id$
  */
 #include <linux/module.h>
 #include <linux/pci.h>
@@ -68,6 +67,7 @@ enum {
        WLHDD,
        WL300G,
        WL320GE,
+       WL330GE,
        WL500G,
        WL500GD,
        WL500GP,
@@ -307,6 +307,15 @@ static struct platform_t __initdata platforms[] = {
                        { .name = "link",       .gpio = 1 << 11, .polarity = REVERSE },
                },
        },
+       [WL330GE] = {
+               .name           = "ASUS WL-330gE",
+               .buttons        = {
+                       { .name = "reset",      .gpio = 1 << 2 },
+               },
+               .leds           = {
+                       { .name = "power",      .gpio = 1 << 0, .polarity = REVERSE },
+               },
+       },
        [WL500G] = {
                .name           = "ASUS WL-500g",
                .buttons        = {
@@ -764,12 +773,16 @@ static struct platform_t __init *platform_detect(void)
                        return &platforms[WL520GC];
                if (startswith(buf,"WL520GU-")) /* WL520GU-* */
                        return &platforms[WL520GU];
+               if (startswith(buf,"WL330GE-")) /* WL330GE-* */
+                       return &platforms[WL330GE];
        }
 
        /* Based on "ModelId" */
        if ((buf = nvram_get("ModelId"))) {
                if (!strcmp(buf, "WR850GP"))
                        return &platforms[WR850GP];
+               if (!strcmp(buf, "WR850G"))
+                       return &platforms[WR850GV2V3];
                if (!strcmp(buf, "WX-5565") && !strcmp(getvar("boardtype"),"bcm94710ap"))
                        return &platforms[TM2300]; /* Dell TrueMobile 2300 */
                if (startswith(buf,"WE800G")) /* WE800G* */