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

Commit 18c61c06 authored by Gururaj Pandurangi's avatar Gururaj Pandurangi Committed by snandini
Browse files

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: I727fd5a055e4e400ebc174cfb504d60e3335c3c4
CRs-Fixed: 2872244
parent 40f177fa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1235,6 +1235,8 @@ struct wlan_lmac_if_reg_rx_ops {
	bool (*reg_ignore_fw_reg_offload_ind)(struct wlan_objmgr_psoc *psoc);
	QDF_STATUS (*reg_get_unii_5g_bitmap)(struct wlan_objmgr_pdev *pdev,
					     uint8_t *bitmap);
	QDF_STATUS (*reg_set_ext_tpc_supported)(struct wlan_objmgr_psoc *psoc,
						bool val);
};

#ifdef CONVERGED_P2P_ENABLE
+3 −0
Original line number Diff line number Diff line
@@ -381,6 +381,9 @@ static void wlan_lmac_if_umac_reg_rx_ops_register(

	rx_ops->reg_rx_ops.reg_get_unii_5g_bitmap =
		ucfg_reg_get_unii_5g_bitmap;

	rx_ops->reg_rx_ops.reg_set_ext_tpc_supported =
		tgt_reg_set_ext_tpc_supported;
}

#ifdef CONVERGED_P2P_ENABLE
+2 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2014-2021 The Linux Foundation. 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
@@ -96,6 +96,7 @@ QDF_STATUS wlan_regulatory_psoc_obj_created_notification(
	soc_reg_obj->five_dot_nine_ghz_supported = false;
	soc_reg_obj->enable_5dot9_ghz_chan_in_master_mode = false;
	soc_reg_obj->retain_nol_across_regdmn_update = false;
	soc_reg_obj->is_ext_tpc_supported = false;

	for (i = 0; i < MAX_STA_VDEV_CNT; i++)
		soc_reg_obj->vdev_ids_11d[i] = INVALID_VDEV_ID;
+2 −0
Original line number Diff line number Diff line
@@ -104,6 +104,7 @@ struct chan_change_cbk_entry {
 *	changes.
 * @domain_code_6g_ap: domain code for 6G AP
 * @domain_code_6g_client: domain code for 6G client
 * @is_ext_tpc_supported: Whether FW supports new WMI command for TPC
 */
struct wlan_regulatory_psoc_priv_obj {
	struct mas_chan_params mas_chan_params[PSOC_MAX_PHY_REG_CAP];
@@ -160,6 +161,7 @@ struct wlan_regulatory_psoc_priv_obj {
	uint8_t domain_code_6g_ap[REG_CURRENT_MAX_AP_TYPE];
	uint8_t domain_code_6g_client[REG_CURRENT_MAX_AP_TYPE][REG_MAX_CLIENT_TYPE];
#endif
	bool is_ext_tpc_supported;
};

/**
+31 −0
Original line number Diff line number Diff line
@@ -4530,3 +4530,34 @@ enum reg_6g_ap_type reg_decide_6g_ap_pwr_type(struct wlan_objmgr_pdev *pdev)
	return ap_pwr_type;
}
#endif

QDF_STATUS
reg_set_ext_tpc_supported(struct wlan_objmgr_psoc *psoc, bool val)
{
	struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;

	psoc_priv_obj = reg_get_psoc_obj(psoc);

	if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
		reg_err("psoc reg component is NULL");
		return QDF_STATUS_E_FAILURE;
	}

	psoc_priv_obj->is_ext_tpc_supported = val;

	return QDF_STATUS_SUCCESS;
}

bool reg_is_ext_tpc_supported(struct wlan_objmgr_psoc *psoc)
{
	struct wlan_regulatory_psoc_priv_obj *psoc_priv_obj;

	psoc_priv_obj = reg_get_psoc_obj(psoc);

	if (!IS_VALID_PSOC_REG_OBJ(psoc_priv_obj)) {
		reg_err("psoc reg component is NULL");
		return  false;
	}

	return psoc_priv_obj->is_ext_tpc_supported;
}
Loading