STRUCT IWL_SEC_KEY_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct iwl_sec_key_cmd β€” security key command πŸ’–

okay bestie so this is a page straight out of the Kernel API Manual (yes, the kernel has lore) and today's main character is struct iwl_sec_key_cmd, the security key command. it's giving "i hold your keys and i'm not sorry." πŸ”‘βœ¨


🌸 NAME 🌸

struct iwl_sec_key_cmd β€” security key command. that's it, that's the vibe. she's a struct, she carries key commands, she slays.


✨ SYNOPSIS ✨

okay look at her. look at the anatomy. the way she's built 🫢

struct iwl_sec_key_cmd {
    __le32 action;
    union {
      struct {
        __le32 sta_mask;
        __le32 key_id;
        __le32 key_flags;
        u8 key[32];
        u8 tkip_mic_rx_key[8];
        u8 tkip_mic_tx_key[8];
        __le64 rx_seq;
        __le64 tx_seq;
      } add;
      struct {
        __le32 old_sta_mask;
        __le32 new_sta_mask;
        __le32 key_id;
        __le32 key_flags;
      } modify;
      struct {
        __le32 sta_mask;
        __le32 key_id;
        __le32 key_flags;
      } remove;
    } u;
 };

so there's action, and then there's u β€” the union that switches up its whole personality depending on which command type you're running. add, modify, remove. three little eras, one union. iconic. πŸ’…


πŸŽ€ Members πŸŽ€

  • action β€” the action, pulled from enum iwl_ctxt_action. she decides which member of the union gets to shine. ✨
  • u β€” the union itself, and which face she's wearing totally depends on the command type. union depending on command type, periodt.
  • u.add.sta_mask β€” station mask for the new key πŸ’«
  • u.add.key_id β€” key ID (0-7) for the new key. yes, 0-7, no cap, that's the range πŸ”’
  • u.add.key_flags β€” key flags, per enum iwl_sec_key_flags
  • u.add.key β€” the actual key material. ⚠️ heads up: WEP keys should start from IWL_SEC_WEP_KEY_OFFSET. don't forget the offset, bestie, you'll have a bad time 😭
  • u.add.tkip_mic_rx_key β€” TKIP MIC RX key
  • u.add.tkip_mic_tx_key β€” TKIP MIC TX key
  • u.add.rx_seq β€” RX sequence counter value
  • u.add.tx_seq β€” TX sequence counter value

like, the add era is the full glam: keys, mics, sequences, she has everything. πŸ’…

  • u.modify.old_sta_mask β€” old station mask (the before picture πŸ“Έ)
  • u.modify.new_sta_mask β€” new station mask (the glow-up ✨)
  • u.modify.key_id β€” key ID
  • u.modify.key_flags β€” new key flags
  • u.remove.sta_mask β€” station mask
  • u.remove.key_id β€” key ID
  • u.remove.key_flags β€” key flags

and remove is the minimalist era: mask, key ID, flags, bye πŸ‘‹ the way she's so much shorter than add... it's giving "we don't do extra here."


πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group 🫢 β€” go say hi, iykyk:

  • Kernel file ./drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h β€” that's where she lives
  • enum iwl_data_path_subcmd_ids(9)
  • struct iwl_mu_group_mgmt_cmd(9)
  • struct iwl_mu_group_mgmt_notif(9)
  • struct iwl_time_sync_cfg_cmd(9)
  • enum iwl_synced_time_operation(9)
  • struct iwl_synced_time_cmd(9)
  • struct iwl_synced_time_rsp(9)
  • struct iwl_time_msmt_ptp_ctx(9)
  • struct iwl_time_msmt_notify(9)
  • struct iwl_time_msmt_cfm_notify(9)
  • struct iwl_channel_estimation_cfg(9)
  • enum iwl_thermal_dual_chain_req_events(9)
  • struct iwl_thermal_dual_chain_request(9)
  • struct iwl_rlc_properties(9)
  • struct iwl_sad_properties(9)
  • struct iwl_rlc_config_cmd(9)
  • enum iwl_rx_baid_action(9)
  • struct iwl_rx_baid_cfg_cmd_alloc(9)
  • struct iwl_rx_baid_cfg_cmd_modify(9)
  • struct iwl_rx_baid_cfg_cmd_remove_v1(9)
  • struct iwl_rx_baid_cfg_cmd_remove(9)
  • struct iwl_rx_baid_cfg_cmd(9)
  • struct iwl_rx_baid_cfg_resp(9)
  • enum iwl_scd_queue_cfg_operation(9)
  • struct iwl_scd_queue_cfg_cmd(9)
  • enum iwl_sec_key_flags(9)

ngl the u.add.key WEP offset thing is the one you'll actually trip over. IWL_SEC_WEP_KEY_OFFSET. write it on your hand. fr fr. πŸ’€

okay that's the whole page!! sourced from ./drivers/net/wireless/intel/i... (she's got a long address, don't make her type it out) and dated October 2026 β€” future queen behavior honestly πŸ‘‘πŸŒˆ that's your struct iwl_sec_key_cmd(9), periodt, love u bye πŸ’œπŸ§šβ€β™€οΈ

πŸ“¦ where this page comes from