speed_to_fw_caps(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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) and lmm_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