121254908SGregory Greenman /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ 221254908SGregory Greenman /* 3*594de122SJohannes Berg * Copyright (C) 2020-2021, 2023 Intel Corporation 421254908SGregory Greenman */ 521254908SGregory Greenman #ifndef __iwl_fw_api_rfi_h__ 621254908SGregory Greenman #define __iwl_fw_api_rfi_h__ 721254908SGregory Greenman 821254908SGregory Greenman #define IWL_RFI_LUT_ENTRY_CHANNELS_NUM 15 921254908SGregory Greenman #define IWL_RFI_LUT_SIZE 24 1021254908SGregory Greenman #define IWL_RFI_LUT_INSTALLED_SIZE 4 1121254908SGregory Greenman 1221254908SGregory Greenman /** 1321254908SGregory Greenman * struct iwl_rfi_lut_entry - an entry in the RFI frequency LUT. 1421254908SGregory Greenman * 1521254908SGregory Greenman * @freq: frequency 1621254908SGregory Greenman * @channels: channels that can be interfered at frequency freq (at most 15) 1721254908SGregory Greenman * @bands: the corresponding bands 1821254908SGregory Greenman */ 1921254908SGregory Greenman struct iwl_rfi_lut_entry { 2021254908SGregory Greenman __le16 freq; 2121254908SGregory Greenman u8 channels[IWL_RFI_LUT_ENTRY_CHANNELS_NUM]; 2221254908SGregory Greenman u8 bands[IWL_RFI_LUT_ENTRY_CHANNELS_NUM]; 2321254908SGregory Greenman } __packed; 2421254908SGregory Greenman 2521254908SGregory Greenman /** 2621254908SGregory Greenman * struct iwl_rfi_config_cmd - RFI configuration table 2721254908SGregory Greenman * 28*594de122SJohannes Berg * @table: a table can have 24 frequency/channel mappings 2921254908SGregory Greenman * @oem: specifies if this is the default table or set by OEM 30*594de122SJohannes Berg * @reserved: (reserved/padding) 3121254908SGregory Greenman */ 3221254908SGregory Greenman struct iwl_rfi_config_cmd { 3321254908SGregory Greenman struct iwl_rfi_lut_entry table[IWL_RFI_LUT_SIZE]; 3421254908SGregory Greenman u8 oem; 3521254908SGregory Greenman u8 reserved[3]; 3621254908SGregory Greenman } __packed; /* RFI_CONFIG_CMD_API_S_VER_1 */ 3721254908SGregory Greenman 3821254908SGregory Greenman /** 39*594de122SJohannes Berg * enum iwl_rfi_freq_table_status - status of the frequency table query 4021254908SGregory Greenman * @RFI_FREQ_TABLE_OK: can be used 4121254908SGregory Greenman * @RFI_FREQ_TABLE_DVFS_NOT_READY: DVFS is not ready yet, should try later 4221254908SGregory Greenman * @RFI_FREQ_TABLE_DISABLED: the feature is disabled in FW 4321254908SGregory Greenman */ 4421254908SGregory Greenman enum iwl_rfi_freq_table_status { 4521254908SGregory Greenman RFI_FREQ_TABLE_OK, 4621254908SGregory Greenman RFI_FREQ_TABLE_DVFS_NOT_READY, 4721254908SGregory Greenman RFI_FREQ_TABLE_DISABLED, 4821254908SGregory Greenman }; 4921254908SGregory Greenman 5021254908SGregory Greenman /** 5121254908SGregory Greenman * struct iwl_rfi_freq_table_resp_cmd - get the rfi freq table used by FW 5221254908SGregory Greenman * 5321254908SGregory Greenman * @table: table used by FW 5421254908SGregory Greenman * @status: see &iwl_rfi_freq_table_status 5521254908SGregory Greenman */ 5621254908SGregory Greenman struct iwl_rfi_freq_table_resp_cmd { 5721254908SGregory Greenman struct iwl_rfi_lut_entry table[IWL_RFI_LUT_INSTALLED_SIZE]; 5821254908SGregory Greenman __le32 status; 5921254908SGregory Greenman } __packed; /* RFI_CONFIG_CMD_API_S_VER_1 */ 6021254908SGregory Greenman 6163b62a2dSGregory Greenman /** 6263b62a2dSGregory Greenman * struct iwl_rfi_deactivate_notif - notifcation that FW disaled RFIm 6363b62a2dSGregory Greenman * 6463b62a2dSGregory Greenman * @reason: used only for a log message 6563b62a2dSGregory Greenman */ 6663b62a2dSGregory Greenman struct iwl_rfi_deactivate_notif { 6763b62a2dSGregory Greenman __le32 reason; 6863b62a2dSGregory Greenman } __packed; /* RFI_DEACTIVATE_NTF_S_VER_1 */ 6921254908SGregory Greenman #endif /* __iwl_fw_api_rfi_h__ */ 70