bcm_linkmod...to_lre_adv_t(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bcm_linkmode_adv_to_lre_adv_t πŸ’…

okay bestie, so this is a page from the Kernel API Manual and it's literally about one tiny little helper function that does one tiny little job, and honestly? she's iconic for it. Let's get into it πŸŽ€


✨ NAME ✨

bcm_linkmode_adv_to_lre_adv_t β€” translate linkmode advertisement to LDS 🌸

like, that's the whole gig. translating. she's a translator. a little bilingual queen for your PHY 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

u32 bcm_linkmode_adv_to_lre_adv_t (unsigned long *advertising );

that's it. that's the signature. one argument, returns a u32, no cap πŸ’œ


🌈 ARGUMENTS 🌈

  • advertising β€” the linkmode advertisement settings πŸ’– like, the settings you wanna advertise, handed over as a pointer to an unsigned long.

⭐ RETURN ⭐

she gives you back the LDS Auto-Negotiation Advertised Ability register value πŸ‘‘ that's the return, that's the whole reward for calling her.


🧚 DESCRIPTION 🧚

so the way that this works is: this is a small helper function (small but mighty, main character energy fr fr πŸ”₯) that translates your linkmode advertisement settings into phy LDS autonegotiation advertisements β€” specifically for the MII_BCM54XX_LREANAA register, which belongs to Broadcom PHYs capable of LDS πŸ’…

so if your PHY speaks LDS and it's a Broadcom one, this is the little function that takes your advertisement settings and puts them in the right language for that register. translator bestie. periodt 🌟


πŸ‘‘ SEE ALSO πŸ‘‘

  • Kernel file ./drivers/net/phy/bcm-phy-lib.c πŸ“
  • bcm_config_lre_advert(9) β€” go read that one too, iykyk 😌

ngl bestie, if you're poking around LRE advertisement stuff, read bcm_config_lre_advert(9) next β€” it's literally right there in the SEE ALSO and it's giving "the other half of the story" ✨

and that's the page!! πŸ’– this one came out of the ./drivers/net/phy directory, from October 2026 πŸ“ go forth and advertise responsibly, bestie πŸ¦‹πŸ’œπŸŽ€

πŸ“¦ where this page comes from