phylink_cap...speed_duplex(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay so picture this: you're deep in the kernel, specifically in ./drivers/net/phy/phylink.c, and you've got a speed and a duplex just sitting there and you need the mac capability. yeah. that's the whole plot. this page is from the Kernel API Manual, section 9, and it's genuinely a little icon. ✨


🌸 NAME 🌸

phylink_cap_from_speed_duplex β€” bestie, this gets you the mac capability from speed/duplex. that's it. that's the function. no cap. πŸ’–


✨ SYNOPSIS ✨

unsigned long phylink_cap_from_speed_duplex (int speed , unsigned int duplex );

she returns an unsigned long, she takes two args, she's booked and busy. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • speed β€” the speed to search for πŸ‘€ like the number, the velocity, the vibe
  • duplex β€” the duplex to search for πŸ”₯ (it's an unsigned int, fyi)

πŸ’œ DESCRIPTION πŸ’œ

literally so simple: find the mac capability for a given speed and duplex. you hand it speed, you hand it duplex, it goes looking, it finds the mac capability. main character energy from a one-line function, honestly. 🌟


πŸ‘‘ RETURN πŸ‘‘

you get back a mask with the mac capability patching speed and duplex πŸ’… β€” or 0 if there were no matches. and yes, 0 means nothing matched, so don't go treating it like a real capability, bestie. 😭


🌈 SEE ALSO 🌈

the whole group chat, fr fr β€” start with the kernel file itself:

Kernel file ./drivers/net/phy/phylink.c

then the crew:

like i said. the whole group chat. 47 links and every single one is invited. πŸ§šβ€β™€οΈ


ngl the only real gotcha here is the 0 return β€” no match means no capability mask, so check it before you assume you've got something. 🫑

okay that's the whole page!! πŸ’– this one's brought to you by ./drivers/net/phy, dated October 2026, and it's literally phylink_cap...speed_duplex(9) from the Kernel API Manual β€” slay, go read your manpages, ily, bye πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from