[PATCH RFC 0/9] S1G support
Lachlan Hodges
lachlan.hodges at morsemicro.com
Thu Oct 8 20:31:57 PDT 2026
Hi Jouni,
This has been rebased on 9c6ac75f731c ("EAP: Validate the configured
fragment_size range") and v1 can be found at [1].
The first S1G driver was released in 7.3 and we are actively
maintaining it and extending the feature set in mac80211/cfg80211.
Enabling S1G support in hostapd is the logical next step and we have
a strong desire to work with you to get these changes merged.
This set has been extensively run through the hwsim test suite to
minimise regressions along the non-S1G path both with and without
S1G enabled. It can also be built and run incrementally as a
patchset.
v1->v2:
- Fix a few failures in the hwsim test suite when this patch is applied
and/or when S1G is disabled. Entire test suite now runs with and
without S1G.
- rebased on tip of hostap.git
- add test skip when S1G is not enabled
- Fix building the S1G AID response element (previously was malformed)
- Refactor the beacon building code, remove ifdefs and simplify it
(where possible)
Below is a summary of the changes:
--
1) freq_offset
==============
The biggest deviation from existing 802.11 standards when it comes to
802.11ah or S1G is the fact that the spectrum is < 1 GHz. Within cfg80211,
this is denoted via a frequency component in MHz, and a frequency offset
component in KHz. This is potentially most contentious part of this entire
series as it requires modifications to core functions that work on various
channel calculations.
Take hw_mode_get_channel() as an example, to compare channels we now
must apply the freq_offset component:
MHZ_TO_KHZ(ch->freq) + ch->freq_offset == MHZ_TO_KHZ(freq) + freq_offset)
For non-S1G the frequency offset component is always 0, but this method
has been chosen as it is similar to how the similar channel calculation
functions were refactored to internally use these components, while
still limiting the external facing APIs from changing too much.
Another example is converting internal channel <-> frequency calculators
to use KHz:
int ieee80211_chan_to_freq(const char *country, u8 op_class, u8 chan)
{
return KHZ_TO_MHZ(ieee80211_chan_to_freq_khz(country, op_class, chan);
}
Where any specific S1G locations can then call ieee80211_chan_to_freq_khz()
directly. Again, we are emulating how this is done within cfg80211.
Additionally, a freq_offset component is then introduced to the parameter
list of key functions to do with setting and/or retrieving channels.
2) Regdom Support
=================
Currently, the upstream regdom supports only a limited number of
countries, this being US and AU. However, this patchset will _only_
be supporting the US. The reason is that, in order to support the
2024 AU channelisation schemes, additional kernel work is required.
This will begin once the driver is accepted, in part, to reduce the
initial scope of these patchsets (both within the kernel/driver and
hostapd).
As a result, only specific US 2024 op_classes are introduced, and an attempt
to configure with an unsupported op_class will result in an error. Obviously,
as support is extended - so will support in hostapd since country support is
far more granular for S1G.
3) S1G Implementation
=====================
Since S1G is based on the VHT phy, much of the implementation follows
that of VHT, besides some S1G specific parts of course.
4) hw_mode=ah
=============
With the new band introduced comes a new hwmode to represent 900 MHz
PHY. For existing drivers that use hw_mode=any there is no affect as
none of those drivers expose S1G channels. However, hwsim does. For now,
we exclude all S1G channels when hw_mode=any. This enables
mac80211_hwsim to function properly and emulates real world behaviour
since there (as of now, maybe in the future....) no multi-band radios
that include both a S1G and non-S1G radio.
5) hwsim tests
==============
A basic test suite is also included that tests various channel permutations
as well as the NO_PRIMARY flag to ensure edgeband primaries with the
NO_PRIMARY flag cannot be used, which is typical of real hardware. See [2]
for more information on this.
In order for the S1G hwsim tests to function, 2 patches [3] must be
applied onto wireless-next.
The actual hwsim output in terms of radiotap headers and whatnot is
not really accurate at all for S1G, however this is on our TODO list
among other things like proper rate reporting and so on. However, as
mentioned previously, the goal is to keep the initial scope of this work
as small as possible and build it up from there :).
6) Sample Config
================
A sample hostapd configuration for 80211ah is as follows:
```
interface=wlan0
country_code=US
driver=nl80211
ssid=wifi_halow
channel=43
ieee80211ah=1
op_class=71
beacon_int=100
dtim_period=10
s1g_oper_centr_freq_idx=44
s1g_primary_2mhz=1
hw_mode=ah
wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
sae_password=12345678
ieee80211w=2
```
The supplicant side is no different from regular Wi-Fi:
```
update_config=1
country=US
pmf=2
network={
ssid="wifi_halow"
sae_password="12345678"
key_mgmt=SAE
}
```
lachlan
Lachlan Hodges (9):
common: introduce ieee80211_chan_to_freq_khz()
AP/STA: introduce support for freq_offset
nl80211: introduce freq_offset support
tests: expose scan_freq_offset
config: enable configuration of S1G
AP: add S1G support
STA: add S1G support
nl80211: add S1G support
tests: add S1G channel tests
hostapd/Makefile | 5 +
hostapd/config_file.c | 12 +
hostapd/defconfig | 3 +
hostapd/hostapd.conf | 37 ++-
src/ap/Makefile | 2 +
src/ap/ap_config.c | 54 ++++
src/ap/ap_config.h | 23 ++
src/ap/ap_drv_ops.c | 14 +-
src/ap/ap_drv_ops.h | 7 +-
src/ap/beacon.c | 93 ++++++-
src/ap/ctrl_iface_ap.c | 8 +-
src/ap/dfs.c | 4 +-
src/ap/drv_callbacks.c | 6 +-
src/ap/hostapd.c | 34 ++-
src/ap/hostapd.h | 1 +
src/ap/hw_features.c | 77 ++++--
src/ap/hw_features.h | 3 +-
src/ap/ieee802_11.c | 55 +++-
src/ap/ieee802_11.h | 6 +
src/ap/ieee802_11_s1g.c | 202 +++++++++++++++
src/ap/interference.c | 3 +-
src/ap/sta_info.c | 3 +-
src/ap/sta_info.h | 2 +
src/common/defs.h | 10 +
src/common/hw_features_common.c | 67 ++++-
src/common/hw_features_common.h | 18 +-
src/common/ieee802_11_common.c | 227 +++++++++++-----
src/common/ieee802_11_common.h | 7 +-
src/common/ieee802_11_defs.h | 91 +++++--
src/common/privsep_commands.h | 1 +
src/drivers/driver.h | 69 ++++-
src/drivers/driver_nl80211.c | 169 +++++++++---
src/drivers/driver_nl80211.h | 3 +
src/drivers/driver_nl80211_capa.c | 69 ++++-
src/drivers/driver_nl80211_event.c | 52 ++--
src/drivers/driver_nl80211_scan.c | 40 ++-
src/drivers/driver_privsep.c | 7 +-
tests/hwsim/example-hostapd.config | 1 +
tests/hwsim/example-wpa_supplicant.config | 1 +
tests/hwsim/test_s1g.py | 299 ++++++++++++++++++++++
tests/hwsim/wpasupplicant.py | 3 +-
wlantest/bip.c | 12 +-
wlantest/bss.c | 2 +-
wpa_supplicant/Makefile | 6 +
wpa_supplicant/ap.c | 4 +-
wpa_supplicant/bss.c | 5 +-
wpa_supplicant/bss.h | 2 +
wpa_supplicant/config.c | 1 +
wpa_supplicant/config_file.c | 1 +
wpa_supplicant/config_ssid.h | 12 +
wpa_supplicant/ctrl_iface.c | 1 +
wpa_supplicant/defconfig | 3 +
wpa_supplicant/driver_i.h | 9 +-
wpa_supplicant/events.c | 22 +-
wpa_supplicant/ibss_rsn.c | 2 +-
wpa_supplicant/nan_supplicant.c | 2 +-
wpa_supplicant/p2p_supplicant.c | 4 +-
wpa_supplicant/pasn_supplicant.c | 4 +-
wpa_supplicant/scan.c | 10 +-
wpa_supplicant/sme.c | 20 +-
wpa_supplicant/wpa_priv.c | 1 +
wpa_supplicant/wpa_supplicant.c | 23 +-
wpa_supplicant/wpa_supplicant_i.h | 2 +
63 files changed, 1656 insertions(+), 280 deletions(-)
create mode 100644 src/ap/ieee802_11_s1g.c
create mode 100644 tests/hwsim/test_s1g.py
--
2.43.0
More information about the Hostap
mailing list