iwl_mei_set_netdev(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– iwl_mei_set_netdev(9) πŸ’–

okay so bestie, we're in section 9 of the Kernel API Manual today and the function on the cover is iwl_mei_set_netdev β€” yes the whole page is literally named after it, she's the main character. Let's get into it πŸŽ€


✨ NAME ✨

iwl_mei_set_netdev β€” sets the netdev for Tx / Rx. that's it, that's the job πŸ’…


🌸 SYNOPSIS 🌸

void iwl_mei_set_netdev (struct net_device *netdev );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • netdev β€” the net_device. that's the one, the whole vibe of this function lives or dies on what you pass here 🫢

πŸ’œ DESCRIPTION πŸ’œ

okay so here's the tea, and please actually read it because the ordering matters:

The caller should set the netdev to a non-NULL value when the interface is added. and like, be aware that packets might be sent to the driver immediately afterwards β€” no grace period, no lil warm-up arc, they're coming in hot πŸ”₯

The caller should set the netdev to NULL when the interface is removed.

This function will call synchronize_net after setting the netdev to NULL. and only when this function returns can the caller assume that iwlmei will no longer inject packets into the netdev's Tx path. like, that's the guarantee β€” the return is the signal, don't go assuming it early 😭


🧚 CONTEXT 🧚

  • This function can sleep and assumes rtnl_lock is taken.
  • The netdev must be set to NULL before iwl_mei_start_unregister is called.
bestie this is the "read the room" section. sleeping function + rtnl_lock assumption + that ordering rule = do not freestyle it πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/wireless/intel/iwlwifi/mei/iwl-mei.h

Introduction(9), Life cycle(9), Memory layout(9), Concurrency(9), Probe and remove from mei bus driver(9), Driver load when CSME owns the device(9), CSME behavior regarding the ownership requests(9), Driver load when CSME is associated and a session is active(9), Datapath(9), enum iwl_mei_nvm_caps(9), struct iwl_mei_nvm(9), enum iwl_mei_pairwise_cipher(9), enum iwl_mei_akm_auth(9), struct iwl_mei_conn_info(9), struct iwl_mei_colloc_info(9), enum iwl_mei_sap_version(9), iwl_mei_is_connected(9), iwl_mei_get_nvm(9), iwl_mei_get_ownership(9), iwl_mei_set_rfkill_state(9), iwl_mei_set_nic_info(9), iwl_mei_set_country_code(9), iwl_mei_set_power_limit(9), iwl_mei_register(9), iwl_mei_start_unregister(9), iwl_mei_unregister_complete(9), iwl_mei_tx_copy_to_csme(9), iwl_mei_host_associated(9), iwl_mei_host_disassociated(9), iwl_mei_device_state(9), iwl_mei_pldr_req(9), iwl_mei_alive_notif(9)

go read them, i'll wait πŸ’–


and that's the page!! mwah πŸ’‹ this came out of ./drivers/net/wireless/intel/i... and it's dated October 2026 β€” so yeah, she's from the future, slay πŸ‘‘βœ¨

πŸ“¦ where this page comes from