diff options
author | Stijn Tintel <stijn@linux-ipv6.be> | 2022-06-27 17:06:34 +0300 |
---|---|---|
committer | Stijn Tintel <stijn@linux-ipv6.be> | 2022-06-28 03:23:51 +0300 |
commit | d2d5aabdbb947443b0d5f75c3847754c7c38a117 (patch) | |
tree | 8027c47435894c16cfae5f9480ce0ad208a6de16 | |
parent | f2982bcc890d10f3a501b3a84fe18e99d1af1e2f (diff) | |
download | upstream-d2d5aabdbb947443b0d5f75c3847754c7c38a117.tar.gz upstream-d2d5aabdbb947443b0d5f75c3847754c7c38a117.tar.bz2 upstream-d2d5aabdbb947443b0d5f75c3847754c7c38a117.zip |
hostapd: introduce min_tx_power option
Introduce a new option min_tx_power to configure the minimum permitted
max TX power (in dBm) for ACS and DFS channel selection.
Imagine the following regulatory rules:
* 5180 MHz [36] (21.0 dBm)
* 5200 MHz [40] (21.0 dBm)
* 5220 MHz [44] (21.0 dBm)
* 5240 MHz [48] (21.0 dBm)
* 5260 MHz [52] (20.0 dBm) (radar detection)
* 5280 MHz [56] (20.0 dBm) (radar detection)
* 5300 MHz [60] (20.0 dBm) (radar detection)
* 5320 MHz [64] (20.0 dBm) (radar detection)
* 5500 MHz [100] (21.0 dBm) (radar detection)
* 5520 MHz [104] (21.0 dBm) (radar detection)
* 5540 MHz [108] (21.0 dBm) (radar detection)
* 5560 MHz [112] (21.0 dBm) (radar detection)
* 5580 MHz [116] (21.0 dBm) (radar detection)
* 5600 MHz [120] (21.0 dBm) (radar detection)
* 5620 MHz [124] (21.0 dBm) (radar detection)
* 5640 MHz [128] (21.0 dBm) (radar detection)
* 5660 MHz [132] (21.0 dBm) (radar detection)
* 5680 MHz [136] (21.0 dBm) (radar detection)
* 5700 MHz [140] (21.0 dBm) (radar detection)
* 5720 MHz [144] (13.0 dBm) (radar detection)
* 5745 MHz [149] (13.0 dBm)
* 5765 MHz [153] (13.0 dBm)
* 5785 MHz [157] (13.0 dBm)
* 5805 MHz [161] (13.0 dBm)
* 5825 MHz [165] (13.0 dBm)
* 5845 MHz [169] (13.0 dBm)
* 5865 MHz [173] (13.0 dBm)
When ACS or DFS end up selecting channel 144 or higher, some clients
might no longer be able to communicate with the AP due to the TX power
being limited to 13 dBm. Setting min_tx_power to 20 will result in
hostapd not considering these channels during ACS or after a DFS event.
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
Acked-by: David Bauer <mail@david-bauer.net>
-rw-r--r-- | package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index 3ffe6de66b..5d6ca7c0e3 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -28,7 +28,7 @@ drv_mac80211_init_device_config() { config_add_string tx_burst config_add_string distance config_add_int beacon_int chanbw frag rts - config_add_int rxantenna txantenna antenna_gain txpower + config_add_int rxantenna txantenna antenna_gain txpower min_tx_power config_add_boolean noscan ht_coex acs_exclude_dfs background_radar config_add_array ht_capab config_add_array channels @@ -137,13 +137,15 @@ mac80211_hostapd_setup_base() { [ -n "$acs_exclude_dfs" ] && [ "$acs_exclude_dfs" -gt 0 ] && append base_cfg "acs_exclude_dfs=1" "$N" - json_get_vars noscan ht_coex + json_get_vars noscan ht_coex min_tx_power:0 json_get_values ht_capab_list ht_capab tx_burst json_get_values channel_list channels [ "$auto_channel" = 0 ] && [ -z "$channel_list" ] && \ channel_list="$channel" + [ "$min_tx_power" -gt 0 ] && append base_cfg "min_tx_power=$min_tx_power" + set_default noscan 0 [ "$noscan" -gt 0 ] && hostapd_noscan=1 |