Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/dhc.h
48426 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2025 Intel Corporation3*/4#ifndef __iwl_fw_api_dhc_h__5#define __iwl_fw_api_dhc_h__67#define DHC_TABLE_MASK_POS (28)89/**10* enum iwl_dhc_table_id - DHC table operations index11*/12enum iwl_dhc_table_id {13/**14* @DHC_TABLE_INTEGRATION: select the integration table15*/16DHC_TABLE_INTEGRATION = 2 << DHC_TABLE_MASK_POS,17/**18* @DHC_TABLE_TOOLS: select the tools table19*/20DHC_TABLE_TOOLS = 0,21};2223/**24* enum iwl_dhc_umac_tools_table - tools operations25* @DHC_TOOLS_UMAC_GET_TAS_STATUS: Get TAS status.26* See @struct iwl_dhc_tas_status_resp27*/28enum iwl_dhc_umac_tools_table {29DHC_TOOLS_UMAC_GET_TAS_STATUS = 0,30};3132/**33* enum iwl_dhc_umac_integration_table - integration operations34*/35enum iwl_dhc_umac_integration_table {36/**37* @DHC_INT_UMAC_TWT_OPERATION: trigger a TWT operation38*/39DHC_INT_UMAC_TWT_OPERATION = 4,40/**41* @DHC_INTEGRATION_TLC_DEBUG_CONFIG: TLC debug42*/43DHC_INTEGRATION_TLC_DEBUG_CONFIG = 1,44/**45* @DHC_INTEGRATION_MAX: Maximum UMAC integration table entries46*/47DHC_INTEGRATION_MAX48};4950#define DHC_TARGET_UMAC BIT(27)5152/**53* struct iwl_dhc_cmd - debug host command54* @length: length in DWs of the data structure that is concatenated to the end55* of this struct56* @index_and_mask: bit 31 is 1 for data set operation else it's 057* bits 28-30 is the index of the table of the operation -58* &enum iwl_dhc_table_id *59* bit 27 is 0 if the cmd targeted to LMAC and 1 if targeted to UMAC,60* (LMAC is 0 for backward compatibility)61* bit 26 is 0 if the cmd targeted to LMAC0 and 1 if targeted to LMAC1,62* relevant only if bit 27 set to 063* bits 0-25 is a specific entry index in the table specified in bits 28-3064*65* @data: the concatenated data.66*/67struct iwl_dhc_cmd {68__le32 length;69__le32 index_and_mask;70#if defined(__linux__)71__le32 data[];72#elif defined(__FreeBSD__)73__le32 data[0];74#endif75} __packed; /* DHC_CMD_API_S */7677/**78* struct iwl_dhc_payload_hdr - DHC payload header79* @version: a version of a payload80* @reserved: reserved for alignment81*/82struct iwl_dhc_payload_hdr {83u8 version;84u8 reserved[3];85} __packed; /* DHC_PAYLOAD_HDR_API_S_VER_1 */8687/**88* struct iwl_dhc_tas_status_per_radio - TAS status per radio89* @band: &PHY_BAND_5 for high band, PHY_BAND_24 for low band and90* &PHY_BAND_6 for ultra high band.91* @static_status: TAS statically enabled or disabled92* @static_disable_reason: TAS static disable reason, uses93* &enum iwl_tas_statically_disabled_reason94* @near_disconnection: is TAS currently near disconnection per radio95* @dynamic_status_ant_a: Antenna A current TAS status.96* uses &enum iwl_tas_dyna_status97* @dynamic_status_ant_b: Antenna B current TAS status.98* uses &enum iwl_tas_dyna_status99* @max_reg_pwr_limit_ant_a: Antenna A regulatory power limits in dBm100* @max_reg_pwr_limit_ant_b: Antenna B regulatory power limits in dBm101* @sar_limit_ant_a: Antenna A SAR limit per radio in dBm102* @sar_limit_ant_b: Antenna B SAR limit per radio in dBm103* @reserved: reserved for alignment104*/105struct iwl_dhc_tas_status_per_radio {106u8 band;107u8 static_status;108u8 static_disable_reason;109u8 near_disconnection;110u8 dynamic_status_ant_a;111u8 dynamic_status_ant_b;112__le16 max_reg_pwr_limit_ant_a;113__le16 max_reg_pwr_limit_ant_b;114__le16 sar_limit_ant_a;115__le16 sar_limit_ant_b;116u8 reserved[2];117} __packed; /* DHC_TAS_STATUS_PER_RADIO_S_VER_1 */118119/**120* struct iwl_dhc_tas_status_resp - Response to DHC_TOOLS_UMAC_GET_TAS_STATUS121* @header: DHC payload header, uses &struct iwl_dhc_payload_hdr122* @tas_config_info: see @struct bios_value_u32123* @mcc_block_list: block listed country codes124* @tas_status_radio: TAS status, uses &struct iwl_dhc_tas_status_per_radio125* @curr_mcc: current mcc126* @valid_radio_mask: represent entry in tas_status_per_radio is valid.127* @reserved: reserved for alignment128*/129struct iwl_dhc_tas_status_resp {130struct iwl_dhc_payload_hdr header;131struct bios_value_u32 tas_config_info;132__le16 mcc_block_list[IWL_WTAS_BLACK_LIST_MAX];133struct iwl_dhc_tas_status_per_radio tas_status_radio[2];134__le16 curr_mcc;135u8 valid_radio_mask;136u8 reserved;137} __packed; /* DHC_TAS_STATUS_RSP_API_S_VER_1 */138139/**140* struct iwl_dhc_cmd_resp_v1 - debug host command response141* @status: status of the command142* @data: the response data143*/144struct iwl_dhc_cmd_resp_v1 {145__le32 status;146__le32 data[];147} __packed; /* DHC_RESP_API_S_VER_1 */148149/**150* struct iwl_dhc_cmd_resp - debug host command response151* @status: status of the command152* @descriptor: command descriptor (index_and_mask) returned153* @data: the response data154*/155struct iwl_dhc_cmd_resp {156__le32 status;157__le32 descriptor;158__le32 data[];159} __packed; /* DHC_RESP_API_S_VER_2 and DHC_RESP_API_S_VER_3 */160161/**162* enum iwl_dhc_twt_operation_type - describes the TWT operation type163*164* @DHC_TWT_REQUEST: Send a Request TWT command165* @DHC_TWT_SUGGEST: Send a Suggest TWT command166* @DHC_TWT_DEMAND: Send a Demand TWT command167* @DHC_TWT_GROUPING: Send a Grouping TWT command168* @DHC_TWT_ACCEPT: Send a Accept TWT command169* @DHC_TWT_ALTERNATE: Send a Alternate TWT command170* @DHC_TWT_DICTATE: Send a Dictate TWT command171* @DHC_TWT_REJECT: Send a Reject TWT command172* @DHC_TWT_TEARDOWN: Send a TearDown TWT command173*/174enum iwl_dhc_twt_operation_type {175DHC_TWT_REQUEST,176DHC_TWT_SUGGEST,177DHC_TWT_DEMAND,178DHC_TWT_GROUPING,179DHC_TWT_ACCEPT,180DHC_TWT_ALTERNATE,181DHC_TWT_DICTATE,182DHC_TWT_REJECT,183DHC_TWT_TEARDOWN,184}; /* DHC_TWT_OPERATION_TYPE_E */185186/**187* struct iwl_dhc_twt_operation - trigger a TWT operation188*189* @mac_id: the mac Id on which to trigger TWT operation190* @twt_operation: see &enum iwl_dhc_twt_operation_type191* @target_wake_time: when should we be on channel192* @interval_exp: the exponent for the interval193* @interval_mantissa: the mantissa for the interval194* @min_wake_duration: the minimum duration for the wake period195* @trigger: is the TWT triggered or not196* @flow_type: is the TWT announced or not197* @flow_id: the TWT flow identifier from 0 to 7198* @protection: is the TWT protected199* @ndo_paging_indicator: is ndo_paging_indicator set200* @responder_pm_mode: is responder_pm_mode set201* @negotiation_type: if the responder wants to doze outside the TWT SP202* @twt_request: 1 for TWT request, 0 otherwise203* @implicit: is TWT implicit204* @twt_group_assignment: the TWT group assignment205* @twt_channel: the TWT channel206* @reserved: reserved207*/208struct iwl_dhc_twt_operation {209__le32 mac_id;210__le32 twt_operation;211__le64 target_wake_time;212__le32 interval_exp;213__le32 interval_mantissa;214__le32 min_wake_duration;215u8 trigger;216u8 flow_type;217u8 flow_id;218u8 protection;219u8 ndo_paging_indicator;220u8 responder_pm_mode;221u8 negotiation_type;222u8 twt_request;223u8 implicit;224u8 twt_group_assignment;225u8 twt_channel;226u8 reserved;227}; /* DHC_TWT_OPERATION_API_S */228229#endif /* __iwl_fw_api_dhc_h__ */230231232