STRUCT IWL_MAC_CTX_CMD(9)
π 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, seeenum iwl_ctxt_actionmac_typeβ one ofenum iwl_mac_typestsf_idβ TSF HW timer, one ofenum iwl_tsf_idβ±οΈnode_addrβ MAC addressreserved_for_node_addrβ reserved, don't touch, it's not for you πbssid_addrβ BSSIDreserved_for_bssid_addrβ reserved, again, hands off π«Άcck_ratesβ basic rates available for CCKofdm_ratesβ basic rates available for OFDMprotection_flagsβ a combination ofenum iwl_mac_protection_flagscck_short_preambleβ0x20for enabling short preamble,0otherwiseshort_slotβ0x10for enabling short slots,0otherwisefilter_flagsβ a combination ofenum iwl_mac_filter_flagsqos_flagsβ fromenum iwl_mac_qos_flagsacβ oneiwl_mac_qosconfiguration for each AC{unnamed_union}β anonymous, mysterious, main character energy β¨apβ AP specific config data, seestruct iwl_mac_data_apgoβ GO specific config data, seestruct iwl_mac_data_gostaβ BSS client specific config data, seestruct iwl_mac_data_stap2p_staβ P2P client specific config data, seestruct iwl_mac_data_p2p_stap2p_devβ P2P-device specific config data, seestruct iwl_mac_data_p2p_devpibssβ Pseudo-IBSS specific data, and heads up bestie, it's unused; seestruct iwl_mac_data_pibssibssβ IBSS specific config data, seestruct 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
- 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