Răsfoiți Sursa

qcacmn: Update best power mode only for client power types

Currently regulatory maintains 2 separate channel lists
for client and AP. For client type, host driver is using super
channel list and for ap type host driver is using secondary
channel list.
Currently when regulatory fills the best power mode, it only
considers highest power to decide best power mode but it does
not consider if the power is for AP power mode or for client
power mode. Since power values for AP power modes is always
higher as compared to power values of client power modes, so
best power mode is always gets updated with the AP power type.
Since host driver uses super channel list for only client power
type and with above method tx power for AP power mode is getting
used which is incorrect.

To address above issue, update the best power mode for only client
power types.

Change-Id: Iba44ce919b719a59944e431cd1b4d58749122e8b
CRs-Fixed: 3159215
Ashish Kumar Dhanotiya 3 ani în urmă
părinte
comite
dfce3ace10
1 a modificat fișierele cu 9 adăugiri și 0 ștergeri
  1. 9 0
      umac/regulatory/core/src/reg_build_chan_list.c

+ 9 - 0
umac/regulatory/core/src/reg_build_chan_list.c

@@ -2293,6 +2293,15 @@ reg_fill_best_pwr_mode(struct wlan_regulatory_pdev_priv_obj *pdev_priv_obj,
 		       uint8_t mas_chan_list_power,
 		       uint8_t *max_eirp_pwr)
 {
+	enum reg_6g_client_type curr_6g_client_type;
+	enum reg_6g_client_type client_type =
+			reg_pwr_enum_2_ap_cli_pwrmode[supp_pwr_mode].cli_type;
+
+	reg_get_cur_6g_client_type(pdev_priv_obj->pdev_ptr,
+				   &curr_6g_client_type);
+	if (client_type != curr_6g_client_type)
+		return;
+
 	if (*max_eirp_pwr == 0) {
 		*max_eirp_pwr = mas_chan_list_power;
 		super_chan_list[chn_idx].best_power_mode = supp_pwr_mode;