hostapd: add support for acs_chan_bias option
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Thu, 15 Jun 2017 11:48:56 +0000 (12:48 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 24 Jun 2017 11:11:19 +0000 (13:11 +0200)
During auto channel selection we may wish to prefer certain channels
over others.

e.g. we can just squeeze 4 channels into europe so '1:0.8 5:0.8 9:0.8
13:0.8' does that.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
package/network/services/hostapd/Makefile
package/network/services/hostapd/files/hostapd.sh

index b7cc6b9c34f67685b92c89de310aedbf8462cb62..8a1f083217e72a75a9e7eacd058c4ce68cf82789 100644 (file)
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE_URL:=http://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
index 86e9a32e5ba82d38215986429d18267c4b53ae51..2c015f9c4b28705ef68e2c825dac46b616859544 100644 (file)
@@ -66,6 +66,8 @@ hostapd_common_add_device_config() {
        config_add_string require_mode
        config_add_boolean legacy_rates
 
+       config_add_string acs_chan_bias
+
        hostapd_add_log_config
 }
 
@@ -76,7 +78,7 @@ hostapd_prepare_device_config() {
        local base="${config%%.conf}"
        local base_cfg=
 
-       json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates
+       json_get_vars country country_ie beacon_int:100 doth require_mode legacy_rates acs_chan_bias
 
        hostapd_set_log_options base_cfg
 
@@ -93,6 +95,8 @@ hostapd_prepare_device_config() {
                [ "$hwmode" = "a" -a "$doth" -gt 0 ] && append base_cfg "ieee80211h=1" "$N"
        }
 
+       [ -n "$acs_chan_bias" ] && append base_cfg "acs_chan_bias=$acs_chan_bias" "$N"
+
        local brlist= br
        json_get_values basic_rate_list basic_rate
        local rlist= r