mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-24 22:31:09 +02:00
madwifi: make country code and outdoor flag changeable without reloading the driver
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15633 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
6f2c5c53e8
commit
0ee2c9dc7b
@ -67,15 +67,18 @@ disable_atheros() (
|
||||
|
||||
enable_atheros() {
|
||||
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
|
||||
[ -z "$country" ] && country="0"
|
||||
local cc="0"
|
||||
[ -e /proc/sys/dev/$device/countrycode ] && cc="$(cat /proc/sys/dev/$device/countrycode)"
|
||||
if [ ! "$cc" = "$country" ] ; then
|
||||
rmmod ath_pci
|
||||
insmod ath_pci countrycode=$country
|
||||
fi
|
||||
echo "$country" > /proc/sys/dev/$device/countrycode
|
||||
|
||||
config_get outdoor "$device" outdoor
|
||||
[ -z "$outdoor" ] && outdoor="0"
|
||||
echo "$outdoor" > /proc/sys/dev/$device/outdoor
|
||||
|
||||
config_get channel "$device" channel
|
||||
config_get vifs "$device" vifs
|
||||
config_get txpower "$device" txpower
|
||||
|
1354
package/madwifi/patches/421-channel_handling.patch
Normal file
1354
package/madwifi/patches/421-channel_handling.patch
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user