qcacmn: Update is_psd_power logic in reg get client pwr API
Currently, the reg_get_client_power_for_connecting_ap() API populates is_psd_power flag within the function and uses it as a check to further populate EIRP power. The is_psd_power flag is derived from current channel list chan flag which returns true if corresponding channel supports PSD power. Normally, all 6 GHz channels support PSD, so this flag is usually set to 1. But, AP can transmit EIRP power in TPE IE for 6 GHz channels, thus for MCC specific cases, derive this flag based on tx_power interpretation field in TPE IE for accurate value. WIN Host can still use reg_is_6g_psd_power() to retrieve the flag in the caller APIs. Hence, derive is_psd_power flag from TPE IE interpretation value beforehand and pass it as an argument to reg_get_client_power_for_connecting_ap() API. Change-Id: Iabbcbd003f441151643a087ad4908bcdaed753a5 CRs-Fixed: 3268118
This commit is contained in:

committed by
Madan Koyyalamudi

parent
ea0eca7d21
commit
534715624f
@@ -7943,7 +7943,7 @@ QDF_STATUS reg_get_6g_chan_ap_power(struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_type,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd,
|
||||
bool is_psd,
|
||||
uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power)
|
||||
{
|
||||
@@ -7966,8 +7966,7 @@ QDF_STATUS reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
reg_find_txpower_from_6g_list(chan_freq, master_chan_list,
|
||||
tx_power);
|
||||
|
||||
*is_psd = reg_is_6g_psd_power(pdev);
|
||||
if (*is_psd)
|
||||
if (is_psd)
|
||||
status = reg_get_6g_chan_psd_eirp_power(chan_freq,
|
||||
master_chan_list,
|
||||
eirp_psd_power);
|
||||
|
@@ -1768,7 +1768,7 @@ QDF_STATUS reg_get_6g_chan_ap_power(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* This function is meant to be called to find the channel frequency power
|
||||
* information for a client when the device is operating as a client. It will
|
||||
* fill in the parameter is_psd, tx_power, and eirp_psd_power. eirp_psd_power
|
||||
* fill in the parameters tx_power and eirp_psd_power. eirp_psd_power
|
||||
* will only be filled if the channel is PSD.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
@@ -1776,7 +1776,7 @@ QDF_STATUS reg_get_6g_chan_ap_power(struct wlan_objmgr_pdev *pdev,
|
||||
QDF_STATUS reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_type,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd,
|
||||
bool is_psd,
|
||||
uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power);
|
||||
|
||||
@@ -1906,11 +1906,10 @@ static inline
|
||||
QDF_STATUS reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_type,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd,
|
||||
bool is_psd,
|
||||
uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power)
|
||||
{
|
||||
*is_psd = false;
|
||||
*tx_power = 0;
|
||||
*eirp_psd_power = 0;
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
|
@@ -2159,8 +2159,8 @@ QDF_STATUS wlan_reg_get_6g_chan_ap_power(struct wlan_objmgr_pdev *pdev,
|
||||
*
|
||||
* This function is meant to be called to find the channel frequency power
|
||||
* information for a client when the device is operating as a client. It will
|
||||
* fill in the parameter is_psd, tx_power, and eirp_psd_power. eirp_psd_power
|
||||
* will only be filled if the channel is PSD.
|
||||
* fill in the parameters tx_power and eirp_psd_power. eirp_psd_power will
|
||||
* only be filled if the channel is PSD.
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
@@ -2168,7 +2168,7 @@ QDF_STATUS
|
||||
wlan_reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_type,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd, uint16_t *tx_power,
|
||||
bool is_psd, uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power);
|
||||
|
||||
/**
|
||||
@@ -2309,10 +2309,9 @@ static inline QDF_STATUS
|
||||
wlan_reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_type,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd, uint16_t *tx_power,
|
||||
bool is_psd, uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power)
|
||||
{
|
||||
*is_psd = false;
|
||||
*tx_power = 0;
|
||||
*eirp_psd_power = 0;
|
||||
return QDF_STATUS_E_NOSUPPORT;
|
||||
|
@@ -1690,7 +1690,7 @@ QDF_STATUS
|
||||
wlan_reg_get_client_power_for_connecting_ap(struct wlan_objmgr_pdev *pdev,
|
||||
enum reg_6g_ap_type ap_type,
|
||||
qdf_freq_t chan_freq,
|
||||
bool *is_psd, uint16_t *tx_power,
|
||||
bool is_psd, uint16_t *tx_power,
|
||||
uint16_t *eirp_psd_power)
|
||||
{
|
||||
return reg_get_client_power_for_connecting_ap(pdev, ap_type, chan_freq,
|
||||
|
Reference in New Issue
Block a user