mii_bmcr_encode_fixed(9)
π mii_bmcr_encode_fixed β the Kernel API Manual moment
okay so bestie, welcome to mii_bmcr_encode_fixed(9), part of the Kernel API Manual, and honestly this one is short but it does the thing. Let's get into it π
β¨ NAME β¨
mii_bmcr_encode_fixed β encodes fixed speed/duplex settings into a BMCR value. that's it, that's the job, and it does it slayfully π
πΈ SYNOPSIS πΈ
u16 mii_bmcr_encode_fixed (int speed , int duplex );
π¦ ARGUMENTS π¦
speedβ aSPEED_*value. yep, one of those π«Άduplexβ aDUPLEX_*value. also one of those β¨
π DESCRIPTION π
So what this icon does is encode the speed and the duplex into a single BMCR value. one value. two things going in. it's giving efficiency, fr fr π
Speeds 2500, 1000, 100 and 10 Mbps are supported. that's the whole guest list.
Now, the little plot twist: 2500 Mbps gets encoded to 1000 Mbps. not a typo, that's just how it goes π
Other speeds β the ones not on the list β get encoded as 10 Mbps. so like, unknown speed? you're getting 10. no cap.
And duplex? Unknown duplex values get encoded to half-duplex. so if it's not a duplex value we recognise, it's going half. periodt π§
ngl, if you're passing in something weird, this function has opinions and it will make a decision for you. it's not asking. it's telling π
π₯ SEE ALSO π₯
Kernel file ./include/linux/mii.h β and honestly the whole friend group, all of them, here we go:
mii_nway_result(9)mii_duplex(9)ethtool_adv_to_mii_adv_t(9)linkmode_adv_to_mii_adv_t(9)mii_adv_to_ethtool_adv_t(9)ethtool_adv_to_mii_ctrl1000_t(9)linkmode_adv_to_mii_ctrl1000_t(9)mii_ctrl1000_to_ethtool_adv_t(9)mii_lpa_to_ethtool_lpa_t(9)mii_stat1000_to_ethtool_lpa_t(9)mii_stat1000_mod_linkmode_lpa_t(9)ethtool_adv_to_mii_adv_x(9)mii_adv_to_ethtool_adv_x(9)mii_adv_mod_linkmode_adv_t(9)mii_adv_to_linkmode_adv_t(9)mii_lpa_to_linkmode_lpa_t(9)mii_lpa_mod_linkmode_lpa_t(9)linkmode_adv_to_lcl_adv_t(9)mii_lpa_mod_linkmode_x(9)linkmode_adv_to_mii_adv_x(9)mii_advertise_flowctrl(9)mii_resolve_flowctrl_fdx(9)
that's the whole group chat, go read them too π
okay that's the page!! π and for the cute sign-off: this one lives under ./include/linux, dated October 2026, and it's mii_bmcr_encode_fixed(9) β kudos to the kernel crew, 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