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:
@@ -6435,6 +6435,7 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||||||
bool srd_channel_allowed, disable_nan = true;
|
bool srd_channel_allowed, disable_nan = true;
|
||||||
enum QDF_OPMODE vdev_opmode;
|
enum QDF_OPMODE vdev_opmode;
|
||||||
uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS], i;
|
uint8_t vdev_id_list[MAX_NUMBER_OF_CONC_CONNECTIONS], i;
|
||||||
|
enum reg_6g_ap_type ap_pwr_type;
|
||||||
|
|
||||||
hdd_enter();
|
hdd_enter();
|
||||||
|
|
||||||
@@ -6529,6 +6530,9 @@ static int __wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
|
|||||||
if (!status)
|
if (!status)
|
||||||
return -EINVAL;
|
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);
|
vdev_opmode = wlan_vdev_mlme_get_opmode(adapter->vdev);
|
||||||
ucfg_mlme_get_srd_master_mode_for_vdev(hdd_ctx->psoc, vdev_opmode,
|
ucfg_mlme_get_srd_master_mode_for_vdev(hdd_ctx->psoc, vdev_opmode,
|
||||||
&srd_channel_allowed);
|
&srd_channel_allowed);
|
||||||
|
@@ -6471,6 +6471,7 @@ QDF_STATUS
|
|||||||
populate_dot11f_he_operation(struct mac_context *mac_ctx,
|
populate_dot11f_he_operation(struct mac_context *mac_ctx,
|
||||||
struct pe_session *session, tDot11fIEhe_op *he_op)
|
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));
|
qdf_mem_copy(he_op, &session->he_op, sizeof(*he_op));
|
||||||
|
|
||||||
he_op->present = 1;
|
he_op->present = 1;
|
||||||
@@ -6493,8 +6494,8 @@ populate_dot11f_he_operation(struct mac_context *mac_ctx,
|
|||||||
session->curr_op_freq);
|
session->curr_op_freq);
|
||||||
he_op->oper_info_6g.info.dup_bcon = 0;
|
he_op->oper_info_6g.info.dup_bcon = 0;
|
||||||
he_op->oper_info_6g.info.min_rate = 0;
|
he_op->oper_info_6g.info.min_rate = 0;
|
||||||
he_op->oper_info_6g.info.reg_info =
|
wlan_reg_get_cur_6g_ap_pwr_type(mac_ctx->pdev, &ap_pwr_type);
|
||||||
wlan_reg_decide_6g_ap_pwr_type(mac_ctx->pdev);
|
he_op->oper_info_6g.info.reg_info = ap_pwr_type;
|
||||||
}
|
}
|
||||||
lim_log_he_op(mac_ctx, he_op, session);
|
lim_log_he_op(mac_ctx, he_op, session);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user