Hi all,
I've seen a few other threads here asking about using USB Wi-Fi cards in an LXC container, but most were abandoned or restored to using a VM. I've gotten several other USB devices to work perfectly in a container, such as RTL SDRs, but I just can't seem to get my Wi-Fi card working. It is an AR9271 chip, should work with firmware-ath9k-htc. I've installed it on both the host and guest (guest is Ubuntu 22 LXC).
Here's my configs on the host:
lsusb:
	
	
	
		
udev rules:
	
	
	
		
ls -la on device
	
	
	
		
Inside my containers config, I have
	
	
	
		
In the container, I can see the device
lsusb
	
	
	
		
ls -la /dev/tplink
	
	
	
		
I can see the ath9k firmware is loaded in the host's kernel (rtw88 is the motherboard's wifi chip, ignore)
	
	
	
		
But no interface is created
	
	
	
		
On the host I see the interface and it works as expected.
	
	
	
		
Does anyone have any suggestions?
				
			I've seen a few other threads here asking about using USB Wi-Fi cards in an LXC container, but most were abandoned or restored to using a VM. I've gotten several other USB devices to work perfectly in a container, such as RTL SDRs, but I just can't seem to get my Wi-Fi card working. It is an AR9271 chip, should work with firmware-ath9k-htc. I've installed it on both the host and guest (guest is Ubuntu 22 LXC).
Here's my configs on the host:
lsusb:
		Code:
	
	# lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 017: ID 0b05:1867 ASUSTek Computer, Inc. AURA Custom Human interface
Bus 001 Device 003: ID 0b05:185c ASUSTek Computer, Inc. Bluetooth Radio 
Bus 001 Device 018: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubudev rules:
		Code:
	
	# cat /etc/udev/rules.d/80-tplink-wifi.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="9271", MODE="0666", GROUP="plugdev", SYMLINK+="tplink"ls -la on device
		Code:
	
	# ls -la /dev/bus/usb/001/018
crw-rw-rw- 1 root plugdev 189, 17 Jan 17 10:18 /dev/bus/usb/001/018Inside my containers config, I have
		Code:
	
	lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb/001 dev/bus/usb/001 none bind,optional,create=dir
lxc.mount.entry: /dev/tplink dev/tplink none bind,optional,create=fileIn the container, I can see the device
lsusb
		Code:
	
	$ lsusb
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 017: ID 0b05:1867 ASUSTek Computer, Inc. AURA Custom Human interface
Bus 001 Device 003: ID 0b05:185c ASUSTek Computer, Inc. Bluetooth Radio 
Bus 001 Device 018: ID 0cf3:9271 Qualcomm Atheros Communications AR9271 802.11n
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubls -la /dev/tplink
		Code:
	
	crw-rw-rw- 1 nobody nogroup 189, 17 Jan 17 15:18 /dev/tplinkI can see the ath9k firmware is loaded in the host's kernel (rtw88 is the motherboard's wifi chip, ignore)
		Code:
	
	$ lsmod | grep ath9k
ath9k_htc              94208  0
ath9k_common           45056  1 ath9k_htc
ath9k_hw              598016  2 ath9k_htc,ath9k_common
ath                    36864  3 ath9k_htc,ath9k_common,ath9k_hw
mac80211             1236992  3 ath9k_htc,rtw88_pci,rtw88_core
cfg80211              966656  5 ath9k_htc,ath9k_common,ath,rtw88_core,mac80211But no interface is created
		Code:
	
	$ ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0@if102: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff link-netnsid 0On the host I see the interface and it works as expected.
		Code:
	
	101: wlxXXXXXXXXXXXX: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000Does anyone have any suggestions?
 
	 
	
