USB-WiFi icon indicating copy to clipboard operation
USB-WiFi copied to clipboard

Help with MT7922 card

Open fs30000 opened this issue 3 years ago • 37 comments

Hello all,

I got a MT7922 PCIe card, but i'm having trouble make it work. hostapd fails with:

*wlp4s0: interface state UNINITIALIZED->COUNTRY_UPDATE
Frequency 5180 (primary) not allowed for AP mode, flags: 0x853 NO-IR
Primary frequency not allowed
wlp4s0: IEEE 802.11 Configured channel (36) or frequency (5180) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a
wlp4s0: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlp4s0: interface state COUNTRY_UPDATE->DISABLED
wlp4s0: AP-DISABLED
wlp4s0: interface state DISABLED->DISABLED
wlp4s0: AP-DISABLED
wlp4s0: CTRL-EVENT-TERMINATING
hostapd_free_hapd_data: Interface wlp4s0 wasn't started
nl80211: deinit ifname=wlp4s0 disabled_11b_rates=0*
.
.
.
I uncommented the respective lines in hostapd.conf for MT7921, which should work for this MT7922 (but does not):


*interface=wlp4s0
driver=nl80211
bridge=br0

ssid=1
wpa_passphrase=12345678
hw_mode=a
channel=36

vht_oper_chwidth=1

vht_oper_centr_freq_seg0_idx=42
country_code=PT

ieee80211d=1

ieee80211h=1

macaddr_acl=0


auth_algs=1
ignore_broadcast_ssid=0
wpa=2
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK


ieee80211n=1
wmm_enabled=1

ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]


ieee80211ac=1

vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMEE][BF-ANTENNA-4][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]*



#iw list:
.................................................
Wiphy phy0
        wiphy index: 0
        max # scan SSIDs: 4
        max scan IEs length: 482 bytes
        max # sched scan SSIDs: 10
        max # match sets: 16
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Device supports AP-side u-APSD.
        Device supports T-DLS.
        Supported Ciphers:
                * WEP40 (00-0f-ac:1)
                * WEP104 (00-0f-ac:5)
                * TKIP (00-0f-ac:2)
                * CCMP-128 (00-0f-ac:4)
                * CCMP-256 (00-0f-ac:10)
                * GCMP-128 (00-0f-ac:8)
                * GCMP-256 (00-0f-ac:9)
                * CMAC (00-0f-ac:6)
                * CMAC-256 (00-0f-ac:13)
                * GMAC-128 (00-0f-ac:11)
                * GMAC-256 (00-0f-ac:12)
        Available Antennas: TX 0x3 RX 0x3
        Configured Antennas: TX 0x3 RX 0x3
        Supported interface modes:
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
        Band 1:
                Capabilities: 0x9ff
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 7935 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: No restriction (0x00)
                HT TX/RX MCS rate indexes supported: 0-15
                HE Iftypes: Station
                        HE MAC Capabilities (0x08011a000040):
                                +HTC HE Supported
                                Trigger Frame MAC Padding Duration: 2
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                A-MSDU in A-MPDU
                        HE PHY Capabilities: (0x2a70ce120dc0b3064e3f00):
                                HE40/2.4GHz
                                HE160/5GHz
                                242 tone RUs/2.4GHz
                                Device Class: 1
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                SU Beamformee
                                Beamformee STS <= 80Mhz: 3
                                Ng = 16 SU Feedback
                                Ng = 16 MU Feedback
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                Triggered CQI Feedback
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                Power Boost Factor ar
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                20MHz in 40MHz HE PPDU 2.4GHz
                                20MHz in 160/80+80MHz HE PPDU
                                80MHz in 160/80+80MHz HE PPDU
                                DCM Max BW: 1
                                Longer Than 16HE SIG-B OFDM Symbols
                                Non-Triggered CQI Feedback
                                TX 1024-QAM
                                RX 1024-QAM
                                RX Full BW SU Using HE MU PPDU with Compression SIGB
                                RX Full BW SU Using HE MU PPDU with Non-Compression SIGB
                        HE RX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                HE Iftypes: AP
                        HE MAC Capabilities (0x00011a081044):
                                +HTC HE Supported
                                BSR
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                BQR
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x0220ce120000a000000c00):
                                HE40/2.4GHz
                                LDPC Coding in Payload
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                TX 1024-QAM
                                RX 1024-QAM
                        HE RX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                Bitrates (non-HT):
                        * 1.0 Mbps (short preamble supported)
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm) (no IR)
                        * 2472 MHz [13] (20.0 dBm) (no IR)
                        * 2484 MHz [14] (20.0 dBm) (no IR)
        Band 2:
                Capabilities: 0x9ff
                        RX LDPC
                        HT20/HT40
                        SM Power Save disabled
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        TX STBC
                        RX STBC 1-stream
                        Max AMSDU length: 7935 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: No restriction (0x00)
                HT TX/RX MCS rate indexes supported: 0-15
                VHT Capabilities (0x339071f6):
                        Max MPDU length: 11454
                        Supported Channel Width: 160 MHz
                        RX LDPC
                        short GI (80 MHz)
                        short GI (160/80+80 MHz)
                        TX STBC
                        SU Beamformee
                        MU Beamformee
                        RX antenna pattern consistency
                        TX antenna pattern consistency
                VHT RX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT RX highest supported: 0 Mbps
                VHT TX MCS set:
                        1 streams: MCS 0-9
                        2 streams: MCS 0-9
                        3 streams: not supported
                        4 streams: not supported
                        5 streams: not supported
                        6 streams: not supported
                        7 streams: not supported
                        8 streams: not supported
                VHT TX highest supported: 0 Mbps
                HE Iftypes: Station
                        HE MAC Capabilities (0x08011a000040):
                                +HTC HE Supported
                                Trigger Frame MAC Padding Duration: 2
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                A-MSDU in A-MPDU
                        HE PHY Capabilities: (0x4c70ce120dc0b3064e3f00):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                242 tone RUs/5GHz
                                Device Class: 1
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                SU Beamformee
                                Beamformee STS <= 80Mhz: 3
                                Ng = 16 SU Feedback
                                Ng = 16 MU Feedback
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                Triggered CQI Feedback
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                Power Boost Factor ar
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                20MHz in 40MHz HE PPDU 2.4GHz
                                20MHz in 160/80+80MHz HE PPDU
                                80MHz in 160/80+80MHz HE PPDU
                                DCM Max BW: 1
                                Longer Than 16HE SIG-B OFDM Symbols
                                Non-Triggered CQI Feedback
                                TX 1024-QAM
                                RX 1024-QAM
                                RX Full BW SU Using HE MU PPDU with Compression SIGB
                                RX Full BW SU Using HE MU PPDU with Non-Compression SIGB
                        HE RX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                HE Iftypes: AP
                        HE MAC Capabilities (0x00011a081044):
                                +HTC HE Supported
                                BSR
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                BQR
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x0420ce120000a000000c00):
                                HE40/HE80/5GHz
                                LDPC Coding in Payload
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                TX 1024-QAM
                                RX 1024-QAM
                        HE RX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 5180 MHz [36] (20.0 dBm) (no IR)
                        * 5200 MHz [40] (20.0 dBm) (no IR)
                        * 5220 MHz [44] (20.0 dBm) (no IR)
                        * 5240 MHz [48] (20.0 dBm) (no IR)
                        * 5260 MHz [52] (20.0 dBm) (no IR, radar detection)
                        * 5280 MHz [56] (20.0 dBm) (no IR, radar detection)
                        * 5300 MHz [60] (20.0 dBm) (no IR, radar detection)
                        * 5320 MHz [64] (20.0 dBm) (no IR, radar detection)
                        * 5500 MHz [100] (20.0 dBm) (no IR, radar detection)
                        * 5520 MHz [104] (20.0 dBm) (no IR, radar detection)
                        * 5540 MHz [108] (20.0 dBm) (no IR, radar detection)
                        * 5560 MHz [112] (20.0 dBm) (no IR, radar detection)
                        * 5580 MHz [116] (20.0 dBm) (no IR, radar detection)
                        * 5600 MHz [120] (20.0 dBm) (no IR, radar detection)
                        * 5620 MHz [124] (20.0 dBm) (no IR, radar detection)
                        * 5640 MHz [128] (20.0 dBm) (no IR, radar detection)
                        * 5660 MHz [132] (20.0 dBm) (no IR, radar detection)
                        * 5680 MHz [136] (20.0 dBm) (no IR, radar detection)
                        * 5700 MHz [140] (20.0 dBm) (no IR, radar detection)
                        * 5720 MHz [144] (20.0 dBm) (no IR, radar detection)
                        * 5745 MHz [149] (20.0 dBm) (no IR)
                        * 5765 MHz [153] (20.0 dBm) (no IR)
                        * 5785 MHz [157] (20.0 dBm) (no IR)
                        * 5805 MHz [161] (20.0 dBm) (no IR)
                        * 5825 MHz [165] (20.0 dBm) (no IR)
                        * 5845 MHz [169] (disabled)
                        * 5865 MHz [173] (disabled)
        Band 4:
                HE Iftypes: Station
                        HE MAC Capabilities (0x08011a000040):
                                +HTC HE Supported
                                Trigger Frame MAC Padding Duration: 2
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                A-MSDU in A-MPDU
                        HE PHY Capabilities: (0x4c70ce120dc0b3064e3f00):
                                HE40/HE80/5GHz
                                HE160/5GHz
                                242 tone RUs/5GHz
                                Device Class: 1
                                LDPC Coding in Payload
                                HE SU PPDU with 1x HE-LTF and 0.8us GI
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                SU Beamformee
                                Beamformee STS <= 80Mhz: 3
                                Ng = 16 SU Feedback
                                Ng = 16 MU Feedback
                                Codebook Size SU Feedback
                                Codebook Size MU Feedback
                                Triggered CQI Feedback
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                Power Boost Factor ar
                                HE SU PPDU & HE PPDU 4x HE-LTF 0.8us GI
                                20MHz in 40MHz HE PPDU 2.4GHz
                                20MHz in 160/80+80MHz HE PPDU
                                80MHz in 160/80+80MHz HE PPDU
                                DCM Max BW: 1
                                Longer Than 16HE SIG-B OFDM Symbols
                                Non-Triggered CQI Feedback
                                TX 1024-QAM
                                RX 1024-QAM
                                RX Full BW SU Using HE MU PPDU with Compression SIGB
                                RX Full BW SU Using HE MU PPDU with Non-Compression SIGB
                        HE RX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE RX MCS and NSS set 160 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set 160 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                HE Iftypes: AP
                        HE MAC Capabilities (0x00011a081044):
                                +HTC HE Supported
                                BSR
                                OM Control
                                Maximum A-MPDU Length Exponent: 3
                                BQR
                                A-MSDU in A-MPDU
                                OM Control UL MU Data Disable RX
                        HE PHY Capabilities: (0x0420ce120000a000000c00):
                                HE40/HE80/5GHz
                                LDPC Coding in Payload
                                NDP with 4x HE-LTF and 3.2us GI
                                STBC Tx <= 80MHz
                                STBC Rx <= 80MHz
                                Full Bandwidth UL MU-MIMO
                                Partial Bandwidth UL MU-MIMO
                                DCM Max Constellation: 2
                                DCM Max Constellation Rx: 2
                                Partial Bandwidth Extended Range
                                PPE Threshold Present
                                TX 1024-QAM
                                RX 1024-QAM
                        HE RX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        HE TX MCS and NSS set <= 80 MHz
                                         1 streams: MCS 0-11
                                         2 streams: MCS 0-11
                                         3 streams: not supported
                                         4 streams: not supported
                                         5 streams: not supported
                                         6 streams: not supported
                                         7 streams: not supported
                                         8 streams: not supported
                        PPE Threshold 0x39 0x1c 0xc7 0x71 0x1c 0x07
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
                Frequencies:
                        * 5955 MHz [1] (disabled)
                        * 5975 MHz [5] (disabled)
                        * 5995 MHz [9] (disabled)
                        * 6015 MHz [13] (disabled)
                        * 6035 MHz [17] (disabled)
                        * 6055 MHz [21] (disabled)
                        * 6075 MHz [25] (disabled)
                        * 6095 MHz [29] (disabled)
                        * 6115 MHz [33] (disabled)
                        * 6135 MHz [37] (disabled)
                        * 6155 MHz [41] (disabled)
                        * 6175 MHz [45] (disabled)
                        * 6195 MHz [49] (disabled)
                        * 6215 MHz [53] (disabled)
                        * 6235 MHz [57] (disabled)
                        * 6255 MHz [61] (disabled)
                        * 6275 MHz [65] (disabled)
                        * 6295 MHz [69] (disabled)
                        * 6315 MHz [73] (disabled)
                        * 6335 MHz [77] (disabled)
                        * 6355 MHz [81] (disabled)
                        * 6375 MHz [85] (disabled)
                        * 6395 MHz [89] (disabled)
                        * 6415 MHz [93] (disabled)
                        * 6435 MHz [97] (disabled)
                        * 6455 MHz [101] (disabled)
                        * 6475 MHz [105] (disabled)
                        * 6495 MHz [109] (disabled)
                        * 6515 MHz [113] (disabled)
                        * 6535 MHz [117] (disabled)
                        * 6555 MHz [121] (disabled)
                        * 6575 MHz [125] (disabled)
                        * 6595 MHz [129] (disabled)
                        * 6615 MHz [133] (disabled)
                        * 6635 MHz [137] (disabled)
                        * 6655 MHz [141] (disabled)
                        * 6675 MHz [145] (disabled)
                        * 6695 MHz [149] (disabled)
                        * 6715 MHz [153] (disabled)
                        * 6735 MHz [157] (disabled)
                        * 6755 MHz [161] (disabled)
                        * 6775 MHz [165] (disabled)
                        * 6795 MHz [169] (disabled)
                        * 6815 MHz [173] (disabled)
                        * 6835 MHz [177] (disabled)
                        * 6855 MHz [181] (disabled)
                        * 6875 MHz [185] (disabled)
                        * 6895 MHz [189] (disabled)
                        * 6915 MHz [193] (disabled)
                        * 6935 MHz [197] (disabled)
                        * 6955 MHz [201] (disabled)
                        * 6975 MHz [205] (disabled)
                        * 6995 MHz [209] (disabled)
                        * 7015 MHz [213] (disabled)
                        * 7035 MHz [217] (disabled)
                        * 7055 MHz [221] (disabled)
                        * 7075 MHz [225] (disabled)
                        * 7095 MHz [229] (disabled)
                        * 7115 MHz [233] (disabled)
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * start_ap
                 * new_station
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * set_tx_bitrate_mask
                 * frame
                 * frame_wait_cancel
                 * set_wiphy_netns
                 * set_channel
                 * tdls_mgmt
                 * tdls_oper
                 * start_sched_scan
                 * probe_client
                 * set_noack_map
                 * register_beacons
                 * start_p2p_device
                 * set_mcast_rate
                 * connect
                 * disconnect
                 * channel_switch
                 * set_qos_map
                 * set_multicast_to_unicast
                 * Unknown command (140)
        WoWLAN support:
                 * wake up on disconnect
                 * wake up on magic packet
                 * wake up on pattern match, up to 1 patterns of 1-128 bytes,
                   maximum packet offset 0 bytes
                 * can do GTK rekeying
                 * wake up on network detection, up to 10 match sets
        software interface modes (can always be added):
                 * AP/VLAN
                 * monitor
        valid interface combinations:
                 * #{ managed } <= 4, #{ AP } <= 1,
                   total <= 4, #channels <= 1, STA/AP BI must match
        HT Capability overrides:
                 * MCS: ff ff ff ff ff ff ff ff ff ff
                 * maximum A-MSDU length
                 * supported channel width
                 * short GI for 40 MHz
                 * max A-MPDU length exponent
                 * min MPDU start spacing
        Device supports TX status socket option.
        Device supports HT-IBSS.
        Device supports SAE with AUTHENTICATE command
        Device supports scan flush.
        Device supports per-vif TX power setting
        Driver supports full state transitions for AP/GO clients
        Driver supports a userspace MPM
        Device supports active monitor (which will ACK incoming frames)
        Device supports configuring vdev MAC-addr on create.
        Device supports randomizing MAC-addr in scans.
        Device supports randomizing MAC-addr in sched scans.
        max # scan plans: 1
        max scan plan interval: 65535
        max scan plan iterations: 0
        Supported TX frame types:
                 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
                 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
        Supported RX frame types:
                 * IBSS: 0x40 0xb0 0xc0 0xd0
                 * managed: 0x40 0xb0 0xd0
                 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * mesh point: 0xb0 0xc0 0xd0
                 * P2P-client: 0x40 0xd0
                 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
                 * P2P-device: 0x40 0xd0
        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
                * [ TXQS ]: FQ-CoDel-enabled intermediate TXQs
                * [ 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

modinfo shows only 1 parameter possible to change: disable_aspm. Any ideas guys?

P.S. - Oh my apologies to this formating mess. How can i past the config file without github formating it? I tried to add the output as code, but it takes out the spaces, making it more unreadable.

fs30000 avatar Feb 25 '23 15:02 fs30000

Do you need wpa3 for wifi6?

bjlockie avatar Feb 25 '23 18:02 bjlockie

Oh my apologies to this formating mess. How can i past the config file without github formating it?

I did this to help. See how I put the little whachamacallums above and below the test?

I got a MT7922 PCIe card, but i'm having trouble make it work. hostapd fails with...

Okay. This is like being taken out of elementary school so you can start work on a PhD.

I just saw where the mt7922e cards were shipping recently. What I think I know about the mt7922:

  • it is the mt7921 except that it supports 160 MHz channel width
  • we may see a mt7922u at some point but let's not forget that USB is always last
  • the mt7922 is supported by the mt7921 driver
  • the mt7922 has its own firmware (not the same as the mt7921) (have you upgraded it?)

Does the adapter work in managed mode? If so, which bands have you tested?

What does iw dev show?

You must have the driver going because I see:

Supported interface modes:
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor

So, that seems to indicate AP mode is supported.

modinfo shows only 1 parameter possible to change: disable_aspm. Any ideas guys?

Not a clue at this point. Cross that bridge when we need to.

Let me suggest this: How about you start with a WiFi 4 2.4 GHz band AP setup and then when that is working well, move on to the next step.

ssid=my2g
wpa_passphrase=myPW
hw_mode=g
channel=6
country_code=PT

bridge=br0
interface=wlp4s0
driver=nl80211

auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
wpa_pairwise=CCMP
#rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK

# IEEE 802.11n
ieee80211n=1
wmm_enabled=1
#
# generic 20 MHz setting
ht_capab=[SHORT-GI-20]

You did not say what hardware or distro you are using. Enlighten us? What guide are you using? Have you looked up to see which bands and channels are supported in your country? regdb?

morrownr avatar Feb 26 '23 00:02 morrownr

Oh my apologies to this formating mess. How can i past the config file without github formating it?

I did this to help. See how I put the little whachamacallums above and below the test?

Yes, i see, it's just if i click the Add Code icon, i do use it, but then it messes the output. Going to try again later then.

I got a MT7922 PCIe card, but i'm having trouble make it work. hostapd fails with...

Okay. This is like being taken out of elementary school so you can start work on a PhD.

lol

I just saw where the mt7922e cards were shipping recently. What I think I know about the mt7922:

* it is the mt7921 except that it supports 160 MHz channel width

Ok

* we may see a mt7922u at some point but let's not forget that USB is always last

Of course.

* the mt7922 is supported by the mt7921 driver

Yes, it is. lspci confirms. the interface does show up in "ip a".

* the mt7922 has its own firmware (not the same as the mt7921) (have you upgraded it?)

Yes, i went to https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/mediatek and downloaded the respective firmwares for 7922 and put in /lib/firmware/mediatek/

Does the adapter work in managed mode? If so, which bands have you tested?

What does iw dev show?

phy#0 Interface wlp4s0 ifindex 5 wdev 0x1 addr 4c:d5:77:b5:20:5d type managed txpower 3.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0

You must have the driver going because I see:

Supported interface modes:
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor

So, that seems to indicate AP mode is supported.

modinfo shows only 1 parameter possible to change: disable_aspm. Any ideas guys?

Not a clue at this point. Cross that bridge when we need to.

Let me suggest this: How about you start with a WiFi 4 2.4 GHz band AP setup and then when that is working well, move on to the next step.

ssid=my2g
wpa_passphrase=myPW
hw_mode=g
channel=6
country_code=PT

bridge=br0
interface=wlp4s0
driver=nl80211

auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
wpa_pairwise=CCMP
#rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK

# IEEE 802.11n
ieee80211n=1
wmm_enabled=1
#
# generic 20 MHz setting
ht_capab=[SHORT-GI-20]

Ok, AP with this config works. Slow, but works.

You did not say what hardware or distro you are using. Enlighten us? What guide are you using? Have you looked up to see which bands and channels are supported in your country? regdb?

Rocky linux 9.1. Just a mini-pc with this chip on a PCIe card. Guide? This very own guide. Kernel have the right driver, so i just need the right hostapd.conf file. Oh, and better antennas :) Oh, i do have the comfast 953-ax, but that's in case i don't manage to make this card work.

EDIT: Using the full line works: ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]

iperf3 reports 2MB/s with reverse 10MB/s

EDIT2: Using these new settings for testing 5GHz, does not work:

hw_mode=a channel=36 vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=42 vht_capab=[SHORT-GI-80]

Fails with:

wlp4s0: IEEE 802.11 Configured channel (36) or frequency (5180) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a wlp4s0: IEEE 802.11 Hardware does not support configured channel These are the most basic 5GHz settings, right?

fs30000 avatar Feb 27 '23 18:02 fs30000

Do you need wpa3 for wifi6?

No. WPA3 is mandatory for WiFi 6e but not WiFi 6.

morrownr avatar Feb 27 '23 20:02 morrownr

Rocky linux 9.1. Just a mini-pc with this chip on a PCIe card. Guide?

I have the Bridged Wireless Access Point guide in the Main Menu but I don't know if that is what you want to do.

I am not familiar with Rocky. AP mode, like monitor mode, will have problems if certain procs are left running... Network Manager for example.

Have you thought about trying OpenWRT? If has the mt7921e driver backported to kernel 5.10. You might have to add the firmware but I have a guide up for that.

morrownr avatar Feb 27 '23 20:02 morrownr

Do you need wpa3 for wifi6?

No. WPA3 is mandatory for WiFi 6e but not WiFi 6.

Ok, so does the mt7921 driver/module support wpa3? Does this mt7922 support it? hostapd? I'm assuming yes, otherwise they wouldn't market it a 6e capable device, right?

fs30000 avatar Feb 27 '23 21:02 fs30000

Rocky linux 9.1. Just a mini-pc with this chip on a PCIe card. Guide?

I have the Bridged Wireless Access Point guide in the Main Menu but I don't know if that is what you want to do.

I am not familiar with Rocky. AP mode, like monitor mode, will have problems if certain procs are left running... Network Manager for example.

Have you thought about trying OpenWRT? If has the mt7921e driver backported to kernel 5.10. You might have to add the firmware but I have a guide up for that.

I managed to have a TPLink usb wifi dongle working on another pc with your config. However on this one i'm having trouble have it working. Same hostapd.conf. Same usb dongle. I suspect the kernel module. I'm on 6.2.1. Realtek drivers already on it.

fs30000 avatar Feb 27 '23 21:02 fs30000

Ok, so does the mt7921 driver/module support wpa3?

Yes. In fact, all in-kernel drivers that I have tested support WPA3. That includes adapters all the way back to ra3070, ra2870, and more. I actually have a lot of adapters.

Does this mt7922 support it?

Yes

hostapd?

It depends on the version you are using.

I'm assuming yes, otherwise they wouldn't market it a 6e capable device, right?

Well, marketing, logic and truth have a loose relationship.

I managed to have a TPLink usb wifi dongle working on another pc with your config. However on this one i'm having trouble have it working. Same hostapd.conf. Same usb dongle. I suspect the kernel module. I'm on 6.2.1. Realtek drivers already on it.

The guilty parties might be wpa_supplicant or Network Manager or something else in the distro. You can run the kernel up to the latest but that does not upgrade others things are needed to be modern for WPA3 and other modern things to work. My basic advice is if you have a distro that was released after mid-2022, you should be good. There are exceptions. What are you using?

morrownr avatar Feb 27 '23 21:02 morrownr

Ok, so does the mt7921 driver/module support wpa3?

Yes. In fact, all in-kernel drivers that I have tested support WPA3. That includes adapters all the way back to ra3070, ra2870, and more. I actually have a lot of adapters.

So, for wap3, i just need to have wpa=2 and wpa_key_mgmt=SAE, right?

Does this mt7922 support it?

Yes

hostapd?

It depends on the version you are using.

2.10

I'm assuming yes, otherwise they wouldn't market it a 6e capable device, right?

Well, marketing, logic and truth have a loose relationship.

I managed to have a TPLink usb wifi dongle working on another pc with your config. However on this one i'm having trouble have it working. Same hostapd.conf. Same usb dongle. I suspect the kernel module. I'm on 6.2.1. Realtek drivers already on it.

The guilty parties might be wpa_supplicant or Network Manager or something else in the distro. You can run the kernel up to the latest but that does not upgrade others things are needed to be modern for WPA3 and other modern things to work. My basic advice is if you have a distro that was released after mid-2022, you should be good. There are exceptions. What are you using?

Downgraded the kernel to 6.1.9, which doesn't have the realtek drivers and compiled your drivers, 88x2bu-20210702, the tplink dongle is working. Not at full blast, but it's ok. However, i would like to have this mt7922 card working. Maybe the mediatek drivers in the kernel 6.2.1 suck just like the realtek ones?

fs30000 avatar Feb 27 '23 22:02 fs30000

So now the card works. No idea why it started working. Anyway here is my hostapd.conf file.

interface=wlp4s0
bridge=br0
driver=nl80211

ssid=teste
wpa_passphrase=12345678
country_code=PT


auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK
#wpa3
#wpa_key_mgmt=SAE


# Advertises the country_code and the set of allowed channels and transmit power levels
ieee80211d=1
# Enables support for 5GHz DFS channels (requires ieee80211d=1)
ieee80211h=1


#############################
############################# SPEEDS
#g --> 2GHz   a --> 5Ghz
hw_mode=a
channel=36

########################### 2GHz

# IEEE 802.11n
ieee80211n=1
wmm_enabled=1

# mediatek
ht_capab=[LDPC][HT40+][HT40-][GF][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935]


########################## 5GHz
ieee80211ac=1

# 0 = 20 or 40 MHz operating Channel width
# 1 = 80 MHz channel width
# 2 = 160 MHz channel width
# 3 = 80+80 MHz channel width
vht_oper_chwidth=1
# VHT center channel (chan + 6)
vht_oper_centr_freq_seg0_idx=42


#mediatek
vht_capab=[MAX-MPDU-11454][RXLDPC][SHORT-GI-80][TX-STBC-2BY1][RX-STBC-1][SU-BEAMFORMEE][BF-ANTENNA-4][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][VHT160][SHORT-GI-160]

So i added [VHT160][SHORT-GI-160] there. No 160Mhz connection. Both phone and laptop connect using 802.11ac, no ax. going to search here for a hostapd.conf with 160Mhz enabled. Both phone and laptop are wifi6 capable.

Tried wpa_key_mgmt=SAE for wpa3, no connection for phone and laptop (intel ax201)

Tried vht_oper_chwidth=2 and 3, hostapd doesn't start.

fs30000 avatar Feb 28 '23 00:02 fs30000

So, for wap3, i just need to have wpa=2 and wpa_key_mgmt=SAE, right?

No, there are 4 things I check:

auth_algs=3
wpa=2
wpa_key_mgmt=SAE
ieee80211w=2

ieee80211w is mandatory for WPA3 so it has to be on.

Here is a longer explanation:

# Security
macaddr_acl=0
# auth_algs=3 is required for WPA3-SAE and WPA3-SAE Transition mode
auth_algs=3
ignore_broadcast_ssid=0
# wpa=2 is required for WPA2 and WPA3 (read the docs)
wpa=2
wpa_pairwise=CCMP
#wpa_pairwise=CCMP CCMP-256
rsn_pairwise=CCMP
#rsn_pairwise=CCMP CCMP-256
#group_cipher=CCMP
# only one wpa_key_mgmt= line should be active.
# wpa_key_mgmt=WPA-PSK is required for WPA2-AES
#wpa_key_mgmt=WPA-PSK
# wpa_key_mgmt=SAE WPA-PSK is required for WPA3-SAE Transition mode
#wpa_key_mgmt=SAE WPA-PSK
# wpa_key_mgmt=SAE is required for WPA3-SAE
wpa_key_mgmt=SAE
#sae_pwe=2
#wpa_group_rekey=1800
# ieee80211w=1 is required for WPA3-SAE Transition mode
# ieee80211w=2 is required for WPA3-SAE
ieee80211w=2
# sae_require_mfp=1 is required for WPA3-SAE Transition mode
#sae_require_mfp=1
# If parameter is not set, 19 is the default value.
#sae_groups=19 20 21 25 26
# If parameter is not set, 5 is the default value.
#sae_anti_clogging_threshold=10

morrownr avatar Feb 28 '23 14:02 morrownr

Ok, but i'm giving up on this card. I guess the drivers are still bad. I used the 6.2.1 kernel and latest firmware. The connection is kind of "funky", also 20ms+ pings. Sometimes hostapd does not start, etc. No wpa_supplicant and Networkmanager was stopped.

Funny because you were saying mediatek is more stable than realtek. I'm finding the exact opposite. The TPLink dongle i got, is much more stable than this card and comfast 953-ax. 2-3ms pings. Plus, i'm compiling the module for Red hat original kernel, 5.14, not mailine. That comfast dongle is even worse than the card. Complete disapointment. I tried, i really tried.

Maybe i screwed up with the PCIe card, because the antenna plugs were so damn tiny, but at a time iperf3 was showing 40-50MB/s, normal and reverse. So afterall the antennas are correctly working. As for the comfast dongle, it has no excuse to suck so much :) Very unstable.

Rocky Linux 9.1 elrepo kernel-ml 6.2.1, it can't be more recent than this.

Realtek 2 Mediatek 0

fs30000 avatar Feb 28 '23 16:02 fs30000

Red hat original kernel...

Rocky Linux 9.1

This could explain a lot. There is a reason that I specify that Red Hat/RHEL and any distro that is based on RHEL is not supported by the Realtek drivers we have up here. There two reasons:

  • Red Hat does some things with their kernels that make it very difficult to support with out-of-kernel drivers. There are many good distros for running hostapd, RHEL is not one of them.

  • Red Hat prioritizes extreme stability. That is good for their target market. Running hostapd is about as far away from Red Hat's target market as you can get. A large part of that stability comes from basing on kernels and other parts that are old. That makes trying get WiFi6/6e and WPA3 going almost impossible...without a deep dive into the various components that support those functions. I'm amazed that you got as far as you did. There is far more than a stable driver that is required to make what you were trying to do work.

Maybe i screwed up with the PCIe card

I don't know that this is what happened as I don't think you can properly judge that based on the distro you are using. I've been running Linux since 1994 and if you asked me to do what you are trying to do with RHEL, I would just break out in a cold sweat and take off running.

What I have found is that if users that have a specific project in mind , they should ask for suggestions first, there are those here than can make recommendations that are likely to increase the chances of success. Do I think you can have success with your card? Yes, but it is not likely right now due to the use of bleeding edge hardware on a distro that can be problematic with 10 year old wifi hardware on your end and a lack of knowledge of what you are really wanting to accomplish on our end.

If you decide to give things another try, first explain what end goal/end state you are trying to accomplish and we can see where it goes.

Good luck

morrownr avatar Feb 28 '23 19:02 morrownr

So, ok. My end goal is to set an AP. 5Ghz only. Decent speeds, decent pings.

I have 3 devices i can use:

  • MT7922 m.2 card (i said before it was pcie, my mistake)
  • Comfast CF-953AX with MT7921
  • TP-Link T3U Plus

MT7922: Even tough i'm running Rocky 9.1, the kernel, as i said, was mainline 6.2.1, released one week ago or something. So, the argument Red Hat is playing safe, does not apply here. The card/glue patched antennas are correctly installed, i got 50 MB/s on iperf. And again, these are crap antennas. However pings were crap. When i modprobed the module with disable_aspm, the system freezed. I find it strange, the modules have just one or two parameters.

Comfast: Too much crapness, very unstable connection, sometimes it didn't even connected. On hostapd.conf i used the config for mt7921. Cheap is cheap i guess.

TPlink: Realtek sucks eh? With your drivers 88x2bu-20210702, not here. I'm using Rocky/Red Hat's default kernel, 5.14.0-162.18.1.el9_1.x86_64. Pings are low and stable, speeds are enough.

Realtek wins. Mediatek can update their drivers as often as they want. For AP, the chips suck. In my experience, mediatek always sucked, i have tried phones with their chips. They sucked.

Maybe i'll try qualcomm later. Pitty intel does not support AP in 5Ghz.

Apologies if i sound mad, that's because i am :) I bought the mediatek stuff, because of recomendations here.

fs30000 avatar Mar 02 '23 12:03 fs30000

Apologies if i sound mad, that's because i am :)

I get that. It happens.

I started this site with a primary goal of getting good information to the Linux community. WiFi is a complicated subject and there are many ways that USB WiFi adapters can be used. At times, I have to make changes to the information that is available. If the information here has caused you to see less than excellent results, I'm all for getting to the reason so that the information here can be modified.

My end goal is to set an AP. 5Ghz only. Decent speeds, decent pings.

The speeds and pings depend on a lot of things besides driver and wifi chipset.

If I know your country then we can look at what 5 GHz channels are available to you? Have you taken a look at the congestion levels on the various 5 GHz channels? Are you able to use DFS channels? IOW, do you have clients that can't use DFS?

I have the following speed test up:

https://github.com/morrownr/USB-WiFi/blob/main/home/Speed_Comparison_Test.md

That test is conducted on a DFS channel that has no other AP operating. It is clean air. If I were to do the same tests on channel 36 or 149, oh my, the results would look much different because there are other APs working. Remember that WiFi is a technology based on sharing.

Should we perform an analysis to see what channels would be best for you to use? I rescanned this thread but do not see what kind of computer you are using? Are you locked into Rocky or are you open to other distros?

morrownr avatar Mar 03 '23 05:03 morrownr

Ping test:

Adapter based on the 8812bu chipset (like your TP-Link adapter)

64 bytes from 192.168.1.1: icmp_seq=10 ttl=64 time=2.16 ms
64 bytes from 192.168.1.1: icmp_seq=11 ttl=64 time=2.38 ms
64 bytes from 192.168.1.1: icmp_seq=12 ttl=64 time=2.67 ms
64 bytes from 192.168.1.1: icmp_seq=13 ttl=64 time=2.50 ms
64 bytes from 192.168.1.1: icmp_seq=14 ttl=64 time=1.86 ms
64 bytes from 192.168.1.1: icmp_seq=15 ttl=64 time=2.34 ms

Adapter based on the 7921au chipset (like your Comfast adapter)

64 bytes from 192.168.1.1: icmp_seq=21 ttl=64 time=1.48 ms
64 bytes from 192.168.1.1: icmp_seq=22 ttl=64 time=2.21 ms
64 bytes from 192.168.1.1: icmp_seq=23 ttl=64 time=1.53 ms
64 bytes from 192.168.1.1: icmp_seq=24 ttl=64 time=2.50 ms
64 bytes from 192.168.1.1: icmp_seq=25 ttl=64 time=1.91 ms
64 bytes from 192.168.1.1: icmp_seq=26 ttl=64 time=2.70 ms

Not much difference.

Here is the result from my Powerline AV2 adapters

64 bytes from 192.168.1.1: icmp_seq=14 ttl=64 time=3.90 ms
64 bytes from 192.168.1.1: icmp_seq=15 ttl=64 time=3.10 ms
64 bytes from 192.168.1.1: icmp_seq=16 ttl=64 time=3.82 ms
64 bytes from 192.168.1.1: icmp_seq=17 ttl=64 time=3.21 ms
64 bytes from 192.168.1.1: icmp_seq=18 ttl=64 time=3.18 ms
64 bytes from 192.168.1.1: icmp_seq=19 ttl=64 time=3.22 ms
64 bytes from 192.168.1.1: icmp_seq=20 ttl=64 time=3.07 ms

Not as good but not that bad. Wireless is faster.

morrownr avatar Mar 03 '23 05:03 morrownr

The problem with the mediatek stuff, was not the bands. I was using the same hostapd.conf file i use for the tplink adapter, just with ht and vht settings specific for the mediatek stuff. tplink works ok, mediatek not. Latest drivers and firmware. Pc is a mini-pc.

In resume, with the m.2 card, pings were high, but speeds were actually good, 50 MB/s. Strangely enough, my phone showed a 5 icon instead of 6. My laptop too, showed AC instead of AX. The chip is supposed to support wifi6/ax.

The comfast adapter was just crap, sometimes hostapd wouldn't even start. It was bad.

I'm happy with tplink, maybe later i'll try again with mediatek.

fs30000 avatar Mar 07 '23 17:03 fs30000

The chip is supposed to support wifi6/ax.

It does.

That does not mean it is easy to configure for those without a high level of skill yet. For hostapd, you need to download and compile the dev version in order for AX to even be available to be turned on. Not to mention numerous others .config settings that have to be correct. You can't just install hostapd and expect it to work with WiFi 6 yet. I have a guide about how to do this.

The bottom line is that the hardware and driver support WiFi 6 and WiFi 6e in AP mode. Very few distros have versions of hostapd and other requires things that are at levels to support it yet. You have to compile you way to it. The latest RasPiOS was released about 2 weeks ago. It STILL does not have a version of hostapd that will support WiFi 6. I had to compile hostapd for my Pi4B to use my 951AX in WiFi 6 mode. Hell, I had to compile the entire kernel as the RasPiOS still comes with kernel 5.15.

In Main Menu item 2, I wrote at length telling anyone that read it that if a person wants plug and play, they need to move on down to the AC1200 section. This still holds true. If you are technically proficient, go for it. Otherwise, stay away. This is a hard upgrade because 3 things are happening at once: Wifi 6, WPA3 and WiFi6. This is not a Linux, Windows or MacOS problem. It is an overall problem because of the complexities.

The tp-link adapter you are comparing with is a WiFi 5 adapter. You are comparing apples to oranges. Grab a WiFi 6 usb Realtek adapter and compare it to the 953AX. If you want something to compare to the tp-link adapter, grab and Alfa ACM and tell me which adapter is easier to use and maintain after about 6 months. That would be comparing apples to apples.

Cheers

morrownr avatar Mar 07 '23 21:03 morrownr

The chip is supposed to support wifi6/ax.

It does.

That does not mean it is easy to configure for those without a high level of skill yet. For hostapd, you need to download and compile the dev version in order for AX to even be available to be turned on. Not to mention numerous others .config settings that have to be correct. You can't just install hostapd and expect it to work with WiFi 6 yet. I have a guide about how to do this.

Can you please share the guide's page? Already compiled hostapd, but don't know the settings for wifi6.

The bottom line is that the hardware and driver support WiFi 6 and WiFi 6e in AP mode. Very few distros have versions of hostapd and other requires things that are at levels to support it yet. You have to compile you way to it. The latest RasPiOS was released about 2 weeks ago. It STILL does not have a version of hostapd that will support WiFi 6. I had to compile hostapd for my Pi4B to use my 951AX in WiFi 6 mode. Hell, I had to compile the entire kernel as the RasPiOS still comes with kernel 5.15.

Understandable.

In Main Menu item 2, I wrote at length telling anyone that read it that if a person wants plug and play, they need to move on down to the AC1200 section. This still holds true. If you are technically proficient, go for it. Otherwise, stay away. This is a hard upgrade because 3 things are happening at once: Wifi 6, WPA3 and WiFi6. This is not a Linux, Windows or MacOS problem. It is an overall problem because of the complexities.

Well, like i said, this tplink adapter is fine for me, but if i could manage to get the this mediatek chip to work, would be great. Plus, would help anyone wanting to do the same.

The tp-link adapter you are comparing with is a WiFi 5 adapter. You are comparing apples to oranges. Grab a WiFi 6 usb Realtek adapter and compare it to the 953AX. If you want something to compare to the tp-link adapter, grab and Alfa ACM and tell me which adapter is easier to use and maintain after about 6 months. That would be comparing apples to apples.

Understood.

I got a mini-pc what came with a realtek 8821ce. Is it any good?

fs30000 avatar Mar 08 '23 12:03 fs30000

Can you please share the guide's page? Already compiled hostapd, but don't know the settings for wifi6.

Upgrade_hostapd.tar.gz

The guide is tested on Raspberry Pi OS which means it is Debian oriented but you can likely work through that. Ask if you don't understand something.

I just thought about this: you will need to compile wpa_supplicant` as well to get WiFi 6 support. Need a guide? This depends on your distro as Ubuntu 22.10 and later are all moved from wpa_supplicant to IWD so this doesn't apply.

WiFi 6e is likely a bridge too far right now. Have you checked reg.db to see if the 6e band is legal in your country? This is a real problem around the world as many countries around the world have not even passed laws making 6e legal yet. The EU seems to be far ahead of the rest of us.

Right now the goal should be getting WiFi 6 going. 6e is another level of complexity. I'm not even up to speed on 6e in AP mode yet. I'm working on it.

My day job is rocket science but this is far more difficult. Just kidding about my day job but not about the level of difficulty. My guess is that this stuff will mostly be sorted out by the time we see Ubuntu 24.04. We have good chipsets with the mt7921 and mt7922 and the Linux driver is already good and improving. It is all the other stuff that is coming up to speed slowly. Remember that you are on the bleeding edge... me too.

morrownr avatar Mar 09 '23 06:03 morrownr

Understandable.

My list was not complete as wpa_supplicant needs to be compiled and the two mt firmware files need to be updated by hand and there is more. Installing kernel 5.19 or later is one little part of this puzzel. And we have no prior art to help us. We are the bleeding edge.

I got a mini-pc what came with a realtek 8821ce. Is it any good?

Unknown. I almost exclusively work with usb adapters.

It might help if the goal were to be getting a good solid 5 GHz AP working with this adapter and then we can proceed to WiFi 6.

morrownr avatar Mar 09 '23 06:03 morrownr

Ok, i got news. After the comfast fiasco, i decided to give this card another try, because i saw on the kernel changelog some changes were made to the mt7921 driver. So i'm running Rocky 9.1 with kernel mainline 6.2.6 from elrepo.

I get 40+ MB/s normal and close to 70 MB/s on reverse. The high pings seem to come from some power saving action from the chip, because as soon i start youtube streaming or even pressing continuously Enter at a ssh prompt, pings lower to 2ms or even less. Executing iperf3 will get them higher as the link gets saturated of course.

EDIT: The hostapd.conf file

#mediatek pcie
interface=wlp4s0
bridge=br0
driver=nl80211

ssid=ap1
wpa_passphrase=12345678
country_code=PT

auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK

ieee80211d=1
ieee80211h=1

channel=36

ieee80211n=1
wmm_enabled=1

#mediatek pcie
ht_capab=[RXLDPC][HT40+][SHORT-GI-20][SHORT-GI-40][GF][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][SU-BEAMFORMEE]


ieee80211ac=1
# Channel width (0 = 40 MHz | 1 = 80 Mhz | 2 = 160 MHz | 3 = 80+80 MHz
#mediatek pcie
vht_oper_chwidth=1

# VHT center channel (chan + 6)
vht_oper_centr_freq_seg0_idx=42


#mediatek pcie
vht_capab=[RXLDPC][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMEE][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][SHORT-GI-160][VHT160]

fs30000 avatar Mar 16 '23 21:03 fs30000

What is "normal" and "reverse"? How do you get MB/s from iperf, I get Mbit/sec.

bjlockie avatar Mar 16 '23 22:03 bjlockie

Even tough, iw list shows this card supports 160Mhz and 80+80, it fails with vht_oper_chwidth=2 and 3, for 160Mhz and 80+80 Mhz respectively.

Configured VHT capability [VHT_CAP_SUPP_CHAN_WIDTH_MASK] exceeds max value supported by the driver (2 > 1)

On vht_capab it accepts [SHORT-GI-160][VHT160], but not [VHT160-80PLUS80].

fs30000 avatar Mar 16 '23 22:03 fs30000

What is "normal" and "reverse"? How do you get MB/s from iperf, I get Mbit/sec.

I'm talking about iperf3. iperf3 -f M -c server will show in MB/s.

In normal mode, iperf client sends data, with reverse (-R), iperf downloads from server. iperf3 -f M -c server -R

fs30000 avatar Mar 16 '23 22:03 fs30000

iw list shows this card supports 160Mhz and 80+80

I think I remember seeing a patch 1-2 weeks ago in linux-wireless that removed 80+80. I think the discussion was that it supports 160 but not 80+80, at least at this time. So, that tells me the capability was added by mistake.

FYI: There is a lot of ongoing work on the mt7921 driver. We should see P2P capability in the wild soon. Since last fall, we have been seeing new firmware files coming monthly... never seen that before but then wifi drivers have never been this complicated before. The various versions of the mt792x chipset are going into stuff all over the place... TV's, etc.

morrownr avatar Mar 17 '23 13:03 morrownr

Hi @fs30000!

I saw you in your hostapd example than you've set Portugal as country and it has same bands locked as Spain (where I am).... May I ask you how you were able to start hostapd in channel 36? I saw you in your first log "wlp4s0: IEEE 802.11 Hardware does not support configured channel"

I ask because I have a AX210 card and I just can start hostapd for 5GHz in channels from 149 to 157 or similar, but in this case is due Intel shitty LAR implementation. And these channels have a very limited power output so they are useless for a home made router.

I was thinking on buying a mt7922 card in aliexpress but I don't know if it will work well as I want.

Thanks in advance!

Astrako avatar Mar 31 '23 12:03 Astrako

Yes, 36 works here. In the begining it was failing because i did't have the right config done. I have it now, working fine. However just wifi5, no AX. For wifi6, like Nick said, you need a recent build of hostapd. 5 is enough for me.

interface=wlp4s0
bridge=br0
driver=nl80211

ssid=1
wpa_passphrase=pass
country_code=PT

auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK


# Advertises the country_code and the set of allowed channels and transmit power levels
ieee80211d=1
# Enables support for 5GHz DFS channels (requires ieee80211d=1)
ieee80211h=1

hw_mode=a
channel=36


ieee80211n=1
wmm_enabled=1

#mediatek pcie
ht_capab=[RXLDPC][HT40+][SHORT-GI-20][SHORT-GI-40][GF][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][SU-BEAMFORMEE]


ieee80211ac=1
vht_oper_chwidth=1
# VHT center channel (chan + 6)
vht_oper_centr_freq_seg0_idx=42

#mediatek pcie
vht_capab=[RXLDPC][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMEE][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][SHORT-GI-160][VHT160]

Maybe i could tweak it even more, but it's enough for me. EDIT: I got it at this link: https://www.aliexpress.com/item/1005005042304492.html

fs30000 avatar Apr 03 '23 16:04 fs30000

EDIT: I got it at this link: https://www.aliexpress.com/item/1005005042304492.html

I bought the exact same card but I'm getting slow speeds (for a Wi-Fi 6 card, I mean).

I used this exact conf as a template (modifying the interface id and country code, only) and I'm getting ~150Mbps during iperf3 tests from Wi-Fi 6 client to the host, in both directions (send / receive).

interface=wlp1s0
bridge=br0
driver=nl80211

ssid=Test
wpa_passphrase=87654321
country_code=BR

auth_algs=3
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK


# Advertises the country_code and the set of allowed channels and transmit power levels
ieee80211d=1
# Enables support for 5GHz DFS channels (requires ieee80211d=1)
ieee80211h=1

hw_mode=a
channel=36


ieee80211n=1
wmm_enabled=1

#mediatek pcie
ht_capab=[RXLDPC][HT40+][SHORT-GI-20][SHORT-GI-40][GF][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][SU-BEAMFORMEE]


ieee80211ac=1
ieee80211ax=1
vht_oper_chwidth=1
# VHT center channel (chan + 6)
vht_oper_centr_freq_seg0_idx=42

#mediatek pcie
vht_capab=[RXLDPC][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][MAX-AMSDU-7935][DSSS_CCK-40][MAX-MPDU-11454][SHORT-GI-80][TX-STBC-2BY1][SU-BEAMFORMEE][MU-BEAMFORMEE][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN][SHORT-GI-160][VHT160]

I tested the card in client mode and I get top speed from my previous Wi-Fi 5 (2x2) hotspot = ~600Mbps

Also tested different distros and another host machine, just in case, but the results were the exact same. My primary goal was using it on OpenWrt but I can't manage to get it working - I want to believe it's because 23.05 is on rc stage, didn't test on 22.03.

UnderEu avatar Sep 26 '23 23:09 UnderEu