]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
kernel: rtl8261n: allow selection as package 20429/head
authorKenneth Kasilag <kenneth@kasilag.me>
Fri, 17 Oct 2025 02:07:25 +0000 (02:07 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 17 Oct 2025 23:31:02 +0000 (01:31 +0200)
Previously, devices would have to select `CONFIG_RTL8261N_PHY=Y` in the
whole target's kernel config. Now that this driver is becoming usable
for devices other than Realtek switches, allow packaging this driver
separately.

Signed-off-by: Kenneth Kasilag <kenneth@kasilag.me>
Link: https://github.com/openwrt/openwrt/pull/20429
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/kernel/linux/modules/netdevices.mk

index 522e76d180561172490817b61d922088c7f121a0..77fe0c153bfafe4de8e5bda4bb1bb013b8b4b3ba 100644 (file)
@@ -525,6 +525,22 @@ endef
 $(eval $(call KernelPackage,phy-realtek))
 
 
+define KernelPackage/phy-rtl8261n
+   SUBMENU:=$(NETWORK_DEVICES_MENU)
+   TITLE:=Realtek RTL8261N NBASE-T PHY driver
+   KCONFIG:=CONFIG_RTL8261N_PHY
+   DEPENDS:=+kmod-libphy
+   FILES:=$(LINUX_DIR)/drivers/net/phy/rtl8261n/rtl8261n.ko
+   AUTOLOAD:=$(call AutoLoad,18,rtl8261n,1)
+endef
+
+define KernelPackage/phy-rtl8261n/description
+   Supports the Realtek 8261N NBASE-T PHY.
+endef
+
+$(eval $(call KernelPackage,phy-rtl8261n))
+
+
 define KernelPackage/phy-smsc
    SUBMENU:=$(NETWORK_DEVICES_MENU)
    TITLE:=SMSC PHY driver