STRUCT PHYLINK_MAC_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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