STRUCT IWL_NAN_PEER_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

struct iwl_nan_peer_cmd β€” the NAN peer command πŸ’… (this is straight out of the Kernel API Manual, bestie, so you know it's legit)

okay so real talk, this is the struct that carries a NAN peer command, and yes it's giving "I'm a wireless driver and I have layers" energy. let's get into it 🫢


🌸 SYNOPSIS 🌸

struct iwl_nan_peer_cmd {
    u8 nmi_sta_id;
    u8 sequence_id;
    __le16 committed_dw_info;
    __le16 max_channel_switch_time;
    __le16 reserved;
    struct {
      __le32 availability_map;
      u8 channel_entry[6];
      u8 link_id;
      u8 map_id;
    } per_phy[NUM_PHY_CTX];
    __le32 initial_ulw_size;
    u8 initial_ulw[];
};

like… it's a whole vibe check in a struct, no cap. copy it exactly, don't be out here renaming fields, i'm begging 😭


πŸŽ€ Members πŸŽ€

time for the field-by-field tour, bestie. every single one matters, so no skipping, periodt.

  • nmi_sta_id β€” the NAN management station ID. this is the "who am i" of the whole thing πŸ’«
  • sequence_id β€” the NAN Availability attribute sequence ID. tracking order, keeping things tidy ✨
  • committed_dw_info β€” committed DW info, pulled straight from the NAN Device Capability attribute. it's imported, it's iconic πŸ‘‘
  • max_channel_switch_time β€” max channel switch time, measured in microseconds. and listen: a value of 0 means unavailable. lowkey important detail, don't forget it πŸ™ˆ
  • reserved β€” (reserved). that's it. that's the whole field. it's reserved. leave it alone πŸ’€
  • per_phy β€” per-PHY information for this peer, indexed by PHY ID. it's an array of structs β€” we love a nested moment 🧚

and inside that nested struct:

  • per_phy.availability_map β€” a bitmap of which slots this peer is available in on this PHY. and here's the plot twist: 0 indicates the this per-PHY entry is unused (yes, the "the this" is in the original, i don't make the rules, i just keep every detail πŸ“)
  • per_phy.channel_entry β€” the channel description the peer is using. it's used for comparisons in ULW management. comparisons, bestie, it's out here judging channels πŸ”₯
  • per_phy.link_id β€” the FW link ID. it should be a valid id β€” so like, actually make it valid, please 🌸
  • per_phy.map_id β€” the map ID from the peer's NAN Availability attributec. (that trailing "c" is canon, i will not be fixing it πŸ’…)
  • initial_ulw_size β€” the size of the initial ULW blob. sizes matter, respect them πŸŽ€
  • initial_ulw β€” the initial ULW data from the peer. a flexible array member, living its best main character energy at the end of the struct 🌈

πŸ‘‘ SEE ALSO πŸ‘‘

okay this is the friend group, the whole squad, the entire group chat. every single one, in order, fr fr:

Kernel file ./drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h, enum iwl_mac_conf_subcmd_ids(9), struct iwl_p2p_noa_attr(9), struct iwl_probe_resp_data_notif(9), struct iwl_missed_vap_notif(9), struct iwl_channel_switch_start_notif_v1(9), struct iwl_channel_switch_start_notif(9), struct iwl_channel_switch_error_notif_v1(9), struct iwl_channel_switch_error_notif(9), struct iwl_cancel_channel_switch_cmd(9), struct iwl_chan_switch_te_cmd(9), struct iwl_mac_low_latency_cmd(9), struct iwl_mac_client_data(9), struct iwl_mac_p2p_dev_data(9), enum iwl_mac_config_filter_flags(9), struct iwl_mac_wifi_gen_support_v2(9), struct iwl_mac_wifi_gen_support(9), struct iwl_mac_config_cmd_v3(9), struct iwl_mac_nan_data(9), struct iwl_mac_config_cmd(9), enum iwl_link_ctx_modify_flags(9), enum iwl_link_ctx_protection_flags(9), enum iwl_link_ctx_flags(9), enum iwl_link_modify_bandwidth(9), enum iwl_npca_flags(9), struct iwl_npca_params(9), struct iwl_link_config_cmd(9), enum iwl_fw_sta_type(9), struct iwl_sta_cfg_cmd_v1(9), struct iwl_sta_cfg_cmd_v2(9), struct iwl_sta_cfg_cmd(9), struct iwl_aux_sta_cmd(9), struct iwl_remove_sta_cmd(9), struct iwl_mvm_sta_disable_tx_cmd(9), enum iwl_mvm_fw_esr_recommendation(9), struct iwl_esr_mode_notif_v1(9), enum iwl_esr_leave_reason(9), struct iwl_esr_mode_notif(9), struct iwl_missed_beacons_notif(9), struct iwl_esr_trans_fail_notif(9), struct iwl_twt_operation_cmd(9), struct iwl_nan_band_config(9), enum iwl_nan_flags(9), struct iwl_nan_config_cmd(9), struct iwl_nan_schedule_cmd_v1(9), struct iwl_nan_schedule_cmd(9), enum iwl_nan_cluster_notif_flags(9), struct iwl_nan_cluster_notif(9), struct iwl_nan_dw_end_notif(9), struct iwl_nan_ulw_attr_notif(9), enum iwl_nan_sched_update_status(9), struct iwl_nan_sched_update_completed_notif(9)

that's a lot of friends and every one of them ate πŸ’–


ngl, the per_phy array is sized by NUM_PHY_CTX and the 0 value of availability_map means that entry is unused β€” if you're iterating, do the vibe check first before you read anything else πŸ™ˆ

and that's the page, bestie! source is ./drivers/net/wireless/intel/i..., dated October 2026, and it's struct iwl_nan_peer_cmd(9) all the way down. slay, go read some kernel headers, mwah πŸ’œπŸ¦‹βœ¨

πŸ“¦ where this page comes from