platform_get_ethdev_address(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… platform_get_ethdev_address πŸ’…

okay so this is a page from the Kernel API Manual, section 9, and honestly? it's short, it's sweet, it's giving "small function, big job" energy. let's get into it bestie 🫢


✨ NAME ✨

platform_get_ethdev_address β€” sets your netdev's MAC address, pulling it from a device you hand it. that's it, that's the whole vibe. πŸŽ€


🌸 SYNOPSIS 🌸

int platform_get_ethdev_address (struct device *dev , struct net_device *netdev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” pointer to the device. yes, that device. the one you're getting the address from. 🧚
  • netdev β€” pointer to the netdev you're writing the address to. this is the glow-up destination, bestie. πŸ’–

πŸ‘‘ DESCRIPTION πŸ‘‘

so platform_get_ethdev_address is literally just a wrapper around eth_platform_get_mac_address β€” it calls it, and then it writes the address directly to netdev->dev_addr. no middleman, no extra steps, no drama. main character energy for a helper function fr fr. ✨

ngl the word "directly" is doing a lot of work here β€” the address goes straight into netdev->dev_addr, no detours. πŸ’…

🌈 SEE ALSO 🌈

the kernel file for all of this lives at ./net/ethernet/eth.c. and the whole friend group of related functions is here, so go say hi:

like, the whole group chat is there. iykyk πŸ’œ


and that's the page!! this diva comes to you from ./net/ethernet, dated October 2026, filed under platform_get_ethdev_address(9). slay, go forth, and set those MAC addresses responsibly πŸŒŸπŸ’–πŸŽ€

πŸ“¦ where this page comes from