mirror of https://github.com/aredn/aredn.git
Fix wifi being disabled after applying setting on non-chain devices
fixes BBHN->ticket:39
This commit is contained in:
parent
e36a2ffbf9
commit
a93d48e849
|
@ -134,15 +134,16 @@ $parms{wifi_rxant} = $wifi_rxant;
|
|||
|
||||
if($parms{button_apply} or $parms{button_save})
|
||||
{
|
||||
$cmd = "iw phy phy0 set distance $wifi_distance >/dev/null 2>&1;";
|
||||
$cmd = "";
|
||||
if(wifi_useschains()){
|
||||
$cmd .= "echo $wifi_rxant > /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask;";
|
||||
$cmd .= "echo $wifi_txant > /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask;";
|
||||
} else {
|
||||
$cmd .= "ifconfig wlan0 down >/dev/null 2>&1;";
|
||||
$cmd .= "ifdown wifi >/dev/null 2>&1;";
|
||||
$cmd .= "iw phy phy0 set antenna $wifi_txantenna $wifi_rxantenna >/dev/null 2>&1;";
|
||||
$cmd .= "ifconfig wlan0 up >/dev/null 2>&1;";
|
||||
$cmd .= "ifup wifi >/dev/null 2>&1;";
|
||||
}
|
||||
$cmd .= "iw phy phy0 set distance $wifi_distance >/dev/null 2>&1;";
|
||||
$cmd .= "iwconfig wlan0 txpower $wifi_txpower >/dev/null 2>&1;";
|
||||
system $cmd;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue