Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/tdls.h
48426 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2018, 2024-2025 Intel Corporation3* Copyright (C) 2013-2015 Intel Mobile Communications GmbH4* Copyright (C) 2016-2017 Intel Deutschland GmbH5*/6#ifndef __iwl_fw_api_tdls_h__7#define __iwl_fw_api_tdls_h__89#include "fw/api/tx.h"10#include "fw/api/phy-ctxt.h"1112#define IWL_TDLS_STA_COUNT 41314/* Type of TDLS request */15enum iwl_tdls_channel_switch_type {16TDLS_SEND_CHAN_SW_REQ = 0,17TDLS_SEND_CHAN_SW_RESP_AND_MOVE_CH,18TDLS_MOVE_CH,19}; /* TDLS_STA_CHANNEL_SWITCH_CMD_TYPE_API_E_VER_1 */2021/**22* struct iwl_tdls_channel_switch_timing - Switch timing in TDLS channel-switch23* @frame_timestamp: GP2 timestamp of channel-switch request/response packet24* received from peer25* @max_offchan_duration: What amount of microseconds out of a DTIM is given26* to the TDLS off-channel communication. For instance if the DTIM is27* 200TU and the TDLS peer is to be given 25% of the time, the value28* given will be 50TU, or 50 * 1024 if translated into microseconds.29* @switch_time: switch time the peer sent in its channel switch timing IE30* @switch_timeout: switch timeout the peer sent in its channel switch timing IE31*/32struct iwl_tdls_channel_switch_timing {33__le32 frame_timestamp; /* GP2 time of peer packet Rx */34__le32 max_offchan_duration; /* given in micro-seconds */35__le32 switch_time; /* given in micro-seconds */36__le32 switch_timeout; /* given in micro-seconds */37} __packed; /* TDLS_STA_CHANNEL_SWITCH_TIMING_DATA_API_S_VER_1 */3839#define IWL_TDLS_CH_SW_FRAME_MAX_SIZE 2004041/**42* struct iwl_tdls_channel_switch_frame - TDLS channel switch frame template43*44* A template representing a TDLS channel-switch request or response frame45*46* @switch_time_offset: offset to the channel switch timing IE in the template47* @tx_cmd: Tx parameters for the frame48* @data: frame data49*/50struct iwl_tdls_channel_switch_frame {51__le32 switch_time_offset;52struct iwl_tx_cmd_v6_params tx_cmd;53u8 data[IWL_TDLS_CH_SW_FRAME_MAX_SIZE];54} __packed; /* TDLS_STA_CHANNEL_SWITCH_FRAME_API_S_VER_1 */5556/**57* struct iwl_tdls_channel_switch_cmd_tail - tail of iwl_tdls_channel_switch_cmd58*59* @timing: timing related data for command60* @frame: channel-switch request/response template, depending to switch_type61*/62struct iwl_tdls_channel_switch_cmd_tail {63struct iwl_tdls_channel_switch_timing timing;64struct iwl_tdls_channel_switch_frame frame;65} __packed;6667/**68* struct iwl_tdls_channel_switch_cmd - TDLS channel switch command69*70* The command is sent to initiate a channel switch and also in response to71* incoming TDLS channel-switch request/response packets from remote peers.72*73* @switch_type: see &enum iwl_tdls_channel_switch_type74* @peer_sta_id: station id of TDLS peer75* @ci: channel we switch to76* @tail: command tail77*/78struct iwl_tdls_channel_switch_cmd {79u8 switch_type;80__le32 peer_sta_id;81struct iwl_fw_channel_info ci;82struct iwl_tdls_channel_switch_cmd_tail tail;83} __packed; /* TDLS_STA_CHANNEL_SWITCH_CMD_API_S_VER_1 */8485/**86* struct iwl_tdls_channel_switch_notif - TDLS channel switch start notification87*88* @status: non-zero on success89* @offchannel_duration: duration given in microseconds90* @sta_id: peer currently performing the channel-switch with91*/92struct iwl_tdls_channel_switch_notif {93__le32 status;94__le32 offchannel_duration;95__le32 sta_id;96} __packed; /* TDLS_STA_CHANNEL_SWITCH_NTFY_API_S_VER_1 */9798/**99* struct iwl_tdls_sta_info - TDLS station info100*101* @sta_id: station id of the TDLS peer102* @tx_to_peer_tid: TID reserved vs. the peer for FW based Tx103* @tx_to_peer_ssn: initial SSN the FW should use for Tx on its TID vs the peer104* @is_initiator: 1 if the peer is the TDLS link initiator, 0 otherwise105*/106struct iwl_tdls_sta_info {107u8 sta_id;108u8 tx_to_peer_tid;109__le16 tx_to_peer_ssn;110__le32 is_initiator;111} __packed; /* TDLS_STA_INFO_VER_1 */112113/**114* struct iwl_tdls_config_cmd - TDLS basic config command115*116* @id_and_color: MAC id and color being configured117* @tdls_peer_count: amount of currently connected TDLS peers118* @tx_to_ap_tid: TID reverved vs. the AP for FW based Tx119* @tx_to_ap_ssn: initial SSN the FW should use for Tx on its TID vs. the AP120* @sta_info: per-station info. Only the first tdls_peer_count entries are set121* @pti_req_data_offset: offset of network-level data for the PTI template122* @pti_req_tx_cmd: Tx parameters for PTI request template123* @pti_req_template: PTI request template data124*/125struct iwl_tdls_config_cmd {126__le32 id_and_color; /* mac id and color */127u8 tdls_peer_count;128u8 tx_to_ap_tid;129__le16 tx_to_ap_ssn;130struct iwl_tdls_sta_info sta_info[IWL_TDLS_STA_COUNT];131132__le32 pti_req_data_offset;133struct iwl_tx_cmd_v6_params pti_req_tx_cmd;134u8 pti_req_template[];135} __packed; /* TDLS_CONFIG_CMD_API_S_VER_1 */136137/**138* struct iwl_tdls_config_sta_info_res - TDLS per-station config information139*140* @sta_id: station id of the TDLS peer141* @tx_to_peer_last_seq: last sequence number used by FW during FW-based Tx to142* the peer143*/144struct iwl_tdls_config_sta_info_res {145__le16 sta_id;146__le16 tx_to_peer_last_seq;147} __packed; /* TDLS_STA_INFO_RSP_VER_1 */148149/**150* struct iwl_tdls_config_res - TDLS config information from FW151*152* @tx_to_ap_last_seq: last sequence number used by FW during FW-based Tx to AP153* @sta_info: per-station TDLS config information154*/155struct iwl_tdls_config_res {156__le32 tx_to_ap_last_seq;157struct iwl_tdls_config_sta_info_res sta_info[IWL_TDLS_STA_COUNT];158} __packed; /* TDLS_CONFIG_RSP_API_S_VER_1 */159160#endif /* __iwl_fw_api_tdls_h__ */161162163