phy_caps_linkmode_max_speed(9)
π phy_caps_linkmode_max_speed β the Kernel API Manual, section 9, bestie β¨
Okay so real quick: this page lives in the Kernel API Manual, section 9, and the star of the show is phy_caps_linkmode_max_speed. Yes it's a long name. No we're not shortening it. It's iconic and it earned it. π
β¨ NAME β¨
phy_caps_linkmode_max_speed β clamp a linkmodes set to a max speed. That's it, that's the whole vibe: you hand it a set of linkmodes, you hand it a ceiling, and it clamps. Like a bouncer for speeds. πͺπ
π¦ SYNOPSIS π¦
void phy_caps_linkmode_max_speed (u32 max_speed , unsigned long
*linkmodes );
Two arguments, zero return value (it's void, ngl it gives nothing back and that's on purpose). π«Ά
πΈ ARGUMENTS πΈ
max_speedβ the speed limit for the linkmode set. Think of it as the ceiling, the cap, the "you shall not pass" number. Anything spicier than this gets clipped. π₯linkmodesβ the linkmodes to limit. This is the set getting clamped, fr fr. It's anunsigned long *pointer, so yes, it's getting modified in place. π
π SEE ALSO π
If you wanna go deeper (and honestly? you should, it's giving main character energy), this all lives in the kernel file ./drivers/net/phy/phy_caps.c, and it's besties with the whole crew:
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_valid(9)phy_caps_linkmodes(9)phy_caps_from_interface(9)phy_caps_medium_get_supported(9)phy_caps_mediums_from_linkmodes(9)
That's the whole group chat, no cap. πβ¨
Heads up bestie: every single one of those is a real reference, so if you're going linkmode-coded, read them all before you start guessing at behaviour. I said what I said. π
And that's the page! Sourced from ./drivers/net/phy, dated October 2026, filed under phy_caps_linkmode_max_speed(9). Slay, go clamp some speeds, mwah ππ§β
π¦ 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