Browse Source

hostapd: add an option for 802.11h (enabled by default)

Signed-off-by: Felix Fietkau <[email protected]>

SVN-Revision: 40690
Felix Fietkau 12 years ago
parent
commit
26044703a4
1 changed files with 6 additions and 2 deletions
  1. 6 2
      package/network/services/hostapd/files/netifd.sh

+ 6 - 2
package/network/services/hostapd/files/netifd.sh

@@ -51,7 +51,7 @@ hostapd_common_add_device_config() {
 	config_add_array basic_rate
 	config_add_array basic_rate
 
 
 	config_add_string country
 	config_add_string country
-	config_add_boolean country_ie
+	config_add_boolean country_ie doth
 
 
 	hostapd_add_log_config
 	hostapd_add_log_config
 }
 }
@@ -63,14 +63,18 @@ hostapd_prepare_device_config() {
 	local base="${config%%.conf}"
 	local base="${config%%.conf}"
 	local base_cfg=
 	local base_cfg=
 
 
-	json_get_vars country country_ie beacon_int
+	json_get_vars country country_ie beacon_int doth
 
 
 	hostapd_set_log_options base_cfg
 	hostapd_set_log_options base_cfg
 
 
 	set_default country_ie 1
 	set_default country_ie 1
+	set_default doth 1
+
 	[ -n "$country" ] && {
 	[ -n "$country" ] && {
 		append base_cfg "country_code=$country" "$N"
 		append base_cfg "country_code=$country" "$N"
+
 		[ "$country_ie" -gt 0 ] && append base_cfg "ieee80211d=1" "$N"
 		[ "$country_ie" -gt 0 ] && append base_cfg "ieee80211d=1" "$N"
+		[ "$hwmode" = "a" -a "$doth" -gt 0 ] && append base_cfg "ieee80211h=1" "$N"
 	}
 	}
 	[ -n "$hwmode" ] && append base_cfg "hw_mode=$hwmode" "$N"
 	[ -n "$hwmode" ] && append base_cfg "hw_mode=$hwmode" "$N"