Skip to content

Instantly share code, notes, and snippets.

@iffa
Created June 1, 2021 10:29
Show Gist options
  • Save iffa/290b1b83b17f51355c63a97df7c1cc60 to your computer and use it in GitHub Desktop.
Save iffa/290b1b83b17f51355c63a97df7c1cc60 to your computer and use it in GitHub Desktop.
hostapd config for Intel WiFi6 AX201 (5Ghz)
# Config for Intel WiFi6 AX201
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=1
ssid=AwesomeWifi
utf8_ssid=1
wpa_passphrase=1234567890
# use wpa2
wpa=2
# wpa-psk, wpa3 keys
wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256 SAE
#wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
# enable pre-authentication
rsn_preauth=1
# lowest supported 5Ghz channel in Finland
channel=149
country_code=FI
# advertise country code and regulatory info
ieee80211d=1
# DFS radar detection
ieee80211h=1
# spectrum management & enforce local power constraint
spectrum_mgmt_required=1
local_pwr_constraint=3
# use interface wlo1, br0 bridge to internet
interface=wlo1
bridge=br0
# default driver
driver=nl80211
# management frame protection (MFP) is enabled
ieee80211w=2
# a = 5ghz
hw_mode=a
# HT enabled
ieee80211n=1
ht_capab=[HT40+][LDPC][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40][MAX-AMSDU-7935]
# enable VHT
ieee80211ac=1
# VHT channel width (1 for best compatibility)
vht_oper_chwidth=1
# freq sequence index (magic value, channel+6 or something)
vht_oper_centr_freq_seg0_idx=155
# vht capabilities (consult iw info)
vht_capab=[MAX-MPDU-11454][VHT160][RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMEE][MU-BEAMFORMEE]
# enable WMM
wmm_enabled=1
# mostly default values for these
rts_threshold=-1
fragm_threshold=-1
beacon_int=100
dtim_period=2
max_num_sta=255
# isolate clients
ap_isolate=1
@dcazdavi
Copy link

dcazdavi commented Jul 13, 2023

@wineway You've probably figured it out yourself, but there are two options:

* use this [patch](https://github.com/torvalds/linux/commit/c545b26dd567a638d62ca29490e9e2e6d04a8b6b) to bring back the `lar_disable=Y` option to iwlwifi

* use this [patch](https://tildearrow.org/?p=post&month=7&year=2022&item=lar) to workaround the stupid limitation in hostapd

I also have the AX201 wifi adapter and tried several months ago using the NetworkManager Hotspot on Ubuntu Server 22.04 and maxed out at a little bit over 100 megabit wifi speeds.

I saw this last week and I tried both of these individually and together with hostapd on Ubuntu Server 23.04 and the fastest I can get is with around 75 megabit speed using any combination with the module modification or hostapd installations.

I recompiled/installed the module modification along with a new kernel with "options iwlwifi lar_disable=1" in /etc/modprobe.d with hostapd.

i also used the apt-get source version of hostapd to run the patch and build the debian package to install it (eg dpkg-buildpackage). apt-get source downloaded the source for hostapd and wpa-2 together as a single tree and the only issue was a required commit message before compilation.

also: the config: "vht_capab=[MAX-MPDU-11454][VHT160][RXLDPC][SHORT-GI-80][SHORT-GI-160][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMEE][MU-BEAMFORMEE]" doesn't work together per systemctl & journalctl, but each parameter works fine individually; however MAX-MPDU-11454 doesn't work at all. i got different error messages all pertaining to incompatible parameters depending on the multiple permutations of re-ordering or reshuffling i tried and confirming that they were correct with iw list didn't seem to matter.

i leave this here for anyone else who wants to try and can know what DOESN'T work. i will post an update if troubleshooting yield any results.

@p-web-git
Copy link

@wineway You've probably figured it out yourself, but there are two options:

  • use this patch to bring back the lar_disable=Y option to iwlwifi
  • use this patch to workaround the stupid limitation in hostapd

I spent a week working on a solution that I was happy with and I decided to post github

@vidalinux
Copy link

Hello, this patch works for 6ghz ?

@p-web-git
Copy link

p-web-git commented Sep 14, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment