wx_get_mac_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… wx_get_mac_addr(9) β€” the Kernel API Manual page, but make it make sense πŸŽ€

okay bestie, so this is a page straight out of the Kernel API Manual, and it's lowkey one of the shortest ones you'll ever meet β€” but it's important, so pay attention πŸ’–


✨ NAME ✨

wx_get_mac_addr β€” the generic "gimme the MAC address" function πŸ¦‹


✨ SYNOPSIS ✨

void wx_get_mac_addr (struct wx *wx , u8 *mac_addr );

like, that's it. two args. in, out. slay πŸ’…


✨ ARGUMENTS ✨

  • wx β€” pointer to hardware structure. it's giving "here's the whole adapter, bestie" πŸ‘‘
  • mac_addr β€” Adapter MAC address. this is where the goods land, so make sure it's got room πŸ“

✨ DESCRIPTION ✨

so what does it actually do? it reads the adapter's MAC address from the first Receive Address Register β€” that's RAR0, iykyk 🌸

⚠️ okay here's the part that matters, no cap: a reset of the adapter must be performed prior to calling this function in order for the MAC address to have been loaded from the EEPROM into RAR0. so if you skip the reset, don't come crying to me when RAR0 is empty, bestie 😭 that's literally the whole vibe check of this function.

✨ SEE ALSO ✨

the kernel file lives at ./drivers/net/ethernet/wangxun/libwx/wx_hw.c, and these are all the siblings in the family group chat 🫢


and that's the whole page, bestie!! πŸ’œ it came from ./drivers/net/ethernet/wangxun... and it's dated October 2026, so go forth and read your MAC addresses responsibly βœ¨πŸ’…πŸŽ€

πŸ“¦ where this page comes from