The latest hostapd and some of the wireless drivers support DFS, which
is required on the 5 GHz band in many countries. This patch adds the
correct option to the hostapd configuration if dfs=1 is set (along with
the country code) in the wireless configuration.
v2: refresh patch for netifd
Signed-off-by: Matti Laakso <malaakso at elisanet.fi>
---
Index: trunk/package/network/services/hostapd/files/netifd.sh
===================================================================
--- trunk/package/network/services/hostapd/files/netifd.sh (revision 39585)
+++ trunk/package/network/services/hostapd/files/netifd.sh (working copy)
@@ -51,7 +51,7 @@
config_add_array basic_rate
config_add_string country
- config_add_boolean country_ie
+ config_add_boolean country_ie dfs
hostapd_add_log_config
}
@@ -63,14 +63,18 @@
local base="${config%%.conf}"
local base_cfg=
- json_get_vars country country_ie beacon_int
+ json_get_vars country country_ie dfs beacon_int
hostapd_set_log_options base_cfg
set_default country_ie 1
+ set_default dfs 0
[ -n "$country" ] && {
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"
+ [ "$dfs" -gt 0 ] && append base_cfg "ieee80211h=1" "$N"
+ }
}
[ -n "$hwmode" ] && append base_cfg "hw_mode=$hwmode" "$N"
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel