]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - src/initscripts/init.d/hostapd
hostapd: change setting of the regdomain.
[people/teissler/ipfire-2.x.git] / src / initscripts / init.d / hostapd
index 31083399b18f83ce6191fbe597f3b9e45717dd1d..8f59a7f16fdb51c1fbe4c420eab4c89cba0d9a9b 100644 (file)
@@ -3,6 +3,7 @@
 . ${rc_functions}
 
 CHANNEL="05"
+COUNTRY="00"
 TXPOWER="auto"
 INTERFACE="blue0"
 MACMODE="0"
@@ -74,6 +75,13 @@ case "${1}" in
                        fi
                fi
 
+               # First set to any country then reset to World (00)
+               # and then set new country because the card is only
+               # reprogrammed if the region was changed.
+               /usr/sbin/iw reg set DE
+               /usr/sbin/iw reg set 00
+               /usr/sbin/iw reg set $COUNTRY
+
                /usr/sbin/iwconfig $INTERFACE channel $CHANNEL 2>/dev/null
                /usr/sbin/iwconfig $INTERFACE txpower $TXPOWER