1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 2 /* 3 * Copyright (C) 2012-2014, 2018-2020 Intel Corporation 4 * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 5 * Copyright (C) 2016-2017 Intel Deutschland GmbH 6 */ 7 #ifndef __iwl_fw_api_datapath_h__ 8 #define __iwl_fw_api_datapath_h__ 9 10 /** 11 * enum iwl_data_path_subcmd_ids - data path group commands 12 */ 13 enum iwl_data_path_subcmd_ids { 14 /** 15 * @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd 16 */ 17 DQA_ENABLE_CMD = 0x0, 18 19 /** 20 * @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd 21 */ 22 UPDATE_MU_GROUPS_CMD = 0x1, 23 24 /** 25 * @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd 26 */ 27 TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2, 28 29 /** 30 * @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd 31 */ 32 STA_HE_CTXT_CMD = 0x7, 33 34 /** 35 * @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd 36 */ 37 RLC_CONFIG_CMD = 0x8, 38 39 /** 40 * @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config 41 */ 42 RFH_QUEUE_CONFIG_CMD = 0xD, 43 44 /** 45 * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd 46 */ 47 TLC_MNG_CONFIG_CMD = 0xF, 48 49 /** 50 * @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd 51 */ 52 HE_AIR_SNIFFER_CONFIG_CMD = 0x13, 53 54 /** 55 * @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI 56 * matrix collection, uses &struct iwl_channel_estimation_cfg 57 */ 58 CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14, 59 60 /** 61 * @MONITOR_NOTIF: Datapath monitoring notification, using 62 * &struct iwl_datapath_monitor_notif 63 */ 64 MONITOR_NOTIF = 0xF4, 65 66 /** 67 * @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data 68 */ 69 RX_NO_DATA_NOTIF = 0xF5, 70 71 /** 72 * @THERMAL_DUAL_CHAIN_DISABLE_REQ: firmware request for SMPS mode, 73 * &struct iwl_thermal_dual_chain_request 74 */ 75 THERMAL_DUAL_CHAIN_REQUEST = 0xF6, 76 77 /** 78 * @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif 79 */ 80 TLC_MNG_UPDATE_NOTIF = 0xF7, 81 82 /** 83 * @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification 84 */ 85 STA_PM_NOTIF = 0xFD, 86 87 /** 88 * @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif 89 */ 90 MU_GROUP_MGMT_NOTIF = 0xFE, 91 92 /** 93 * @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification 94 */ 95 RX_QUEUES_NOTIFICATION = 0xFF, 96 }; 97 98 /** 99 * struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration 100 * 101 * @reserved: reserved 102 * @membership_status: a bitmap of MU groups 103 * @user_position:the position of station in a group. If the station is in the 104 * group then bits (group * 2) is the position -1 105 */ 106 struct iwl_mu_group_mgmt_cmd { 107 __le32 reserved; 108 __le32 membership_status[2]; 109 __le32 user_position[4]; 110 } __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */ 111 112 /** 113 * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification 114 * 115 * @membership_status: a bitmap of MU groups 116 * @user_position: the position of station in a group. If the station is in the 117 * group then bits (group * 2) is the position -1 118 */ 119 struct iwl_mu_group_mgmt_notif { 120 __le32 membership_status[2]; 121 __le32 user_position[4]; 122 } __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */ 123 124 enum iwl_channel_estimation_flags { 125 IWL_CHANNEL_ESTIMATION_ENABLE = BIT(0), 126 IWL_CHANNEL_ESTIMATION_TIMER = BIT(1), 127 IWL_CHANNEL_ESTIMATION_COUNTER = BIT(2), 128 }; 129 130 /** 131 * struct iwl_channel_estimation_cfg - channel estimation reporting config 132 */ 133 struct iwl_channel_estimation_cfg { 134 /** 135 * @flags: flags, see &enum iwl_channel_estimation_flags 136 */ 137 __le32 flags; 138 /** 139 * @timer: if enabled via flags, automatically disable after this many 140 * microseconds 141 */ 142 __le32 timer; 143 /** 144 * @count: if enabled via flags, automatically disable after this many 145 * frames with channel estimation matrix were captured 146 */ 147 __le32 count; 148 /** 149 * @rate_n_flags_mask: only try to record the channel estimation matrix 150 * if the rate_n_flags value for the received frame (let's call 151 * that rx_rnf) matches the mask/value given here like this: 152 * (rx_rnf & rate_n_flags_mask) == rate_n_flags_val. 153 */ 154 __le32 rate_n_flags_mask; 155 /** 156 * @rate_n_flags_val: see @rate_n_flags_mask 157 */ 158 __le32 rate_n_flags_val; 159 /** 160 * @reserved: reserved (for alignment) 161 */ 162 __le32 reserved; 163 /** 164 * @frame_types: bitmap of frame types to capture, the received frame's 165 * subtype|type takes 6 bits in the frame and the corresponding bit 166 * in this field must be set to 1 to capture channel estimation for 167 * that frame type. Set to all-ones to enable capturing for all 168 * frame types. 169 */ 170 __le64 frame_types; 171 } __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */ 172 173 enum iwl_datapath_monitor_notif_type { 174 IWL_DP_MON_NOTIF_TYPE_EXT_CCA, 175 }; 176 177 struct iwl_datapath_monitor_notif { 178 __le32 type; 179 u8 mac_id; 180 u8 reserved[3]; 181 } __packed; /* MONITOR_NTF_API_S_VER_1 */ 182 183 /** 184 * enum iwl_thermal_dual_chain_req_events - firmware SMPS request event 185 * @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation 186 * (subject to other constraints) 187 * @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation 188 * (static SMPS) 189 */ 190 enum iwl_thermal_dual_chain_req_events { 191 THERMAL_DUAL_CHAIN_REQ_ENABLE, 192 THERMAL_DUAL_CHAIN_REQ_DISABLE, 193 }; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */ 194 195 /** 196 * struct iwl_thermal_dual_chain_request - SMPS request 197 * @event: the type of request, see &enum iwl_thermal_dual_chain_req_events 198 */ 199 struct iwl_thermal_dual_chain_request { 200 __le32 event; 201 } __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */ 202 203 enum iwl_rlc_chain_info { 204 IWL_RLC_CHAIN_INFO_DRIVER_FORCE = BIT(0), 205 IWL_RLC_CHAIN_INFO_VALID = 0x000e, 206 IWL_RLC_CHAIN_INFO_FORCE = 0x0070, 207 IWL_RLC_CHAIN_INFO_FORCE_MIMO = 0x0380, 208 IWL_RLC_CHAIN_INFO_COUNT = 0x0c00, 209 IWL_RLC_CHAIN_INFO_MIMO_COUNT = 0x3000, 210 }; 211 212 /** 213 * struct iwl_rlc_properties - RLC properties 214 * @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info 215 * @reserved: reserved 216 */ 217 struct iwl_rlc_properties { 218 __le32 rx_chain_info; 219 __le32 reserved; 220 } __packed; /* RLC_PROPERTIES_S_VER_1 */ 221 222 enum iwl_sad_mode { 223 IWL_SAD_MODE_ENABLED = BIT(0), 224 IWL_SAD_MODE_DEFAULT_ANT_MSK = 0x6, 225 IWL_SAD_MODE_DEFAULT_ANT_FW = 0x0, 226 IWL_SAD_MODE_DEFAULT_ANT_A = 0x2, 227 IWL_SAD_MODE_DEFAULT_ANT_B = 0x4, 228 }; 229 230 /** 231 * struct iwl_sad_properties - SAD properties 232 * @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode 233 * @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode 234 * @mac_id: MAC index 235 * @reserved: reserved 236 */ 237 struct iwl_sad_properties { 238 __le32 chain_a_sad_mode; 239 __le32 chain_b_sad_mode; 240 __le32 mac_id; 241 __le32 reserved; 242 } __packed; 243 244 /** 245 * struct iwl_rlc_config_cmd - RLC configuration 246 * @phy_id: PHY index 247 * @rlc: RLC properties, &struct iwl_rlc_properties 248 * @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties 249 * @flags: flags, &enum iwl_rlc_flags 250 * @reserved: reserved 251 */ 252 struct iwl_rlc_config_cmd { 253 __le32 phy_id; 254 struct iwl_rlc_properties rlc; 255 struct iwl_sad_properties sad; 256 u8 flags; 257 u8 reserved[3]; 258 } __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */ 259 260 #endif /* __iwl_fw_api_datapath_h__ */ 261