add country code option for hostapd (patch from #4675)
authorFelix Fietkau <nbd@openwrt.org>
Sun, 22 Feb 2009 02:46:04 +0000 (02:46 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 22 Feb 2009 02:46:04 +0000 (02:46 +0000)
SVN-Revision: 14608

package/hostapd/files/hostapd.sh

index a2f2d6fd1d4d46d200b4f3837b1be821fb646389..4c57d11dd7e79fb1134594ba7d8de057ab426ccf 100644 (file)
@@ -76,6 +76,7 @@ hostapd_setup_vif() {
        config_get device "$vif" device
        config_get channel "$device" channel
        config_get hwmode "$device" hwmode
+       config_get country "$device" country
        case "$hwmode" in
                11a) hwmode=a;;
                11b) hwmode=b;;
@@ -96,6 +97,7 @@ ssid=$ssid
 debug=0
 wpa=$wpa
 ${crypto:+wpa_pairwise=$crypto}
+${country:+country_code=$country}
 $hostapd_cfg
 EOF
        hostapd -P /var/run/wifi-$ifname.pid -B /var/run/hostapd-$ifname.conf