platform_get_ethdev_address(9)
π 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:
eth_header(9)eth_get_headlen(9)eth_type_trans(9)eth_header_cache(9)eth_header_cache_update(9)eth_header_parse_protocol(9)eth_prepare_mac_addr_change(9)eth_commit_mac_addr_change(9)eth_mac_addr(9)ether_setup(9)alloc_etherdev_mqs(9)nvmem_get_mac_address(9)fwnode_get_mac_address(9)device_get_mac_address(9)device_get_ethdev_address(9)
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
- 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