phy_caps_valid(9)
π
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 π: passingDUPLEX_UNKNOWNis 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:
phy_caps_init(9)phy_caps_speeds(9)phy_caps_lookup_by_linkmode(9)phy_caps_lookup_by_linkmode_rev(9)phy_caps_lookup(9)phy_caps_linkmode_max_speed(9)phy_caps_linkmodes(9)phy_caps_from_interface(9)phy_caps_medium_get_supported(9)phy_caps_mediums_from_linkmodes(9)
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
- 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