Changeset 15633


Ignore:
Timestamp:
2009-05-06T13:52:24+02:00 (9 years ago)
Author:
nbd
Message:

madwifi: make country code and outdoor flag changeable without reloading the driver

Location:
trunk/package/madwifi
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/madwifi/files/lib/wifi/madwifi.sh

    r15283 r15633  
    6868enable_atheros() { 
    6969        local device="$1" 
    70         # Can only set the country code to one setting for the entire system. The last country code is the one that will be applied. 
     70 
     71        config_get regdomain "$device" regdomain 
     72        [ -n "$regdomain" ] && echo "$regdomain" > /proc/sys/dev/$device/regdomain 
     73 
    7174        config_get country "$device" country 
    7275        [ -z "$country" ] && country="0" 
    73         local cc="0" 
    74         [ -e /proc/sys/dev/$device/countrycode ] && cc="$(cat /proc/sys/dev/$device/countrycode)" 
    75         if [ ! "$cc" = "$country" ] ; then 
    76                 rmmod ath_pci 
    77                 insmod ath_pci countrycode=$country 
    78         fi 
     76        echo "$country" > /proc/sys/dev/$device/countrycode 
     77 
     78        config_get outdoor "$device" outdoor 
     79        [ -z "$outdoor" ] && outdoor="0" 
     80        echo "$outdoor" > /proc/sys/dev/$device/outdoor 
     81 
    7982        config_get channel "$device" channel 
    8083        config_get vifs "$device" vifs 
Note: See TracChangeset for help on using the changeset viewer.