User:Omega/Boardnum&boardtype

Reference Board - boardtype
boardtype=0x0646 rt-ac56u_nvram.txt on github.com
 * 1) boardtype describes what type of Broadcom reference board that the design resembles
 * 2) Reference Board  boardtype     Reference Board  boardtype
 * 3)  BCM94704agr     0x042F (11ag)  BCM95356ssnr    0x0505 (SS,11n)
 * 4)  BCM94712ap      0x0445 (AP?)   BCM94718nrl     0x050D (rev.L)
 * 5)  BCM94712p       0x0446 (Pow?)  BCM94718nrx     0x050E (rev.X)
 * 6)  BCM94712agr     0x0451 (11ag)  BCM947186nrh    0x052A (rev.H)
 * 7)  BCM95350gr      0x0456 (11g)   BCM947186nr2    0x052B (rev.2)
 * 8)  BCM94712lgr     0x0460 (L g)   BCM94718nrlfmc  0x052C (LF MC)
 * 9)  BCM95352gr      0x0467 (11g)   BCM95357nr      0x053A (11n,rev.)
 * 10)  BCM95351agr     0x0470 (11ag)  BCM95357nrepa   0x053B (ext.PA)
 * 11)  BCM94704mpcb    0x0472 (mPCB)  BCM95358nr2     0x053D (rev.2)
 * 12)  BCM94712agsdio  0x047B (SDIO)  BCM95357nr2epa  0x054C (rev.2,ext.PA)
 * 13)  BCM95352elgr    0x047F (EL g)  BCM95357nr2     0x054D (rev.2)
 * 14)  BCM94705lmp     0x0489 (L MP)  BCM95357cbtnr2epa 0x056A (rev.2,ext.PA)
 * 15)  BCM94705gmp     0x0489 (g MP)  BCM94706nr      0x05B2 (rev.)
 * 16)  BCM94705gmp115  0x0489 (g MP)  BCM94706nrh     0x05D8 (rev.H)
 * 17)  BCM94312mcg     0x048B (MC g)  BCM94706Lmiih5  0x0603 (MII H5)
 * 18)  BCM94312mcag    0x048C (MC ag) BCM94706nr2hmc  0x0617 (rev.2,HMC)
 * 19)  BCM95354gr      0x048E (11g)   BCM94708r       0x0646 (RT-AC56U/68U)
 * 20)  BCM94705nogig   0x0496 (FE)    BCM94709r       0x0665 (RT-AC87U)
 * 21)  BCM94703nr      0x04C0 (11n)   BCM94706nrhpo   0xF5B2 (RT-N/AC66U)*
 * 22)  BCM94716nr2     0x04CD (rev.2) BCM94708rlinkd  0xD646 (EA6900)*
 * 23)  BCM94717ap      0x04CE (AP?)   BCM94708rlinkf  0xF646 (EA6700)*
 * 24)  BCM94718nr      0x04CF (11n)   BCM95357nr2u    0x0550 (RT-N10U/N53)*
 * 25)  BCM95356A1n     0x04EC (RT-N10)*
 * 26)  BCM94717mii     0x04ED (MII)
 * 27)  BCM94717cbtnr   0x04EF (comp.BT? 11n)
 * 28)  BCM94716nr2ipa  0x04FB (11n,rev.2,int.PA)
 * 29) set a boardtype of BCM94708r but customized for ASUS RT-AC56U
 * 1) set a boardtype of BCM94708r but customized for ASUS RT-AC56U
 * 1) set a boardtype of BCM94708r but customized for ASUS RT-AC56U

boardnum & boardtype & boardrev
boardnum: 679 & boardtype: 0x0646 & boardrev: 0x1110
 * ASUS Board ID
 * NETGEAR Board ID
 * Netgear R6250 • R6250 • U12H245T00_NETGEAR
 * Netgear EX6200 • EX6200 • U12H269T00_NETGEAR
 * Netgear R6300 v1 • R6300 • U12H218T00_NETGEAR
 * Netgear R6300 v2 • R6300V2 • U12H240T00_NETGEAR
 * Netgear R6300 v2 • R6300V2CH • U12H240T70_NETGEAR
 * Netgear AC1450 • AC1450 • U12H240T99_NETGEAR

boardnum: 32 & boardtype: 0x0646 & boardrev: 0x1601
 * Netgear R6400 v1 • R6400 • U12H332T00_NETGEAR
 * Netgear R6400 v2 • R6400V2 • U12H332T20_NETGEAR • U12H332T30_NETGEAR +√
 * Netgear R6700v3 • R6700V3 • U12H332T77_NETGEAR

boardnum: 32 & boardtype: 0x0665 & boardrev: 0x1301
 * Netgear R6700 • R6700 • U12H270T10_NETGEAR
 * Netgear R7000 • R7000 • U12H270T00_NETGEAR
 * Netgear R7000P • R7000P • U12H270T20_NETGEAR

boardnum: 32 & boardtype: 0x0665 & boardrev: 0x1101
 * Netgear R7900 • R7900 • U12H315T00_NETGEAR
 * Netgear R8000 • R8000 • U12H315T20_NETGEAR

boardnum: 32 & boardtype: 0x072F & boardrev: 0x1101
 * Netgear R8500 • R8500 • U12H334T99_NETGEAR (Open)


 * BCM47XX_BOARD_NETGEAR • OEM: Foxconn
 * Netgear WGR614v8 • WGR614V8 • U12H072T00_NETGEAR
 * Netgear WGR614v9 • WGR614V9 • U12H094T00_NETGEAR
 * Netgear WGR614v10 • WGR614_V10 • U12H139T01_NETGEAR
 * Netgear WNR834Bv1 • WNR834BV1 • SerComm (YBQ00A-0.8MM)
 * Netgear WNR834Bv2 • WNR834BV2 • U12H081T00_NETGEAR
 * Netgear WNR2000v2 • WNR2000V2 • U12H114T00_NETGEAR
 * Netgear WNDR3300v1 • WNDR3300 • U12H093T00_NETGEAR
 * Netgear WNDR3300v2 • WNDR3300V2 • U12H155T00_NETGEAR ° (?) \
 * Netgear WNDR3400v1(VCNA) • WNDR3400VCNA • U12H155T01_NETGEAR ° (?)
 * Netgear WNDR3400v1 • WNDR3400V1 • U12H155T00_NETGEAR ° /
 * Netgear WNDR3400v2 • WNDR3400V2 • U12H187T00_NETGEAR
 * Netgear WNDR3400v3 • WNDR3400V3 • U12H208T00_NETGEAR
 * Netgear WNR3500v2 • WNR3500V2 • U12H127T00_NETGEAR (?) \
 * Netgear WNR3500v2(VC) • WNR3500V2VC • U12H127T70_NETGEAR (?) /
 * Netgear WNR3500U • WNR3500U • U12H136T00_NETGEAR (?) \
 * Netgear WNR3500Lv1 • WNR3500L • U12H136T99_NETGEAR (?) /
 * Netgear WNR3500Lv2 • WNR3500LV2 • U12H172T00/U12H172T99 (?)
 * Netgear WNDR3700v3 • WNDR3700V3 • U12H194T00_NETGEAR
 * Netgear WNDR4000 • WNDR4000 • U12H181T00_NETGEAR
 * Netgear WNDR4500 • WNDR4500 • U12H189T00_NETGEAR

NETGEAR --- struct bcm47xx_board_type_list1 bcm47xx_board_list_board_id[] __initconst = { {{BCM47XX_BOARD_NETGEAR_WGR614V8, "Netgear WGR614 V8"}, "U12H072T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WGR614V9, "Netgear WGR614 V9"}, "U12H094T00_NETGEAR"}, +      {{BCM47XX_BOARD_NETGEAR_WGR614_V10, "Netgear WGR614 V10"}, "U12H139T01_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3300, "Netgear WNDR3300"}, "U12H093T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400V1, "Netgear WNDR3400 V1"}, "U12H155T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400V2, "Netgear WNDR3400 V2"}, "U12H187T00_NETGEAR"}, +      {{BCM47XX_BOARD_NETGEAR_WNDR3400_V3, "Netgear WNDR3400 V3"}, "U12H208T00_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3400VCNA, "Netgear WNDR3400 Vcna"}, "U12H155T01_NETGEAR"}, {{BCM47XX_BOARD_NETGEAR_WNDR3700V3, "Netgear WNDR3700 V3"}, "U12H194T00_NETGEAR"}, +	{{BCM47XX_BOARD_NETGEAR_WNDR4000, "Netgear WNDR4000"}, "U12H181T00_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNDR4500, "Netgear WNDR4500"}, "U12H189T00_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNR2000, "Netgear WNR2000"}, "U12H114T00_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNR3500L, "Netgear WNR3500L"}, "U12H136T99_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNR3500U, "Netgear WNR3500U"}, "U12H136T00_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNR3500V2, "Netgear WNR3500V2"}, "U12H127T00_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNR3500V2VC, "Netgear WNR3500V2VC"}, "U12H127T70_NETGEAR",}, +	{{BCM47XX_BOARD_NETGEAR_WNR834BV2, "Netgear WNR834BV2"}, "U12H081T00_NETGEAR",},
 * DD-WRT SVN

560	       if (boardnum == 679 && nvram_match("boardtype", "0x0646") 561	            && nvram_match("boardrev", "0x1110")) { 562	               int mtd = getMTD("board_data"); 563	               char devname[32]; 564	               sprintf(devname, "/dev/mtdblock/%d", mtd); 565	               FILE *model = fopen(devname, "rb"); 566	               if (model) { 567	#define R6300V2 "U12H240T00_NETGEAR" 568	#define R6300V2CH "U12H240T70_NETGEAR" 569	#define AC1450 "U12H240T99_NETGEAR" 570	#define EX6200 "U12H269T00_NETGEAR" 571	                       char modelstr[32]; 572	                       fread(modelstr, 1, strlen(R6300V2), model); 573	                       if (!strncmp(modelstr, R6300V2, strlen(R6300V2)) ||                                 !strncmp(modelstr, R6300V2CH, strlen(R6300V2CH))) { 574	                               setRouter("Netgear R6300V2"); 575	                               fclose(model); 576	                               return ROUTER_NETGEAR_R6300V2; 577	                       } else if (!strncmp(modelstr, AC1450, strlen(AC1450))) { 578	                               setRouter("Netgear AC1450"); 579	                               fclose(model); 580	                               return ROUTER_NETGEAR_AC1450; 581	                       } else if (!strncmp(modelstr, EX6200, strlen(EX6200))) { 582	                               setRouter("Netgear EX6200"); 583	                               fclose(model); 584	                               return ROUTER_NETGEAR_EX6200; 585	                       } else { 586	                               setRouter("Netgear R6250"); 587	                               fclose(model); 588	                               return ROUTER_NETGEAR_R6250;

593	       if (boardnum == 32 && nvram_match("boardtype", "0x0665") 594	            && nvram_match("boardrev", "0x1301")) { 595	               if (nvram_match("board_id", "U12H270T10_NETGEAR")) { 596	                       setRouter("Netgear R6700"); 597	               } else { 598	                       setRouter("Netgear R7000"); 599	               } 600	                return ROUTER_NETGEAR_R7000; 602	603	       if (boardnum == 32 && nvram_match("boardtype", "0x0646") 604	            && nvram_match("boardrev", "0x1601")) { 605	               if (nvram_match("board_id", "U12H270T20_NETGEAR")) { 606	                       setRouter("Netgear R7000P"); 607	                       return ROUTER_NETGEAR_R7000P; 608	               } else if (nvram_match("board_id", "U12H332T20_NETGEAR") 609	                           || nvram_match("board_id", "U12H332T30_NETGEAR")) { 610	                       setRouter("Netgear R6400 v2"); 611	                       return ROUTER_NETGEAR_R6400V2; 612	               } else if (nvram_match("board_id", "U12H332T77_NETGEAR")) { 613	                       setRouter("Netgear R6700 v3"); 614	                       return ROUTER_NETGEAR_R6700V3; 615	               } else { 616	                       setRouter("Netgear R6400 v1"); 617	                       return ROUTER_NETGEAR_R6400; 620	621	       if (boardnum == 32 && nvram_match("boardtype", "0x0665") 622	            && nvram_match("boardrev", "0x1101")) { 623	               setRouter("Netgear R8000"); 624	               return ROUTER_NETGEAR_R8000; 625	       } 626	627	        if (boardnum == 32 && nvram_match("boardtype", "0x072F") 628	            && nvram_match("boardrev", "0x1101")) { 629	               setRouter("Netgear R8500"); 630	               return ROUTER_NETGEAR_R8500; -- ASUS

347	       if (nvram_match("productid", "RT-AC56U")) { 348	               setRouter("Asus RT-AC56U"); 349	               return ROUTER_ASUS_AC56U; 351	352	       if (nvram_match("productid", "RT-AC67U")) { 353	               setRouter("Asus RT-AC67U"); 354	               return ROUTER_ASUS_AC67U; 356	357	       if (nvram_match("odmpid", "RT-AC68R")) { 358	               setRouter("Asus RT-AC68R"); 359	               return ROUTER_ASUS_AC67U; 361	362	       if (nvram_match("odmpid", "RT-AC1900P")) { 363	               setRouter("Asus RT-AC1900P"); 364	               return ROUTER_ASUS_AC67U;

367	       if (nvram_match("odmpid", "RT-AC68A")) { 368	               setRouter("Asus RT-AC68A"); 369	               return ROUTER_ASUS_AC67U; 371	372	       if (nvram_match("model", "RT-AC1200G+")) { 373	               setRouter("Asus RT-AC1200G+"); 374	               return ROUTER_ASUS_AC1200; 376	377	       if (nvram_match("productid", "RT-AC68U") && nvram_match("boardrev", "0x1100")) { 378	               setRouter("Asus RT-AC68U"); 379	               return ROUTER_ASUS_AC67U; 381	382	       if (nvram_match("productid", "RT-AC68U") && nvram_match("boardrev", "0x1103")                    && nvram_match("boardtype", "0x0665")) { 383	               setRouter("Asus RT-AC68U B1"); 384	               return ROUTER_ASUS_AC67U; 386	387	       if (nvram_match("productid", "RT-AC68U") && nvram_match("boardrev", "0x1103")) { 388	               setRouter("Asus RT-AC68U C1"); 389	               return ROUTER_ASUS_AC67U; 391	392	       if (nvram_match("model", "RT-AC68U") && nvram_match("boardrev", "0x1100")) { 393	               setRouter("Asus RT-AC68U"); 394	               return ROUTER_ASUS_AC67U; 396	397	       if (nvram_match("model", "RT-AC68U") && nvram_match("boardrev", "0x1500")) { 398	               setRouter("Asus RT-AC68U"); 399	               return ROUTER_ASUS_AC67U; 401	402	       if (nvram_match("model", "RT-AC68U") && nvram_match("boardrev", "0x1103")                    && nvram_match("boardtype", "0x0665")) { 403	               setRouter("Asus RT-AC68U B1"); 404	               return ROUTER_ASUS_AC67U; 406	407	       if (nvram_match("model", "RT-AC68U") && nvram_match("boardrev", "0x1103")) { 408	               setRouter("Asus RT-AC68U C1"); 409	               return ROUTER_ASUS_AC67U; 411	412	       if (nvram_match("productid", "RT-AC87U") || nvram_match("model", "RT-AC87U")) { 413	               setRouter("Asus RT-AC87U"); 414	               return ROUTER_ASUS_AC87U; 416	417	       if (nvram_match("model", "RT-AC88U")) { 418	               setRouter("Asus RT-AC88U"); 419	               return ROUTER_ASUS_AC88U; 421	422	       if (nvram_match("model", "RT-AC3100")) { 423	               setRouter("Asus RT-AC3100"); 424	               return ROUTER_ASUS_AC3100; 425 426	       if (nvram_match("productid", "RT-AC3100")) { 427	               setRouter("Asus RT-AC3100"); 428	               return ROUTER_ASUS_AC3100; 430	431	       if (nvram_match("odmpid", "RT-AC3100")) { 432	               setRouter("Asus RT-AC3100"); 433	               return ROUTER_ASUS_AC3100; 435	436	       if (nvram_match("model", "RT-AC5300")) { 437	               setRouter("Asus RT-AC5300"); 438	               return ROUTER_ASUS_AC5300; 440	441	       if (nvram_match("productid", "RT-AC3200") || nvram_match("model", "RT-AC3200")) { 442	               setRouter("Asus RT-AC3200"); 443	               return ROUTER_ASUS_AC3200; 445	446	       if (nvram_match("boardtype", "0x0665") 447	            && nvram_match("boardrev", "0x1103") 448	            && !nvram_match("melco_id", "RD_BB13049")) { 449	               setRouter("Asus RT-AC87U"); 450	               return ROUTER_ASUS_AC87U; 452	453	       if (nvram_match("odmpid", "RT-AC87U")) { 454	               setRouter("Asus RT-AC87U"); 455	               return ROUTER_ASUS_AC87U; 457	458	       if (nvram_match("model", "RT-N18U")) { 459	               setRouter("Asus RT-N18U"); 460	               return ROUTER_ASUS_RTN18U;

511	       if (boardnum == 00 && nvram_match("boardtype", "0x0646") 512	            && nvram_match("boardrev", "0x1100") 513	            && nvram_match("gpio15", "wps_button")) { 514	               setRouter("Asus RT-AC56U"); 515	               return ROUTER_ASUS_AC56U;

553	       if (boardnum != 24 && nvram_match("boardtype", "0x0646") 554	            && nvram_match("boardrev", "0x1100") 555	            && nvram_match("gpio7", "wps_button")) { 556	               setRouter("Asus RT-AC68U"); 557	               return ROUTER_ASUS_AC67U; -- dd-wrt

2585	       if (nvram_match("boardnum", "asusX")                  && nvram_match("boardtype", "bcm94710dev")) 2586	               setRouter("Asus WL-300g / WL-500g"); 2587	               return ROUTER_ASUS_WL500G;

2601	       if (boardnum == 45                  && nvram_match("boardtype", "bcm95365r")) 2602	               setRouter("Asus WL-500g Deluxe"); 2603	               return ROUTER_ASUS_WL500GD;

2606	       if (boardnum == 45 && nvram_match("boardtype", "0x0472") 2607	            && nvram_match("boardrev", "0x23")                    && nvram_match("parkid", "1")) { 2608	               setRouter("Asus WL-500W"); 2609	               return ROUTER_ASUS_WL500W;

2612	       if (boardnum == 45 && nvram_match("boardtype", "0x467")) 2613	               char *hwver0 = nvram_safe_get("hardware_version"); 2615	               if (startswith(hwver0, "WL320G")) 2616	                       setRouter("Asus WL-320gE/gP"); 2617	                       return ROUTER_ASUS_WL550GE; 2618	               } else { 2619	                       setRouter("Asus WL-550gE"); 2620	                       return ROUTER_ASUS_WL550GE;

2854	       if (nvram_match("boardtype", "0x042f") 2855	            && nvram_match("boardrev", "0x10")) { 2856	               char *hwver = nvram_safe_get("hardware_version"); 2858	               if (boardnum == 45 || startswith(hwver, "WL500gp") 2859	                    || startswith(hwver, "WL500gH")) { 2860	                       setRouter("Asus WL-500g Premium"); 2861	                       return ROUTER_ASUS_WL500G_PRE; 2862 2863	               if (boardnum == 44 || startswith(hwver, "WL700g")) 2864	                       setRouter("Asus WL-700gE"); 2865	                       return ROUTER_ASUS_WL700GE;

3400	       if (boardnum == 45 && nvram_match("boardtype", "0x456")) 3401	               setRouter("Asus WL-520G"); 3402	               return ROUTER_ASUS_WL520G;

3405	       if (nvram_match("boardtype", "0x48E") 3406	            && nvram_match("boardrev", "0x10")) { 3407	          char *hwver = nvram_safe_get("hardware_version"); 3408	3409	       if (boardnum == 45 && startswith(hwver,"WL500GPV2")) 3410	                       setRouter("Asus WL-500G Premium v2"); 3411	                       return ROUTER_ASUS_WL500G_PRE_V2;

3412	               } else if (boardnum == 45                           && startswith(hwver, "WL330GE")) 3413	                       setRouter("Asus WL-330GE"); 3414	                       return ROUTER_ASUS_330GE;

3415	               } else if (boardnum == 45 ||                           startswith(hwver, "WL500GU") 3416	                           || startswith(hwver, "WL500GC")) 3417	                       setRouter("Asus WL-520GU/GC"); 3418	                       return ROUTER_ASUS_WL520GUGC;

2623	#ifdef HAVE_BCM MODERN 2624	       if (boardnum == 45 && nvram_match("boardtype", "0x04EC") 2625	            && nvram_match("boardrev", "0x1402")) 2626	               setRouter("Asus RT-N10"); 2627	               return ROUTER_ASUS_RTN10;

2630	       if (boardnum == 45 && nvram_match("boardtype", "0x0550") 2631	            && nvram_match("boardrev", "0x1102")) 2632	               setRouter("Asus RT-N10U"); 2633	               return ROUTER_ASUS_RTN10U;

2636	       if (boardnum == 45 && nvram_match("boardtype", "0x058e") 2637	            && nvram_match("boardrev", "0x1153")) 2638	               setRouter("Asus RT-N10+ rev D1"); 2639	               return ROUTER_ASUS_RTN10PLUSD1;

2661	       if (boardnum == 45 && nvram_match("boardtype", "0x04CD") 2662	            && nvram_match("boardrev", "0x1201")) 2663	               setRouter("Asus RT-N12"); 2664	               return ROUTER_ASUS_RTN12;

2667	       if (boardnum == 45 && nvram_match("boardtype", "0x054D") 2668	            && nvram_match("boardrev", "0x1101")) { 2669	               char *hwrev = nvram_safe_get("hardware_version"); 2670	               if (!strncmp(hwrev, "RTN12C1", 7)) 2671	                       setRouter("Asus RT-N12C1"); 2672	               else 2673	                       setRouter("Asus RT-N12B"); 2674	               return ROUTER_ASUS_RTN12B;

2677	       if (boardnum == 45 && nvram_match("boardtype", "0x04cf") 2678	            && nvram_match("boardrev", "0x1218")) { 2679	               setRouter("Asus RT-N16"); 2680	               return ROUTER_ASUS_RTN16;

1170	       if (nvram_match("model", "RT-N18U")) { 1171	               setRouter("Asus RT-N18U"); 1172	               return ROUTER_ASUS_RTN18U;

2642	       if (boardnum == 45 && nvram_match("boardtype", "0x0550") 2643	            && nvram_match("boardrev", "0x1442")) { 2644	               setRouter("Asus RT-N53"); 2645	               return ROUTER_ASUS_RTN53;

2648	       if (boardnum == 0 && nvram_match("boardtype", "0xF5B2") 2649	            && nvram_match("boardrev", "0x1100") 2650	          && !nvram_match("pci/2/1/sb20in80and160hr5ghpo", "0")) 2651	               setRouter("Asus RT-N66U"); 2652	               return ROUTER_ASUS_RTN66;

3267	       if (boardnum == 00 && nvram_match("boardtype", "0xF5B2") 3268	            && nvram_match("boardrev", "0x1100") 3269	            && nvram_match("pci/2/1/sb20in80and160hr5ghpo", "0")) 3270	               setRouter("Asus RT-AC66U"); 3271	               return ROUTER_ASUS_AC66U;

3274	       if (boardnum == 00 && nvram_match("boardtype", "0xF5B2") 3275	            && nvram_match("boardrev", "0x1100") 3276	            && nvram_match("pci/2/1/sb20in80and160hr5ghpo", "0")) 3277	               setRouter("Asus RT-AC66U"); 3278	               return ROUTER_ASUS_AC66U;

1188	       if (boardnum == 00 && nvram_match("boardtype", "0x0646") 1189	            && nvram_match("boardrev", "0x1100") 1190	            && nvram_match("gpio15", "wps_button")) 1191	               setRouter("Asus RT-AC56U"); 1192	               return ROUTER_ASUS_AC56U

1223	       if (boardnum != 24 && nvram_match("boardtype", "0x0646") 1224	            && nvram_match("boardrev", "0x1100") 1225	            && nvram_match("gpio7", "wps_button")) 1226	               setRouter("Asus RT-AC68U"); 1227	               return ROUTER_ASUS_AC67U;

1153	       if (nvram_match("boardtype", "0x0665") 1154	            && nvram_match("boardrev", "0x1103") 1155	            && !nvram_match("melco_id", "RD_BB13049")) 1156	               setRouter("Asus RT-AC87U"); 1157	               return ROUTER_ASUS_AC87U;

1263	       if (boardnum == 32 && nvram_match("boardtype", "0x0665") 1264	            && nvram_match("boardrev", "0x1301")) { 1265	               if (nvram_match("board_id", "U12H270T10_NETGEAR")) 1266	                       setRouter("Netgear R6700"); 1267	               } else { 1268	                       setRouter("Netgear R7000"); 1270	               return ROUTER_NETGEAR_R7000;

1273	       if (boardnum == 32 && nvram_match("boardtype", "0x0665") 1274	            && nvram_match("boardrev", "0x1101")) 1275	               setRouter("Netgear R8000"); 1276	               return ROUTER_NETGEAR_R8000;

1098	       if (nvram_match("boardtype", "0x0665")                   && nvram_match("boardrev", "0x1102")                                 && boardnum == 1 ) { 1099	               setRouter("TPLINK Archer C9"); 1101	               return ROUTER_TPLINK_ARCHERC9;

1105	       if (nvram_match("boardtype", "0xD646")                   && nvram_match("boardrev", "0x1100")                    && nvram_match("0:devid", "0x43A1")) 1106	               setRouter("Linksys EA6900"); 1108	               return ROUTER_LINKSYS_EA6900;

1111	       if (nvram_match("boardtype", "0xF646")                   && nvram_match("boardrev", "0x1100")                    && nvram_match("0:devid", "0x4332")) 1112	               setRouter("Linksys EA6700"); 1114	               return ROUTER_LINKSYS_EA6700;

1117	       if (nvram_match("boardtype", "0xF646")                   && nvram_match("boardrev", "0x1100")) 1118	               setRouter("Linksys EA6500 V2"); 1120	               return ROUTER_LINKSYS_EA6500V2;

3455	       if ((boardnum == 1 || boardnum == 3500) 3456	            && nvram_match("boardtype", "0x04CF") 3457	            && (nvram_match("boardrev", "0x1213") 3458	               || nvram_match("boardrev", "02"))) 3459	           setRouter("Netgear WNR3500 v2/U/L v1"); 3460	               return ROUTER_NETGEAR_WNR3500L;

3520	       if (nvram_match("boardnum", "679")                  && nvram_match("boardtype", "0x0646") 3521	          && nvram_match("boardrev", "0x1110")) 3522	               setRouter("Netgear R6250"); 3523	               return ROUTER_NETGEAR_R6250;

3321	       if (boardnum == 0 && nvram_match("boardtype", "0x048e")                 && // cfe sets boardnum="", strtoul -> 0 3322	            nvram_match("boardrev", "0x35")) 3323	               setRouter("D-Link DIR-320"); 3324	               // apply some fixes 3325	               if (nvram_get("vlan2ports") != NULL) 3326	                       nvram_unset("vlan2ports"); 3327	                       nvram_unset("vlan2hwname"); 3329	               return ROUTER_DLINK_DIR320;

3331	       if (nvram_match("model_name", "DIR-330")                    && nvram_match("boardrev", "0x10")) 3332	               setRouter("D-Link DIR-330"); 3333	               nvram_set("wan_ifnames", "eth0"); // quirk 3334	               nvram_set("wan_ifname", "eth0"); 3335	       if (nvram_match("et0macaddr", "00:90:4c:4e:00:0c")) 3336	               FILE *in = fopen("/dev/mtdblock/1", "rb"); 3338	               fseek(in, 0x7a0022, SEEK_SET); 3339	               char mac[32]; 3341	               fread(mac, 32, 1, in); 3342	               fclose(in); 3343	               mac[17] = 0; 3344	            if (sv_valid_hwaddr(mac)) 3345	               nvram_set("et0macaddr", mac); 3346	               fprintf(stderr, "restore D-Link MAC\n"); 3347	                   nvram_commit; 3348	                   sys_reboot; 3352	          * if (nvram_get("vlan2ports")!=NULL) nvram_unset("vlan2ports"); 3353	                * nvram_unset("vlan2hwname"); 3355	                  return ROUTER_DLINK_DIR330;


 * http://repo.or.cz/w/tomato.git/blob_plain?f=release/src/router/shared/id.c
 * http://svn.dd-wrt.com/browser/src/router/libutils/utils.c?rev=19083