mac_select_pcs(9)
π 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 astruct 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:
- During validation, to make sure the configuration is valid. She's checking your fit before you leave the house. π
- 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:
- Kernel file
./include/linux/phylink.h struct phylink_link_state(9)struct phylink_config(9)struct phylink_mac_ops(9)mac_get_caps(9)mac_prepare(9)mac_config(9)mac_finish(9)mac_link_down(9)mac_link_up(9)mac_disable_tx_lpi(9)mac_enable_tx_lpi(9)mac_wol_set(9)struct phylink_pcs(9)struct phylink_pcs_ops(9)pcs_validate(9)pcs_inband_caps(9)pcs_enable(9)pcs_disable(9)pcs_get_state(9)pcs_config(9)pcs_an_restart(9)pcs_link_up(9)pcs_disable_eee(9)pcs_enable_eee(9)pcs_pre_init(9)phylink_get_link_timer_ns(9)phylink_mac_implements_lpi(9)
π«Ά 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
- 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