Changeset 10727


Ignore:
Timestamp:
11/01/08 13:56:37 (5 years ago)
Author:
BrainSlayer
Message:

fixes selection issues

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/visuals/dd-wrt.c

    r10726 r10727  
    31603160                   "" ); 
    31613161     
    3162     if (nvram_nmatch("n","%s_phytypes",prefix)) 
    3163     if( nvram_nmatch("ab" "%s_bandlist", prefix ) || nvram_nmatch("ba", "%s_bandlist", prefix ) || nvram_nmatch( "a","%s_bandlist", prefix ) ) 
     3162    if( has_mimo( prefix ) ) 
     3163    { 
     3164    char band[64]; 
     3165    sprintf(band,"%s_bandlist",prefix); 
     3166    char *b=nvram_safe_get(band); 
     3167    if (contains(b,'a')) 
    31643168    { 
    31653169        websWrite( wp, 
     
    31733177                                "na-only" ) ? "selected=\\\"selected\\\"" : 
    31743178                   "" ); 
     3179    } 
    31753180    } 
    31763181#else 
     
    39994004               "<div class=\"label\"><script type=\"text/javascript\">Capture(wl_basic.label3)</script></div><input name=\"%s\" size=\"20\" maxlength=\"32\" onblur=\"valid_name(this,wl_basic.label3)\" value=\"%s\" /></div>\n", 
    40004005               wl_ssid, nvram_safe_get( wl_ssid ) ); 
    4001  
     4006     
    40024007#ifdef HAVE_MADWIFI 
    40034008    showRadio( wp, "wl_basic.radar", wl_doth ); 
     
    40104015        if( has_mimo( prefix ) 
    40114016            && ( nvram_nmatch( "n-only", "%s_net_mode", prefix ) 
    4012                  || nvram_nmatch( "mixed," "%s_net_mode", prefix ) || nvram_nmatch( "na-only," "%s_net_mode", prefix ) ) ) 
     4017                 || nvram_nmatch( "mixed," "%s_net_mode", prefix ) || nvram_nmatch( "na-only", "%s_net_mode", prefix ) ) ) 
    40134018        { 
    40144019 
     
    40164021            websWrite( wp, 
    40174022                       "<div class=\"label\"><script type=\"text/javascript\">Capture(wl_basic.channel_width)</script></div>\n" ); 
    4018             websWrite( wp, "<select name=\"wl0_nbw\">\n" ); 
     4023            websWrite( wp, "<select name=\"%s_nbw\">\n",prefix ); 
    40194024            websWrite( wp, 
    40204025                       "<script type=\"text/javascript\">\n//<![CDATA[\n document.write(\"<option value=\\\"0\\\" %s >\" + share.auto + \"</option>\");\n//]]>\n</script>\n", 
    4021                        nvram_match( "wl0_nbw", 
    4022                                     "0" ) ? "selected=\\\"selected\\\"" : 
     4026                       nvram_nmatch( "0","%s_nbw", 
     4027                                    prefix) ? "selected=\\\"selected\\\"" : 
    40234028                       "" ); 
    40244029            websWrite( wp, "<option value=\"10\" %s>10 MHz</option>", 
    4025                        nvram_match( "wl0_nbw", 
    4026                                     "10" ) ? "selected=\\\"selected\\\"" : 
     4030                       nvram_nmatch( "10","%s_nbw", 
     4031                                    prefix) ? "selected=\\\"selected\\\"" : 
    40274032                       "" ); 
    40284033            websWrite( wp, "<option value=\"20\" %s>20 MHz</option>", 
    4029                        nvram_match( "wl0_nbw", 
    4030                                     "20" ) ? "selected=\\\"selected\\\"" : 
     4034                       nvram_nmatch( "20","%s_nbw",prefix) ? "selected=\\\"selected\\\"" : 
    40314035                       "" ); 
    40324036            websWrite( wp, "<option value=\"40\" %s>40 MHz</option>", 
    4033                        nvram_match( "wl0_nbw", 
    4034                                     "40" ) ? "selected=\\\"selected\\\"" : 
     4037                       nvram_nmatch("40", "%s_nbw",prefix) ? "selected=\\\"selected\\\"" : 
    40354038                       "" ); 
    40364039            websWrite( wp, "</select>\n" ); 
     
    40404043            websWrite( wp, 
    40414044                       "<div class=\"label\"><script type=\"text/javascript\">Capture(wl_basic.channel_wide)</script></div>\n" ); 
    4042             websWrite( wp, "<select name=\"wl0_wchannel\" ></select>\n" ); 
     4045            websWrite( wp, "<select name=\"%s_wchannel\" ></select>\n",prefix ); 
    40434046            websWrite( wp, "</div>\n" ); 
    40444047 
Note: See TracChangeset for help on using the changeset viewer.