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
此提交包含在:
@@ -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)
|
||||
{
|
||||
|
新增問題並參考
封鎖使用者