mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 08:09:41 +00:00
interfaces: optionally allow to set txpower
PR: https://forum.opnsense.org/index.php?topic=3462.0
This commit is contained in:
parent
4e662fe436
commit
3da906b624
@ -2293,10 +2293,6 @@ function interface_wireless_configure($if, &$wl, &$wlcfg)
|
||||
$wlcmd[] = "-mediaopt turbo";
|
||||
}
|
||||
|
||||
/* handle txpower setting */
|
||||
/* if($wlcfg['txpower'] <> "")
|
||||
$wlcmd[] = "txpower " . escapeshellarg($wlcfg['txpower']);
|
||||
*/
|
||||
/* handle wme option */
|
||||
if (isset($wlcfg['wme']['enable'])) {
|
||||
$wlcmd[] = "wme";
|
||||
@ -2579,6 +2575,10 @@ EOD;
|
||||
mwexec("/sbin/ifconfig " . escapeshellarg($if) . " " . $wlcmd_args, false);
|
||||
unset($wlcmd_args, $wlcmd);
|
||||
|
||||
/* configure txpower setting (it has been known to fail so run it separately) */
|
||||
if (!empty($wlcfg['txpower'])) {
|
||||
mwexecf('/sbin/ifconfig %s txpower %s', array($if, $wlcfg['txpower']));
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
/* execute hostapd and wpa_supplicant if required in shell */
|
||||
|
||||
@ -2792,9 +2792,10 @@ include("head.inc");
|
||||
<td><a id="help_for_txpower" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=gettext("Transmit power"); ?></td>
|
||||
<td>
|
||||
<select name="txpower" class="selectpicker" data-size="10" data-style="btn-default" id="txpower">
|
||||
<option value=""><?= gettext('default') ?></option>
|
||||
<?php
|
||||
for($x = 99; $x > 0; $x--):?>
|
||||
<option value="<?=$x;?>" <?=$pconfig["txpower"] == $x ? "selected=\"selected\"" : "";?> ><?=$x;?></option>
|
||||
<option value="<?=$x;?>" <?=$pconfig['txpower'] == $x ? 'selected="selected"' : '';?>><?=$x;?></option>
|
||||
<?php
|
||||
endfor;?>
|
||||
</select>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user