mac_enable_tx_lpi(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ mac_enable_tx_lpi β€” from the Kernel API Manual, section 9, bestie πŸ’…

Okay so picture this: you're in the 9 section of the Kernel API Manual (the driver-dev one, iykyk) and you need to make a MAC actually generate LPI. That's this function. She's the one who configures the LPI timeout and flips generation on. Main character energy fr fr 🌸


πŸŽ€ SYNOPSIS

int mac_enable_tx_lpi(struct phylink_config *config, u32 timer, bool tx_clk_stop);

Three args, no drama. Let's meet them 🫢


πŸ¦‹ ARGUMENTS

  • config β€” a pointer to a struct phylink_config. Yeah, that one. She's your ticket in πŸ’«
  • timer β€” the LPI timeout, measured in microseconds. Little numbers, big job ⏱️
  • tx_clk_stop β€” a bool that says whether the xMII transmit clock is allowed to be stopped while LPI is happening. Stopping clocks = iconic but also very much a whole thing πŸ™ˆ

πŸ’– DESCRIPTION

So first thing: she configures the LPI timeout accordingly. Easy.

Now the important little caveat that lives rent-free in my head: this is only called when the link is already up. Not before, not during, only after. Why? Because some hardware needs to be programmed according to the link speed, and you can't know the speed until the link is up. It's giving "don't ask me to pick an outfit before I know where we're going" 😭

Then, the actual job: enable LPI generation at the MAC, and configure whether the xMII transmit clock may be stopped. That's it, that's the vibe. She ate and left no crumbs πŸ”₯

ngl the "already up" part is not a suggestion, it's the contract. Respect it or the hardware will simply not cooperate.

πŸ‘‘ RETURN

Returns 0 on success. Periodt.

And um β€” if you were thinking about returning an error? Please consult with rmk before returning an error. That's not me being dramatic, that's literally in the docs. Ask rmk first. πŸ™


🌈 SEE ALSO

The whole group chat, in order, and I'm not skipping a single one of them because they're all invited to the function πŸ’œ


πŸ’€ real talk though: 27 manpage refs in one SEE ALSO is a lot of links and honestly, study them, that's the whole PHYLINK extended universe and it goes hard.

and that's the page!! mwah πŸ’‹ this one lives at ./include/linux, stamped October 2026, section 9 β€” catch you in the next manpage, bestie πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from