STRUCT IWL_NAN_CONFIG_CMD(9)
π 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, seeenum 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 are44and149, which correspond to the 5 GHz channel, and0, which means NAN operation on the 5 GHz band is disabled. So it's44,149, or0β 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 to0, the dwell time is determined by the firmware. The firmware takes the wheel. πscan_periodβ scan period in seconds. If set to0, the scan period is determined by the firmware. Same deal β hand it to firmware and chill. π«Άflagsβ flags for the NAN configuration, seeenum 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
- 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