2013-12-02 13:04:54 -07:00
|
|
|
#!/usr/bin/perl -w -I/www/cgi-bin
|
2015-01-18 12:36:49 -07:00
|
|
|
=for commnet
|
|
|
|
|
|
|
|
Part of BBHN Mesh -- Used for creating Amateur Radio friendly mesh networks
|
|
|
|
Copyright (C) 2015 Conrad Lara
|
|
|
|
See Contributors file for additional contributors
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation version 3 of the License.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
=cut
|
2013-12-02 13:04:54 -07:00
|
|
|
|
|
|
|
use perlfunc;
|
|
|
|
|
|
|
|
if (wifi_useschains()){
|
|
|
|
|
|
|
|
$wifi_rxant = `uci -q get wireless.\@wifi-device[0].rxchain`;
|
|
|
|
$wifi_txant = `uci -q get wireless.\@wifi-device[0].txchain`;
|
|
|
|
chomp($wifi_rxant);
|
|
|
|
chomp($wifi_txant);
|
|
|
|
|
|
|
|
if ( $wifi_rxant ne "" ) {
|
|
|
|
`echo $wifi_rxant > /sys/kernel/debug/ieee80211/phy0/ath9k/rx_chainmask`;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( $wifi_txant ne "" ) {
|
|
|
|
`echo $wifi_txant > /sys/kernel/debug/ieee80211/phy0/ath9k/tx_chainmask`;
|
|
|
|
}
|
|
|
|
}
|