ytphy_set_wol(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

ytphy_set_wol β€” turns wake-on-lan on or off, bestie ✨ (yes that's the whole vibe, it's giving "one job, does it well" πŸ‘‘)

So real quick, before we dive in: this is a page from the Kernel API Manual, and honestly? She's a little icon. Let's get into it πŸŽ€


✨ SYNOPSIS ✨

int ytphy_set_wol (struct phy_device *phydev , struct ethtool_wolinfo
*wol );

Like, it literally returns an int, takes two pointers, and minds its own business. Periodt πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • phydev β€” a pointer to a struct phy_device 🌸 (you know the one, your fave PHY device struct)
  • wol β€” a pointer to a struct ethtool_wolinfo πŸ’œ (this one's carrying all your wake-on-lan wishes)

Two pointers. That's it. That's the whole input situation πŸ™ˆ


🌈 NOTE 🌈

Okay so here's the tea, and you're gonna wanna listen fr fr πŸ‘€

YTPHY_WOL_CONFIG_REG, YTPHY_WOL_MACADDR2_REG, YTPHY_WOL_MACADDR1_REG and YTPHY_WOL_MACADDR0_REG are common ext reg πŸ”₯

But the YTPHY_INTERRUPT_ENABLE_REG of UTP? That one's special ⭐ β€” fiber also use this register. Not me stressing over one shared register 😭 it's giving main character energy, lowkey.

And the return situation: returns 0 or a negative errno code πŸ’€

Heads up bestie β€” that's a negative errno code, so don't go treating a sad return value like it's a happy little index 🫢

πŸ’… SEE ALSO πŸ’…

Everything is connected, iykyk 🧚 β€” here's the whole friend group:

Kernel file ./drivers/net/phy/motorcomm.c, plus:

ytphy_read_ext(9), ytphy_read_ext_with_lock(9), ytphy_write_ext(9), ytphy_write_ext_with_lock(9), ytphy_modify_ext(9), ytphy_modify_ext_with_lock(9), ytphy_get_wol(9), yt8521_read_page(9), yt8521_write_page(9), struct ytphy_cfg_reg_map(9), struct ytphy_ldo_vol_map(9), yt8521_probe(9), ytphy_utp_read_lpa(9), yt8521_adjust_status(9), yt8521_read_status_paged(9), yt8521_read_status(9), yt8521_modify_bmcr_paged(9), yt8521_modify_utp_fiber_bmcr(9), yt8521_soft_reset(9), yt8521_suspend(9), yt8521_resume(9), yt8521_config_init(9), yt8531_link_change_notify(9), yt8521_prepare_fiber_features(9), yt8521_fiber_setup_forced(9), ytphy_check_and_restart_aneg(9), yt8521_fiber_config_aneg(9), ytphy_setup_master_slave(9), ytphy_utp_config_advert(9), ytphy_utp_config_aneg(9), yt8521_config_aneg_paged(9), yt8521_config_aneg(9), yt8521_aneg_done_paged(9), yt8521_aneg_done(9), ytphy_utp_read_abilities(9), yt8521_get_features_paged(9), yt8521_get_features(9), yt8821_get_features(9), yt8821_get_rate_matching(9), yt8821_aneg_done(9), yt8821_serdes_init(9), yt8821_utp_init(9), yt8821_auto_sleep_config(9), yt8821_soft_reset(9), yt8821_config_init(9), yt8821_adjust_status(9), yt8821_update_interface(9), yt8821_read_status(9), yt8821_modify_utp_fiber_bmcr(9), yt8821_suspend(9), yt8821_resume(9)

Like… that's a lot of friends and every single one of them ate πŸ”₯ no cap.


And that's the whole page, bestie! 🫢 This lil' baddie lives over in ./drivers/net/phy and she's dated October 2026 β€” so go wake some LANs, stay iconic, and remember: negative errno codes are not a personality trait πŸ’€πŸ’– πŸ¦‹

πŸ“¦ where this page comes from