phy_caps_lookup_by_linkmode(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ phy_caps_lookup_by_linkmode ✨

okay so bestie, welcome to the phy_caps_lookup_by_linkmode(9) era β€” it's a kernel API manual page and honestly it's giving "small function, big main character energy" πŸ’… Let's get into it.


πŸ’– NAME πŸ’–

phy_caps_lookup_by_linkmode β€” look up the fastest matching link_capabilities 🏎️✨


πŸ¦‹ SYNOPSIS πŸ¦‹

const struct link_capabilities * phy_caps_lookup_by_linkmode (const
       unsigned long *linkmodes );

so it takes a pointer to some linkmodes and hands you back a const struct link_capabilities * β€” no cap, that's the whole vibe πŸŽ€


🌸 ARGUMENTS 🌸

  • linkmodes β€” the linkmodes you wanna match against πŸ’« that's literally it, that's the whole argument, she's lowkey uncomplicated.

πŸŽ€ RETURN πŸŽ€

It returns the highest-speed link_capabilities that intersects the given linkmodes πŸ”₯ like, fastest wins, periodt.

And here's the cute little tiebreaker detail, iykyk: in case several DUPLEX_ options exist at that speed, DUPLEX_FULL is matched first πŸ‘‘ so full duplex gets first dibs at that speed level.

If there's no match at all? You get NULL back 😭 not me getting rejected by a lookup function. fr fr, no match means NULL.

🌈 SEE ALSO 🌈

Kernel file ./drivers/net/phy/phy_caps.c β€” go read the source, bestie, it's right there 🫢

that's the whole friend group, go say hi to all of them πŸ’œ


annnnd that's the page!! brought to you by ./drivers/net/phy 🌟 dated October 2026 β€” a whole little time capsule, iconic of her honestly. hope this helped bestie, mwah πŸ’‹βœ¨πŸ“

πŸ“¦ where this page comes from