mii_adv_to_linkmode_adv_t(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mii_adv_to_linkmode_adv_t β€” kernel API manual, but make it make sense

okay so bestie, welcome to the mii_adv_to_linkmode_adv_t(9) page. yes that's the whole name. the NAME section literally gives you the function name and then dips β€” no little summary, no nothing. iconic of it honestly. πŸŽ€


✨ SYNOPSIS ✨

void mii_adv_to_linkmode_adv_t (unsigned long *advertising , u32 adv );

that's the whole signature, no cap. returns void, so don't go looking for a return value, it's not coming. πŸ¦‹


🌸 ARGUMENTS 🌸

  • advertising β€” pointer to the destination link mode. this is where the translated stuff lands, so pls make sure it points somewhere real. 🫢
  • adv β€” the value of the MII_ADVERTISE register. raw bits, coming in hot, about to get translated.

πŸ’– DESCRIPTION πŸ’–

so what does this little guy do? it's a small helper function β€” lowercase s small β€” that translates MII_ADVERTISE bits into linkmode advertisement settings. that's the whole job. it takes the register bits and rehomes them into linkmode-speak. πŸ”₯

and the important bit, literally: it clears the old value of advertising. so whatever was chilling in that destination before? gone. wiped. not me accidentally assuming it'd merge with what's already there πŸ’€ β€” it does not merge, it clears first. so don't pass it a buffer you were still emotionally attached to.


πŸ‘‘ SEE ALSO πŸ‘‘

the kernel file itself lives at ./include/linux/mii.h β€” go say hi. 🌈

and here's the whole friend group, all of them (9) pages, all of them part of this saga:

that's twenty-two whole cross-references, bestie, we are thorough here. πŸ’œ

lowkey reminder: mii_adv_mod_linkmode_adv_t(9) is a different function from this one. the _to_ one clears, the _mod_ one modifies. don't mix them up, that's how you get bugs. πŸ™ˆ

and that's the page!! source dir was ./include/linux, dated October 2026, and it's the mii_adv_to_linkmode_adv_t(9) manual β€” slay, go translate some register bits, you've got this β­πŸ§šπŸ’…

πŸ“¦ where this page comes from