TP-Link UE300 is not found on a clean sysupgrade in the latest 25.12-SNAPSHOT

I am using 25.12-SNAPSHOT on a tiny x64 with UE300 and until a week ago, the dongle worked fine. Today's build (using image builder) would no longer work. I re-flashed the older build and it all started working again.

"OpenWrt 25.12-SNAPSHOT r32963-949487e090" from a week ago or so:

dmesg | grep r8152
[   14.378177] usbcore: registered new device driver r8152-cfgselector
[   14.519823] r8152-cfgselector 2-2: reset SuperSpeed USB device number 2 using xhci_hcd
[   14.620201] r8152 2-2:1.0 eth1: v1.12.13
[   14.620758] usbcore: registered new interface driver r8152
[   35.107984] r8152 2-2:1.0 eth1: carrier on

Today's log:

dmesg | grep r8152
[    7.421641] usbcore: registered new device driver r8152-cfgselector
[    7.569815] r8152-cfgselector 2-2: reset SuperSpeed USB device number 2 using xhci_hcd
[    7.659745] r8152 2-2:1.0 eth1: v1.12.13
[    7.660281] usbcore: registered new interface driver r8152

The line [ 35.107984] r8152 2-2:1.0 eth1: carrier on is missing from today's build and eth1 does not come up.

Any ideas or suggestions?

Check for other error messages in the log without filtering. Only 6 commits have been made to the 25.12 branch since the beginning of June, of which the only one that might seem a possibility of introducing a glitch to this device is the kernel update to 6.12.92.

I made a copy of dmesg output before reverting and I see no errors there.

I am already running it: https://git.openwrt.org/openwrt/openwrt/commit/?h=openwrt-25.12&id=949487e0900b92a87b5f5bc5db9861ce3480db6a that is the commit that I built a week ago and which works just fine.

I do not think it is a kernel issue. When the router reboots after sysupgrade (no configuration preserved), it runs my /etc/uci-defaults auto configure script, which failed because the default /etc/confing/network is missing the the wan section (see below). So to me it looks like the kernel is fine and the module is loaded, but eth1 is not activated, because it is not configured anywhere. And it is not configured, because upon boot, something decided that this is a single NIC device so only the onboard NIC got configured.

config interface 'loopback'
	option device 'lo'
	option proto 'static'
	list ipaddr '127.0.0.1/8'

config globals 'globals'
	option dhcp_default_duid 'xxxxxxxxxxxxx'
	option ula_prefix 'fd96:xxxxx:xxxx::/48'

config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'eth0'

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	list ipaddr '192.168.1.1/24'
	option ip6assign '60'

This commit looks suspicious: https://git.openwrt.org/openwrt/openwrt/commit/?h=openwrt-25.12&id=2a8b27fab9c8e8bf67ff8a0c341b06a8c68453cf

Turns out that as per that commit, default/initial config generation now happens earlier than before and the kernel module for UE300 is not loaded yet. This causes /etc/board.json to only include one onboard NIC and the router ends up with a single network interface (lan). A workaround is to create a softlink to the required module under /etc/modules-boot.d/: usb-net-rtl8152 -> ../modules.d/usb-net-rtl8152 (this module needs to load after e1000e or eth0/1 will get swapped.

Hoping the developers will notice a GitHub issue I raised and this gets fixed properly.