mac_select_pcs(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… mac_select_pcs(9) β€” like, the Kernel API Manual girlies know

Okay so bestie, welcome to mac_select_pcs(9). Yes the manual name is literally part of the whole brand β€” it's a Kernel API Manual situation and we're about to read it together. Grab a strawberry drink πŸ“, this one's short but she matters.


✨ NAME ✨

mac_select_pcs β€” pick a PCS for the interface mode. That's it. That's the whole job. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

struct phylink_pcs * mac_select_pcs (struct phylink_config *config ,
phy_interface_t interface );

Look at her go. One function, two arguments, zero drama (well, okay, some drama if you return an error pointer, more on that below 😭).


πŸŽ€ ARGUMENTS πŸŽ€

  • config β€” a pointer to a struct phylink_config. Yeah. That thing. You know her.
  • interface β€” the PHY interface mode you're getting a PCS for. The vibe check in type form.

πŸ”₯ DESCRIPTION πŸ”₯

So what does she actually do? She returns the struct phylink_pcs for the specified interface mode. That's the main character move.

But wait, there's range:

  • If none is required, she returns NULL. Respect. Sometimes the answer is nobody. πŸ™ˆ
  • On error, she returns an error pointer. Not me crying in IS_ERR() πŸ’€
Genuinely important caveat, no cap: this function must not modify any state. Like, at all. It's a query, bestie, not a mutation. Do not touch. Do not rearrange the furniture. It exists purely to ask "which PCS should be used?"

And here's why that matters β€” Phylink uses it in two places:

  1. During validation, to make sure the configuration is valid. She's checking your fit before you leave the house. πŸ’…
  2. When setting a configuration, to internally set the PCS that will actually be used. Slay. That's the assignment.

🌈 SEE ALSO 🌈

The whole friend group, honestly. Go say hi:


🫢 That's the page, bestie. No state was modified in the making of this manpage.

And a cute little sign-off for the credits stans: this one lives under ./include/linux, and the version/date stamp is October 2026 β€” mac_select_pcs(9), as iconic as ever. πŸ’–βœ¨

πŸ“¦ where this page comes from