mirror of
https://github.com/openwrt/openwrt.git
synced 2026-10-19 02:45:55 +04:00
The Fibocom FG621-EA supplies a fresh locally-administered address in its CDC-NCM descriptor on every power-up, so usb0 changes identity across reboots. Five consecutive boots on the same unit: cdc_ncm 1-1:1.0: MAC-Address: d6:c4:81:03:15:77 cdc_ncm 1-1:1.0: MAC-Address: 26:aa:4f:6c:ad:ff cdc_ncm 1-1:1.0: MAC-Address: 16:46:a8:94:fd:29 cdc_ncm 1-1:1.0: MAC-Address: 46:ad:de:0f:82:d8 cdc_ncm 1-1:1.0: MAC-Address: ea:fa:1a:b7:c9:dc The kernel reports these as permanent rather than random (addr_assign_type 0), because they are read from the device instead of being generated by the host, so nothing downstream compensates for them. Assign a stable address derived from the factory base instead. Offsets 0, 1 and 4 are already used by the LAN ports and phy0, the WAN port, and phy1 respectively, so use offset 3. Tested on hardware (HW rev A1). An LTE data session still passes traffic in both directions with usb0 pinned: 5/5 ICMP replies at 1400 bytes and a 274 kB HTTP transfer, with downlink byte counts matching an unpinned run on the same unit (293 kB vs 294 kB). This modem therefore learns the host MAC from uplink frames rather than filtering to the address it advertised in its own descriptor. Note this does not change the address the carrier hands out: with usb0 pinned, the PDP address still differs between sessions, as it is issued per context activation and does not depend on the host-side MAC of the USB link. Signed-off-by: Fredrik Hallin <fredappsdev@outlook.com> Link: https://github.com/openwrt/openwrt/pull/24975 Signed-off-by: Jonas Jelonek <jonas@jonasjelonek.de>