STRUCT IWL_TOF_RANGE_REQ_CMD_V11(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ struct iwl_tof_range_req_cmd_v11 β€” start measurement cmd ✨

okay bestie, so this is straight out of the Kernel API Manual (struct iwl_tof_range_req_cmd_v11, section 9, obviously πŸ’…) and it's literally the command that kicks off a measurement. we're in the group chat now, let's get into it 🫢


🌸 SYNOPSIS 🌸

here's the whole struct, copy-paste vibes, do not touch:

struct iwl_tof_range_req_cmd_v11 {
    __le32 initiator_flags;
    u8 request_id;
    u8 num_of_ap;
    u8 range_req_bssid[ETH_ALEN];
    u8 macaddr_mask[ETH_ALEN];
    u8 macaddr_template[ETH_ALEN];
    __le32 req_timeout_ms;
    __le32 tsf_mac_id;
    struct iwl_tof_range_req_ap_entry_v7 ap[IWL_TOF_MAX_APS];
 };

πŸ’– Members πŸ’–

okay so going field by field, no skips, we don't do that here:

  • initiator_flags β€” the flags bestie. like, go look at iwl_tof_initiator_flags, that's the whole vibe check for this one πŸ‘€
  • request_id β€” a Token that gets incremented per request (capital T Token, that's how the original says it, iconic). the same Token comes back to you in the range response, so you can match them up like matching bracelets πŸ”₯
  • num_of_ap β€” how many APs we're measuring. it's an error if it's > IWL_TOF_MAX_APS, so maybe don't 🫢
  • range_req_bssid β€” the ranging request BSSID, periodt.
  • macaddr_mask β€” this is the fun one: bits set to 0 shall be copied from the MAC address template, and bits set to 1 shall be randomized by the UMAC. so the mask is literally choosing which parts stay and which parts get scrambled ✨
  • macaddr_template β€” the MAC address template you use for the non-randomized bits. the pieces the mask said to keep πŸ’…
  • req_timeout_ms β€” the requested timeout of the response, in units of milliseconds. this is the session time for completing the measurement, so it's very much the "you have this long" energy ⏳
  • tsf_mac_id β€” reports the measurement start time for each ap in terms of the TSF of this mac id. set it to 0xff to disable TSF reporting entirely (yes, 0xff, exactly that) πŸ’€
  • ap β€” the per-AP request data, see struct iwl_tof_range_req_ap_entry_v2. (that's what it says, that's what I'm telling you, iykyk 🌸)

πŸ¦‹ SEE ALSO πŸ¦‹

bestie this list is long, but we are not skipping a single one, so buckle up. also shoutout to the Kernel file ./drivers/net/wireless/intel/iwlwifi/fw/api/location.h where all this lives πŸ‘‘

enum iwl_location_subcmd_ids(9), enum iwl_location_frame_format(9), enum iwl_location_bw(9), enum iwl_location_format_bw(9), struct iwl_tof_config_cmd(9), enum iwl_tof_bandwidth(9), enum iwl_tof_responder_cmd_valid_field(9), enum iwl_tof_responder_cfg_flags(9), struct iwl_tof_responder_config_cmd_v6(9), struct iwl_tof_responder_config_cmd_v7(9), struct iwl_tof_responder_config_cmd_v8(9), struct iwl_tof_responder_config_cmd_v9(9), struct iwl_tof_responder_config_cmd(9), struct iwl_tof_responder_dyn_config_cmd_v2(9), enum iwl_responder_dyn_cfg_valid_flags(9), struct iwl_tof_responder_dyn_config_cmd(9), struct iwl_tof_range_req_ext_cmd(9), enum iwl_tof_location_query(9), enum iwl_initiator_ap_flags(9), struct iwl_tof_range_req_ap_entry_v3(9), struct iwl_tof_range_req_ap_entry_v4(9), enum iwl_location_cipher(9), struct iwl_tof_range_req_ap_entry_v6(9), struct iwl_tof_range_req_ap_entry_v7(9), struct iwl_tof_range_req_ap_entry_v8(9), struct iwl_tof_range_req_ap_entry_v9(9), struct iwl_tof_range_req_ap_entry(9), enum iwl_tof_response_mode(9), enum iwl_tof_initiator_flags(9), struct iwl_tof_range_req_cmd_v5(9), struct iwl_tof_range_req_cmd_v7(9), struct iwl_tof_range_req_cmd_v8(9), struct iwl_tof_range_req_cmd_v9(9), struct iwl_tof_range_req_cmd_v12(9), struct iwl_tof_range_req_cmd_v13(9), struct iwl_tof_range_req_cmd(9), enum iwl_tof_entry_status(9), struct iwl_tof_range_rsp_ap_entry_ntfy_v3(9), struct iwl_tof_range_rsp_ap_entry_ntfy_v4(9), struct iwl_tof_range_rsp_ap_entry_ntfy_v5(9), struct iwl_tof_range_rsp_ap_entry_ntfy_v7(9), struct iwl_tof_range_rsp_ap_entry_ntfy(9), enum iwl_tof_response_status(9), struct iwl_tof_range_rsp_ntfy_v5(9), struct iwl_tof_range_rsp_ntfy_v6(9), struct iwl_tof_range_rsp_ntfy_v7(9), struct iwl_tof_range_rsp_ntfy_v9(9), struct iwl_tof_range_rsp_ntfy(9), struct iwl_tof_mcsi_notif(9), struct iwl_tof_range_abort_cmd(9), struct iwl_ftm_responder_stats(9)

like… that's the whole extended universe fr fr 🌈


ngl there's no OPTIONS section here and no exit statuses and no signals β€” it's a struct, bestie, it just is. the only spicy bits are the error if num_of_ap > IWL_TOF_MAX_APS and the 0xff TSF disable, so don't say I didn't warn you πŸ’€

πŸŽ€ sign-off πŸŽ€

this icon of a page came from ./drivers/net/wireless/intel/i... and it's dated October 2026, so yeah, she's from the future and she ate πŸ’…πŸ½ periodt, love you, bye πŸ¦‹πŸ’–

πŸ“¦ where this page comes from