Add QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER command

During high battery voltage scenario, higher MCS data rate leads to poor
EVM accuracy which causes poor user experience. Hence to provide better
user experience, EVM accuracy needs to be improved by adjusting TX power
for MCS rate of specific band/radio chain. To achieve this, add a new
vendor command to configure required parameters in the WLAN driver.

Signed-off-by: Mukul Sharma <quic_mukul@quicinc.com>
This commit is contained in:
mukul sharma 2024-02-08 13:17:29 +05:30 committed by Jouni Malinen
parent fe82a61efa
commit 87120a5b6e

View file

@ -1048,6 +1048,11 @@ enum qca_radiotap_vendor_ids {
* to user space to disassociate with a peer based on the peer MAC address
* provided. Specify the peer MAC address in
* QCA_WLAN_VENDOR_ATTR_MAC_ADDR. For MLO, MLD MAC address is provided.
*
* @QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER: This vendor command is used to
* adjust transmit power. The attributes used with this subcommand are
* defined in enum qca_wlan_vendor_attr_adjust_tx_power.
*
*/
enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
@ -1272,6 +1277,7 @@ enum qca_nl80211_vendor_subcmds {
QCA_NL80211_VENDOR_SUBCMD_FW_PAGE_FAULT_REPORT = 238,
QCA_NL80211_VENDOR_SUBCMD_FLOW_POLICY = 239,
QCA_NL80211_VENDOR_SUBCMD_DISASSOC_PEER = 240,
QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER = 241,
};
/* Compatibility defines for previously used subcmd names.
@ -16822,4 +16828,127 @@ enum qca_wlan_btm_support {
QCA_WLAN_BTM_SUPPORT_DISABLE = 1,
};
/**
* enum qca_wlan_vendor_data_rate_type - Represents the possible values for
* attribute %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE.
*
* @QCA_WLAN_VENDOR_DATA_RATE_TYPE_LEGACY: Data rate type is a legacy rate code
* used in OFDM/CCK.
*
* @QCA_WLAN_VENDOR_DATA_RATE_TYPE_MCS: Data rate type is an MCS index.
*
*/
enum qca_wlan_vendor_data_rate_type {
QCA_WLAN_VENDOR_DATA_RATE_TYPE_LEGACY = 0,
QCA_WLAN_VENDOR_DATA_RATE_TYPE_MCS = 1,
};
/**
* enum qca_wlan_vendor_attr_adjust_tx_power_rate - Definition
* of data rate related attributes which is used inside nested attribute
* %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_RATE_CONFIG.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE: u8 data rate type.
* For this attribute, valid values are enumerated in enum
* %qca_wlan_vendor_data_rate_type.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_VALUE: u8 value.
* This attribute value is interpreted according to the value of attribute
* %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE. For legacy config
* type, this attribute value is defined in the units of 0.5 Mbps.
* For non legacy config type, this attribute carries the MCS index number.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_POWER_VALUE: u8 value in dBm.
* Usually the target computes a final transmit power that is the maximum
* power level that doesn't exceed the limits enforced by various sources
* like chip-specific conformance test limits (CTL), Specific Absorption
* Rate (SAR), Transmit Power Control (TPC), wiphy-specific limits, STA-specific
* limits, channel avoidance limits, Automated Frequency Coordination (AFC),
* and others. In some cases it may be desirable to use a power level that is
* lower than the maximum power level allowed by all of these limits, so this
* attribute provides an additional limit that can be used to reduce the
* transmit power level.
*
*/
enum qca_wlan_vendor_attr_adjust_tx_power_rate {
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_TYPE = 1,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_VALUE = 2,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_RATE_POWER_VALUE = 3,
/* keep last */
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CONFIG_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CONFIG_MAX =
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CONFIG_AFTER_LAST - 1,
};
/**
* enum qca_wlan_vendor_attr_adjust_tx_power_chain_config - Definition
* of chain related attributes which is used inside nested attribute
* %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CHAIN_CONFIG.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_INDEX: u8 value.
* Represents a particular chain for which transmit power adjustment needed.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_RATE_CONFIG: A nested
* attribute containing data rate related information to adjust transmit
* power. The attributes used inside this nested attributes are defined in
* enum qca_wlan_vendor_attr_adjust_tx_power_rate.
*/
enum qca_wlan_vendor_attr_adjust_tx_power_chain_config {
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_INDEX = 1,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_RATE_CONFIG = 2,
/* keep last */
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_MAX =
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_CHAIN_AFTER_LAST - 1,
};
/**
* enum qca_wlan_vendor_attr_adjust_tx_power_band_config - Definition
* of band related attributes which is used inside nested attribute
* %QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CONFIG.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_INDEX: u8 value to
* indicate band for which configuration applies. Valid values are enumerated
* in enum %nl80211_band.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CHAIN_CONFIG: A nested
* attribute containing per chain related information to adjust transmit
* power. The attributes used inside this nested attribute are defined in
* enum qca_wlan_vendor_attr_adjust_tx_power_chain_config.
*
*/
enum qca_wlan_vendor_attr_adjust_tx_power_band_config {
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_INDEX = 1,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CHAIN_CONFIG = 2,
/* keep last */
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_MAX =
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_AFTER_LAST - 1,
};
/**
* enum qca_wlan_vendor_attr_adjust_tx_power - Definition of attributes
* for %QCA_NL80211_VENDOR_SUBCMD_ADJUST_TX_POWER subcommand.
*
* @QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CONFIG: A nested attribute
* containing per band related information to adjust transmit power.
* The attributes used inside this nested attributes are defined in
* enum qca_wlan_vendor_attr_adjust_tx_power_band_config.
*/
enum qca_wlan_vendor_attr_adjust_tx_power {
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_INVALID = 0,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_BAND_CONFIG = 1,
/* keep last */
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_AFTER_LAST,
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_MAX =
QCA_WLAN_VENDOR_ATTR_ADJUST_TX_POWER_AFTER_LAST - 1,
};
#endif /* QCA_VENDOR_H */