Mt7922 6Ghz ap on x86 VM


Noob here trying to build a 6Ghz AP with an mt7922 card passed through to a proxmox VM.

Compiled snapshot openwrt x86 64 image, which seems to generally work fine.

Tried pulling in the newer mt7921 code with support for mt7922, but probably didn't do it right.
So now, luci shows the card as Generic MAC80211 802.11ac/ax/b/g/n, allows to select 6Ghz and appears to start AP mode, but the card seems to only operate in 5Ghz...

Any feedback welcome!
Info below:

root@OpenWrt:~# iw list | grep -e " 70.*MHz"
                        * 7015 MHz [213] (12.0 dBm) (no IR)
                        * 7035 MHz [217] (12.0 dBm) (no IR)
                        * 7055 MHz [221] (12.0 dBm) (no IR)
                        * 7075 MHz [225] (12.0 dBm) (no IR)
                        * 7095 MHz [229] (12.0 dBm) (no IR)
root@OpenWrt:~# iwinfo phy0-ap0 info
phy0-ap0  ESSID: "OpenWrt"
          Access Point: C8:94:02:FF:FB:AB
          Mode: Master  Channel: 36 (5.180 GHz)  HT Mode: HE80
          Center Channel 1: 42 2: unknown
          Tx-Power: 3 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: WPA3 SAE (CCMP)
          Type: nl80211  HW Mode(s): 802.11ac/ax/b/g/n
          Hardware: 14C3:0616 105B:E0CB [Generic MAC80211]
          TX power offset: unknown
          Frequency offset: unknown
          Supports VAPs: no  PHY name: phy0
root@OpenWrt:~# cat /etc/config/wireless 

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'pci0000:00/0000:00:10.0'
        option channel '209'
        option band '6g'
        option htmode 'HE80'
        option cell_density '0'
        option country 'BR'

config wifi-iface 'wifinet0'
        option device 'radio0'
        option mode 'ap'
        option ssid 'OpenWrt'
        option encryption 'sae'
        option key '.....'
        option network 'lan'
        option ieee80211w '2'

root@OpenWrt:~# cat /etc/openwrt_version 
root@OpenWrt:~# cat /etc/openwrt_release 
DISTRIB_DESCRIPTION='OpenWrt SNAPSHOT r22511-c3cb2d48da'

00:10.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter
        Subsystem: Foxconn International, Inc. Device e0cb
        Physical Slot: 16
        Flags: bus master, fast devsel, latency 0, IRQ 35
        Memory at fd600000 (64-bit, prefetchable) [size=1M]
        Memory at fea90000 (64-bit, non-prefetchable) [size=32K]
        Capabilities: [80] Express Endpoint, MSI 00
        Capabilities: [e0] MSI: Enable+ Count=1/32 Maskable+ 64bit+
        Capabilities: [f8] Power Management version 3
        Kernel driver in use: mt7921e

I'm not quite sure what exactly you mean by this. If that implies you're trying to backport mt76 into openwrt-22.03, then stop right there, it's not going to work sensibly. Work on master, and ideally on the bare-iron, to get the hypervisor and its quirks out of the way - only once you got that working, you may stand a chance to backport the necessary changes (just don't expect that the openwrt-22.03 branch would take these changes, openwrt-23.xy is about to branch off - make sure that this branch (via master) is working now).

6 GHz support (as well as mt7921/ mt7922) is very much at the forefront of development, a lot of bits and pieces would have to go together for it to work. On top of that I don't think any 6 GHz devices (as in plastic routers with three- or four radios, one of which happens to support the 6 GHz band) is even supported at this point, which severely reduces the chances that anyone has tested it (yes, with PCIe cards you can do a lot more, a lot earlier, but that doesn't imply anyone else has set the groundwork for it, yet - and I think there still are known pieces missing for it to be fully supported). Get your readings from the the low-level linux tools (iw) and the kernel, make sure that the generated hostapd configuration match your expectations for 6 GHz, …

Expect quite some development on netifd, iwinfo and luci to be necessary.

from experience with mt7921un, in STA mode on general purpose linux, you want at least kernel v6.1 (respectively its mac8021/ mt76 packages) for these new chipsets to work in 6 GHz mode (and even then there's still quite some performance tweaking pending for 6 GHz), in other words excatly what's master giving you right now.

1 Like

@slh I see the error of my ways :rofl: and thank you for taking the time to explain!

Just FYI, trying this with proxmox myself the past week with openwrt 22.03 and a mt7921au usb nic, and while hostapd will start, and with a manual restart after boot will work, but connecting with my phone the system crashes directly after I see the 4-way handshake succeed, then the bios rebooting.

Digging about on this since, seems the kvm usb drivers are known to be problematic to the point folks are actually using vfio to tend the whole usb controller to the proxmox vm instead of the usb feature of kvm. Kinda leaning toward doing this too as I'd really like to run this virtual as a full multi-radio AP on hardware with my current firewall and other edge/services appliances, but not so far.

Testing the nic on my sorta useless otherwise R7000 with openwrt, and 2.4/5ghz work fine with it, as it does also with openwrt inside virtualbox, so something wack with kvm I think, or at least definitely with it liking the mt7921au chip. Now just want to see the 6ghz work on the R7000, 2.4/5ghz work fine, but hostapd errors trying to set to band 6g and HE40 or 80 that it shows capable via iw list. Curious to know what you get working if/when in your wireless config.

config wifi-device 'radio0'
  option type 'mac80211'
  option path 'platform/18000000.axi/bcma0:11/18021000.usb/usb1/1-1/1-1:1.3'
  option cell_density '0'
  option htmode 'HE80'
  option country 'US'
  option band '6g'
  option channel 'auto'

With this, hostapd still ends up coming up in 5g mode on channel 36 oddly, if I set a channel like '1', hostapd errors out again. I'll keep fiddling too, but any advice would be appreciated on getting 6ghz working!


At least try OpenWrt on the bare metal (and a master snapshot at that), booting it from a USB stick is fine. Other than that, everything I said above still stands - don't expect 6 GHz support to work within OpenWrt at this point, be prepared to get your hands dirty with development.

Totally understood, I was looking to see if it was at all even doable with openwrt in any capacity inside a vm and found not so much so wanted to warn them of the USB issue too. It seems not short of giving over the entire controller with the usb woes with proxmox/kvm on a run of the mill supermicro xeon box.

I'm fairly impressed I can connect up a reasonably priced USB AP-capable mt7921 nic off amazon for ~80usd (ALFA AWUS036AXML) to any old hardware with a port, even my old pos Netgear R7000, and get working 6ghz capable hardware with drivers. With these more commonly available in usb/mpcie reasonably priced, seems finally a reasonable barrier to entry for the common folk to add 6ghz to existing AP solutions that run OpenWrt once support catches up.

Hi,guys,can you help me to opeator this? I can't build only AP mode with an mt7922 card passed through to a proxmox VM, When I passed through to the virtual machine, the virtual machine cannot start...
the sysinfo show this:
pve kernel: vfio-pci 0000:02:00.0: not ready 65535ms after FLR; giving up
pve kernel: vfio-pci 0000:02:00.0: vfio_ecap_init: hiding ecap 0x1e@0x110
pve kernel: vfio-pci 0000:02:00.0: not ready 1023ms after FLR; waiting