STRUCT IWL_MVM_ADD_STA_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ¦‹ struct iwl_mvm_add_sta_cmd(9) πŸ¦‹

okay so bestie, we're in the Kernel API Manual today and this is genuinely one of my fave little structs β€” it's the struct iwl_mvm_add_sta_cmd page, and it's giving "backstage pass to the firmware's guest list" energy πŸ’…


✨ NAME ✨

struct iwl_mvm_add_sta_cmd β€” Add/modify a station in the fw's sta table. ( REPLY_ADD_STA = 0x18 )


🌸 SYNOPSIS 🌸

struct iwl_mvm_add_sta_cmd {
    u8 add_modify;
    u8 awake_acs;
    __le16 tid_disable_tx;
    __le32 mac_id_n_color;
    u8 addr[ETH_ALEN];
    __le16 reserved2;
    u8 sta_id;
    u8 modify_mask;
    __le16 reserved3;
    __le32 station_flags;
    __le32 station_flags_msk;
    u8 add_immediate_ba_tid;
    u8 remove_immediate_ba_tid;
    __le16 add_immediate_ba_ssn;
    __le16 sleep_tx_count;
    u8 sleep_state_flags;
    u8 station_type;
    __le16 assoc_id;
    __le16 beamform_flags;
    __le32 tfd_queue_msk;
    __le16 rx_ba_window;
    u8 sp_length;
    u8 uapsd_acs;
 };

πŸ’– Members πŸ’–

like, every field, and yes we're doing all of them, no skipping 🫢

  • add_modify β€” see enum iwl_sta_mode
  • awake_acs β€” the ACs to transmit data on while the station is sleeping (that's for U-APSD)
  • tid_disable_tx β€” this one's asking "is tid BIT(tid) enabled for Tx?" Clear BIT(x) to enable AMPDU for tid x. And to actually change this field you gotta set STA_MODIFY_TID_DISABLE_TX. iykyk.
  • mac_id_n_color β€” the Mac context this station belongs to, see enum iwl_ctxt_id_and_color
  • addr β€” station's MAC address
  • reserved2 β€” reserved, it's literally just vibing there
  • sta_id β€” index of station in uCode's station table
  • modify_mask β€” from enum iwl_sta_modify_flag, selects what to change
  • reserved3 β€” reserved, another filler queen πŸ‘‘
  • station_flags β€” look at enum iwl_sta_flags
  • station_flags_msk β€” what of station_flags have changed, also enum iwl_sta_flags
  • add_immediate_ba_tid β€” tid for which to add block-ack support (Rx). Set STA_MODIFY_ADD_BA_TID to use this field, and also set add_immediate_ba_ssn. package deal, fr fr.
  • remove_immediate_ba_tid β€” tid for which to remove block-ack support (Rx). Set STA_MODIFY_REMOVE_BA_TID to use this field
  • add_immediate_ba_ssn β€” ssn for the Rx block-ack session. Used together with add_immediate_ba_tid. they're a duo, you can't split them 😭
  • sleep_tx_count β€” number of packets to transmit to station even though it is asleep. Used to synchronise PS-poll and u-APSD responses while ucode keeps track of STA sleep state. so it's like, "how many texts do I send while they're napping" energy πŸ’€
  • sleep_state_flags β€” Look at enum iwl_sta_sleep_flag.
  • station_type β€” type of this station. See enum iwl_sta_type.
  • assoc_id β€” assoc_id to be sent in VHT PLCP (9-bit), for grp use 0, for AP mac-addr.
  • beamform_flags β€” beam forming controls ✨ literally shaping the vibe
  • tfd_queue_msk β€” tfd queues used by this station. Obselete β€” Obselete, their spelling not mine πŸ“ β€” for new TX API (9 and above).
  • rx_ba_window β€” aggregation window size
  • sp_length β€” the size of the SP in actual number of frames
  • uapsd_acs β€” 4 LS bits are trigger enabled ACs, 4 MS bits are the deliver enabled ACs. half and half, like a lil snack split πŸŽ€

🌈 Description 🌈

The device contains an internal table of per-station information, with info on security keys, aggregation parameters, and Tx rates for initial Tx attempt and any retries (set by REPLY_TX_LINK_QUALITY_CMD).

ADD_STA sets up the table entry for one station, either creating a new entry, or modifying a pre-existing one. so it's the "new friend or update your contact info" command, main character energy honestly πŸ‘‘


⭐ SEE ALSO ⭐

Kernel file ./drivers/net/wireless/intel/iwlwifi/fw/api/sta.h and the whole friend group:

  • enum iwl_sta_flags(9)
  • enum iwl_sta_key_flag(9)
  • enum iwl_sta_modify_flag(9)
  • enum iwl_sta_mode(9)
  • enum iwl_sta_sleep_flag(9)
  • struct iwl_mvm_add_sta_cmd_v7(9)
  • enum iwl_sta_type(9)
  • struct iwl_mvm_add_sta_key_common(9)
  • struct iwl_mvm_add_sta_key_cmd_v1(9)
  • struct iwl_mvm_add_sta_key_cmd(9)
  • enum iwl_mvm_add_sta_rsp_status(9)
  • struct iwl_mvm_rm_sta_cmd(9)
  • struct iwl_mvm_mgmt_mcast_key_cmd_v1(9)
  • struct iwl_mvm_mgmt_mcast_key_cmd(9)
  • struct iwl_mvm_eosp_notification(9)
go read them all, bestie, do it for the plot πŸ’œ

kay that's the whole page! credits moment 🎬: this one came from the kernel file ./drivers/net/wireless/intel/i... and it's dated October 2026, and it's filed under struct iwl_mvm_add_sta_cmd(9). slay, stan, and always read your manpages πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from