STRUCT IWL_MAC_CTX_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct iwl_mac_ctx_cmd(9) β€” from the Kernel API Manual, bestie

okay so picture this: you're in the kernel API manual, right, and you run into struct iwl_mac_ctx_cmd. bestie. this is the command structure for configuring MAC contexts. like, the whole vibe of MAC setup goes through here. and its code is MAC_CONTEXT_CMD = 0x28 β€” write that down, it's on the test πŸŽ€


✨ NAME ✨

struct iwl_mac_ctx_cmd β€” the command structure that configures MAC contexts (MAC_CONTEXT_CMD = 0x28) πŸ‘‘


🌸 SYNOPSIS 🌸

struct iwl_mac_ctx_cmd {
    __le32 id_and_color;
    __le32 action;
    __le32 mac_type;
    __le32 tsf_id;
    u8 node_addr[6];
    __le16 reserved_for_node_addr;
    u8 bssid_addr[6];
    __le16 reserved_for_bssid_addr;
    __le32 cck_rates;
    __le32 ofdm_rates;
    __le32 protection_flags;
    __le32 cck_short_preamble;
    __le32 short_slot;
    __le32 filter_flags;
    __le32 qos_flags;
    struct iwl_ac_qos ac[AC_NUM+1];
    union {
      struct iwl_mac_data_ap ap;
      struct iwl_mac_data_go go;
      struct iwl_mac_data_sta sta;
      struct iwl_mac_data_p2p_sta p2p_sta;
      struct iwl_mac_data_p2p_dev p2p_dev;
      struct iwl_mac_data_pibss pibss;
      struct iwl_mac_data_ibss ibss;
    };
 };

πŸ¦‹ Members πŸ¦‹

okay this is the part where we go through every single one, no skipping, no "you get the idea" β€” periodt πŸ’…

  • id_and_color β€” the ID and color of the MAC. yes, color, it's a whole thing 🎨
  • action β€” the action to perform, see enum iwl_ctxt_action
  • mac_type β€” one of enum iwl_mac_types
  • tsf_id β€” TSF HW timer, one of enum iwl_tsf_id ⏱️
  • node_addr β€” MAC address
  • reserved_for_node_addr β€” reserved, don't touch, it's not for you πŸ™ˆ
  • bssid_addr β€” BSSID
  • reserved_for_bssid_addr β€” reserved, again, hands off 🫢
  • cck_rates β€” basic rates available for CCK
  • ofdm_rates β€” basic rates available for OFDM
  • protection_flags β€” a combination of enum iwl_mac_protection_flags
  • cck_short_preamble β€” 0x20 for enabling short preamble, 0 otherwise
  • short_slot β€” 0x10 for enabling short slots, 0 otherwise
  • filter_flags β€” a combination of enum iwl_mac_filter_flags
  • qos_flags β€” from enum iwl_mac_qos_flags
  • ac β€” one iwl_mac_qos configuration for each AC
  • {unnamed_union} β€” anonymous, mysterious, main character energy ✨
  • ap β€” AP specific config data, see struct iwl_mac_data_ap
  • go β€” GO specific config data, see struct iwl_mac_data_go
  • sta β€” BSS client specific config data, see struct iwl_mac_data_sta
  • p2p_sta β€” P2P client specific config data, see struct iwl_mac_data_p2p_sta
  • p2p_dev β€” P2P-device specific config data, see struct iwl_mac_data_p2p_dev
  • pibss β€” Pseudo-IBSS specific data, and heads up bestie, it's unused; see struct iwl_mac_data_pibss
  • ibss β€” IBSS specific config data, see struct iwl_mac_data_ibss
lowkey important: that union is anonymous, so all those structs are just... vibing in the same spot. only one at a time, iykyk 🧚

πŸ”₯ SEE ALSO πŸ”₯

go read these, they're all connected, it's giving lore:

Kernel file ./drivers/net/wireless/intel/iwlwifi/fw/api/mac.h, enum iwl_mac_protection_flags(9), enum iwl_mac_types(9), enum iwl_tsf_id(9), struct iwl_mac_data_ap(9), struct iwl_mac_data_ibss(9), enum iwl_mac_data_policy(9), struct iwl_mac_data_sta(9), struct iwl_mac_data_go(9), struct iwl_mac_data_p2p_sta(9), struct iwl_mac_data_pibss(9), enum iwl_mac_filter_flags(9), enum iwl_mac_qos_flags(9), struct iwl_ac_qos(9), struct iwl_missed_beacons_notif_ver_3(9), struct iwl_missed_beacons_notif_v4(9), struct iwl_he_backoff_conf(9), enum iwl_he_pkt_ext_constellations(9), struct iwl_he_pkt_ext_v1(9), struct iwl_he_pkt_ext_v2(9), enum iwl_he_sta_ctxt_flags(9), enum iwl_he_htc_flags(9), struct iwl_he_sta_context_cmd_v1(9), struct iwl_he_sta_context_cmd_v2(9), struct iwl_he_sta_context_cmd_v3(9), struct iwl_he_monitor_cmd(9)


and that's the whole page, bestie πŸ’– signing off from ./drivers/net/wireless/intel/i... β€” yeah the path got cut off, tragic, we don't know the rest 😭 β€” dated October 2026, and the page itself is struct iwl_mac_ctx_cmd(9). slay, go configure some MAC contexts πŸŽ€βœ¨πŸ‘‘

πŸ“¦ where this page comes from