phy_caps_me...et_supported(9)
π phy_caps_medium_get_supported β NAME β¨
okay so bestie, this is a page from the Kernel API Manual, and the function we're stanning today is phy_caps_medium_get_supported β literally "returns linkmodes supported on a given medium" π that's the whole vibe, she tells you which linkmodes your medium can do.
πΈ SYNOPSIS πΈ
void phy_caps_medium_get_supported (unsigned long *supported , enum
ethtool_link_medium medium , int pairs );
that's it, that's the whole call. no return value, she just fills your buffer and dips π
π¦ ARGUMENTS π¦
supportedβ the output param, the main character of this whole operation β¨ after the call, this holds all possible linkmodes on the given medium, and with the given number of pairs, or less. like, she's generous, she'll give you the under-pairs options too π«Άmediumβ the medium you want the support info from. this is the "who are we asking about" of it all πpairsβ how many pairs are used on that given medium. lowkey important note: this only matters for modes that even support this notion, likeBaseT. if it's not applicable to what you're doing, just pass0and move on π
β DESCRIPTION β
okay so here's the one (1) behaviour detail you cannot miss: if no match exists, the supported field is left untouched. like, she doesn't clear it, she doesn't zero it, she doesn't touch it, periodt π so whatever was in there before? still there. plan accordingly bestie π
π SEE ALSO π
the kernel file is ./drivers/net/phy/phy_caps.c β that's the source of truth, iykyk π
and the whole phy_caps friend group, all iconic, all worth a read:
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_valid(9)phy_caps_linkmodes(9)phy_caps_from_interface(9)phy_caps_mediums_from_linkmodes(9)
π okay that's the page!! this one lives over at ./drivers/net/phy, dated October 2026, from the Kernel API Manual β go forth and get those supported linkmodes, bestie, you got this πβ¨π
π¦ 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