netdev_set_eeprom(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ netdev_set_eeprom β€” Kernel API Manual energy πŸ¦‹

okay so bestie, welcome to the netdev_set_eeprom(9) page, straight out of the Kernel API Manual. this is the little guy that writes EEPROM data. that's it. that's the whole vibe. let's get into it πŸ’…


✨ NAME ✨

netdev_set_eeprom β€” write EEPROM data. yes literally, that's the entire name section, she's lowkey ✨iconic✨ for keeping it short πŸŽ€


🌸 SYNOPSIS 🌸

int netdev_set_eeprom (struct net_device *dev , struct ethtool_eeprom
*eeprom , u8 *data );

that's the whole signature, no cap. three args, one int coming back at you 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • dev β€” the Network device. your actual netdev bestie, the one going through it πŸ’–
  • eeprom β€” the Ethtool EEPROM data structure. this is the little struct carrying the deets πŸ“‹
  • data β€” the Data buffer. the actual bytes you're yeeting in there πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

okay so this is the important part, listen up: this function modifies the EEPROM data one byte at a time. like, literally one. byte. at. a. time. no shortcuts, no bulk mode, it's giving patient main character energy 🧚

and the return situash? she returns 0 if it worked, otherwise an error code. slay when it's zero, cry when it's not 😭


πŸ’œ SEE ALSO πŸ’œ

ngl this list is long β€” like, "the way that this goes on for multiple screens" long β€” but every single one of these is part of the friend group, so here we go, no skipping, no cap πŸ’…

first up, the kernel file this whole thing lives next to:

  • ./drivers/net/ethernet/micrel/ksz884x.c

then the structs, in order, all of them πŸ¦‹

  • struct ksz_hw_desc(9), struct ksz_sw_desc(9), struct ksz_dma_buf(9), struct ksz_desc(9), struct ksz_desc_info(9), struct ksz_mac_table(9)
  • struct ksz_vlan_table(9), struct ksz_port_mib(9), struct ksz_port_cfg(9), struct ksz_switch(9), struct ksz_port_info(9), struct ksz_hw(9)
  • struct ksz_port(9), struct ksz_timer_info(9), struct ksz_shared_mem(9), struct ksz_counter_info(9), struct dev_info(9), struct dev_priv(9)

then the hardware/switch function crew πŸ’€

periodt. every single one of them made the list πŸ’–


aaaand that's the page bestie 🫢 this one came from ./drivers/net/ethernet/micrel, dated October 2026 β€” go read the whole squad of (9) pages, iykyk πŸŒˆβ­πŸ‘‘

πŸ“¦ where this page comes from