On 2/17/14, 09:05 PM, Matti Laakso wrote: > 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. >
It is good to see that there are more people working on DFS support. One month ago we also added a ticket to solve the same "ieee80211d=1" problem (https://dev.openwrt.org/ticket/14867). Our patch reuses the "doth" variable which already exists (see below). Index: network/services/hostapd/files/netifd.sh =================================================================== --- network/services/hostapd/files/netifd.sh (revision 39386) +++ network/services/hostapd/files/netifd.sh (working copy) @@ -140,7 +140,7 @@ maxassoc max_inactivity disassoc_low_ack isolate auth_cache \ wps_pushbutton wps_label ext_registrar \ wps_device_type wps_device_name wps_manufacturer wps_pin \ - macfilter ssid wmm hidden short_preamble + macfilter ssid wmm hidden short_preamble doth set_default isolate 0 set_default maxassoc 0 @@ -149,6 +149,7 @@ set_default disassoc_low_ack 1 set_default hidden 0 set_default wmm 1 + set_default doth 1 append bss_conf "ctrl_interface=/var/run/hostapd" if [ "$isolate" -gt 0 ]; then @@ -160,6 +161,9 @@ if [ "$max_inactivity" -gt 0 ]; then append bss_conf "ap_max_inactivity=$max_inactivity" "$N" fi + if [ "$doth" -gt 0 ]; then + append bss_conf "ieee80211h=1" "$N" + fi append bss_conf "disassoc_low_ack=$disassoc_low_ack" "$N" append bss_conf "preamble=$short_preamble" "$N" > 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 openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel