From 03648addc2aff1b7a9f07dc7102cea948b4cf61f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 21 Jun 2024 10:07:11 +0200 Subject: [PATCH] mac80211: package virt_wifi driver Add the necessary definitions to package the virt_wifi kernel module as kmod package. The virt_wifi module is useful to wrap an existing ethernet interface and make it appear like a wireless device, which allows testing wireless related userspace tools without actual wireless hardware. In contrast to mac80211-hwsim, it allows forwarding "fake" wireless traffic between different virtual machines, enabling virtual testing of complex wireless topologies. Signed-off-by: Jo-Philipp Wich --- package/kernel/mac80211/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index b0de3950b9..4fe699c064 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -26,6 +26,7 @@ PKG_MAINTAINER:=Felix Fietkau PKG_DRIVERS = \ mac80211-hwsim \ + virt-wifi \ mt7601u \ rsi91x rsi91x-usb rsi91x-sdio\ wlcore wl12xx wl18xx @@ -176,6 +177,14 @@ define KernelPackage/mac80211-hwsim AUTOLOAD:=$(call AutoProbe,mac80211_hwsim) endef +define KernelPackage/virt-wifi + $(call KernelPackage/mac80211/Default) + TITLE:=Wifi wrapper for ethernet drivers + DEPENDS+= +kmod-cfg80211 +@DRIVER_11AX_SUPPORT +@DRIVER_11AC_SUPPORT + FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/virtual/virt_wifi.ko + AUTOLOAD:=$(call AutoProbe,virt_wifi) +endef + define KernelPackage/mt7601u $(call KernelPackage/mac80211/Default) @@ -262,6 +271,7 @@ ifdef CONFIG_PACKAGE_MAC80211_TRACING endif config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM +config-$(call config_package,virt-wifi) += VIRT_WIFI config-$(call config_package,mt7601u) += MT7601U config-y += WL_MEDIATEK -- 2.30.2