Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 153cfbb2 authored by Balaji Pothunoori's avatar Balaji Pothunoori Committed by Gerrit - the friendly Code Review server
Browse files

qcacmn: Vendor command to config concurrent STA connection policies

Introduce a QCA vendor command to configure the concurrent connection
policies when multiple STA interfaces are (getting) active.

Change-Id: I574880e526e4aa8e179b417fbcba6d7e9e9fcfb1
CRs-Fixed: 2915545
parent 0c9c3f05
Loading
Loading
Loading
Loading
+74 −0
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2021 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -4753,6 +4754,27 @@ enum qca_wlan_vendor_attr_config {
	 * will update the RX NSS based on QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS.
	 */
	QCA_WLAN_VENDOR_ATTR_CONFIG_RX_NSS = 78,

	/*
	 * 8-bit unsigned value. This attribute, when set, indicates whether the
	 * specified interface is the primary STA interface when there are more
	 * than one STA interfaces concurrently active.
	 *
	 * This configuration helps the firmware/hardware to support certain
	 * features (e.g., roaming) on this primary interface, if the same
	 * cannot be supported on the concurrent STA interfaces simultaneously.
	 *
	 * This configuration is only applicable for a single STA interface on
	 * a device and gives the priority for it only over other concurrent STA
	 * interfaces.
	 *
	 * If the device is a multi wiphy/soc, this configuration applies to a
	 * single STA interface across the wiphys.
	 *
	 * 1-Enable (is the primary STA), 0-Disable (is not the primary STA)
	 */
	QCA_WLAN_VENDOR_ATTR_CONFIG_CONCURRENT_STA_PRIMARY = 79,

	/* keep last */
	QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST,
	QCA_WLAN_VENDOR_ATTR_CONFIG_MAX =
@@ -10891,6 +10913,58 @@ enum qca_wlan_vendor_oci_override_frame_type {
	QCA_WLAN_VENDOR_OCI_OVERRIDE_FRAME_FILS_REASSOC_REQ = 4,
};

/**
 * enum qca_wlan_concurrent_sta_policy_config - Concurrent STA policies
 *
 * @QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY: Preference to the primary
 * STA interface has to be given while selecting the connection policies
 * (e.g., BSSID, band, TX/RX chains, etc.) for the subsequent STA interface.
 * An interface is set as primary through the attribute
 * QCA_WLAN_VENDOR_ATTR_CONFIG_CONCURRENT_STA_PRIMARY. This policy is not
 * applicable if the primary interface has not been set earlier.
 *
 * The intention is not to downgrade the primary STA performance, such as:
 * - Do not reduce the number of TX/RX chains of primary connection.
 * - Do not optimize DBS vs. MCC/SCC, if DBS ends up reducing the number of
 *   chains.
 * - If using MCC, should set the MCC duty cycle of the primary connection to
 *   be higher than the secondary connection.
 *
 * @QCA_WLAN_CONCURRENT_STA_POLICY_UNBIASED: The connection policies for the
 * subsequent STA connection shall be chosen to balance with the existing
 * concurrent STA's performance.
 * Such as
 * - Can choose MCC or DBS mode depending on the MCC efficiency and hardware
 *   capability.
 * - If using MCC, set the MCC duty cycle of the primary connection to be equal
 *   to the secondary.
 * - Prefer BSSID candidates which will help provide the best "overall"
 *   performance for all the STA connections.
 */
enum qca_wlan_concurrent_sta_policy_config {
	QCA_WLAN_CONCURRENT_STA_POLICY_PREFER_PRIMARY = 0,
	QCA_WLAN_CONCURRENT_STA_POLICY_UNBIASED = 1,
};

/**
 * enum qca_wlan_vendor_attr_concurrent_sta_policy - Defines attributes
 * used by QCA_NL80211_VENDOR_SUBCMD_CONCURRENT_MULTI_STA_POLICY vendor command.
 *
 * @QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_CONFIG:
 * u8 attribute. Configures the concurrent STA policy configuration.
 * Possible values are defined in enum qca_wlan_concurrent_sta_policy_config.
 */
enum qca_wlan_vendor_attr_concurrent_sta_policy {
	QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_INVALID = 0,
	QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_CONFIG = 1,

	/* keep last */
	QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_AFTER_LAST,
	QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_MAX =
	QCA_WLAN_VENDOR_ATTR_CONCURRENT_STA_POLICY_AFTER_LAST - 1,

};

/**
 * enum qca_sta_connect_fail_reason_codes - Defines values carried
 * by QCA_WLAN_VENDOR_ATTR_GET_STA_INFO_CONNECT_FAIL_REASON_CODE vendor