STRUCT IWL_NAN_CONFIG_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct iwl_nan_config_cmd(9) β€” NAN configuration command

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes this is a real kernel manpage and yes you're gonna understand it, because this struct is literally just the "hey firmware, here's how I want my NAN set up" message. No cap. 🫢

Let me walk you through it, field by field, like we're doing homework together at 1am. πŸ•―οΈ


✨ NAME ✨

struct iwl_nan_config_cmd β€” NAN configuration command. That's it, that's the whole vibe. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

Look at her. Iconic. This is the exact shape of the struct, don't touch a single character:

struct iwl_nan_config_cmd {
    __le32 action;
    u8 nmi_addr[6];
    __le16 reserved_for_nmi_addr;
    __le32 discovery_beacon_interval;
    u8 cluster_id[2];
    u8 sta_id;
    u8 hb_channel;
    u8 master_pref;
    u8 dwell_time;
    u8 scan_period;
    u8 flags;
    struct iwl_nan_band_config band_config[IWL_NUM_NAN_BANDS];
    __le32 nan_attr_len;
    __le32 nan_vendor_elems_len;
    u8 beacon_data[];
};

Lowkey a whole personality in a struct. πŸ’–


πŸ’… Members πŸ’…

  • action β€” the action to perform, see enum iwl_ctxt_action. Like picking which move you're making. 🎬
  • nmi_addr β€” the NAN Management Interface (NMI) address. Her address. Her identity. 🌸
  • reserved_for_nmi_addr β€” reserved. It's reserved, bestie. Leave it alone, it's not for us. πŸ™ˆ
  • discovery_beacon_interval β€” discovery beacon interval in TUs. That's the timing of the discovery beacons, in TUs. ⏳
  • cluster_id β€” the lower last two bytes of the cluster ID, in case the local device starts a cluster. So if you're the one starting the cluster, you get to name her β€” well, two bytes of her. πŸ‘‘
  • sta_id β€” station ID of the NAN station. Careful here: used only in version 1, and in version 2 it's reserved. Version 2 said "not my problem." πŸ’€
  • hb_channel β€” the channel for 5 GHz if the device supports operating on 5 GHz. The valid values are 44 and 149, which correspond to the 5 GHz channel, and 0, which means NAN operation on the 5 GHz band is disabled. So it's 44, 149, or 0 β€” no in-between, no improvising. 🎯
  • master_pref β€” master preference. 🌟
  • dwell_time β€” dwell time on the discovery channel during scan (milliseconds). And if you set it to 0, the dwell time is determined by the firmware. The firmware takes the wheel. πŸš—
  • scan_period β€” scan period in seconds. If set to 0, the scan period is determined by the firmware. Same deal β€” hand it to firmware and chill. 🫢
  • flags β€” flags for the NAN configuration, see enum iwl_nan_flags. 🚩
  • band_config β€” band configuration for NAN, one for each band. Every band gets her own little config. ✨
  • nan_attr_len β€” length of the NAN attributes to be added to the beacon (bytes). πŸ“
  • nan_vendor_elems_len β€” length of the NAN vendor elements to be added to the beacon (bytes). πŸ“
  • beacon_data β€” variable length data that contains the NAN attributes (nan_attr_len) followed by the NAN vendor elements (nan_vendor_elems_len). Variable length!! She can grow!! πŸ’
heads up bestie: those two length fields are literally telling you how to read beacon_data β€” attributes first, then vendor elements. Don't mix up the order or it's giving chaos. 😭

🌈 SEE ALSO 🌈

The whole friend group 🫢 β€” header file ./drivers/net/wireless/intel/iwlwifi/fw/api/mac-cfg.h plus:

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_schedule_cmd_v1(9), struct iwl_nan_schedule_cmd(9), struct iwl_nan_peer_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).

Like I said. The whole friend group. πŸŽ€


and that's the page!! source credit goes to ./drivers/net/wireless/intel/i... and she's dated October 2026 β€” so yeah, future-coded, main character energy, periodt. πŸ§šπŸ’œ go read your structs bestie, you're doing amazing πŸ«ΆπŸ’–

πŸ“¦ where this page comes from