/*echo "nvram set ".$pci_5g_path."regrev=".$regrev."\n"; echo "nvram set ".$pci_5g_path."ccode=".$ctry_code."\n";*/ startcmd("nvram set " . $pci_path . "regrev=0"); startcmd("nvram set " . $pci_path . "ccode=0"); startcmd("nvram set wl" . $wlif_bss_idx . "_country_code=" . $ctry_code); startcmd("nvram set wl" . $wlif_bss_idx . "_country_rev=" . $regrev); /* alpha create nvram parameter: it's value include country code and regulatory revision */ startcmd("nvram set wl" . $wlif_bss_idx . "_alpha_country_code=" . $ctry_code . "/" . $regrev); } $ccode = query("/runtime/devdata/countrycode"); if (isdigit($ccode) == 1) { TRACE_error("\n\nError\nWe do not support digital country,assign as US\n\n"); $ccode = "US"; } if ($ccode == "") { TRACE_error("\n\nError\nempty country,assign as US\n\n"); $ccode = "US"; } $pci_2g_path = "pci/2/1/"; $pci_5g_path = "pci/1/1/"; /*wl0 is 5G*/ nvram_country_setup(0, $ccode, $pci_5g_path); /*wl1 is 2.4G*/ nvram_country_setup(1, $ccode, $pci_2g_path); /*for ap client we need set country to dirver this moment. the site survey will run without wlconfig ifname up the driver will using default channel (1~11). we set the country here via wl command. */ startcmd("wl -i " . $BAND24G_DEVNAME . " country " . $ccode); startcmd("wl -i " . $BAND5G_DEVNAME . " country " . $ccode);
$ccode = query("/runtime/devdata/countrycode"); if (isdigit($ccode) == 1) { TRACE_error("\n\nError\nWe do not support digital country,assign as US\n\n"); $ccode = "US"; } if ($ccode == "") { TRACE_error("\n\nError\nempty country,assign as US\n\n"); $ccode = "US"; } //set smp_affinity value for performance (tom, 20121226) //move 5g driver irq to CPU1 echo "echo 2 > /proc/irq/169/smp_affinity\n"; //move 2.4g driver irq to CPU1 echo "echo 2 > /proc/irq/163/smp_affinity\n"; //in SDK 143, slot number is 1 (tom, 2012) //$pci_2g_path = "pci/1/0/"; $pci_2g_path = "pci/1/1/"; $pci_5g_path = "pci/2/1/"; //initialize country code for for 5g interface $wlif_bss_idx = 1; nvram_country_setup($wlif_bss_idx, $ccode, $pci_5g_path); //initialize country code for for 2.4g interface $wlif_bss_idx = 0; nvram_country_setup($wlif_bss_idx, $ccode, $pci_2g_path); /*for ap client we need set country to dirver this moment. the site survey will run without wlconfig ifname up the driver will using default channel (1~11). we set the country here via wl command. */ startcmd("wl -i " . $BAND24G_DEVNAME . " country " . $ccode); startcmd("wl -i " . $BAND5G_DEVNAME . " country " . $ccode);