STRUCT PHYLINK_MAC_OPS(9)
β¨ struct phylink_mac_ops(9) β a Kernel API Manual moment β¨
okay bestie, so this is a page from the Kernel API Manual, and it's all about a lil struct called struct phylink_mac_ops β literally the MAC operations structure, and it's giving very main-character energy in the phylink world π
πΈ NAME πΈ
struct phylink_mac_ops β the MAC operations structure. that's it, that's the name, no cap π
π¦ SYNOPSIS π¦
here's the whole vibe, verbatim, don't @ me:
struct phylink_mac_ops {
unsigned long (*mac_get_caps)(struct phylink_config *config,
phy_interface_t interface);
struct phylink_pcs *(*mac_select_pcs)(struct phylink_config *config,
phy_interface_t interface);
int (*mac_prepare)(struct phylink_config *config, unsigned int mode,
phy_interface_t iface);
void (*mac_config)(struct phylink_config *config, unsigned int mode,
const struct phylink_link_state *state);
int (*mac_finish)(struct phylink_config *config, unsigned int mode,
phy_interface_t iface);
void (*mac_link_down)(struct phylink_config *config, unsigned int
mode, phy_interface_t interface);
void (*mac_link_up)(struct phylink_config *config, struct phy_device
*phy, unsigned int mode, phy_interface_t interface, int speed, int
duplex, bool tx_pause, bool rx_pause);
void (*mac_disable_tx_lpi)(struct phylink_config *config);
int (*mac_enable_tx_lpi)(struct phylink_config *config, u32 timer,
bool tx_clk_stop);
int (*mac_wol_set)(struct phylink_config *config, u32 wolopts, const
u8 *sopass);
};
π MEMBERS π
these are the function pointers, aka the whole squad π«Ά
mac_get_capsβ get the MAC capabilities for the interface mode. it's literally just asking "what can u do, babe?" πͺmac_select_pcsβ pick a PCS for the interface mode. choosing your fave, iconic behavior β¨mac_prepareβ prep for a major reconfiguration of the interface. big glow-up incoming, get ready πmac_configβ configure the MAC for the selected mode and state. the actual makeover moment πmac_finishβ wrap up that major reconfiguration of the interface. the finale, periodt πmac_link_downβ take the link down. sad girl hours, but someone has to do it πmac_link_upβ let the link come up. yasss, we're so back π₯mac_disable_tx_lpiβ disable LPI. bye bestie πmac_enable_tx_lpiβ enable and configure LPI. multitasking queen πmac_wol_setβ configure Wake-on-Lan settings at the MAC. the MAC wakes up like it's got a 6am alarm β
π DESCRIPTION π
the individual methods are described more fully below. that's the whole description. short and sweet, iykyk π
π SEE ALSO π
the whole friend group, fr fr β kernel file ./include/linux/phylink.h, plus struct phylink_link_state(9), struct phylink_config(9), mac_get_caps(9), mac_select_pcs(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) β go read them, they're all icons π
ok that's the whole page, no notes π
and that's a wrap bestie!! this came from ./include/linux, dated October 2026, and it's filed under struct phylink_mac_ops(9) β mwah, slay, goodbye π§ββοΈπΈ
π¦ 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