Changeset 11662


Ignore:
Timestamp:
02/20/09 07:02:39 (4 years ago)
Author:
eko
Message:

clean Asus detection: still don't know who deleted boardnum variable?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/libutils/utils.c

    r11661 r11662  
    10791079    } 
    10801080 
    1081     if( boardnum == 45 && 
    1082         nvram_match( "boardtype", "0x042f" ) 
    1083         && nvram_match( "boardrev", "0x10" ) ) 
    1084     { 
    1085         cprintf( "router is Asus WL-500g Premium\n" ); 
    1086         setRouter( "Asus WL-500g Premium" ); 
    1087         return ROUTER_ASUS_WL500G_PRE; 
    1088     } 
    10891081    if( nvram_match( "boardtype", "0x042f" ) 
    10901082        && nvram_match( "boardrev", "0x10" ) ) 
     
    10921084        char *hwver = nvram_safe_get( "hardware_version" ); 
    10931085 
    1094         if( startswith( hwver, "WL500gp" ) ) 
     1086        if( boardnum == 45 || startswith( hwver, "WL500gp" ) ) 
    10951087        { 
    10961088            cprintf( "router is Asus WL-500g Premium\n" ); 
     
    16491641    } 
    16501642 
    1651     if( boardnum == 45 && 
    1652         nvram_match( "boardtype", "0x48E" ) 
     1643    if( bvram_match( "boardtype", "0x48E" ) 
    16531644        && nvram_match( "boardrev", "0x10" ) ) 
    16541645    { 
    16551646        char *hwver = nvram_safe_get( "hardware_version" ); 
    16561647 
    1657         if( startswith( hwver, "WL500GPV2" ) ) 
     1648        if( boardnum == 45 && startswith( hwver, "WL500GPV2" ) ) 
    16581649        { 
    16591650            cprintf( "router is Asus WL-500G Premium V2\n" ); 
     
    16611652            return ROUTER_ASUS_WL500G_PRE_V2; 
    16621653        } 
    1663         else if( startswith( hwver, "WL330GE" ) ) 
     1654        else if( boardnum == 45 && startswith( hwver, "WL330GE" ) ) 
    16641655        { 
    16651656            cprintf( "router is Asus WL-330GE\n" ); 
     
    16671658            return ROUTER_ASUS_330GE; 
    16681659        } 
    1669         else 
     1660        else if( boardnum == 45 || startswith( hwver, "WL500GU" ) || startswith( hwver, "WL500GC" ) ) 
    16701661        { 
    16711662            cprintf( "router is Asus WL-520GU/GC\n" ); 
     
    16741665        } 
    16751666    } 
    1676     if( nvram_match( "boardtype", "0x48E" ) 
    1677         && nvram_match( "boardrev", "0x10" ) ) 
    1678     { 
    1679         char *hwver = nvram_safe_get( "hardware_version" ); 
    1680  
    1681         if( startswith( hwver, "WL500gp" ) ) 
    1682         { 
    1683             cprintf( "router is Asus WL-520GU/GC\n" ); 
    1684             setRouter( "Asus WL-520GU" ); 
    1685             return ROUTER_ASUS_WL520GUGC; 
    1686         } 
    1687     } 
     1667 
    16881668    if( ( boardnum == 83258 || boardnum == 01 ) //or 001 or 0x01 
    16891669        && ( nvram_match( "boardtype", "0x048e" ) 
Note: See TracChangeset for help on using the changeset viewer.