18e99ea8dSJohannes Berg /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 28e99ea8dSJohannes Berg /* 3f7d6ef33SJohannes Berg * Copyright (C) 2012-2014, 2018-2020 Intel Corporation 48e99ea8dSJohannes Berg * Copyright (C) 2013-2015 Intel Mobile Communications GmbH 58e99ea8dSJohannes Berg * Copyright (C) 2016-2017 Intel Deutschland GmbH 68e99ea8dSJohannes Berg */ 7d172a5efSJohannes Berg #ifndef __iwl_fw_api_datapath_h__ 8d172a5efSJohannes Berg #define __iwl_fw_api_datapath_h__ 9d172a5efSJohannes Berg 10d172a5efSJohannes Berg /** 11d172a5efSJohannes Berg * enum iwl_data_path_subcmd_ids - data path group commands 12d172a5efSJohannes Berg */ 13d172a5efSJohannes Berg enum iwl_data_path_subcmd_ids { 14d172a5efSJohannes Berg /** 15d172a5efSJohannes Berg * @DQA_ENABLE_CMD: &struct iwl_dqa_enable_cmd 16d172a5efSJohannes Berg */ 17d172a5efSJohannes Berg DQA_ENABLE_CMD = 0x0, 18d172a5efSJohannes Berg 19d172a5efSJohannes Berg /** 20d172a5efSJohannes Berg * @UPDATE_MU_GROUPS_CMD: &struct iwl_mu_group_mgmt_cmd 21d172a5efSJohannes Berg */ 22d172a5efSJohannes Berg UPDATE_MU_GROUPS_CMD = 0x1, 23d172a5efSJohannes Berg 24d172a5efSJohannes Berg /** 25d172a5efSJohannes Berg * @TRIGGER_RX_QUEUES_NOTIF_CMD: &struct iwl_rxq_sync_cmd 26d172a5efSJohannes Berg */ 27d172a5efSJohannes Berg TRIGGER_RX_QUEUES_NOTIF_CMD = 0x2, 28d172a5efSJohannes Berg 29d172a5efSJohannes Berg /** 308a6171a7SLuca Coelho * @STA_HE_CTXT_CMD: &struct iwl_he_sta_context_cmd 318a6171a7SLuca Coelho */ 328a6171a7SLuca Coelho STA_HE_CTXT_CMD = 0x7, 338a6171a7SLuca Coelho 348a6171a7SLuca Coelho /** 35*c48e93a6SJohannes Berg * @RLC_CONFIG_CMD: &struct iwl_rlc_config_cmd 36*c48e93a6SJohannes Berg */ 37*c48e93a6SJohannes Berg RLC_CONFIG_CMD = 0x8, 38*c48e93a6SJohannes Berg 39*c48e93a6SJohannes Berg /** 408edbfaa1SSara Sharon * @RFH_QUEUE_CONFIG_CMD: &struct iwl_rfh_queue_config 418edbfaa1SSara Sharon */ 428edbfaa1SSara Sharon RFH_QUEUE_CONFIG_CMD = 0xD, 438edbfaa1SSara Sharon 448edbfaa1SSara Sharon /** 45110b32f0SGregory Greenman * @TLC_MNG_CONFIG_CMD: &struct iwl_tlc_config_cmd 46110b32f0SGregory Greenman */ 47110b32f0SGregory Greenman TLC_MNG_CONFIG_CMD = 0xF, 48110b32f0SGregory Greenman 49110b32f0SGregory Greenman /** 5098920961SShaul Triebitz * @HE_AIR_SNIFFER_CONFIG_CMD: &struct iwl_he_monitor_cmd 5198920961SShaul Triebitz */ 5298920961SShaul Triebitz HE_AIR_SNIFFER_CONFIG_CMD = 0x13, 5398920961SShaul Triebitz 5498920961SShaul Triebitz /** 555213e8a8SJohannes Berg * @CHEST_COLLECTOR_FILTER_CONFIG_CMD: Configure the CSI 565213e8a8SJohannes Berg * matrix collection, uses &struct iwl_channel_estimation_cfg 575213e8a8SJohannes Berg */ 585213e8a8SJohannes Berg CHEST_COLLECTOR_FILTER_CONFIG_CMD = 0x14, 595213e8a8SJohannes Berg 605213e8a8SJohannes Berg /** 61f7d6ef33SJohannes Berg * @MONITOR_NOTIF: Datapath monitoring notification, using 62f7d6ef33SJohannes Berg * &struct iwl_datapath_monitor_notif 63f7d6ef33SJohannes Berg */ 64f7d6ef33SJohannes Berg MONITOR_NOTIF = 0xF4, 65f7d6ef33SJohannes Berg 66f7d6ef33SJohannes Berg /** 67bf9dfedaSShaul Triebitz * @RX_NO_DATA_NOTIF: &struct iwl_rx_no_data 68bf9dfedaSShaul Triebitz */ 69bf9dfedaSShaul Triebitz RX_NO_DATA_NOTIF = 0xF5, 70bf9dfedaSShaul Triebitz 71bf9dfedaSShaul Triebitz /** 722a7ce54cSJohannes Berg * @THERMAL_DUAL_CHAIN_DISABLE_REQ: firmware request for SMPS mode, 732a7ce54cSJohannes Berg * &struct iwl_thermal_dual_chain_request 742a7ce54cSJohannes Berg */ 752a7ce54cSJohannes Berg THERMAL_DUAL_CHAIN_REQUEST = 0xF6, 762a7ce54cSJohannes Berg 772a7ce54cSJohannes Berg /** 7846d372afSGregory Greenman * @TLC_MNG_UPDATE_NOTIF: &struct iwl_tlc_update_notif 7946d372afSGregory Greenman */ 8046d372afSGregory Greenman TLC_MNG_UPDATE_NOTIF = 0xF7, 8146d372afSGregory Greenman 8246d372afSGregory Greenman /** 83d172a5efSJohannes Berg * @STA_PM_NOTIF: &struct iwl_mvm_pm_state_notification 84d172a5efSJohannes Berg */ 85d172a5efSJohannes Berg STA_PM_NOTIF = 0xFD, 86d172a5efSJohannes Berg 87d172a5efSJohannes Berg /** 88d172a5efSJohannes Berg * @MU_GROUP_MGMT_NOTIF: &struct iwl_mu_group_mgmt_notif 89d172a5efSJohannes Berg */ 90d172a5efSJohannes Berg MU_GROUP_MGMT_NOTIF = 0xFE, 91d172a5efSJohannes Berg 92d172a5efSJohannes Berg /** 93d172a5efSJohannes Berg * @RX_QUEUES_NOTIFICATION: &struct iwl_rxq_sync_notification 94d172a5efSJohannes Berg */ 95d172a5efSJohannes Berg RX_QUEUES_NOTIFICATION = 0xFF, 96d172a5efSJohannes Berg }; 97d172a5efSJohannes Berg 98d172a5efSJohannes Berg /** 99d172a5efSJohannes Berg * struct iwl_mu_group_mgmt_cmd - VHT MU-MIMO group configuration 100d172a5efSJohannes Berg * 101d172a5efSJohannes Berg * @reserved: reserved 102d172a5efSJohannes Berg * @membership_status: a bitmap of MU groups 103d172a5efSJohannes Berg * @user_position:the position of station in a group. If the station is in the 104d172a5efSJohannes Berg * group then bits (group * 2) is the position -1 105d172a5efSJohannes Berg */ 106d172a5efSJohannes Berg struct iwl_mu_group_mgmt_cmd { 107d172a5efSJohannes Berg __le32 reserved; 108d172a5efSJohannes Berg __le32 membership_status[2]; 109d172a5efSJohannes Berg __le32 user_position[4]; 110d172a5efSJohannes Berg } __packed; /* MU_GROUP_ID_MNG_TABLE_API_S_VER_1 */ 111d172a5efSJohannes Berg 112d172a5efSJohannes Berg /** 113d172a5efSJohannes Berg * struct iwl_mu_group_mgmt_notif - VHT MU-MIMO group id notification 114d172a5efSJohannes Berg * 115d172a5efSJohannes Berg * @membership_status: a bitmap of MU groups 116d172a5efSJohannes Berg * @user_position: the position of station in a group. If the station is in the 117d172a5efSJohannes Berg * group then bits (group * 2) is the position -1 118d172a5efSJohannes Berg */ 119d172a5efSJohannes Berg struct iwl_mu_group_mgmt_notif { 120d172a5efSJohannes Berg __le32 membership_status[2]; 121d172a5efSJohannes Berg __le32 user_position[4]; 122d172a5efSJohannes Berg } __packed; /* MU_GROUP_MNG_NTFY_API_S_VER_1 */ 123d172a5efSJohannes Berg 1245213e8a8SJohannes Berg enum iwl_channel_estimation_flags { 1255213e8a8SJohannes Berg IWL_CHANNEL_ESTIMATION_ENABLE = BIT(0), 1265213e8a8SJohannes Berg IWL_CHANNEL_ESTIMATION_TIMER = BIT(1), 1275213e8a8SJohannes Berg IWL_CHANNEL_ESTIMATION_COUNTER = BIT(2), 1285213e8a8SJohannes Berg }; 1295213e8a8SJohannes Berg 1305213e8a8SJohannes Berg /** 1315213e8a8SJohannes Berg * struct iwl_channel_estimation_cfg - channel estimation reporting config 1325213e8a8SJohannes Berg */ 1335213e8a8SJohannes Berg struct iwl_channel_estimation_cfg { 1345213e8a8SJohannes Berg /** 1355213e8a8SJohannes Berg * @flags: flags, see &enum iwl_channel_estimation_flags 1365213e8a8SJohannes Berg */ 1375213e8a8SJohannes Berg __le32 flags; 1385213e8a8SJohannes Berg /** 1395213e8a8SJohannes Berg * @timer: if enabled via flags, automatically disable after this many 1405213e8a8SJohannes Berg * microseconds 1415213e8a8SJohannes Berg */ 1425213e8a8SJohannes Berg __le32 timer; 1435213e8a8SJohannes Berg /** 1445213e8a8SJohannes Berg * @count: if enabled via flags, automatically disable after this many 1455213e8a8SJohannes Berg * frames with channel estimation matrix were captured 1465213e8a8SJohannes Berg */ 1475213e8a8SJohannes Berg __le32 count; 1485213e8a8SJohannes Berg /** 1495213e8a8SJohannes Berg * @rate_n_flags_mask: only try to record the channel estimation matrix 1505213e8a8SJohannes Berg * if the rate_n_flags value for the received frame (let's call 1515213e8a8SJohannes Berg * that rx_rnf) matches the mask/value given here like this: 1525213e8a8SJohannes Berg * (rx_rnf & rate_n_flags_mask) == rate_n_flags_val. 1535213e8a8SJohannes Berg */ 1545213e8a8SJohannes Berg __le32 rate_n_flags_mask; 1555213e8a8SJohannes Berg /** 1565213e8a8SJohannes Berg * @rate_n_flags_val: see @rate_n_flags_mask 1575213e8a8SJohannes Berg */ 1585213e8a8SJohannes Berg __le32 rate_n_flags_val; 1595213e8a8SJohannes Berg /** 1605213e8a8SJohannes Berg * @reserved: reserved (for alignment) 1615213e8a8SJohannes Berg */ 1625213e8a8SJohannes Berg __le32 reserved; 1635213e8a8SJohannes Berg /** 1645213e8a8SJohannes Berg * @frame_types: bitmap of frame types to capture, the received frame's 1655213e8a8SJohannes Berg * subtype|type takes 6 bits in the frame and the corresponding bit 1665213e8a8SJohannes Berg * in this field must be set to 1 to capture channel estimation for 1675213e8a8SJohannes Berg * that frame type. Set to all-ones to enable capturing for all 1685213e8a8SJohannes Berg * frame types. 1695213e8a8SJohannes Berg */ 1705213e8a8SJohannes Berg __le64 frame_types; 1715213e8a8SJohannes Berg } __packed; /* CHEST_COLLECTOR_FILTER_CMD_API_S_VER_1 */ 1725213e8a8SJohannes Berg 173f7d6ef33SJohannes Berg enum iwl_datapath_monitor_notif_type { 174f7d6ef33SJohannes Berg IWL_DP_MON_NOTIF_TYPE_EXT_CCA, 175f7d6ef33SJohannes Berg }; 176f7d6ef33SJohannes Berg 177f7d6ef33SJohannes Berg struct iwl_datapath_monitor_notif { 178f7d6ef33SJohannes Berg __le32 type; 179f7d6ef33SJohannes Berg u8 mac_id; 180f7d6ef33SJohannes Berg u8 reserved[3]; 181f7d6ef33SJohannes Berg } __packed; /* MONITOR_NTF_API_S_VER_1 */ 182f7d6ef33SJohannes Berg 1832a7ce54cSJohannes Berg /** 1842a7ce54cSJohannes Berg * enum iwl_thermal_dual_chain_req_events - firmware SMPS request event 1852a7ce54cSJohannes Berg * @THERMAL_DUAL_CHAIN_REQ_ENABLE: (re-)enable dual-chain operation 1862a7ce54cSJohannes Berg * (subject to other constraints) 1872a7ce54cSJohannes Berg * @THERMAL_DUAL_CHAIN_REQ_DISABLE: disable dual-chain operation 1882a7ce54cSJohannes Berg * (static SMPS) 1892a7ce54cSJohannes Berg */ 1902a7ce54cSJohannes Berg enum iwl_thermal_dual_chain_req_events { 1912a7ce54cSJohannes Berg THERMAL_DUAL_CHAIN_REQ_ENABLE, 1922a7ce54cSJohannes Berg THERMAL_DUAL_CHAIN_REQ_DISABLE, 1932a7ce54cSJohannes Berg }; /* THERMAL_DUAL_CHAIN_DISABLE_STATE_API_E_VER_1 */ 1942a7ce54cSJohannes Berg 1952a7ce54cSJohannes Berg /** 1962a7ce54cSJohannes Berg * struct iwl_thermal_dual_chain_request - SMPS request 1972a7ce54cSJohannes Berg * @event: the type of request, see &enum iwl_thermal_dual_chain_req_events 1982a7ce54cSJohannes Berg */ 1992a7ce54cSJohannes Berg struct iwl_thermal_dual_chain_request { 2002a7ce54cSJohannes Berg __le32 event; 2012a7ce54cSJohannes Berg } __packed; /* THERMAL_DUAL_CHAIN_DISABLE_REQ_NTFY_API_S_VER_1 */ 2022a7ce54cSJohannes Berg 203*c48e93a6SJohannes Berg enum iwl_rlc_chain_info { 204*c48e93a6SJohannes Berg IWL_RLC_CHAIN_INFO_DRIVER_FORCE = BIT(0), 205*c48e93a6SJohannes Berg IWL_RLC_CHAIN_INFO_VALID = 0x000e, 206*c48e93a6SJohannes Berg IWL_RLC_CHAIN_INFO_FORCE = 0x0070, 207*c48e93a6SJohannes Berg IWL_RLC_CHAIN_INFO_FORCE_MIMO = 0x0380, 208*c48e93a6SJohannes Berg IWL_RLC_CHAIN_INFO_COUNT = 0x0c00, 209*c48e93a6SJohannes Berg IWL_RLC_CHAIN_INFO_MIMO_COUNT = 0x3000, 210*c48e93a6SJohannes Berg }; 211*c48e93a6SJohannes Berg 212*c48e93a6SJohannes Berg /** 213*c48e93a6SJohannes Berg * struct iwl_rlc_properties - RLC properties 214*c48e93a6SJohannes Berg * @rx_chain_info: RX chain info, &enum iwl_rlc_chain_info 215*c48e93a6SJohannes Berg * @reserved: reserved 216*c48e93a6SJohannes Berg */ 217*c48e93a6SJohannes Berg struct iwl_rlc_properties { 218*c48e93a6SJohannes Berg __le32 rx_chain_info; 219*c48e93a6SJohannes Berg __le32 reserved; 220*c48e93a6SJohannes Berg } __packed; /* RLC_PROPERTIES_S_VER_1 */ 221*c48e93a6SJohannes Berg 222*c48e93a6SJohannes Berg enum iwl_sad_mode { 223*c48e93a6SJohannes Berg IWL_SAD_MODE_ENABLED = BIT(0), 224*c48e93a6SJohannes Berg IWL_SAD_MODE_DEFAULT_ANT_MSK = 0x6, 225*c48e93a6SJohannes Berg IWL_SAD_MODE_DEFAULT_ANT_FW = 0x0, 226*c48e93a6SJohannes Berg IWL_SAD_MODE_DEFAULT_ANT_A = 0x2, 227*c48e93a6SJohannes Berg IWL_SAD_MODE_DEFAULT_ANT_B = 0x4, 228*c48e93a6SJohannes Berg }; 229*c48e93a6SJohannes Berg 230*c48e93a6SJohannes Berg /** 231*c48e93a6SJohannes Berg * struct iwl_sad_properties - SAD properties 232*c48e93a6SJohannes Berg * @chain_a_sad_mode: chain A SAD mode, &enum iwl_sad_mode 233*c48e93a6SJohannes Berg * @chain_b_sad_mode: chain B SAD mode, &enum iwl_sad_mode 234*c48e93a6SJohannes Berg * @mac_id: MAC index 235*c48e93a6SJohannes Berg * @reserved: reserved 236*c48e93a6SJohannes Berg */ 237*c48e93a6SJohannes Berg struct iwl_sad_properties { 238*c48e93a6SJohannes Berg __le32 chain_a_sad_mode; 239*c48e93a6SJohannes Berg __le32 chain_b_sad_mode; 240*c48e93a6SJohannes Berg __le32 mac_id; 241*c48e93a6SJohannes Berg __le32 reserved; 242*c48e93a6SJohannes Berg } __packed; 243*c48e93a6SJohannes Berg 244*c48e93a6SJohannes Berg /** 245*c48e93a6SJohannes Berg * struct iwl_rlc_config_cmd - RLC configuration 246*c48e93a6SJohannes Berg * @phy_id: PHY index 247*c48e93a6SJohannes Berg * @rlc: RLC properties, &struct iwl_rlc_properties 248*c48e93a6SJohannes Berg * @sad: SAD (single antenna diversity) options, &struct iwl_sad_properties 249*c48e93a6SJohannes Berg * @flags: flags, &enum iwl_rlc_flags 250*c48e93a6SJohannes Berg * @reserved: reserved 251*c48e93a6SJohannes Berg */ 252*c48e93a6SJohannes Berg struct iwl_rlc_config_cmd { 253*c48e93a6SJohannes Berg __le32 phy_id; 254*c48e93a6SJohannes Berg struct iwl_rlc_properties rlc; 255*c48e93a6SJohannes Berg struct iwl_sad_properties sad; 256*c48e93a6SJohannes Berg u8 flags; 257*c48e93a6SJohannes Berg u8 reserved[3]; 258*c48e93a6SJohannes Berg } __packed; /* RLC_CONFIG_CMD_API_S_VER_2 */ 259*c48e93a6SJohannes Berg 260d172a5efSJohannes Berg #endif /* __iwl_fw_api_datapath_h__ */ 261