phy_caps_valid(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… phy_caps_valid β€” the phy_caps_valid(9) tea 🫢

So this is a page from the Kernel API Manual, bestie, and it's literally about checking whether a bunch of linkmodes actually work at a speed and duplex you hand it. Yes. That's the whole vibe check. ✨


🌸 NAME 🌸

phy_caps_valid β€” validate a linkmodes set agains given speed and duplex

(that "agains" is the original's spelling, not me being chaotic, i prommy πŸ’€)


✨ SYNOPSIS ✨

bool phy_caps_valid (int speed , int duplex , const unsigned long
*linkmodes );

It returns a bool, takes an int speed, an int duplex, and a const unsigned long *linkmodes. That's it, that's the whole signature. πŸŽ€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • speed β€” the input speed you wanna validate, bestie. Just... the speed. πŸƒβ€β™€οΈ
  • duplex β€” the input duplex to validate. And listen πŸ‘‘: passing DUPLEX_UNKNOWN is always not valid. Like, not "sometimes", not "depends" β€” always. No cap. πŸ’€
  • linkmodes β€” the linkmodes to validate. The actual set. The main character of this whole function, honestly. 🌟

πŸ”₯ RETURN πŸ”₯

true if at least one of the linkmodes in linkmodes can function at the given speed and duplex. Otherwise false. Simple as that, periodt. πŸ’…

lowkey important: it's at least one β€” one single icon slaying at that speed and duplex is enough to make the whole thing true. ✨

🌈 SEE ALSO 🌈

Kernel file ./drivers/net/phy/phy_caps.c β€” and the whole friend group fr fr:


okay that's the whole page, mwah πŸ’– it lives under ./drivers/net/phy and the version stamp says October 2026 β€” so yeah, from the future, slay. 🧚🌸 Go validate some linkmodes, bestie. 🫢

πŸ“¦ where this page comes from