of_get_ethdev_address(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– of_get_ethdev_address(9) πŸ’–

okay bestie, welcome to the kernel API manual page for of_get_ethdev_address β€” it lives in section 9 (the kernel API one, iykyk) and it's lowkey the moment your network device finally gets its glow-up address. πŸ¦‹


✨ NAME ✨

of_get_ethdev_address β€” literally the function that hunts down a MAC address for your netdevice and hands it over πŸ’…


🌸 SYNOPSIS 🌸

int of_get_ethdev_address (struct device_node *np , struct net_device
*dev );

πŸŽ€ ARGUMENTS πŸŽ€

  • np β€” the caller's Device Node, aka where we go snooping for the address πŸ‘€
  • dev β€” pointer to the netdevice whose address is gonna get updated, main character energy fr

⭐ DESCRIPTION ⭐

so what it does is: it searches the device tree for the best MAC address to use. no cap. and if it finds one, it sets dev->dev_addr to that address. slay. πŸ’…

if you're wondering how it decides which address is "the best"? that tea is spilled in the documentation of of_get_mac_address β€” go read that one for more information on how the best address is determined 🫢


🌈 RETURN 🌈

0 on success, and errno in case of error. that's it, that's the vibe check 😭


πŸ¦‹ SEE ALSO πŸ¦‹


bestie reminder: this page is filed under ./net/core, and the version stamp says October 2026 β€” so like, mark your calendar, periodt. stay iconic, go read of_get_mac_address(9) if you want the full lore, and remember: the kernel loves you back πŸ’–βœ¨πŸŽ€
πŸ“¦ where this page comes from