Persistent renaming mlan0 to wlan0

Creating a bug report/issue

I have searched the existing open and closed issues

Required Information

  • DietPi version | 9.19
  • Distro version | Native PC for UEFI (Trixie)
  • Kernel version | uname --all
  • Architecture | x86-64
  • SBC model | Dell Wyse 3040
  • Power supply used | 5v
  • SD card used | Internal EMMC

Additional Information (if applicable)

Steps to reproduce

  1. Install Wireless card drivers based upon this post.
  2. dietpi-config → Network options: Adapters → Wifi: Not Found

Expected behaviour

  • Wifi: Available

Actual behaviour

  • The network hardware is actually working with the driver installed. However, as explained by this post, the hardware interface presents itself as ‘mlan0’ instead of ‘wlan0’. The solution explicated in the post above is tied to a specific mac address. I have a few 3040 devices and I would like to create a standard image that I can restore to any of these devices without worrying about the change in mac address.
  • Is there a way to change the interface name from ‘mlan0’ to ‘wlan0’ independent of it’s mac address. The thought came to mind is based upon it’s network interface, however, I’m not well versed with Linux, so looking forward for help here.

Your can replace the MAC address condition in the udev rule with KERNEL=="mlan0" to make it based on the device name instead.

Give that rule a more unique name to not override default system configs, like 99-mlan0.rules or so.