mac_get_caps(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mac_get_caps(9) β€” like, the Kernel API Manual, but make it make sense

okay bestie, so we're in the mac_get_caps(9) page today ✨ it's a little kernel-API moment from the Kernel API Manual, and honestly? it's short, it's sweet, and it's gonna take you like twelve seconds to get. let's go 🫢


🌸 NAME 🌸

mac_get_caps β€” get the MAC capabilities for a given interface mode, no cap πŸ’…


✨ SYNOPSIS ✨

unsigned long mac_get_caps (struct phylink_config *config ,
phy_interface_t interface );

that's it. that's the whole signature. it hands you back an unsigned long and takes exactly two things, which we're about to break down πŸ‘‡


πŸŽ€ ARGUMENTS πŸŽ€

  • config β€” a pointer to a struct phylink_config. yeah. that one. the config struct bestie 🫢
  • interface β€” your PHY interface mode. like, which mode we're talking about here 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this one is an optional method β€” lowkey important detail, don't skip it πŸ™ˆ if it's not provided, then config->mac_capabilities gets used instead. simple as that.

but when you do implement it? it returns the MAC capabilities for the specified interface mode β€” specifically for the cases where the MAC driver needs some special handling 🧚 like, for example, not supporting half-duplex in certain interface modes. it's giving "i have exceptions and i'm not sorry" energy, and honestly? iconic πŸ‘‘

so no, it's not just a fancy wrapper β€” it's the escape hatch for when the default capabilities vibe check fails 😭


πŸ’– SEE ALSO πŸ’–

buckle up, because this list is LONG and it ate πŸ’€ every single one of these, bestie:

like i said. a whole friend group 😭


ngl, if you're implementing a MAC driver and you're like "hmm do i need this one?" β€” it's optional, so the default is config->mac_capabilities, and you only reach for mac_get_caps when a specific interface mode needs special capability handling. fr fr.

and that's the page!! πŸ’œ this one ships out of ./include/linux, dated October 2026 β€” mwah, slay, periodt πŸŽ€βœ¨ go read phylink.h and stay hydrated bestie πŸ“

πŸ“¦ where this page comes from