STRUCT IWL_NAN_PEER_CMD(9)
β¨ 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 of0means 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:0indicates 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, theper_phyarray is sized byNUM_PHY_CTXand the0value ofavailability_mapmeans 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
- 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