feature-wifi: Only install files in romfs if enabled

Move from board romfs directory, to inside feature-wifi
This commit is contained in:
Mattias Walström
2026-05-19 15:51:20 +02:00
parent 87c2d3fc77
commit f39e62fdb1
4 changed files with 9 additions and 0 deletions
@@ -0,0 +1,3 @@
# Rename WiFi PHY devices from phy0 to radio0 to avoid name clashes
SUBSYSTEM=="ieee80211", ACTION=="add", KERNEL=="phy*", \
RUN+="/bin/sh -c '/usr/sbin/iw phy %k set name radio%n'"
@@ -0,0 +1,7 @@
# Remove kernel-created WiFi interfaces
# All WiFi interfaces are now virtual interfaces created by confd
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan*", \
TEST=="/sys/class/net/$name/phy80211/name", \
PROGRAM="/bin/cat /sys/class/net/%k/phy80211/name", \
TEST!="/run/wifi-cleaned-%c", \
RUN+="/bin/sh -c '/usr/sbin/iw dev %k del && touch /run/wifi-cleaned-%c'"
+9
View File
@@ -68,4 +68,13 @@ define FEATURE_WIFI_LINUX_CONFIG_FIXUPS
)
endef
define FEATURE_WIFI_INSTALL_IN_ROMFS
mkdir -p $(TARGET_DIR)/etc/modprobe.d $(TARGET_DIR)/etc/udev/rules.d
cp $(FEATURE_WIFI_PKGDIR)/mt7915e.conf $(TARGET_DIR)/etc/modprobe.d/mt7915e.conf
cp $(FEATURE_WIFI_PKGDIR)/60-rename-wifi-phy.rules $(TARGET_DIR)/etc/udev/rules.d/60-rename-wifi-phy.rules
cp $(FEATURE_WIFI_PKGDIR)/70-remove-virtual-wifi-interfaces.rules $(TARGET_DIR)/etc/udev/rules.d/70-remove-virtual-wifi-interfaces.rules
endef
FEATURE_WIFI_POST_INSTALL_TARGET_HOOKS += FEATURE_WIFI_INSTALL_IN_ROMFS
$(eval $(generic-package))
+1
View File
@@ -0,0 +1 @@
options mt7915e enable_6ghz=1