From: Tom Smyth Subject: Re: fix net80211 802.11g compatibility check Cc: tech@openbsd.org Date: Thu, 31 Jul 2025 12:26:48 +0100 To follow up regarding with the colour of the Bike Shed :) In MikroTik for instance , you can setup APs with different rate settings, and like what Peter pointed out, sometimes the Maximal Rates are disabled due to (less forward error correction data being sent) which can lead to worse performance / with data having to be re-transmitted, so it would be better to check for at least one of the supported rates to detect a particular standard of AP be it 802.11 b, or a or g or n or ac etc... in any case the Bike shed should be yellow to match Puffy Motif... thanks Stefan, Peter et all, On Thu, 31 Jul 2025 at 12:17, Peter Hessler wrote: > On 2025 Jul 31 (Thu) at 12:26:18 +0200 (+0200), Stefan Sperling wrote: > :I have a WIP fix for qwx which relies on ieee80211_iserp_sta() to > :detect whether an AP supports 802.11g, rather than 802.11b only. > : > :And I encountered an access point which qwx could not connect to when > :my WIP fix is applied. > : > :This AP allows 11g clients but blocks 11b clients by not announcing > :support for 11b rates in its beacons. > : > :ieee80211_iserp_sta() is supposed to detect whether a peer supports > ERP/11g. > :Yet it will return false for APs which do not announce support for any > :of the 11b (pre-11g) data rates in their beacons. > : > :This code seems to be based on the last sentence in this paragraph from > : the 802.11 standard (I am from quoting from the 2012 / 11n version): > : > : 18. Extended Rate PHY (ERP) specification > : > : [...] > : > : 18.1.2 Introduction > : > : The ERP builds on the payload data rates of 1 and 2 Mb/s, as described > : in Clause 15, that use DSSS modulation and builds on the payload data > : rates of 1, 2, 5.5, and 11 Mb/s, as described in Clause 16, that use > : DSSS and CCK. > : > : The ERP draws from Clause 17 to provide additional payload data rates > : of 6, 9, 12, 18, 24, 36, 48, and 54 Mb/s. Of these rates, transmission > : and reception capability for 1, 2, 5.5, 6, 11, 12, and 24 Mb/s data > : rates is mandatory. > : > :To summarize: > : > :ERP rates are the OFDM rates: 6, 9, 12, 18, 24, 36, 48, and 54 Mb/s. > :These rates were introduced with 11g. The mandatory ones are: 6, 12, and > 24. > : > :The CCK rates are 1, 2, 5.5, and 11. These were already present in 11b. > :They are not relevant when checking for EP/11g support. The mandatory > :ones are 1, 2, and 5. Current APs may choose to disable support even > :for the mandatory ones, which makes ieee80211_iserp_sta() return false > :even though the AP supports ERP/11g. > : > :Fix below. ok? > : > > OK, buuuuut... (bikeshed incoming) > > I'm seeing websites that indicate our understanding of mandatory > data-rates is not fully correct. These two comments from Meraki are > particularlly interesting: > > (from > https://documentation.meraki.com/MR/Radio_Settings/Minimum_Bitrate_Control > ) > """The highest recommended setting is 24Mbps unless specifically advised > by a Cisco partner. Most environments and designs do not provide a great > enough signal-to-noise (SNR) ratio for the client to reliably decode all > frames sent at a higher rate.""" > > """Note: As per standards, 6 Mbps, 12 Mbps, and 24 Mbps are the > mandatory data rates. Cisco's San Francisco office uses 18 Mbps as the > Minimum bitrate.""" > > I'm starting to lean towards "we need to see at least one of the rates > to qualify a station for a particular mode", but would need to do a lot > more reading before being convinced that is correct. > > > :(Rate arrays in beacons and in our code represent data rates in units > :of 512Kb/s. Divide by 2 to get Mbit/s: 12 -> 6, 24 -> 12, 48 -> 24) > : > :(Clause 18 used to be called Clause 19 in earlier standard revisions.) > : > :M sys/net80211/ieee80211_node.c | 7+ 3- > : > :1 file changed, 7 insertions(+), 3 deletions(-) > : > :commit - d640f8310f2c7fb76506646c2f836023d40fa2ae > :commit + 8716e27d44c511046d01f245922e9015a72552fb > :blob - ccf47c6cf6750600db391afa5be8d4e792b8821c > :blob + f38a0917731c91e2e68fe3c8350ac847e19c1fb6 > :--- sys/net80211/ieee80211_node.c > :+++ sys/net80211/ieee80211_node.c > :@@ -2706,13 +2706,17 @@ ieee80211_node_addba_request_ac_vo_to(void *arg) > : int > : ieee80211_iserp_sta(const struct ieee80211_node *ni) > : { > :- static const u_int8_t rates[] = { 2, 4, 11, 22, 12, 24, 48 }; > :+ static const u_int8_t rates[] = { 12, 24, 48 }; > : const struct ieee80211_rateset *rs = &ni->ni_rates; > : int i, j; > : > : /* > :- * A STA supports ERP operation if it includes all the Clause 19 > :- * mandatory rates in its supported rate set. > :+ * A STA supports ERP operation if it includes all mandatory legacy > :+ * OFDM rates in its supported rate set. > :+ * We used to check for mandatory CCK rates here as well. However, > :+ * there are APs which deliberately disable CCK rates to prevent > :+ * 11b clients from connecting. We want to detect such APs as 11g, > :+ * because otherwise we will fail to connect to them. > : */ > : for (i = 0; i < nitems(rates); i++) { > : for (j = 0; j < rs->rs_nrates; j++) { > : > > -- > As Zeus said to Narcissus, "Watch yourself." > > -- Kindest regards, Tom Smyth.