phy_get_tx_amplitude_gain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… phy_get_tx_amplitude_gain ✨

okay so bestie, real talk β€” this is a page from the Kernel API Manual, section 9, and the star of the show is phy_get_tx_amplitude_gain. She's a little function with one job and she does it: she goes and gets the tx amplitude gain and tucks it into @val. That's it. That's the whole personality. Iconic, honestly. πŸŽ€


✨ NAME ✨

phy_get_tx_amplitude_gain β€” stores tx amplitude gain in @val


πŸ¦‹ SYNOPSIS πŸ¦‹

int phy_get_tx_amplitude_gain (struct phy_device *phydev , struct device
*dev , enum ethtool_link_mode_bit_indices linkmode , u32 *val );

like. she takes four things and gives you back an int. we love a predictable queen. πŸ‘‘


🌸 ARGUMENTS 🌸

  • phydev β€” the phy_device struct. your main character, fr fr.
  • dev β€” pointer to the device's device struct. yes, that's the phrasing, no I'm not gonna make it more confusing than it already is. 🫢
  • linkmode β€” the linkmode you want the tx amplitude gain retrieved for. it's literally what it sounds like.
  • val β€” the tx amplitude gain itself. this is where the answer lands. 🎯

πŸ’– RETURN πŸ’–

  • 0 on success ✨
  • < 0 on failure 😭

that's the whole vibe check: zero means slay, negative means something's off.


πŸ”₯ SEE ALSO πŸ”₯

the kernel file is ./drivers/net/phy/phy_device.c, and honestly the whole friend group is listed here so let's go, no gatekeeping:

phy_uses_state_machine(9), phy_register_fixup(9), genphy_match_phy_device(9), get_phy_c45_ids(9), get_phy_c22_id(9), get_phy_device(9), phy_device_register(9), phy_device_remove(9), phy_get_c45_ids(9), phy_find_next(9), phy_prepare_link(9), phy_connect_direct(9), phy_connect(9), phy_disconnect(9), phy_poll_reset(9), phy_sfp_connect_phy(9), phy_sfp_disconnect_phy(9), phy_sfp_attach(9), phy_sfp_detach(9), phy_sfp_probe(9), phy_attach_direct(9), phy_detach(9), phy_reset_after_clk_enable(9), genphy_config_advert(9), genphy_c37_config_advert(9), genphy_setup_forced(9), genphy_restart_aneg(9), genphy_check_and_restart_aneg(9), __genphy_config_aneg(9), genphy_c37_config_aneg(9), genphy_aneg_done(9), genphy_update_link(9), genphy_read_status_fixed(9), genphy_read_status(9), genphy_c37_read_status(9), genphy_soft_reset(9), genphy_read_abilities(9), phy_remove_link_mode(9), phy_advertise_supported(9), phy_advertise_eee_all(9), phy_support_eee(9), phy_disable_eee(9), phy_support_sym_pause(9), phy_support_asym_pause(9), phy_set_sym_pause(9), phy_set_asym_pause(9), phy_validate_pause(9), phy_get_pause(9), phy_get_internal_delay(9), phy_get_mac_termination(9), phy_get_sfp_port(9), fwnode_mdio_find_device(9), fwnode_phy_find_device(9), fwnode_get_phy_node(9), phy_probe(9), phy_driver_register(9)


ngl bestie, read the ones you actually need β€” there's like fifty of them and you have stuff to do today. πŸ’€

mwAh, that's the whole page!! this little baddie lives under ./drivers/net/phy, the version vibes are dated October 2026, and the whole thing is filed under phy_get_tx_amplitude_gain(9) in case you need to find her again. go get that gain, queen. πŸ’œπŸ¦‹β­

πŸ“¦ where this page comes from