You are not logged in.

#1 2025-01-25 20:46:39

Beemo
Member
Registered: 2024-12-20
Posts: 50

hostapd: Increase lowest link rates

I'm trying to increase the lowest link rates of my AP so the management, broadcast, beacon etc takes less air time. But I'm running into some really arcane behaviors that I don't know if it's driver or hostapd issue, or if there is a legit reason for it.

  • 2.4GHz Intel AX200: beacon_rate setting has no effect when ieee80211w and ieee80211ax are enabled. 1Mbps. But since I need to raise more than just the beacon rate, that's fine, I raised the rate by excluding the slower rates from supported_rates.

  • 6GHz Mediatek MT7921aun: Raising the lowest supported rates like above does not work. Still 6Mbps.

  • MT7921aun driver says it supports BEACON_HE_RATES and anything below. But anything above beacon_rate=ht:15 (so no vht or he) result in hostapd failing. And packet capture shows the "ht" is not working anyway and it's still 802.11g.

Last edited by Beemo (2025-01-27 01:59:26)

Offline

#2 2025-01-26 11:05:17

Beemo
Member
Registered: 2024-12-20
Posts: 50

Re: hostapd: Increase lowest link rates

For the 1st issue, the beacon rate is behaving really weirdly. Now I get the opposite behavior:
Setting beacon_rate works, but changing supported_rates instead will result in 1Mbps beacon rate but correct rate for other management frames. Turning on 80211ax & 80211w corrects the beacon rate. One time powering off & on the hardware corrected the beacon rate as well.
Minimal config:

interface=wlp2s0
bridge=bridge-0
driver=nl80211
ssid=test
country_code=AU
hw_mode=g
channel=13
auth_algs=1

wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
sae_password=REDACTED

#ieee80211ax=1
#ieee80211w=2
beacon_rate=120
#supported_rates=120 180 240 360 480 540
#basic_rates=120

Offline

#3 2025-01-26 11:32:47

Beemo
Member
Registered: 2024-12-20
Posts: 50

Re: hostapd: Increase lowest link rates

For the 2nd issue, none of the settings or power cycling changed the beacon rate. Half of the management frames have the correct data rate. For some reason beacon, unicast probe response, multicast are still 6Mbps. (Broadcast probe response is correct.)
Minimal config for 2nd and 3rd issue:

interface=wlp0s20f0u2
bridge=bridge-0
driver=nl80211
ssid=test2
country_code=AU
hw_mode=a
channel=5
op_class=133  # mandatory for 6GHz
auth_algs=1

wpa=2
wpa_key_mgmt=SAE
rsn_pairwise=CCMP
sae_password=redacted

ieee80211ax=1
ieee80211w=2 # mandatory for 6GHz
he_oper_centr_freq_seg0_idx=7 # mandatory for 5/6 GHz

beacon_rate=120
supported_rates=120 180 240 360 480 540
basic_rates=120
#he_basic_mcs_nss_set=65530
#beacon_rate=he:11

Last edited by Beemo (2025-01-26 12:48:38)

Offline

#4 2025-01-26 11:55:02

Beemo
Member
Registered: 2024-12-20
Posts: 50

Re: hostapd: Increase lowest link rates

For the 3rd issue, no matter what he:<HE MCS> I set, hostapd will "fail to set beacon parameter". It usually happens when a config error is not caught by hostapd and the driver errors out. Looking at the source code, <HE MCS> is a number between 0-11 as expected, and I've tried all of them.

$ journalctl -u hostapd@ax-6 -e wrote:

systemd[1]: Started Hostapd IEEE 802.11 AP, IEEE 802.1X/WPA/WPA2/EAP/RADIUS Authenticator.
hostapd[754]: SAE: Enabling SAE H2E on 6 GHz
hostapd[754]: wlp0s20f0u2: interface state UNINITIALIZED->COUNTRY_UPDATE
hostapd[754]: Failed to set beacon parameters
hostapd[754]: Interface initialization failed
hostapd[754]: wlp0s20f0u2: interface state COUNTRY_UPDATE->DISABLED
hostapd[754]: wlp0s20f0u2: AP-DISABLED
hostapd[754]: wlp0s20f0u2: Unable to setup interface.
hostapd[754]: wlp0s20f0u2: interface state DISABLED->DISABLED
hostapd[754]: wlp0s20f0u2: AP-DISABLED
hostapd[754]: wlp0s20f0u2: CTRL-EVENT-TERMINATING
hostapd[754]: hostapd_free_hapd_data: Interface wlp0s20f0u2 wasn't started
hostapd[754]: nl80211: deinit ifname=wlp0s20f0u2 disabled_11b_rates=0
systemd[1]: hostapd@ax-6.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: hostapd@ax-6.service: Failed with result 'exit-code'.

$ iw list
...
	Supported extended features:
		* [ RRM ]: RRM
		* [ SET_SCAN_DWELL ]: scan dwell setting
		* [ BEACON_RATE_LEGACY ]: legacy beacon rate setting
		* [ BEACON_RATE_HT ]: HT beacon rate setting
		* [ BEACON_RATE_VHT ]: VHT beacon rate setting
		* [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
		* [ ACK_SIGNAL_SUPPORT ]: ack signal level support
		* [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
		* [ CAN_REPLACE_PTK0 ]: can safely replace PTK 0 when rekeying
		* [ AIRTIME_FAIRNESS ]: airtime fairness scheduling
		* [ AQL ]: Airtime Queue Limits (AQL)
		* [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
		* [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
		* [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support
		* [ BEACON_RATE_HE ]: HE beacon rate support (AP/mesh)
		* [ POWERED_ADDR_CHANGE ]: can change MAC address while up

Last edited by Beemo (2025-01-26 12:05:57)

Offline

#5 2025-01-27 18:11:26

Beemo
Member
Registered: 2024-12-20
Posts: 50

Re: hostapd: Increase lowest link rates

Answer #2:
For 6GHz there is a new "minimum rate" tag in HE Operation -> 6 GHz Operation -> Minimum Rate.
It is set to 6 and hostapd doesn't seem to have a setting to change it.

Edit: Yup hard-coded. src/ap/802_11_he.c:

		/* Minimum Rate */
		*pos++ = 6; /* TODO: what should be set here? */

Edit2: Nope changing the value has no effect.

Last edited by Beemo (2025-01-28 00:43:39)

Offline

Board footer

Powered by FluxBB