of_get_ethdev_address(9)
π 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 π¦
- Kernel file
./net/core/of_net.c of_get_phy_mode(9)of_get_mac_address(9)
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 readof_get_mac_address(9)if you want the full lore, and remember: the kernel loves you back πβ¨π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms