Passthrough WiFi USB

Hello everyone,
On a Lenovo X260 laptop running debian 13 is host. Openwrt VM is running on it. Openwrt is able to access host RJ-45 to access the Internet. Openwrt is unable to access the passthrough WiFi USB (MediaTek 7921u, ID 0e8d:7961 MediaTek) radio. I tried many different and <hostdev with ID and address and without address. Nothing has worked so far. I appreciate your help.

Use gnome-boxes or virt-manager, your question does not really pertain OpenWrt. Virtualisation passthrough latency and powersaving will most likely stop your plans soon.

Hi brada4,
Would you expand on how to use virt-manager? I have been using virtsh. Do you mean using virt-manager is easier? And then you mention latency and powersaving will stop is soon.
So what you suggest to do? And how to build a openwrt router on x86_64 PC. What are your thoughts.
Thank you for your time.

USB devices (other than PCI) can't really be passed through (unless you pass-through the whole USB host controller on the PCI side of it), it always remains a half (slow) emulation and you need to keep your host from claiming it. While this -kind of- works (well enough) for slow devices (NFC readers, usb2serial, etc.), it absolutely doesn't for fast ones which require speedy responses like WLAN cards. Even if it may appear to work at first glance, it will explode spectacularly once you start using it.

Ok, good enough and I am convinced that my configuration will not work. If my plan is to use openwrt as router on pc and VM would not work, what is your suggestion of a method that would work?
Thank you for your time

Using virtualization for wired routing works, but I usually recommend against it (at least for your primary router at home, fine for a second stage router for optional 'lab' networks, if you know your hypervisor), because it complicates the whole situation, expands the attack surface of your router, introduces bootstrapping and reboot race conditions, [insert more reasons here]. On top of that, client-oriented WLAN chipsets are not good choices for AP usage, this includes all USB WLAN chipsets - 'good' AP oriented chipsets exist, but there it gets really expensive, fast.

As you will find with deeper explanations in previous discussions about x86_64 (or RPi, etc.) and WLAN, the only sensible option is to offload the WLAN handling to more purpose-built hardware, like an OpenWrt compatible wifi router configured as bridged AP. Even a cheap ~20 buck plastic router will run circles around ~100++ bucks worth of PCIe WLAN cards in your x86_64 (before even thinking about virtualization).

Well said. This laptop pc running debia 13 and kvm/qemu virtualization. I have proven to my self that openwrt vm as router to do a passthrough os WIFi USB dongle will not work. This is very old machine. In lieu of discarding it I plan to use it as a router using openwrt firmware. How should I approach this and accomplish this task. This old machine is for home use only.
Thanks.

Well, you told us a little about what you have, but almost nothing about what you need. So recommending anything would be an instance of Maslow's hammer.

But just in general, any well supported wifi6 (wifi5, if you get a great device for very cheap) with sufficient amount of flash/ RAM and the CPU performance to meet your demands should do.

Good morning all,
Thank you all for all your support. Ideas offered I am convinced VM would not work and I should pursue other options to make my project work.
Take care.

It heavily depends, say USB bt mic+headphone mode is low bandwidth, while when you try to play hq audio the USB timeouts pop up. Another is wencams, 320x200 kinda works as PoC but 4k needs PCI slot to be passthrough.

Alternative would be to attach debian hostap to virtual bridge with OpenWrt routing, as an extender without real cabling. mt76 driver is developed mostly from OpenWrt side, thus should be good as an AP on any linux.

Hello again,
I am grateful for your technical insight and ideas you offered. I have spent a lot of time on this old machine to make it work with openwrt vm. Most of my work has been with XML and repeated fiddling and getting nowhere because of issues you mentioned earlier latency and power issue for passthrough to work.
I have used host to tap virtual bridge in order to access RJ-45 and reach Internet... The reason I used VM was to use the of pc for other tasks. Now plan is to use pc as a hardware for openwrt firmware and move to my next project.
Thank you for your time.
And happy New Year.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.