Skip to content

wifi: rtw89: allow AP mode on 6 GHz

Josef Schlehofer linux-wireless 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2wifi: rtw89: advertise HE 6 GHz antenna pattern consistencydrivers/net/wireless/realtek/rtw89/core.c+3 -00 replies
2/2wifi: rtw89: allow AP mode on 6 GHzdrivers/net/wireless/realtek/rtw89/core.h drivers/net/wireless/realtek/rtw89/mac80211.c drivers/net/wireless/realtek/rtw89/regd.c+120 -102 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH rtw-next 0/2] wifi: rtw89: allow AP mode on 6 GHz

rtw89 currently refuses to start an AP on 6 GHz. This series adds support for it. I tested it with a Cudy BE6500 (RTL8922AU) as the 6 GHz AP on a Turris Omnia running OpenWrt.

Patch 1 advertises the HE 6 GHz antenna pattern consistency bits that hostapd requires by default. Patch 2 reads the AP's 6 GHz power type from the beacon's HE Operation element, since mac80211 does not set a power type for AP interfaces. It accepts LPI and VLP at AP start, and other power types make the start fail. If a later beacon advertises an unsupported power type, the driver falls back to the default power type.

There are two points I'd particularly like feedback on:

- If policy blocks VLP and a running AP changes its beacon to VLP, patch 2 falls back to the default power type, which also selects the VLP table. Should this case be handled differently?
- Patch 1 omits both antenna pattern consistency bits when Tx path diversity is enabled. Does Tx path diversity actually affect the Rx antenna pattern? If not, could the Rx consistency bit still be set?

Two related issues are outside this series:

- From reading the code, stopping the AP while a 6 GHz station is also active leaves the station on the default power type until the next recalculation. Two stations behave the same today. I plan to address it separately.
- I found no check that stops a P2P GO from moving to 6 GHz with a channel switch.

Testing: RTL8922AU with firmware 0.35.80.3, using OpenWrt main's rtw89 driver (backports from 7.2, plus commit a8cddb62c573 ("wifi:
rtw89: check return values in rtw89_ops_start_ap()") and my two fixes:
"regd: avoid freeing devm-allocated 6 GHz band" and "fix 6 GHz peer rate lookup"). Both patches also build on plain rtw-next, without my two fixes (arm64, W=1). A phone was used as the client. A second adapter in monitor mode saw the beacons 9 dB weaker with VLP than with LPI, as the ETSI limits in the firmware tables predict.

The failed-start unwind and blocked-VLP fallback paths were tested with a temporary patch that forced the corresponding failures. The reset when an AP leaves 6 GHz was compile-tested only: hostapd refused the 6-to-5 GHz channel switch, so I could not test that path at runtime.

Josef Schlehofer (2):
wifi: rtw89: advertise HE 6 GHz antenna pattern consistency
wifi: rtw89: allow AP mode on 6 GHz

 drivers/net/wireless/realtek/rtw89/core.c     |   3 +
 drivers/net/wireless/realtek/rtw89/core.h     |   1 +
 drivers/net/wireless/realtek/rtw89/mac80211.c | 119 ++++++++++++++++--
 drivers/net/wireless/realtek/rtw89/regd.c     |  10 +-
 4 files changed, 123 insertions(+), 10 deletions(-)
Signature · 1 line
2.54.0 (Apple Git-157)