speed_to_fw_caps(9)
π speed_to_fw_caps(9)
okay so bestie, welcome to the Kernel API Manual β yes we're literally in the kernel docs rn, and this function is lowkey iconic for what it does. it's called speed_to_fw_caps and it's giving "translator era" π
β¨ SYNOPSIS β¨
unsigned int speed_to_fw_caps (int speed );
that's it. that's the whole signature. one argument, one return value, no cap π
π¦ ARGUMENTS π¦
speedβ the speed, in Kb/s. yes, Kb/s β like, kilobits. keep that unit in mind bestie, it's not a suggestion, it's the contract π«Ά
πΈ DESCRIPTION πΈ
so what does it actually do? it translates a specific Port Speed into a Firmware Port Capabilities value. that's the whole vibe:
- you hand it a port speed π
speed - it hands you back the firmware port capabilities value π
unsigned int
it's a glow-up for your numbers, basically. speed in, fw caps out. main character energy π₯
π SEE ALSO π
the kernel file it lives in, diva:
./drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c
and its besties, all of whom you should also go read:
iykyk β it's a whole little chelsio cxgb4 friend group π§
ngl if you're converting things back and forth between fw caps and lmm,from_fw_port_mod_type(9),fw_caps_to_lmm(9)andlmm_to_fw_caps(9)are your round-trip squad β go look at all of them, no skipping π
and that's the tea bestie π this page came out of ./drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c with a date stamp of October 2026, and yeah β it's still speed_to_fw_caps(9) in the corner, slay β
π¦ 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