hw_read_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– hw_read_addr(9) πŸ’–

okay so bestie, welcome to the kernel API manual β€” this is hw_read_addr(9) and it is, like, the entire personality of one very specific function. it's giving "small but mighty" ngl πŸŽ€


✨ NAME ✨

hw_read_addr β€” read the MAC address πŸ’…

🌸 SYNOPSIS 🌸

void hw_read_addr (struct ksz_hw *hw );

that's the whole vibe. void, so it doesn't hand anything back to you β€” no return value, no little gift, nothing. it just does the thing ✨

πŸ¦‹ ARGUMENTS πŸ¦‹

  • hw β€” bestie this is the hardware instance. the actual hardware. the main character of this whole situation. you hand it over and the function knows what to do with it πŸ‘‘

πŸ’œ DESCRIPTION πŸ’œ

so here's the tea: this routine retrieves the MAC address of the hardware. that's it. that's the whole function. it goes and gets the MAC address off hw and, like, that's what it does β€” periodt 🫢

no return value (it's void, remember), no error code, no drama. it's a little retrieval goblin and it's literally obsessed with getting that MAC address for you 🌈

πŸ”₯ SEE ALSO πŸ”₯

okay this is the part where the manpage just absolutely goes OFF, because the SEE ALSO list is, and I cannot stress this enough, enormous. buckle up 🎒

first up, the actual kernel file this lives in: ./drivers/net/ethernet/micrel/ksz884x.c β€” that's the home base, the address, the zip code 🏑

and then the structs, all of them, in this order: 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). that's eighteen structs. iconic behaviour honestly πŸ’€

next, the hardware/sw helper girlies: hw_turn_on_intr(9), hw_block_intr(9), sw_r_table(9), sw_w_table_64(9), sw_w_sta_mac_table(9), sw_r_vlan_table(9), port_r_mib_cnt(9), port_r_mib_pkt(9), port_r_cnt(9), port_init_cnt(9), port_cfg(9), port_r8(9), port_r16(9), port_w16(9).

then the switch config squad: sw_chk(9), sw_cfg(9), sw_cfg_broad_storm(9), sw_get_broad_storm(9), sw_dis_broad_storm(9), sw_ena_broad_storm(9), sw_init_broad_storm(9), hw_cfg_broad_storm(9), sw_dis_prio_rate(9), sw_init_prio_rate(9), sw_dis_diffserv(9), sw_dis_802_1p(9), sw_cfg_replace_null_vid(9), sw_cfg_replace_vid(9), sw_cfg_port_based(9), sw_dis_multi_queue(9), sw_init_prio(9), port_get_def_vid(9), sw_init_vlan(9), sw_cfg_port_base_vlan(9), sw_set_addr(9), sw_set_global_ctrl(9), port_set_stp_state(9), sw_clr_sta_mac_table(9), sw_init_stp(9), sw_block_addr(9).

PHY and EEPROM moment: hw_r_phy(9), hw_w_phy(9), eeprom_read(9), eeprom_write(9), port_get_link_speed(9), port_set_link_speed(9), port_force_link_speed(9).

wake-on-LAN crew, they ate: hw_chk_wol_pme_status(9), hw_clr_wol_pme_status(9), hw_cfg_wol_pme(9), hw_cfg_wol(9), hw_set_wol_frame(9), hw_add_wol_arp(9), hw_add_wol_bcast(9), hw_add_wol_mcast(9), hw_add_wol_ucast(9), hw_enable_wol(9).

main hw lifecycle besties: hw_init(9), hw_reset(9), hw_setup(9), hw_setup_intr(9), hw_set_desc_base(9), hw_start_rx(9), hw_stop_rx(9), hw_start_tx(9), hw_stop_tx(9), hw_disable(9), hw_enable(9), hw_alloc_pkt(9), hw_send_pkt(9), hw_set_addr(9), hw_clr_multicast(9), hw_set_grp_addr(9), hw_set_multicast(9), hw_set_promiscuous(9), sw_enable(9), sw_setup(9).

timers and descriptors and memory, oh my: ksz_start_timer(9), ksz_stop_timer(9), ksz_alloc_soft_desc(9), ksz_alloc_desc(9), free_dma_buf(9), ksz_init_rx_buffers(9), ksz_alloc_mem(9), ksz_free_desc(9), ksz_free_buffers(9), ksz_free_mem(9).

packet path girlies: send_packet(9), transmit_cleanup(9), tx_done(9), netdev_tx(9), netdev_tx_timeout(9), netdev_intr(9), netdev_close(9), netdev_open(9), netdev_query_statistics(9), netdev_set_mac_address(9), netdev_set_rx_mode(9), netdev_ioctl(9), mdio_read(9), mdio_write(9).

ethtool + netdev ops, the whole ensemble cast: netdev_get_link_ksettings(9), netdev_set_link_ksettings(9), netdev_nway_reset(9), netdev_get_link(9), netdev_get_drvinfo(9), netdev_get_regs_len(9), netdev_get_regs(9), netdev_get_wol(9), netdev_set_wol(9), netdev_get_msglevel(9), netdev_set_msglevel(9), netdev_get_eeprom_len(9), netdev_get_eeprom(9), netdev_set_eeprom(9), netdev_get_pauseparam(9), netdev_set_pauseparam(9), netdev_get_ringparam(9), netdev_get_strings(9), netdev_get_sset_count(9), netdev_get_ethtool_stats(9), netdev_set_features(9), dev_monitor(9), netdev_init(9).

like, that's the entire friend group and they ALL showed up to the party πŸ’€πŸŽ‰


ok real talk bestie β€” this page has like zero warnings and zero caveats in it, which honestly? a serve. no gotchas, no "undefined behaviour", no "do not call this or your kernel will simply pass away." it's just a read. enjoy the peace and quiet while it lasts πŸ™ˆπŸŒΈ

and that's the whole page!! 🌟 this cutie came out of ./drivers/net/ethernet/micrel, October 2026, and it's the hw_read_addr(9) manual page β€” go read a MAC address, you absolute icon πŸ‘‘πŸ’– mwah πŸ’‹

πŸ“¦ where this page comes from