STRUCT PHYLINK_CONFIG(9)
π¦ struct phylink_config β the PHYLINK configuration structure, bestie
okay so this is a page from the Kernel API Manual, and it's literally the whole personality of struct phylink_config. it's the little struct that tells PHYLINK how your MAC wants to be handled π
no cap, every field matters, so let's go through them one by one.
β¨ SYNOPSIS β¨
here's the whole struct, exactly as it lives β don't touch, just vibe:
struct phylink_config {
struct device *dev;
enum phylink_op_type type;
bool poll_fixed_state;
bool mac_managed_pm;
bool mac_requires_rxc;
bool default_an_inband;
bool eee_rx_clk_stop_enable;
void (*get_fixed_state)(struct phylink_config *config, struct
phylink_link_state *state);
unsigned long supported_interfaces[BITS_TO_LONGS(
PHY_INTERFACE_MODE_MAX)];
unsigned long lpi_interfaces[BITS_TO_LONGS(
PHY_INTERFACE_MODE_MAX)];
unsigned long mac_capabilities;
unsigned long lpi_capabilities;
u32 lpi_timer_default;
bool eee_enabled_default;
bool wol_phy_legacy;
bool wol_phy_speed_ctrl;
u32 wol_mac_support;
};
π Members π
these are the members, bestie, all of them, in order. no skipping, that's the rule π«Ά
devβ a pointer to astruct devicethat's associated with the MAC.typeβ the operation type of the PHYLINK instance.poll_fixed_stateβ if true, it startslink_poll, but only if the MAC link is atMLO_AN_FIXEDmode.mac_managed_pmβ if true, this is you telling everyone the MAC driver is the one responsible for PHY PM. main character energy, honestly πmac_requires_rxcβ if true, the MAC always requires a receive clock from the PHY. so the PHY driver should start that clock signal as soon as possible and avoid stopping it during suspend events. literally do not touch it πdefault_an_inbandβ if true, it defaults toMLO_AN_INBANDrather thanMLO_AN_PHY. and heads up: a fixed-link specification will override this.eee_rx_clk_stop_enableβ if true, the PHY can stop the receive clock during LPI.get_fixed_stateβ callback to execute to determine the fixed link state, if the MAC link is atMLO_AN_FIXEDmode.supported_interfacesβ bitmap describing whichPHY_INTERFACE_MODE_xxxare supported by the MAC/PCS.lpi_interfacesβ bitmap describing which PHY interface modes can support LPI signalling.mac_capabilitiesβ the MAC pause/speed/duplex capabilities.lpi_capabilitiesβ the MAC speeds which can support LPI signalling.lpi_timer_defaultβ the default EEE LPI timer setting.eee_enabled_defaultβ if set, EEE will be enabled by phylink at creation time.wol_phy_legacyβ use Wake-on-Lan with the PHY even ifphy_can_wakeupis false.wol_phy_speed_ctrlβ use phy speed control on suspend/resume.wol_mac_supportβ bitmask of MAC supportedWAKE_*options.
π SEE ALSO π
so much lore, iykyk. this all lives in the kernel file ./include/linux/phylink.h:
struct phylink_link_state(9)struct phylink_mac_ops(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)
that's the whole page, periodt π this one's from the path ./include/linux, and it's dated October 2026 β so yeah, it's giving future-kernel-girlie β¨ go forth and configure your PHYLINK, bestie, you've got this ππ¦
π¦ 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