qcacld-3.0: Update the AP pwr mode when country changes

Currently, the AP power mode is only updated during HE OP IE population.
This causes the country IE to use the incorrect TX powers since HE OP is
populated afterwards. Add a call to update the power mode whenever the
country changes.

Change-Id: I46641d12f1aed045dbe1becf4b96ff65c5746c5b
CRs-fixed: 2910774
This commit is contained in:
Lincoln Tran
2021-03-30 15:59:32 -07:00
committed by snandini
parent 70f283c5d8
commit 9974417ba9
2 changed files with 7 additions and 2 deletions

View File

@@ -6435,6 +6435,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
bool srd_channel_allowed, disable_nan = true;
enum QDF_OPMODE vdev_opmode;
uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS], i;
enum reg_6g_ap_type ap_pwr_type;
hdd_enter();
@@ -6529,6 +6530,9 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
if (!status)
return -EINVAL;
ap_pwr_type = wlan_reg_decide_6g_ap_pwr_type(hdd_ctx->pdev);
hdd_debug("selecting AP power type %d", ap_pwr_type);
vdev_opmode = wlan_vdev_mlme_get_opmode(adapter->vdev);
ucfg_mlme_get_srd_master_mode_for_vdev(hdd_ctx->psoc, vdev_opmode,
&srd_channel_allowed);

View File

@@ -6471,6 +6471,7 @@ QDF_STATUS
populate_dot11f_he_operation(struct mac_context *mac_ctx,
struct pe_session *session, tDot11fIEhe_op *he_op)
{
enum reg_6g_ap_type ap_pwr_type;
qdf_mem_copy(he_op, &session->he_op, sizeof(*he_op));
he_op->present = 1;
@@ -6493,8 +6494,8 @@ populate_dot11f_he_operation(struct mac_context *mac_ctx,
session->curr_op_freq);
he_op->oper_info_6g.info.dup_bcon = 0;
he_op->oper_info_6g.info.min_rate = 0;
he_op->oper_info_6g.info.reg_info =
wlan_reg_decide_6g_ap_pwr_type(mac_ctx->pdev);
wlan_reg_get_cur_6g_ap_pwr_type(mac_ctx->pdev, &ap_pwr_type);
he_op->oper_info_6g.info.reg_info = ap_pwr_type;
}
lim_log_he_op(mac_ctx, he_op, session);