www.usr.com/support/gpl/USR9113_release1.0.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / html / wlcfgadv.html
index 693d89d..89b4e0d 100755 (executable)
@@ -4,18 +4,27 @@
 -->
 <html>
 <head>
-       <title>Wireless &raquo; Advanced Settings</title>
+       <title>Advanced Settings &laquo; Wireless</title>
 
-       <link href="usr_main.css" rel="stylesheet" type="text/css">
-       <link href="usr_menus.css" rel="stylesheet" type="text/css"><script src="usr_menus.js" type="text/javascript"></script><script src="usr_menus_build.js" type="text/javascript"></script>
-       <script src="usr_common.js" type="text/javascript"></script>
+       <link href="usr_layout.css" type="text/css" rel="stylesheet" />
+       <script src="usr_layout.js" type="text/javascript"></script>
+
+       <link href="usr_menus_dropdown.css" rel="stylesheet" type="text/css">
+       <script src="usr_menus_dropdown.js" type="text/javascript"></script>
+       <script src="usr_menus_build.js" type="text/javascript"></script>
+
+       <link href="usr_device.css" type="text/css" rel="stylesheet" />
+       <script src="usr_device.js" type="text/javascript"></script>
+
+       <link href="usr_91xx.css" type="text/css" rel="stylesheet" />
+       <script src="usr_91xx.js" type="text/javascript"></script>
+       <script src="usr_resources.js" type="text/javascript"></script>
 
        <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
 
        <script type="text/javascript" src="util.js"></script>
        <script type="text/javascript">
 <!-- hide
-setPageTitle("<%ejGetWlJS(wlInterface)%>");
 
 var enbl = '<%ejGetWlJS(wlEnbl)%>';
 var country = '<%ejGetWlJS(wlCountry)%>';
@@ -44,13 +53,24 @@ var reg_mode = '<%ejGetWlJS(wlRegMode)%>';
 var dfs_preism = '<%ejGetWlJS(wlDfsPreIsm)%>';
 var dfs_postism = '<%ejGetWlJS(wlDfsPostIsm)%>';
 var tpcDb = '<%ejGetWlJS(wlTpcDb)%>';
-var haswme = '<%ejGetWlJS(wlHasWme)%>';
 var wme = '<%ejGetWlJS(wlWme)%>';
-var wmeNoAck = '<%ejGetWlJS(wlWmeNoAck)%>';
 var wlCurrentChannel = '<%ejGetWlJS(wlCurrentChannel)%>';
+var csscantimer = '<%ejGetWlJS(wlCsScanTimer)%>';
+var maxassoc = '<%ejGetWlJS(wlMaxAssoc)%>';
+var nbw = '<%ejGetWlJS(wlNBw)%>';
+var nctrlsb = '<%ejGetWlJS(wlNCtrlsb)%>';
+var corerev = '<%ejGetWlJS(wlCoreRev)%>';
+var npro = '<%ejGetWlJS(wlNProtection)%>';
+var nmcsidx = '<%ejGetWlJS(wlNMcsidx)%>';
+var chanspec = '<%ejGetWlJS(wlCurrentChSpec)%>';
+var nmode = '<%ejGetWlJS(wlNmode)%>';
+var nreqd = '<%ejGetWlJS(wlNReqd)%>';
+var curr_bw_str = "";
+
+
 
 if ( wlRefresh == '1' ) {
-   var code = 'location = "wlcfgadvrefresh.wl?wlRefresh=0"';
+   var code = 'location="wlcfgadvrefresh.wl?wlRefresh=0"';
    eval(code);
 }
 
@@ -73,42 +93,278 @@ function getGmodeIndex(mode) {
    return ret;
 }
 
-function gModeChange()
+function getNmodeIndex(mode) {
+   var ret = 0;
+   switch(mode) {
+   case "off":
+      ret = 1;
+      break;
+   case "auto":
+   default:
+      ret = 0;
+      break;
+   }
+   return ret;
+}
+
+function genericChange(OnPageLoad)
 {
+   with ( document.forms[0] )
+   {
+      if(OnPageLoad)
+      {
+         wlAPIsolation.selectedIndex = parseInt(apisolation);
+         wlRate.selectedIndex = getRateIndex(rate);
+         wlMCastRate.selectedIndex = getRateIndex(mcastrate);
+         wlBasicRate.selectedIndex = getBasicRateIndex(brate);
+
+         if (afterburneren == "auto")
+             cbAcceleration.value = "maxg";
+         else if (fburst != "off")
+             cbAcceleration.value = "xpress";
+         else
+             cbAcceleration.value = "none";
+       
+         wlFrgThrshld.value = frg;
+         wlRtsThrshld.value = rts;
+         wlDtmIntvl.value = dtm;
+         wlBcnIntvl.value = bcn;
+         wlCsScanTimer.value = csscantimer;
+         wlMaxAssoc.value = maxassoc;
+         wlTxPower.selectedIndex = ((TxPwrPcnt/20) -1);
+         wlRegMode.selectedIndex = reg_mode;
+         wlDfsPreIsm.value = dfs_preism;
+         wlDfsPostIsm.value = dfs_postism;
+         wlTpcDb.selectedIndex = getTpcDbIndex(tpcDb);
+         /* preamble */
+         if ( pre == 'short' )
+            wlPreambleType.selectedIndex = 1;
+         else
+            wlPreambleType.selectedIndex = 0;
+               /*
+                       If WMM is enabled or the AP mode isn't set, cannot set acceleration to MAXg.
+               */
+/*DELME
+               if (wme == "1")
+               {
+                       // find the index of the MAXg option and delete it
+                       for (var ix = 0; ix < cbAcceleration.options.length; ++ix)
+                       {
+                               if (cbAcceleration.options[ix].value == "maxg")
+                               {
+                                       cbAcceleration.options[ix] = null;
+                                       break;
+                               }
+                       }
+               }
+DELME*/
+               setVisibility("idWMMnoMAXg", (wme == "1"));
+               setVisibility("idWMMno11n", (wme == "1"));
+//DELME                wlNmode.disabled = (wme == "1");   
+      }
+   }
+}
+
+function gModeChange(OnPageLoad) {
+
+   var sel_band;
+   var sel_gmode;
+   var sel_pro;
+   var sel_pre;
+   var sel_nmode;
+
+   /* save selected */
+   if(OnPageLoad) {
+      sel_band = band;
+      sel_gmode = gmode;
+      sel_pro = pro;
+      sel_nmode = nmode;
+   } else {
+      sel_band = document.forms[0].wlBand.value;
+      sel_gmode = document.forms[0].wlgMode.value;
+      sel_pro = document.forms[0].wlProtection.value;
+      sel_nmode = document.forms[0].wlNmode.value;
+   }
+
    with ( document.forms[0] ) {
-      setVisibility("preambleType", (band == "2") && (wlgMode.selectedIndex == 3));
+      setVisibility("preambleType", false);
+
+      wlProtection.selectedIndex = getGModeProtection(sel_pro);
+      switch(sel_gmode) {
+         case '0':
+            setVisibility("preambleType", true);
+            wlgMode.selectedIndex = 3;
+            break;
+         case '4':
+            wlgMode.selectedIndex = 1;
+            break;
+         case '5':
+            wlgMode.selectedIndex = 2;
+            break;
+         default:
+            wlgMode.selectedIndex = 0;
+            setVisibility("preambleType", true);
+            break;
+      }
+
+      if (phy == "n" && sel_nmode != "off") {
+         SetDivisionVisibility("gMode", false);
+      } else {
+         if (sel_band == "2") {
+           if (phy == "b") { //11b
+             SetDivisionVisibility("gMode", false);
+           }
+           else { //11g
+             SetDivisionVisibility("gMode", true);
+           }
+         }
+         else { //11a
+           SetDivisionVisibility("gMode", false);
+           setVisibility("preambleType", false);
+         }
+      }
+   }
+}
+
+function wlLoadCountryList(OnPageLoad)
+{
+   var sel = 0;
+   var idx;
+
+   /* save selected */
+   if(OnPageLoad) {
+      sel = country;
+   } else {
+      sel = document.forms[0].wlCountry.options[document.forms[0].wlCountry.selectedIndex].value;
+   }
+
+   /* load list */
+   if (band == "1") { // 5G
+      <%ejGetWl(wlCountryList, a)%>
+   } else {
+      <%ejGetWl(wlCountryList, b)%>
+   }
+
+   /* mark selected */
+   for (idx=0; idx < document.forms[0].wlCountry.options.length; idx++) {
+      if (document.forms[0].wlCountry.options[idx].value == sel) {
+         document.forms[0].wlCountry.options[idx].selected = true;
+         break;
+      }
    }
+
+   /* set to all(the last one) if not found */
+   if( idx == document.forms[0].wlCountry.options.length)
+      document.forms[0].wlCountry.options[idx-1].selected = true;
 }
 
-function loadChannelList()
+function loadChannelList(OnPageLoad)
 {
-   if (band == "2") {
-      <%ejGetWlStr(wlChannelList_b)%>
+   var sel_ch;
+   var sel_band;
+   var sel_nbw;
+   var sel_sb;
+   var idx;
+
+   /* save selected */
+   if(OnPageLoad) {
+      sel_ch = channel;
+      sel_band = band;
+      sel_nbw = nbw;
+      sel_sb = nctrlsb;
+   } else {
+      sel_ch = document.forms[0].wlChannel.value;
+      sel_band = document.forms[0].wlBand.value;
+      sel_nbw = document.forms[0].wlNbw.value;
+      sel_sb = document.forms[0].wlNCtrlsb.value;
+   }
+
+   /* load list */
+   document.forms[0].wlChannel.length = 0;
+
+   if ((sel_band == "2") && (phy != "n") ) {
+      <%ejGetWlStr(wlChannelList, b)%>
+   }
+   else  if ((sel_band == "1") && (phy != "n")) {
+      <%ejGetWlStr(wlChannelList, a)%>
+   }
+   else  if ((sel_band == "2") && (phy == "n") ) {
+      if(sel_nbw == 40) {
+         if(sel_sb == 1) {
+            <%ejGetWlStr(wlChannelList, n, b, 40, "upper")%>
+         } else {
+            <%ejGetWlStr(wlChannelList, n, b, 40, "lower")%>
+         }
+      } else {
+         <%ejGetWlStr(wlChannelList, n, b, 20 )%>
+      }
    }
-   else  if (band == "1") {
-      <%ejGetWlStr(wlChannelList_a)%>
+   else  if ((sel_band == "1") && (phy == "n") ) {
+      if(sel_nbw == 40) {
+         if(sel_sb == 1) {
+            <%ejGetWlStr(wlChannelList, n, a, 40, "upper")%>
+         } else {
+            <%ejGetWlStr(wlChannelList, n, a, 40, "lower")%>
+         }
+      } else {
+         <%ejGetWlStr(wlChannelList, n, a, 20 )%>
+      }
    }
    else {
-      document.forms[0].wlChannel[0] = new Option("Automatic", "0")
+      wlChannel[0] = new Option("Automatic", "0")
    }
 
-   var found = false;
-   for (var i=0; i<document.forms[0].wlChannel.options.length; i++) {
-      if (document.forms[0].wlChannel.options[i].value == channel) {
-         document.forms[0].wlChannel.options[i].selected = true;
-         found = true;
+   /* mark selected */
+   for (idx=0; idx<document.forms[0].wlChannel.options.length; idx++) {
+      if (document.forms[0].wlChannel.options[idx].value == sel_ch) {
+         document.forms[0].wlChannel.options[idx].selected = true;
          break;
       }
    }
 
-   if (!found) {
+   /* set to first channel if not found */
+   if (idx == document.forms[0].wlChannel.options.length) {
       document.forms[0].wlChannel.options[0].selected = true;
    }
+
+   with ( document.forms[0] ) {
+      if( wlChannel.selectedIndex != 0 ) {
+         wlCsScanTimer.disabled=true;
+      } else {
+         wlCsScanTimer.disabled=false;
+      }
+   }
 }
 
-function loadRateList() {
-   if (band == "2") { // 2.4G
-      if (phy == "b") {
+function loadRateList(OnPageLoad) {
+   var sel_band;
+   var sel_rate;
+   var idx;
+   var sel_nmode;
+   var sel_gmode;
+
+   /* save selected */
+   if(OnPageLoad) {
+      sel_band = band;
+      sel_rate = rate;
+      sel_nmode = nmode;
+      sel_gmode = gmode;
+   }
+   else {
+      sel_band = document.forms[0].wlBand.value;
+      sel_rate = document.forms[0].wlRate.value;
+      sel_nmode = document.forms[0].wlNmode.value;
+      sel_gmode = document.forms[0].wlgMode.value;
+   }
+
+   if(phy != "n") sel_nmode = "off";
+
+   document.forms[0].wlRate.length = 0;
+
+   if (sel_band == "2") { // 2.4G
+      if (phy == "b" ||
+          (country == "JP" && document.forms[0].wlChannel.value == 14) ||
+          (sel_nmode == "off" && sel_gmode == "0")) {
 document.forms[0].wlRate[0] = new Option("Automatic", "0");
 document.forms[0].wlRate[1] = new Option("1 Mbps", "1000000");
 document.forms[0].wlRate[2] = new Option("2 Mbps", "2000000");
@@ -131,7 +387,7 @@ document.forms[0].wlRate[11] = new Option("48 Mbps", "48000000");
 document.forms[0].wlRate[12] = new Option("54 Mbps", "54000000");
      }
    }
-   else if (band == "1") { // 5G
+   else if (sel_band == "1") { // 5G
 document.forms[0].wlRate[0] = new Option("Automatic", "0");
 document.forms[0].wlRate[1] = new Option("6 Mbps", "6000000");
 document.forms[0].wlRate[2] = new Option("9 Mbps", "9000000");
@@ -145,12 +401,55 @@ document.forms[0].wlRate[8] = new Option("54 Mbps", "54000000");
    else {
 document.forms[0].wlRate[0] = new Option("Automatic", "0");
    }
+
+   if(sel_nmode != "off") {
+      /* exclude auto for 802.11a/b/g (Legacy) rates if 11n is enabled */
+      document.forms[0].wlRate[0]=null;
+   }
+
+   /* mark selected */
+   for (idx = 0; idx < document.forms[0].wlRate.options.length; idx++) {
+      if (document.forms[0].wlRate.options[idx].value == sel_rate) {
+         document.forms[0].wlRate.options[idx].selected = true;
+         break;
+      }
+   }
+
+   /* set to first(Auto) if not found */
+   if( idx == document.forms[0].wlRate.options.length)
+      document.forms[0].wlRate.options[0].selected = true;
 }
 
 
-function loadMCastRateList() {
-   if (band == "2") { // 2.4G
-      if (phy == "b") {
+function loadMCastRateList(OnPageLoad) {
+
+   var sel_band;
+   var sel_rate;
+   var idx;
+   var sel_nmode;
+   var sel_gmode;
+
+   /* save selected */
+   if(OnPageLoad) {
+      sel_band = band;
+      sel_rate = mcastrate;
+      sel_nmode = nmode;
+      sel_gmode = gmode;
+   }
+   else {
+      sel_band = document.forms[0].wlBand.value;
+      sel_rate = document.forms[0].wlMCastRate.value;
+      sel_nmode = document.forms[0].wlNmode.value;
+      sel_gmode = document.forms[0].wlgMode.value;
+   }
+
+   if(phy != "n") sel_nmode = "off";
+
+   document.forms[0].wlMCastRate.length = 0;
+   if (sel_band == "2") { // 2.4G
+      if (phy == "b" ||
+          (country == "JP" && document.forms[0].wlChannel.value == 14) ||
+          (sel_nmode == "off" && sel_gmode == "0")) {
 document.forms[0].wlMCastRate[0] = new Option("Automatic", "0");
 document.forms[0].wlMCastRate[1] = new Option("1 Mbps", "1000000");
 document.forms[0].wlMCastRate[2] = new Option("2 Mbps", "2000000");
@@ -173,7 +472,7 @@ document.forms[0].wlMCastRate[11] = new Option("48 Mbps", "48000000");
 document.forms[0].wlMCastRate[12] = new Option("54 Mbps", "54000000");
      }
    }
-   else if (band == "1") { // 5G
+   else if (sel_band == "1") { // 5G
 document.forms[0].wlMCastRate[0] = new Option("Automatic", "0");
 document.forms[0].wlMCastRate[1] = new Option("6 Mbps", "6000000");
 document.forms[0].wlMCastRate[2] = new Option("9 Mbps", "9000000");
@@ -187,52 +486,91 @@ document.forms[0].wlMCastRate[8] = new Option("54 Mbps", "54000000");
    else {
 document.forms[0].wlMCastRate[0] = new Option("Automatic", "0");
    }
+
+   /* mark selected */
+   for (idx=0; idx < document.forms[0].wlMCastRate.options.length; idx++) {
+      if (document.forms[0].wlMCastRate.options[idx].value == sel_rate) {
+         document.forms[0].wlMCastRate.options[idx].selected = true;
+         break;
+      }
+   }
+
+   /* set to first(Auto) if not found */
+   if( idx == document.forms[0].wlMCastRate.options.length)
+      document.forms[0].wlMCastRate.options[0].selected = true;
+
 }
 
-function loadBasicRateList() {
-   if (band == "2") { // 2.4G
+function loadBasicRateList(OnPageLoad) {
+
+   var sel_band;
+   var sel_rate;
+   var idx;
+
+   /* save selected */
+   if(OnPageLoad) {
+      sel_band = band;
+      sel_rate = brate;
+   }
+   else {
+      sel_band = document.forms[0].wlBand.value;
+      sel_rate = document.forms[0].wlBasicRate.value;
+   }
+
+  document.forms[0].wlBasicRate.length = 0;
+
+   if (sel_band == "2") { // 2.4G
 document.forms[0].wlBasicRate[0] = new Option("Default", "default");
 document.forms[0].wlBasicRate[1] = new Option("All", "all");
 document.forms[0].wlBasicRate[2] = new Option("1 & 2 Mbps", "12");
-      if (phy == "g") {
+      if (phy != "b") {
          document.forms[0].wlBasicRate[3] = new Option("1 & 2 & 5.5 & 6 & 11 & 12 & 24 Mbps", "wifi2");
       }
 
    }
-   else if (band == "1") { // 5G
+   else if (sel_band == "1") { // 5G
 document.forms[0].wlBasicRate[0] = new Option("Default", "default");
 document.forms[0].wlBasicRate[1] = new Option("All", "all");
 document.forms[0].wlBasicRate[2] = new Option("6 & 12 Mbps", "12");
 document.forms[0].wlBasicRate[3] = new Option("6 & 12 & 24 Mbps", "wifi2");
    }
    else {
-document.forms[0].wlMCastRate[0] = new Option("Default", "0");
+document.forms[0].wlBasicRate[0] = new Option("Default", "0");
+   }
+
+   /* mark selected */
+   for (idx=0; idx < document.forms[0].wlBasicRate.options.length; idx++) {
+      if (document.forms[0].wlBasicRate.options[idx].value == sel_rate) {
+         document.forms[0].wlBasicRate.options[idx].selected = true;
+         break;
+      }
    }
+
+   /* set to first(Auto) if not found */
+   if( idx == document.forms[0].wlBasicRate.options.length)
+      document.forms[0].wlBasicRate.options[0].selected = true;
+
 }
 
-function onBandChange() {
-  band = document.forms[0].wlBand.value;
-  document.forms[0].wlChannel.length = 0;
-  loadChannelList();
-  document.forms[0].wlRate.length = 0;
-  loadRateList();
-  document.forms[0].wlMCastRate.length = 0;
-  loadMCastRateList();
-  document.forms[0].wlBasicRate.length = 0;
-  loadBasicRateList();
-
-  if (band == "2") {
-    if (phy == "b") { //11b
-      setVisibility("div_gMode", false);
-    }
-    else {
-      setVisibility("div_gMode", true);
-    }
-  }
-  else {
-    setVisibility("div_gMode", false);
-  }
-  gModeChange();
+function onBandChange(OnPageLoad) {
+
+   with ( document.forms[0] ) {
+      var sel_band;
+
+      /* save selected */
+      if(OnPageLoad) {
+         sel_band = band;
+         wlBand.selectedIndex = getBandIndex(sel_band);
+      }
+      else {
+         sel_band = document.forms[0].wlBand.value;
+      }
+
+      loadChannelList(OnPageLoad);
+      loadRateList(OnPageLoad);
+      loadMCastRateList(OnPageLoad);
+      loadBasicRateList(OnPageLoad);
+   }
 }
 
 function getBasicRateIndex(br) {
@@ -398,14 +736,44 @@ function getTpcDbIndex(val) {
    return ret;
 }
 
-function RegModeChange() {
+function phyChange() {
    with ( document.forms[0] )
+      if (phy == "n") {
+         SetDivisionVisibility("nMode", true);
+         setVisibility("div_nMode_sel", true);
+         SetDivisionVisibility("gMode", false);
+      } else {
+         SetDivisionVisibility("nMode", false);
+         setVisibility("div_nMode_sel", false);
+         SetDivisionVisibility("gMode", true);
+      }
+}
+
+function RegModeChange(OnPageLoad) {
+   with ( document.forms[0] ) {
+      var sel_band;
+
+      /* save selected */
+      if(OnPageLoad) {
+         sel_band = band;
+      }
+      else {
+         sel_band = document.forms[0].wlBand.value;
+      }
+
       if( wlRegMode.selectedIndex != 1 )
          wlDfsPreIsm.disabled=wlDfsPostIsm.disabled=wlTpcDb.disabled=true;
       else
          wlDfsPreIsm.disabled=wlDfsPostIsm.disabled=wlTpcDb.disabled=false;
-}
 
+      if (sel_band == "2") {
+        SetDivisionVisibility("regMode", false);
+      }
+      else {
+        SetDivisionVisibility("regMode", true);
+      }
+   }
+}
 
 function getBandIndex(b) {
    var ret;
@@ -423,110 +791,278 @@ function wl_afterburner_options(OnPageLoad)
        {
                // MAXg and WMM cannot both be enabled at the same time. MAXg requires Fragmentation to be set to 2346.
                // But no need to check these because the MAXg option is deleted if they're true.
-               setVisibility("idFragNoMAXg", (parseInt(wlFrgThrshld.value) != 2346));
-               if (parseInt(wlFrgThrshld.value) != 2346)
-               {
-                       cbAcceleration.value = "xpress";
-               }
+               if (cbAcceleration.value == "maxg")
+                       wlFrgThrshld.value = 2346;
        }
        return true;
 }
 
-function wl_recalc(OnPageLoad)
+function wl_ewc_options(OnPageLoad)
 {
-       var retval=true;
-       with ( document.forms[0] )
+   var sel_nbw;
+   var sel_nmcsidx;
+   var idx;
+   var sel_ch;
+   var sel_nmode;
+   var sel_nreqd;
+
+   if(phy != "n")
+      return;
+
+   if(OnPageLoad) {
+     sel_nbw = curr_bw_str; //nbw;
+     sel_ch = channel;
+     sel_nmode = nmode;
+     sel_nreqd = nreqd;
+
+     document.forms[0].wlNProtection.value = npro;
+     sel_nmcsidx = nmcsidx;
+     if(nctrlsb == 0) {
+        document.forms[0].wlNCtrlsb.selectedIndex = 0;
+        document.forms[0].wlNCtrlsb.disabled = 1;
+     } else
+        document.forms[0].wlNCtrlsb.value = nctrlsb;
+
+     document.forms[0].wlNReqd.value = nreqd;
+     if(sel_nmode == "off") {
+        document.forms[0].wlNmode.selectedIndex = 1;
+     }
+
+   } else {
+     sel_ch = document.forms[0].wlChannel.value;
+     sel_nbw = document.forms[0].wlNbw.value;
+     sel_nmcsidx = document.forms[0].wlNMmcsidx.value;
+     sel_nmode = document.forms[0].wlNmode.value;
+     sel_nreqd = document.forms[0].wlNReqd.value;
+   }
+
+   if(sel_nmode == "off") {
+      document.forms[0].wlNMmcsidx.disabled = 1;
+      document.forms[0].wlNbw.disabled = 1;
+      document.forms[0].wlNProtection.disabled = 1;
+      document.forms[0].wlNReqd.disabled = 1;
+      SetDivisionVisibility("nMode", false);
+   } else {
+      document.forms[0].wlNMmcsidx.disabled = 0;
+      document.forms[0].wlNbw.disabled = 0;
+      document.forms[0].wlNProtection.disabled = 0;
+      document.forms[0].wlNReqd.disabled = 0;
+      SetDivisionVisibility("nMode", true);
+   }
+
+   if (document.forms[0].wlNMmcsidx != null)
+      document.forms[0].wlNMmcsidx.disabled = 0;
+
+   if(corerev > 11) {
+      bw = new Array("10", "20", "40");
+   } else {
+      bw = new Array("20", "40");
+   }
+
+   /* If nmode is disabled, allow only 20Mhz selection and disable selection */
+   if (sel_nmode == "off") {
+      bw = new Array("20");
+      nbw = "20";
+   }
+
+   document.forms[0].wlNbw.length = 0;
+   for (var i in bw) {
+      document.forms[0].wlNbw[i] = new Option(bw[i] + " MHz", bw[i]);
+         /* Fix the selectedIndex to match new set of options */
+      if (bw[i] == sel_nbw) {
+         document.forms[0].wlNbw.selectedIndex = i;
+      }
+   }
+
+   /* load n phy rates */
+   if(sel_ch == 0) {
+      document.forms[0].wlNCtrlsb.disabled = 1;
+      document.forms[0].wlNbw.disabled = 1;
+      <%ejGetWlStr(wlNPhyRates, "0");%>
+   } else if (sel_nbw == "40") {
+      /* Control sb is allowed only for 40MHz BW Channels */
+      document.forms[0].wlNCtrlsb.disabled = 0;
+      <%ejGetWlStr(wlNPhyRates, "40");%>
+   } else if (sel_nbw == "20") {
+      document.forms[0].wlNCtrlsb.selectedIndex = 0;
+      document.forms[0].wlNCtrlsb.disabled = 1;
+      <%ejGetWlStr(wlNPhyRates, "20");%>
+   }
+
+   /* mark selected */
+   for (idx=0; idx< document.forms[0].wlNMmcsidx.options.length; idx++) {
+      if (document.forms[0].wlNMmcsidx[idx].value == sel_nmcsidx) {
+         document.forms[0].wlNMmcsidx[idx].selected = true;
+         break;
+      }
+   }
+
+   /* set to first (Auto) if not found */
+   if( idx == document.forms[0].wlNMmcsidx.options.length)
+      document.forms[0].wlNMmcsidx.options[0].selected = true;
+
+   /* mark selected */
+   document.forms[0].wlNmode.selectedIndex = getNmodeIndex(sel_nmode);
+
+}
+
+function wl_mcs_onchange(OnPageLoad)
+{
+   var sel_nmcsidx;
+   var sel_nmode;
+
+   if(phy != "n")
+      return;
+
+   if(OnPageLoad) {
+     sel_nmcsidx = nmcsidx;
+     sel_nmode = nmode;
+   } else {
+     sel_nmcsidx = document.forms[0].wlNMmcsidx.value;
+     sel_nmode = document.forms[0].wlNmode.value;
+   }
+
+   /* If using 'legacy rate' then enable */
+   if (sel_nmcsidx == "-2" || sel_nmode == "off")
+      document.forms[0].wlRate.disabled = 0;
+   else
+      document.forms[0].wlRate.disabled = 1;
+}
+
+
+function wl_recalc(OnPageLoad) {
+   with ( document.forms[0] ) {
+      phyChange(OnPageLoad);
+      genericChange(OnPageLoad);
+      updateCurChannel(OnPageLoad);
+      onBandChange(OnPageLoad);
+      gModeChange(OnPageLoad);
+      wl_ewc_options(OnPageLoad);
+      wl_afterburner_options(OnPageLoad);
+      RegModeChange(OnPageLoad);
+      wl_mcs_onchange(OnPageLoad)
+   }
+}
+
+function updateCurChannel(OnPageLoad) {
+
+   if(OnPageLoad) {
+
+      var curr_chanspec = parseInt(chanspec);
+      var curr_sb = (curr_chanspec & 0x300 ) >> 8;
+      var curr_bw = (curr_chanspec & 0xc00 ) >> 10;
+      var curr_sb_str = "N/A";
+
+      if(curr_bw == 2)
+         curr_bw_str = "20";
+      else if (curr_bw == 3)
+         curr_bw_str = "40";
+      else if (curr_bw == 1)
+         curr_bw_str = "10";
+
+      if(curr_sb == 1)
+         curr_sb_str = "Lower";
+      else if (curr_sb == 2)
+         curr_sb_str = "Upper";
+      else if (curr_sb == 3)
+         curr_sb_str = "None";
+   }
+}
+
+function onNmodeChange()
+{
+       /*
+               if WMM is on (and we're not already turning if off) and we're turning
+               on 802.11n mode, we have to turn off WMM.
+       */
+       if ((wme == "1") && bWMM && (document.forms[0].wlNmode.value == "auto"))
        {
-               retval = wl_afterburner_options(OnPageLoad);
+               if (!confirm("802.11n mode does not support WMM. Click OK to enable 802.11n mode and disable WMM."))
+               {
+                       document.forms[0].wlNmode.value = "off";        // Set 802.11n back to Disabled
+                       return;
+               }
+
+               bWMM = false;           // turn off WMM
        }
-       return retval;
+
+   wl_recalc(false);
+   document.forms[0].wlRate.selectedIndex = 0;
 }
 
-function frmLoad() {
-  with ( document.forms[0] ) {
-      wlBand.selectedIndex = getBandIndex(band);
-      onBandChange();
-      wlRate.selectedIndex = getRateIndex(rate);
-      wlMCastRate.selectedIndex = getRateIndex(mcastrate);
-      wlBasicRate.selectedIndex = getBasicRateIndex(brate);
-
-               if (afterburneren == "auto")
-                       cbAcceleration.value = "maxg";
-               else if (fburst != "off")
-                       cbAcceleration.value = "xpress";
-               else
-                       cbAcceleration.value = "none";
-
-      wlAPIsolation.selectedIndex = parseInt(apisolation);
-      wlFrgThrshld.value = frg;
-      wlRtsThrshld.value = rts;
-      wlDtmIntvl.value = dtm;
-      wlBcnIntvl.value = bcn;
-               /*
-                       If WMM is enabled or the AP mode isn't set, cannot set acceleration to MAXg.
-               */
-               if (wme == "1")
+function onAccelerationChange()
+{
+       /*
+               if WMM is on (and we're not already turning if off) and we're turning
+               on MAXg acceleration, we have to turn off WMM.
+       */
+       if ((wme == "1") && bWMM && (document.forms[0].cbAcceleration.value == "maxg"))
+       {
+               if (!confirm("MAXg acceleration is incompatible with WMM. Click OK to enable MAXg acceleration and disable WMM."))
                {
-                       // find the index of the MAXg option and delete it
-                       for (var ix = 0; ix < cbAcceleration.options.length; ++ix)
-                       {
-                               if (cbAcceleration.options[ix].value == "maxg")
-                               {
-                                       cbAcceleration.options[ix] = null;
-                                       break;
-                               }
-                       }
+                       // set Acceleration to 54g+ (it could've been None, but we can't know that, so we go to the next one below MAXg)
+                       document.forms[0].cbAcceleration.value = "xpress";
+                       return;
                }
-               setVisibility("idWMMnoMAXg", (wme == "1"));
 
-      if ( pre == 'short' )
-         wlPreambleType.selectedIndex = 1;
-      else
-         wlPreambleType.selectedIndex = 0;
-      // physical type is 802.11g
-      if ( phy == "g" ) {
-         switch(gmode) {
-         case '0':
-            wlgMode.selectedIndex = 3;
-            break;
-         case '4':
-            wlgMode.selectedIndex = 1;
-            break;
-         case '5':
-            wlgMode.selectedIndex = 2;
-            break;
-         default:
-            wlgMode.selectedIndex = 0;
-            break;
-         }
-         wlProtection.selectedIndex = getGModeProtection(pro);
-         gModeChange();
-      }
+               bWMM = false;           // turn off WMM
+       }
 
-      wlTxPower.selectedIndex = ((TxPwrPcnt/20) -1);
-      wlRegMode.selectedIndex = reg_mode;
-      wlDfsPreIsm.value = dfs_preism;
-      wlDfsPostIsm.value = dfs_postism;
-      wlTpcDb.selectedIndex = getTpcDbIndex(tpcDb);
-      RegModeChange();
+       wl_recalc(false);
+}
 
+
+function frmLoad() {
+   wl_recalc(true);
+}
+
+function SetDivisionVisibility(divID, mode)
+{
+   if ( divID == "nMode" )
+   {
+      setVisibility("idBandwidth", mode);
+      setVisibility("idCtrlSideband", mode);
+      setVisibility("idNRate", mode);
+      setVisibility("idNProtection", mode);
+      setVisibility("idNClient", mode);
+   }
+   else if ( divID == "gMode" )
+   {
+      setVisibility("id54gMode", mode);
+      setVisibility("id54gProtection", mode);
+   }
+   else if ( divID == "regMode" )
+   {
+      setVisibility("idRegulatory", mode);
+      setVisibility("idDfsPreIsm", mode);
+      setVisibility("idDfsPostIsm", mode);
+      setVisibility("idTpsMitigation", mode);
    }
-   wl_recalc(1);
 }
 
-function btnApply() {
-   var loc = 'wlcfgadv.wl?';
+/*
+       If the user modifies a setting that requires WMM to be disabled,
+       this flag is reset.
+*/
+var bWMM = true;
+function btnApply()
+{
+   var loc = "wlcfgadv.wl?" + (bWMM ? "" : "wlWme=0&");
    var idx, frgNum, rtsNum, dtmNum, bcnNum, frmburstNum;
 
-   if ( enbl == '0' ) {
+   if ( enbl == '0' )
+   {
       alert('Cannot apply the change since wireless is currently disabled.');
       return;
    }
 
-   if (!wl_recalc(0))
-      return;
+   wl_recalc(false);
+
+   with ( document.forms[0] )
+   {
+      var sel_nmode = wlNmode.options[wlNmode.selectedIndex].value;
+      var sel_nmcsidx = wlNMmcsidx.value;
 
-   with ( document.forms[0] ) {
       frgNum = parseInt(wlFrgThrshld.value);
       if ( isNaN(frgNum) == true || frgNum < 256 || frgNum > 2346 ) {
          alert('Fragmentation threshold "' + wlFrgThrshld.value + '" should be between 256 and 2346.');
@@ -551,16 +1087,22 @@ function btnApply() {
          return;
       }
 
-      idx = wlChannel.selectedIndex;
-      loc += 'wlChannel=' + wlChannel.options[idx].value;
-      idx = wlRate.selectedIndex;
-      loc += '&wlRate=' + wlRate.options[idx].value;
-      idx = wlBasicRate.selectedIndex;
-      loc += '&wlBasicRate=' + wlBasicRate.options[idx].value;
+      assocNum = parseInt(wlMaxAssoc.value);
+      if ( isNaN(assocNum) == true || assocNum <= 0 || assocNum > 128 ) {
+         alert('Max Clients "' + wlMaxAssoc.value + '" should be between 1 and 128.');
+         return;
+      }
+
+      loc += 'wlChannel=' + wlChannel.options[wlChannel.selectedIndex].value;
+      loc += '&wlNmode=' + sel_nmode;
+      loc += '&wlNReqd=' + wlNReqd.value;
+      loc += '&wlBasicRate=' + wlBasicRate.options[wlBasicRate.selectedIndex].value;
       loc += '&wlFrgThrshld=' + wlFrgThrshld.value;
       loc += '&wlRtsThrshld=' + wlRtsThrshld.value;
       loc += '&wlDtmIntvl=' + wlDtmIntvl.value;
       loc += '&wlBcnIntvl=' + wlBcnIntvl.value;
+      loc += '&wlCsScanTimer=' + wlCsScanTimer.value;
+      loc += '&wlMaxAssoc=' + wlMaxAssoc.value;
 
                if (cbAcceleration.value == "maxg")
                {
@@ -580,30 +1122,40 @@ function btnApply() {
 
       loc += '&wlAPIsolation=' + wlAPIsolation.value;
       loc += '&wlBand=' + wlBand.value;
-      idx = wlMCastRate.selectedIndex;
-      loc += '&wlMCastRate=' + wlMCastRate.options[idx].value;
+      loc += '&wlMCastRate=' + wlMCastRate.options[wlMCastRate.selectedIndex].value;
 
+      /* rate */
+      if ( phy != "n" || (phy == "n" && (sel_nmode == "off" || sel_nmcsidx == -2)))
+         loc += '&wlRate=' + wlRate.options[wlRate.selectedIndex].value;
+
+      /* b/g mode */
       if ( band == '2') { // 2.4G
-         if ( phy == "g") { // 802.11g
-            idx = wlgMode.selectedIndex;
-            loc += '&wlgMode=' + wlgMode.options[idx].value;
-            idx = wlProtection.selectedIndex;
-            loc += '&wlProtection=' + wlProtection.options[idx].value;
+         if ( phy == "g" || (phy == "n" && sel_nmode == "off")) { // 802.11g
+            loc += '&wlgMode=' + wlgMode.options[wlgMode.selectedIndex].value;
+            loc += '&wlProtection=' + wlProtection.options[wlProtection.selectedIndex].value;
             if (wlgMode.selectedIndex == 3) {
-               idx = wlPreambleType.selectedIndex;
-               loc += '&wlPreambleType=' + wlPreambleType.options[idx].value;
+               loc += '&wlPreambleType=' + wlPreambleType.options[wlPreambleType.selectedIndex].value;
             }
-         } else { // 802.11b
-            idx = wlPreambleType.selectedIndex;
-            loc += '&wlPreambleType=' + wlPreambleType.options[idx].value;
+         } else if (phy == "b") { // 802.11b
+            loc += '&wlPreambleType=' + wlPreambleType.options[wlPreambleType.selectedIndex].value;
          }
       }
 
-     idx = wlTxPower.selectedIndex;
-     loc += '&wlTxPwrPcnt=' + wlTxPower.options[idx].value;
+     loc += '&wlTxPwrPcnt=' + wlTxPower.options[wlTxPower.selectedIndex].value;
+     loc += '&wlRegMode=' + wlRegMode.options[wlRegMode.selectedIndex].value;
+
+     if(phy == "n") {
+        loc += '&wlNBw=' + wlNbw.options[wlNbw.selectedIndex].value;
+
+        if(wlNbw.options[wlNbw.selectedIndex].value == 20)
+           loc += '&wlNCtrlsb=' + 0;
+        else
+           loc += '&wlNCtrlsb=' + wlNCtrlsb.options[wlNCtrlsb.selectedIndex].value;
+
+        loc += '&wlNProtection=' + wlNProtection.options[wlNProtection.selectedIndex].value;
+        loc += '&wlNMcsidx=' + wlNMmcsidx.options[wlNMmcsidx.selectedIndex].value;
+     }
 
-     idx = wlRegMode.selectedIndex;
-     loc += '&wlRegMode=' + wlRegMode.options[idx].value;
      if(wlRegMode.selectedIndex == 1) {
         DfsPreIsmNum = parseInt(wlDfsPreIsm.value);
         if ( isNaN(DfsPreIsmNum) == true || DfsPreIsmNum < 0 || DfsPreIsmNum > 99 ) {
@@ -619,15 +1171,14 @@ function btnApply() {
 
         loc += '&wlDfsPreIsm=' + wlDfsPreIsm.value;
         loc += '&wlDfsPostIsm=' + wlDfsPostIsm.value;
-        idx = wlTpcDb.selectedIndex;
-        loc += '&wlTpcDb=' + wlTpcDb.options[idx].value;
+        loc += '&wlTpcDb=' + wlTpcDb.options[wlTpcDb.selectedIndex].value;
      }
+
    }
+   var code = 'location="' + loc + '"';
 
-   var code = 'location = "' + loc + '"';
    eval(code);
 }
-
 // done hiding -->
        </script>
 </head>
@@ -651,59 +1202,102 @@ short or long preambles are used.</p>
 <form>
    <table border="0" cellpadding="2" cellspacing="0">
       <tr>
-          <td><label for="">AP isolation:</label></td>
+          <td><label>AP isolation:</label></td>
           <td><select name='wlAPIsolation' id='wlAPIsolation'>
                  <option value='0'>Disabled</option>
                  <option value='1'>Enabled</option>
               </select></td>
       </tr>
       <tr>
-          <td><label for="">Band:</td>
+          <td><label>Band:</td>
           <td><select name='wlBand' id='wlBand' onChange='onBandChange();'>
 <script type="text/javascript">
 <!-- hide
 if ( bands == '3' ) { // dual band
-         document.writeln('      <option value=2>2.4GHz - 802.11g</option>');
-         document.writeln('      <option value=1>5GHz - 802.11a</option>');
+         document.writeln('      <option value=2>2.4GHz</option>');
+         document.writeln('      <option value=1>5GHz</option>');
 }
 else if (bands == '1') {
-         document.writeln('      <option value=1>5GHz - 802.11a</option>');
+         document.writeln('      <option value=1>5GHz</option>');
 }
 else {
-    if (phy == "g") {
-         document.writeln('      <option value=2>2.4GHz - 802.11g</option>');
-    }
-    else {
-         document.writeln('      <option value=2>2.4GHz - 802.11b</option>');
-    }
+         document.writeln('      <option value=2>2.4GHz</option>');
 }
 // done hiding -->
 </script>
           </select></td>
       </tr>
       <tr>
-          <td><label for="">Channel:</label></td>
-          <td><select name='wlChannel' id='wlChannel'>
+          <td><label>Channel:</label></td>
+          <td><select name='wlChannel' id='wlChannel' onChange="wl_recalc(false)">
               </select></td>
       </tr>
       <tr>
-          <td><label for="">Rate:</label></td>
+         <td><label>Channel timer:</label></td>
+         <td><input type='text' name='wlCsScanTimer' id='wlCsScanTimer' size="10"> <label>minutes</label></td>
+      </tr>
+      <tr id="div_nMode_sel">
+         <td><label>802.11n mode:</label></td>
+         <td><select name='wlNmode' id='wlNmode' onChange="onNmodeChange();">
+                <option value="auto">Automatic</option>
+                <option value="off">Disabled</option>
+             </select></td>
+      </tr>
+      <tr id="idWMMno11n">
+         <td></td>
+         <td><span class="clsNote">(Note: WMM is incompatible with <b>802.11n</b> mode.)</span></td>
+      </tr>
+      <tr id="idBandwidth">
+         <td><label>Bandwidth:</label></td>
+                <td><select name="wlNbw" id="wlNbw" onChange="wl_recalc(false)">
+                <option value="20">20MHz</option>
+                <option value="40">40MHz</option>
+             </select></td>
+      </tr>
+      <tr id="idCtrlSideband">
+         <td><label>Control sideband:</label></td>
+         <td><select name="wlNCtrlsb" id="wlNCtrlsb" onChange="wl_recalc(false)">
+                <option value="-1">Lower</option>
+                <option value="1">Upper</option>
+             </select></td>
+      </tr>
+      <tr id="idNRate">
+         <td><label>802.11n rate:</label></td>
+         <td><select name="wlNMmcsidx" id="wlNMmcsidx"  onChange="wl_mcs_onchange(false)";>
+             </select></td>
+      </tr>
+      <tr id="idNProtection">
+         <td><label>802.11n protection:</label></td>
+         <td><select name="wlNProtection" id="wlNProtection">
+                <option value="off">Off</option>
+                <option value="auto">Automatic</option>
+             </select></td>
+      </tr>
+      <tr id="idNClient">
+         <td><label>Support 802.11n client only:</label></td>
+         <td><select name="wlNReqd" id="wlNReqd">
+                <option value="0">Off</option>
+                <option value="1">On</option>
+            </select></td>
+      </tr>
+      <tr>
+          <td><label>54g&trade; rate:</label></td>
           <td><select name='wlRate' id='wlRate'>
               </select></td>
       </tr>
       <tr>
-          <td><label for="">Multicast rate:</label></td>
+          <td><label>Multicast rate:</label></td>
           <td><select name='wlMCastRate' id='wlMCastRate'>
               </select></td>
       </tr>
       <tr>
-          <td><label for="">Basic rate:</label></td>
+          <td><label>Basic rate:</label></td>
           <td><select name='wlBasicRate' id='wlBasicRate'>
               </select></td>
       </tr>
       <tr>
-          <td><label for="wlFrgThrshld">Fragmentation threshold:</label></td>
-          <td><input type='text' name='wlFrgThrshld' id='wlFrgThrshld' size='10' onchange="wl_recalc(0);">
+          <td><label for="wlFrgThrshld">Fragmentation&nbsp;threshold:</label></td>
+          <td><input type='text' name='wlFrgThrshld' id='wlFrgThrshld' size='10' onchange="wl_recalc(false);">
           <span class="clsNote">(Note: <b>MAXg</b> acceleration requires a value of 2346.)</span></td>
       </tr>
       <tr>
@@ -718,68 +1312,58 @@ else {
           <td><label for="wlBcnIntvl">Beacon interval:</label></td>
           <td><input type='text' name='wlBcnIntvl' id='wlBcnIntvl' size='10'></td>
       </tr>
-
-               <tr>
-                       <td><label>Acceleration:</label></td>
-                       <td>
-                               <select id="cbAcceleration" onchange="wl_recalc(0);">
-                                       <option value="maxg" selected>MAXg (125 Mbps)</option>
-                                       <option value="xpress">54g+ (XPress&trade;)</option>
-                                       <option value="none">None</option>
-                               </select>
-                       </td>
-               </tr>
-               <tr id="idWMMnoMAXg">
-                       <td></td>
-                       <td>
-                               WMM is enabled so <b>Acceleration</b> cannot be set to <b>MAXg</b>.
-                               In order to set <b>Acceleration</b> to <b>MAXg</b>, please disable
-                               <b>WMM</b> on the <a href="wlqos.html">Wireless Quality of Service</a> page.
-                       </td>
-               </tr>
-               <tr id="idFragNoMAXg">
-                       <td></td>
-                       <td>
-                               In order to set <b>Acceleration</b> to <b>MAXg</b>,
-                               the <b>Fragmentation threshold</b> must be set to <b>2346</b>.
-                       </td>
-               </tr>
-
-      <tr id="div_gMode">
-          <td><label for="">54g&trade; mode:</label></td>
-          <td><select name="wlgMode" id="wlgMode" onChange="gModeChange()">
-                  <option value="1">Automatic</option>
-                  <option value="4">54g Performance</option>
-                  <option value="5">54g LRS</option>
-                  <option value="0">802.11b Only</option>
-              </select></td>
+      <tr>
+         <td><label for="wlMaxAssoc">Maximum&nbsp;associated&nbsp;clients:</td>
+         <td><input type='text' name='wlMaxAssoc' id="wlMaxAssoc" size='10'></td>
       </tr>
+
       <tr>
-          <td><label for="">54g protection:</label></td>
-          <td><select name="wlProtection" id="wlProtection">
-                  <option value="off">Disabled</option>
-                  <option value="auto">Automatic</option>
-              </select></td>
+         <td><label>Acceleration:</label></td>
+         <td><select id="cbAcceleration" onchange="onAccelerationChange();">
+                <option value="maxg" selected>MAXg (125 Mbps)</option>
+                <option value="xpress">54g+ (XPress&trade;)</option>
+                <option value="none">None</option>
+                        </select></td>
       </tr>
-      <tr id="div_regMode">
-         <td><label for="">Regulatory mode:</label></td>
+      <tr id="idWMMnoMAXg">
+         <td></td>
+         <td><span class="clsNote">(Note: WMM is incompatible with <b>MAXg</b> acceleration.)</span></td>
+      </tr>
+
+      <tr id="id54gMode">
+         <td><label>54g&trade; mode:</label></td>
+         <td><select name="wlgMode" id="wlgMode" onChange="gModeChange()">
+                 <option value="1">Automatic</option>
+                 <option value="4">54g Performance</option>
+                 <option value="5">54g LRS</option>
+                 <option value="0">802.11b Only</option>
+             </select></td>
+      </tr>
+      <tr id="id54gProtection">
+         <td><label>54g&trade; protection:</label></td>
+         <td><select name="wlProtection" id="wlProtection">
+                 <option value="off">Disabled</option>
+                 <option value="auto">Automatic</option>
+             </select></td>
+      </tr>
+      <tr id="idRegulatory">
+         <td><label>Regulatory mode:</label></td>
          <td><select name="wlRegMode" id="wlRegMode" onChange='RegModeChange()'>
-               <option value="0">Disabled</option>
-               <option value="1">802.11h</option>
-               <option value="2">802.11d</option>
+                 <option value="0">Disabled</option>
+                 <option value="1">802.11h</option>
+                 <option value="2">802.11d</option>
              </select></td>
       </tr>
-<!-- Hide unsupported uptions.
-      <tr id="div_regMode1">
-         <td><label for="">Pre-network radar check:</label></td>
+      <tr id="idDfsPreIsm">
+         <td><label for="wlDfsPreIsm">Pre-network radar check:</label></td>
          <td><input type='text' name='wlDfsPreIsm' id='wlDfsPreIsm'></td>
       </tr>
-      <tr id="div_regMode2">
-         <td><label for="">In-network radar check:</label></td>
+      <tr id="idDfsPostIsm">
+         <td><label for="wlDfsPostIsm">In-network radar check:</label></td>
          <td><input type='text' name='wlDfsPostIsm' id='wlDfsPostIsm'></td>
       </tr>
-      <tr>
-         <td label for=""="180">TPC mitigation:</td>
+      <tr id="idTpsMitigation">
+         <td><label>TPC mitigation:</label></td>
          <td><select name="wlTpcDb" id="wlTpcDb">
                <option value="0">0 dB (off)</option>
                <option value="2">2 dB</option>
@@ -787,9 +1371,15 @@ else {
                <option value="4">4 dB</option>
             </select></td>
       </tr>
--->
+       <tr id="preambleType">
+           <td><label>Preamble type:</label></td>
+           <td><select name="wlPreambleType" id="wlPreambleType">
+                  <option value="long">long</option>
+                  <option value="short">short</option>
+               </select></td>
+       </tr>
       <tr id="WLTXPOWER">
-         <td><label for="">Transmit power:</label></td>
+         <td><label>Transmit power:</label></td>
          <td><select name="wlTxPower" id="wlTxPower">
                <option value="20">20%</option>
                <option value="40">40%</option>
@@ -798,13 +1388,6 @@ else {
                <option value="100">100%</option>
              </select></td>
       </tr>
-       <tr id="preambleType">
-           <td><label for="">Preamble type:</label></td>
-           <td><select name="wlPreambleType" id="wlPreambleType" size='1'>
-                  <option value="long">long</option>
-                  <option value="short">short</option>
-               </select></td>
-       </tr>
    </table>
 
    <p><input type='button' onClick='btnApply()' value='Apply'></p>