qcacld-3.0: Handle AP power type in he_ops IE for 6GHz

Parse reg_info subfield present in he_ops IE from beacon on
6GHz channels to obtain AP's power type for STA.
In case of SAP, get the AP power type from SAP decision
engine and populate it in dot11f API.

Change-Id: Iec317ea35936e7a5c2372d1188fe5940afb0c28d
CRs-Fixed: 2869367
This commit is contained in:
Gururaj Pandurangi 2021-02-02 01:16:29 -08:00 • committed by snandini
commit 0aae9ef6c1
3 changed files with 9 additions and 1 deletions

View file

@ -577,6 +577,8 @@ struct pe_session {
uint16_t prot_status_code;
tSirResultCodes result_code;
uint32_t dfs_regdomain;
/* AP power type */
uint8_t ap_power_type;
};
/*-------------------------------------------------------------------------

View file

@ -127,7 +127,8 @@ static void lim_extract_he_op(struct pe_session *session,
session->he_op.oper_info_6g.info.center_freq_seg0;
session->ch_center_freq_seg1 =
session->he_op.oper_info_6g.info.center_freq_seg1;
session->ap_power_type =
session->he_op.oper_info_6g.info.reg_info;
pe_debug("6G op info: ch_wd %d cntr_freq_seg0 %d cntr_freq_seg1 %d",
session->ch_width, session->ch_center_freq_seg0,
session->ch_center_freq_seg1);

View file

@ -45,6 +45,7 @@
#include "wlan_mlme_public_struct.h"
#include "wlan_mlme_ucfg_api.h"
#include "wlan_mlme_api.h"
#include "wlan_reg_services_api.h"
#define RSN_OUI_SIZE 4
/* ////////////////////////////////////////////////////////////////////// */
@ -4518,6 +4519,8 @@ sir_convert_beacon_frame2_struct(struct mac_context *mac,
pBeaconStruct->chan_freq = wlan_reg_chan_band_to_freq(mac->pdev,
pBeacon->he_op.oper_info_6g.info.primary_ch,
BIT(REG_BAND_6G));
pBeaconStruct->ap_power_type =
pBeacon->he_op.oper_info_6g.info.reg_info;
} else if (pBeacon->DSParams.present) {
pBeaconStruct->dsParamsPresent = 1;
pBeaconStruct->chan_freq =
@ -6396,6 +6399,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);
}
lim_log_he_op(mac_ctx, he_op, session);