qcacmn: Add service bit to support backward compatibility

The host will send TPC power to FW via the new WMI cmd
WMI_VDEV_SET_TPC_POWER_CMDID going forward instead of
WMI_VDEV_PARAM_TX_PWRLIMIT to accommodate 6GHz channels.
But, to support backward compatibility for New Host+old FW
the TPC power will be sent to FW via legacy WMI cmds
WMI_VDEV_SET_PARAM_CMDID (during initial connection) or
WMI_VDEV_PARAM_TX_PWRLIMIT (power value change during RRM
req/bcn processing from connected AP) with the help of a
service bit WMI_SERVICE_EXT_TPC_REG_SUPPORT.

Change-Id: I22e11ff847cd384fac8ea0061e5df42cea0c8de8
CRs-Fixed: 2874245
此提交包含在:
Gururaj Pandurangi
2021-02-09 01:26:40 -08:00
提交者 snandini
父節點 ae259a4256
當前提交 901a17b4ae
共有 3 個檔案被更改,包括 50 行新增2 行删除

查看文件

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
*
*
* Permission to use, copy, modify, and/or distribute this software for
@@ -72,4 +72,13 @@ QDF_STATUS target_if_reg_set_5dot9_ghz_info(struct wlan_objmgr_psoc *psoc);
*/
struct wlan_lmac_if_reg_rx_ops *
target_if_regulatory_get_rx_ops(struct wlan_objmgr_psoc *psoc);
/**
* target_if_regulatory_set_ext_tpc() - populate FW support of new WMI command
* for TPC
* @psoc: psoc pointer
*
* Return: Success or Failure
*/
QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc);
#endif /* __TARGET_IF_REG_H__ */

查看文件

@@ -675,6 +675,43 @@ tgt_if_regulatory_set_tpc_power(struct wlan_objmgr_psoc *psoc,
return wmi_unified_send_set_tpc_power_cmd(wmi_handle, vdev_id, param);
}
/**
* tgt_if_regulatory_is_ext_tpc_supported() - Check if FW supports new
* WMI command for TPC power
*
* @psoc: Pointer to psoc
*
* Return: true if FW supports new WMI command for TPC, else false
*/
static bool
tgt_if_regulatory_is_ext_tpc_supported(struct wlan_objmgr_psoc *psoc)
{
wmi_unified_t wmi_handle = get_wmi_unified_hdl_from_psoc(psoc);
if (!wmi_handle)
return false;
return wmi_service_enabled(wmi_handle, wmi_service_ext_tpc_reg_support);
}
QDF_STATUS target_if_regulatory_set_ext_tpc(struct wlan_objmgr_psoc *psoc)
{
struct wlan_lmac_if_reg_rx_ops *reg_rx_ops;
reg_rx_ops = target_if_regulatory_get_rx_ops(psoc);
if (!reg_rx_ops) {
target_if_err("reg_rx_ops is NULL");
return QDF_STATUS_E_FAILURE;
}
if (reg_rx_ops->reg_set_ext_tpc_supported)
reg_rx_ops->reg_set_ext_tpc_supported(
psoc,
tgt_if_regulatory_is_ext_tpc_supported(psoc));
return QDF_STATUS_SUCCESS;
}
QDF_STATUS target_if_register_regulatory_tx_ops(
struct wlan_lmac_if_tx_ops *tx_ops)
{