Message ID | 20200926150623.42441-1-nick.lowe@gmail.com |
---|---|
State | Superseded |
Delegated to: | David Bauer |
Headers | show |
Series | hostapd: Add cell_density data rates option | expand |
Hi all, Please may I request any thoughts and feedback on this proposed patch to the hostapd config generation shell script to add a new cell_density configuration option? This would subsequently allow for a LuCI-exposed option to then be added via a follow up patch for easy, less error prone configuration of data rates for normal, high and very high density deployments. Currently, it is both easy to misunderstand basic/mandatory and optional rates and to misconfigure these, and the current basic_rate and supported_rates options are not exposed in Luci and are therefore not easily discoverable or accessible. I feel that the basic_rate and supported_rates options are best abstracted via a new setting for general use cases before being exposed to LuCI. Where specified, the basic_rate and supported_rates options would override both the cell_density and legacy_rates options. Cheers, Nick
Hi Nick, On 10/2/20 5:26 PM, Nick Lowe wrote: > Hi all, > > Please may I request any thoughts and feedback on this proposed patch > to the hostapd config generation shell script to add a new > cell_density configuration option? > > This would subsequently allow for a LuCI-exposed option to then be > added via a follow up patch for easy, less error prone configuration > of data rates for normal, high and very high density deployments. As briefly mentioned on IRC, I have concerns that this might interfere with clients using buggy wireless implementations. I've noticed 802.11g clients not connecting / listing networks which do not offer a 6 Mbit/s basic rate. On the other hand, these kind of clients also show frequent issues when used with FT or (god forbid) PSK2-SAE mixed mode. Therefore I'm in favor of adding a brief notice to this option to LuCI, that tampering with this setting might lead to issues with some clients. That said, the proposed settings and rate sets look sensible to me, given they are abstracted from easily explained toggles. Best wishes David > > Currently, it is both easy to misunderstand basic/mandatory and > optional rates and to misconfigure these, and the current basic_rate > and supported_rates options are not exposed in Luci and are therefore > not easily discoverable or accessible. > I feel that the basic_rate and supported_rates options are best > abstracted via a new setting for general use cases before being > exposed to LuCI. > > Where specified, the basic_rate and supported_rates options would > override both the cell_density and legacy_rates options. > > Cheers, > > Nick > > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel >
> As briefly mentioned on IRC, I have concerns that this might interfere with > clients using buggy wireless implementations. I've noticed 802.11g clients > not connecting / listing networks which do not offer a 6 Mbit/s basic rate. Yes, completely agree. This setting does have interoperability implications with some 802.11b and 802.11g clients that have buggy 802.11 stacks. The notable compatibility issues that I am aware of are: 1) Some 802.11g devices require the original 802.11, prior to 802.11b, defined data rates to be offered as basic/mandatory, the 1 Mb/s and 2 Mb/s rates, despite them being 802.11g devices. Nintendo specifically comes to mind here with their older devices. 2) Some 802.11g devices require either the 1 Mb/s and 2 Mb/s rates as minimum basic/mandatory, or else the 6 Mb/s rate as minimum basic/mandatory. Aged handheld scanners typically used in warehouses and some printers specifically come to mind here. To my knowledge, such clients are not generally encountered, common devices in use in the present day. > On the other hand, these kind of clients also show frequent issues when used > with FT or (god forbid) PSK2-SAE mixed mode. > > Therefore I'm in favor of adding a brief notice to this option to LuCI, that > tampering with this setting might lead to issues with some clients. Yes, completely agreed. Both the documentation for the new cell_density setting and the LuCI UI should highlight this. > That said, the proposed settings and rate sets look sensible to me, given they > are abstracted from easily explained toggles. Thank you very much for the review. Do you think this specific patch could be merged in its present state? If yes, please could you do so?
Hello Nick, sorry, i was quite busy the last days. On 10/8/20 10:24 AM, Nick Lowe wrote: > Thank you very much for the review. Do you think this specific patch > could be merged in its present state? If yes, please could you do so? I've merged your commit to my staging tree and will push it in a few days when I've sent my hostapd changes to the list. Best wishes David
diff --git a/package/network/services/hostapd/files/hostapd.sh b/package/network/services/hostapd/files/hostapd.sh index b33e8e1edc..d2a4ada1ad 100644 --- a/package/network/services/hostapd/files/hostapd.sh +++ b/package/network/services/hostapd/files/hostapd.sh @@ -98,6 +98,7 @@ hostapd_common_add_device_config() { config_add_int local_pwr_constraint config_add_string require_mode config_add_boolean legacy_rates + config_add_int cell_density config_add_string acs_chan_bias config_add_array hostapd_options @@ -113,7 +114,7 @@ hostapd_prepare_device_config() { local base_cfg= json_get_vars country country_ie beacon_int:100 dtim_period:2 doth require_mode legacy_rates \ - acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode + acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density hostapd_set_log_options base_cfg @@ -122,8 +123,7 @@ hostapd_prepare_device_config() { set_default doth 1 set_default legacy_rates 1 set_default airtime_mode 0 - - [ "$hwmode" = "b" ] && legacy_rates=1 + set_default cell_density 0 [ -n "$country" ] && { append base_cfg "country_code=$country" "$N" @@ -144,16 +144,57 @@ hostapd_prepare_device_config() { json_get_values rate_list supported_rates [ -n "$hwmode" ] && append base_cfg "hw_mode=$hwmode" "$N" - [ "$legacy_rates" -eq 0 ] && set_default require_mode g - - [ "$hwmode" = "g" ] && { - [ "$legacy_rates" -eq 0 ] && set_default rate_list "6000 9000 12000 18000 24000 36000 48000 54000" - [ -n "$require_mode" ] && set_default basic_rate_list "6000 12000 24000" - } - - case "$require_mode" in - n) append base_cfg "require_ht=1" "$N";; - ac) append base_cfg "require_vht=1" "$N";; + if [ "$hwmode" = "g" ] || [ "$hwmode" = "a" ]; then + [ -n "$require_mode" ] && legacy_rates=0 + case "$require_mode" in + n) append base_cfg "require_ht=1" "$N";; + ac) append base_cfg "require_vht=1" "$N";; + esac + fi + case "$hwmode" in + b) + if [ "$cell_density" -eq 1 ]; then + set_default rate_list "5500 11000" + set_default basic_rate_list "5500 11000" + elif [ "$cell_density" -ge 2 ]; then + set_default rate_list "11000" + set_default basic_rate_list "11000" + fi + ;; + g) + if [ "$cell_density" -eq 1 ]; then + if [ "$legacy_rates" -eq 0 ]; then + set_default rate_list "6000 9000 12000 18000 24000 36000 48000 54000" + set_default basic_rate_list "6000 12000 24000" + else + set_default rate_list "5500 6000 9000 11000 12000 18000 24000 36000 48000 54000" + set_default basic_rate_list "5500 11000" + fi + elif [ "$cell_density" -eq 2 ] || [ "$legacy_rates" -ne 0 ]; then + if [ "$legacy_rates" -eq 0 ]; then + set_default rate_list "12000 18000 24000 36000 48000 54000" + set_default basic_rate_list "12000 24000" + else + set_default rate_list "11000 12000 18000 24000 36000 48000 54000" + set_default basic_rate_list "11000" + fi + elif [ "$cell_density" -ge 3 ]; then + set_default rate_list "24000 36000 48000 54000" + set_default basic_rate_list "24000" + fi + ;; + a) + if [ "$cell_density" -eq 1 ]; then + set_default rate_list "6000 9000 12000 18000 24000 36000 48000 54000" + set_default basic_rate_list "6000 12000 24000" + elif [ "$cell_density" -eq 2 ]; then + set_default rate_list "12000 18000 24000 36000 48000 54000" + set_default basic_rate_list "12000 24000" + elif [ "$cell_density" -ge 3 ]; then + set_default rate_list "24000 36000 48000 54000" + set_default basic_rate_list "24000" + fi + ;; esac for r in $rate_list; do
Add a cell_density option to configure data rates for normal, high and very high cell density wireless deployments. The purpose of using a minimum basic/mandatory data rate that is higher than 6 Mb/s, or 5.5 Mb/s (802.11b compatible), in high cell density environments is to transmit broadcast/multicast data frames using less airtime or to reduce management overheads where significant co-channel interference (CCI) exists and cannot be avoided. Caution: Without careful design and validation, configuration of a too high minimum basic/mandatory data rate can sacrifice connection stability or disrupt the ability to reliably connect and authenticate for little to no capacity benefit. This is because this configuration affects the ability of clients to hear and demodulate management, control and broadcast/multicast data frames. Deployments that have not been specifically designed and validated are usually best suited to use 6, 12 and 24 Mb/s as basic/mandatory data rates. Only usually seek to configure a 12 Mb/s, or 11 Mb/s (802.11b compatible), minimum basic/mandatory rate in high cell density deployments that have been designed and validated for this. For many deployments, the minimum basic/mandatory data rate should not be configured above 12 Mb/s to 18 Mb/s, 24 Mb/s or higher. Such a configuration is only appropriate for use in very high cell density deployment scenarios. A cell_density of Very High (3) should only be used where a deployment has a valid use case and has been designed and validated specifically for this use, nearly always with highly directional antennas - an example would be stadium deployments. For example, with a 24 Mb/s OFDM minimum basic/mandatory data rate, approximately a -73 dBm RSSI is required to decode frames. Many clients will not have roamed elsewhere by the time that they experience -73 dBm and, where they do, they frequently may not hear and be able to demodulate beacon, control or broadcast/multicast data frames causing connectivity issues. There is a myth that disabling lower basic/mandatory data rates will improve roaming and avoid sticky clients. For 802.11n, 802.11ac and 802.11ax clients this is not correct as clients will shift to and use lower MCS rates and not to the 802.11b or 802.11g/802.11a rates that are able to be used as basic/mandatory data rates. There is a myth that disabling lower basic/mandatory data rates will ensure that clients only use higher data rates and that better performance is assured. For 802.11n, 802.11ac and 802.11ax clients this is not correct as clients will shift around and use MCS rates and not the 802.11b or 802.11g/802.11a rates that able to be used as basic/mandatory data rates. Cell Density 0 - Disabled (Default) Setting cell_density to 0 does not configure data rates. This is the default. 1 - Normal Cell Density Setting cell_density to 1 configures the basic/mandatory rates to 6, 12 and 24 Mb/s OFDM rates where legacy_rates is 0. Supported rates lower than the minimum basic/mandatory rate are not offered. Setting cell_density to 1 configures the basic/mandatory rates to the 5.5 and 11 Mb/s DSSS rates where legacy_rates is 1. Supported rates lower than the minimum basic/mandatory rate are not offered. 2 - High Cell Density Setting the cell_density to 2 configures the basic/mandatory rates to the 12 and 24 Mb/s OFDM rates where legacy_rates is 0. Supported rates lower than the minimum basic/mandatory rate are not offered. Setting the cell_density to 2 configures the basic/mandatory rates to the 11 Mb/s DSSS rate where legacy_rates is 1. Supported rates lower than the minimum basic/mandatory rate are not offered. 3 - Very High Cell Density Setting the cell_density to 3 configures the basic/mandatory rates to the 24 Mb/s OFDM rate where legacy_rates is 0. Supported rates lower than the minimum basic/mandatory rate are not offered. Setting the cell_density to 3 only has effect where legacy_rates is 0, this has the same effect as being configured with a cell_density of 2. Where specified, the basic_rate and supported_rates options continue to override both the cell_density and legacy_rates options. Signed-off-by: Nick Lowe <nick.lowe@gmail.com> --- .../network/services/hostapd/files/hostapd.sh | 67 +++++++++++++++---- 1 file changed, 54 insertions(+), 13 deletions(-)