mirror of https://github.com/hak5/openwrt.git
madwifi: make country code and outdoor flag changeable without reloading the driver
SVN-Revision: 15633lede-17.01
parent
23d3e5ad03
commit
56ae52b008
|
@ -67,15 +67,18 @@ disable_atheros() (
|
||||||
|
|
||||||
enable_atheros() {
|
enable_atheros() {
|
||||||
local device="$1"
|
local device="$1"
|
||||||
# Can only set the country code to one setting for the entire system. The last country code is the one that will be applied.
|
|
||||||
|
config_get regdomain "$device" regdomain
|
||||||
|
[ -n "$regdomain" ] && echo "$regdomain" > /proc/sys/dev/$device/regdomain
|
||||||
|
|
||||||
config_get country "$device" country
|
config_get country "$device" country
|
||||||
[ -z "$country" ] && country="0"
|
[ -z "$country" ] && country="0"
|
||||||
local cc="0"
|
echo "$country" > /proc/sys/dev/$device/countrycode
|
||||||
[ -e /proc/sys/dev/$device/countrycode ] && cc="$(cat /proc/sys/dev/$device/countrycode)"
|
|
||||||
if [ ! "$cc" = "$country" ] ; then
|
config_get outdoor "$device" outdoor
|
||||||
rmmod ath_pci
|
[ -z "$outdoor" ] && outdoor="0"
|
||||||
insmod ath_pci countrycode=$country
|
echo "$outdoor" > /proc/sys/dev/$device/outdoor
|
||||||
fi
|
|
||||||
config_get channel "$device" channel
|
config_get channel "$device" channel
|
||||||
config_get vifs "$device" vifs
|
config_get vifs "$device" vifs
|
||||||
config_get txpower "$device" txpower
|
config_get txpower "$device" txpower
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue