netdev_set_mac_address(9)
π netdev_set_mac_address β like, the Kernel API Manual page, bestie π
Okay so picture this: you're deep in the kernel, you're in netdev_set_mac_address(9) territory, and honestly? It's giving "small function, big job." Let's get into it. β¨
πΈ NAME πΈ
netdev_set_mac_address β writes the MAC address, and yes, from outside the driver, that's the whole point π«Ά
β¨ SYNOPSIS β¨
int netdev_set_mac_address (struct net_device *ndev , void *p );
That's it. That's the whole signature. Iconic, lowkey. π
π¦ ARGUMENTS π¦
ndevβ a pointer to thenet_devicestructure. Your device, your bestie, your main character. πpβ a 6 byte address that's gonna get written as the MAC address. Six whole bytes. That's the entire identity of your NIC, no cap. π
π RETURN π
It returns 0 for all conditions. Presently, there is no failure case. Not one. Zero failure energy. It literally cannot fail you, and honestly? We stan a reliable function. ππ₯
π DESCRIPTION π
So here's the vibe: netdev_set_mac_address is the function you call to initialize the MAC address of the Axi Ethernet core. πΈ
It does this by calling the core specific axienet_set_mac_address β so it's like, the friendly middleman. π
And the fun part: this is the function that goes into the net_device_ops structure entry ndo_set_mac_address. Like, it is the entry. Registration slay. β¨
π§ SEE ALSO π§
Girl, this list is long. It's giving "the whole family tree." Sit down, grab a snack, we're doing all of them. π
First up, the kernel file itself:
- Kernel file
./drivers/net/ethernet/xilinx/xilinx_axienet_main.c
And then the entire axienet extended universe, no skips, no cuts: π
axienet_dma_in32(9)axienet_dma_bd_release(9)axienet_calc_cr(9)axienet_coalesce_params(9)axienet_dma_start(9)axienet_dma_bd_init(9)axienet_set_mac_address(9)axienet_set_multicast_list(9)axienet_setoptions(9)axienet_dma_stop(9)axienet_device_reset(9)axienet_free_tx_chain(9)axienet_check_tx_bd_space(9)axienet_dma_tx_cb(9)axienet_start_xmit_dmaengine(9)axienet_tx_poll(9)axienet_start_xmit(9)axienet_dma_rx_cb(9)axienet_rx_poll(9)axienet_tx_irq(9)axienet_rx_irq(9)axienet_eth_irq(9)axienet_rx_submit_desc(9)axienet_init_dmaengine(9)axienet_init_legacy_dma(9)axienet_open(9)axienet_stop(9)axienet_change_mtu(9)axienet_poll_controller(9)axienet_ethtools_get_drvinfo(9)axienet_ethtools_get_regs_len(9)axienet_ethtools_get_regs(9)axienet_ethtools_get_pauseparam(9)axienet_ethtools_set_pauseparam(9)axienet_update_coalesce_rx(9)axienet_dim_coalesce_count_rx(9)axienet_rx_dim_work(9)axienet_update_coalesce_tx(9)axienet_ethtools_get_coalesce(9)axienet_ethtools_set_coalesce(9)axienet_dma_err_handler(9)axienet_probe(9)
All forty-two of them. Read them, love them, link them. π«Ά
Okay that's the whole page, bestie! π This little gem lives in ./drivers/net/ethernet/xilinx, it's part of the Kernel API Manual, and this particular edition is dated October 2026 β so yeah, she's got a timestamp and everything. Go set some MAC addresses, you absolute icon. ππΈβ¨
π¦ 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