Path: blob/main/sys/contrib/dev/iwlwifi/fw/api/binding.h
48427 views
/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */1/*2* Copyright (C) 2012-2014, 2020, 2022, 2024 Intel Corporation3* Copyright (C) 2013-2015 Intel Mobile Communications GmbH4* Copyright (C) 2016-2017 Intel Deutschland GmbH5*/6#ifndef __iwl_fw_api_binding_h__7#define __iwl_fw_api_binding_h__89#include <fw/file.h>10#include <fw/img.h>1112#define MAX_MACS_IN_BINDING (3)13#define MAX_BINDINGS (4)1415/**16* struct iwl_binding_cmd_v1 - configuring bindings17* ( BINDING_CONTEXT_CMD = 0x2b )18* @id_and_color: ID and color of the relevant Binding,19* &enum iwl_ctxt_id_and_color20* @action: action to perform, see &enum iwl_ctxt_action21* @macs: array of MAC id and colors which belong to the binding,22* &enum iwl_ctxt_id_and_color23* @phy: PHY id and color which belongs to the binding,24* &enum iwl_ctxt_id_and_color25*/26struct iwl_binding_cmd_v1 {27/* COMMON_INDEX_HDR_API_S_VER_1 */28__le32 id_and_color;29__le32 action;30/* BINDING_DATA_API_S_VER_1 */31__le32 macs[MAX_MACS_IN_BINDING];32__le32 phy;33} __packed; /* BINDING_CMD_API_S_VER_1 */3435/**36* struct iwl_binding_cmd - configuring bindings37* ( BINDING_CONTEXT_CMD = 0x2b )38* @id_and_color: ID and color of the relevant Binding,39* &enum iwl_ctxt_id_and_color40* @action: action to perform, see &enum iwl_ctxt_action41* @macs: array of MAC id and colors which belong to the binding42* &enum iwl_ctxt_id_and_color43* @phy: PHY id and color which belongs to the binding44* &enum iwl_ctxt_id_and_color45* @lmac_id: the lmac id the binding belongs to46*/47struct iwl_binding_cmd {48/* COMMON_INDEX_HDR_API_S_VER_1 */49__le32 id_and_color;50__le32 action;51/* BINDING_DATA_API_S_VER_1 */52__le32 macs[MAX_MACS_IN_BINDING];53__le32 phy;54__le32 lmac_id;55} __packed; /* BINDING_CMD_API_S_VER_2 */5657#define IWL_BINDING_CMD_SIZE_V1 sizeof(struct iwl_binding_cmd_v1)5859/* The maximal number of fragments in the FW's schedule session */60#define IWL_MVM_MAX_QUOTA 1286162/**63* struct iwl_time_quota_data_v1 - configuration of time quota per binding64* @id_and_color: ID and color of the relevant Binding,65* &enum iwl_ctxt_id_and_color66* @quota: absolute time quota in TU. The scheduler will try to divide the67* remainig quota (after Time Events) according to this quota.68* @max_duration: max uninterrupted context duration in TU69*/70struct iwl_time_quota_data_v1 {71__le32 id_and_color;72__le32 quota;73__le32 max_duration;74} __packed; /* TIME_QUOTA_DATA_API_S_VER_1 */7576/**77* struct iwl_time_quota_cmd_v1 - configuration of time quota between bindings78* ( TIME_QUOTA_CMD = 0x2c )79* @quotas: allocations per binding80* Note: on non-CDB the fourth one is the auxilary mac and is81* essentially zero.82* On CDB the fourth one is a regular binding.83*/84struct iwl_time_quota_cmd_v1 {85struct iwl_time_quota_data_v1 quotas[MAX_BINDINGS];86} __packed; /* TIME_QUOTA_ALLOCATION_CMD_API_S_VER_1 */8788enum iwl_quota_low_latency {89IWL_QUOTA_LOW_LATENCY_NONE = 0,90IWL_QUOTA_LOW_LATENCY_TX = BIT(0),91IWL_QUOTA_LOW_LATENCY_RX = BIT(1),92IWL_QUOTA_LOW_LATENCY_TX_RX =93IWL_QUOTA_LOW_LATENCY_TX | IWL_QUOTA_LOW_LATENCY_RX,94};9596/**97* struct iwl_time_quota_data - configuration of time quota per binding98* @id_and_color: ID and color of the relevant Binding.99* @quota: absolute time quota in TU. The scheduler will try to divide the100* remainig quota (after Time Events) according to this quota.101* @max_duration: max uninterrupted context duration in TU102* @low_latency: low latency status, &enum iwl_quota_low_latency103*/104struct iwl_time_quota_data {105__le32 id_and_color;106__le32 quota;107__le32 max_duration;108__le32 low_latency;109} __packed; /* TIME_QUOTA_DATA_API_S_VER_2 */110111/**112* struct iwl_time_quota_cmd - configuration of time quota between bindings113* ( TIME_QUOTA_CMD = 0x2c )114* Note: on non-CDB the fourth one is the auxilary mac and is essentially zero.115* On CDB the fourth one is a regular binding.116*117* @quotas: allocations per binding118*/119struct iwl_time_quota_cmd {120struct iwl_time_quota_data quotas[MAX_BINDINGS];121} __packed; /* TIME_QUOTA_ALLOCATION_CMD_API_S_VER_2 */122123#endif /* __iwl_fw_api_binding_h__ */124125126