Skip to content

ath9k: Virtual interfaces and radios

Jouni Malinen linux-wireless 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15ath9k: Cleanup multiple VIF processingdrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/beacon.c drivers/net/wireless/ath9k/main.c+59 -570 replies
2/15ath9k: Set BSSID mask based on configured interfacesdrivers/net/wireless/ath9k/Makefile drivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c +1 more+103 -150 replies
3/15ath9k: Add data structure for supporting virtual radio/wiphy operationdrivers/net/wireless/ath9k/ahb.c drivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c +5 more+88 -360 replies
4/15ath9k: Add support for multiple secondary virtual wiphysdrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/beacon.c drivers/net/wireless/ath9k/main.c +4 more+212 -410 replies
5/15ath9k: Configure RX filter for multi-BSSID broadcastdrivers/net/wireless/ath9k/mac.h drivers/net/wireless/ath9k/recv.c+9 -00 replies
6/15ath9k: Virtual wiphy pause/unpause functionalitydrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/beacon.c drivers/net/wireless/ath9k/main.c +3 more+191 -20 replies
7/15ath9k: Add routines for switching between active virtual wiphysdrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c drivers/net/wireless/ath9k/virtual.c+176 -120 replies
8/15ath9k: Make start/stop operations aware of virtual wiphysdrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c drivers/net/wireless/ath9k/virtual.c+49 -00 replies
9/15ath9k: Register larger listen intervaldrivers/net/wireless/ath9k/main.c+1 -00 replies
10/15ath9k: Pause other virtual wiphys on channel changedrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c drivers/net/wireless/ath9k/virtual.c+33 -10 replies
11/15ath9k: Check virtual wiphy state on tx()drivers/net/wireless/ath9k/main.c+6 -00 replies
12/15ath9k: Add workaround to recover from failed channel changesdrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c drivers/net/wireless/ath9k/virtual.c+43 -20 replies
13/15ath9k: Special processing for channel changes during scandrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c drivers/net/wireless/ath9k/virtual.c+68 -100 replies
14/15ath9k: Add a simple virtual wiphy schedulerdrivers/net/wireless/ath9k/ath9k.h drivers/net/wireless/ath9k/main.c drivers/net/wireless/ath9k/virtual.c+72 -00 replies
15/15ath9k: Add a debugfs interface for controlling virtual wiphysdrivers/net/wireless/ath9k/debug.c drivers/net/wireless/ath9k/debug.h+165 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/15] ath9k: Virtual interfaces and radios

This set of patches brings in an initial step in adding support for multiple virtual interfaces into ath9k both at the multi-vif (for single channel only) and multi-wiphy (virtual radios that can be used with multiple channels). The patches are on top of the current wireless-testing tree, the beacon changes from Sujith and a setkey patch from earlier today.

The first two patches clean up the multi-vif code and prepare the driver for use of multiple MAC addresses. The third patch starts the work on the concept of a virtual wiphy/radio (i.e., ath9k will be able to register multiple "radios" with mac80211, but without mac80211 having to know about multi-channel operations). The fourth patch adds support for multiple secondary wiphys. The patches 5-13 are completing and improving the virtual interface operations.

The 14th patch file brings in a simple channel scheduler that is enough for initial tests, but will be optimized in the future to take into account various corner cases and different states of each virtual radio to time the channel changes better.

The final patch in this series adds a debugfs interface that makes it possible to control the virtual radios (e.g., add a new "radio"). For now, this is enough to allow initial testing and experiments with the new virtual wiphy concept. In the future, more official interface (e.g., an nl80211 command passed through mac80211) is likely to remove need for a debugfs interface.

Lot of the code here is still quite experimental, but taken into account how many areas this touches, it would be helpful to get at least parts of this merged in. I'm not aware of any regressions for single-interface operations.

There are still some known limitations for the multi-interface operations and one should be aware of these when running experiments with the code. These will be worked on in the future to avoid the extra complexity or compromises needed in the initial version.

Key cache configuration does not yet handle all combinations of security policies in virtual interfaces. Consequently, the recommended starting point is to use software crypto when using multiple wiphys/vifs, i.e., use nohwcrypt=1 module parameter.

There is currently support for only a single beaconing interface, i.e., not more than one AP wiphy can be added at a time. There is no such limitation for station interfaces, i.e., arbitrary number of virtual station wiphys can be added and used on arbitrary channels. Though, the simple channel scheduler will start showing up its simplicity with increased latency if there the wiphys end up on large number of different channels.

Quick steps to start experiments:

modprobe ath9k nohwcrypt=1

# make sure debugfs is mounted somewhere (replace '/debug' in the
# command below with wherever the root directory is)
# wlan0 can now be used, e.g., with wpa_supplicant

echo add > /debug/ath9k/phy0/wiphy

# wlan1 can now be used, e.g., with wpa_supplicant

echo add > /debug/ath9k/phy0/wiphy

# wlan2 can now be used, e.g., with wpa_supplicant

and so on.. In theory, all the virtual wiphy interfaces could be used as if they are real radios (run wpa_supplicant, hostapd, use iwconfig, etc.).

When using virtual wiphys, the APs that the virtual interfaces are associated with do not need to be on the same channel. One of the wiphys could also be used with hostapd to bring up an AP. However, it should be noted that most client implementation do not exactly like the AP disappearing all the time, so using a virtual station interface on another channel at the same time may not be that good of an idea for most use cases now. This will hopefully improve somewhat with future optimizations.

It would be useful to hear what others think about this sort of functionality and how this should be integrated with Linux, including the user space interface, applications managing the virtual interface functionality, and user interface that the end users would see. This is still quite an early step in the progress, but the goal here is to get this functionality into mature state and provide something that makes it easier to use wireless LAN in general for connecting devices in various scenarios. All feedback would be welcome!

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA