qcacld-3.0: Modify IEs for 6 GHz processing

Modify IEs for 6 GHz processing.

Country IE - Make the first triplet mandatory and keep
rest of the triplets as optional as 6ghz channels are
denoted by operating class/subband sequence and the
triplet field will have details about it.

transmit_power_env IE - Rename vht_transmit_power_env to
transmit_power_env and add 3 new subfields-
Max tx_pwr_count - indicates the number of local max tx
power For X MHz fields (where X = 20, 40, 80, or 160/80+80)
minus 1 in max tx pwr field of the TPE element.
Max tx_pwr_interpret - indicates the contents of max tx power
field (local EIRP, Local EIRP PSD etc) and interpretation of
the max tx power count field.
Max tx_pwr_category - indicates a category for which max
tx powers apply. A value of 0 indicates the default category;
the interpretation of other values depends on the country.

HE Ops IE - Addition of a 3-bit subfield Regulatory info,
reg_info indicates TYPE of the 6GHZ AP that is carrying this
IE in the beacon: this would typically be SP, LPI or VLP.

Change-Id: If6fbb8a92a6f80b6bcf18906494d08ff048d68a4
CRs-Fixed: 2822657
This commit is contained in:
snandini 2020-11-02 08:03:30 -08:00
commit 311f0f392b
9 changed files with 1580 additions and 1531 deletions

View file

@ -114,7 +114,7 @@ const EID_AID = 197;
const EID_EXT_CAP = 127;
const EID_OPERATING_MODE = 199;
const EID_WIDER_BW_CHANNEL_SWITCH_ANN= 194;
const VHT_TRANSMIT_POWER_ENVELOPE = 195;
const EID_TRANSMIT_POWER_ENVELOPE = 195;
const EID_CHANNEL_SWITCH_WRAPPER = 196;
const EID_VENDOR_SPECIFIC = 221;
const EID_FILS_INDICATION = 240;
@ -1332,7 +1332,8 @@ IE RequestedInfo (EID_REQUEST) // 7.3.2.12
IE Country (EID_COUNTRY) // 7.3.2.9
{
country[3];
OPTIONAL triplets[3][0..84];
first_triplet[3];
OPTIONAL more_triplets[3][0..80];
}
IE FHParams (EID_FH_PATTERN) // 7.3.2.10
@ -2448,15 +2449,20 @@ IE WiderBWChanSwitchAnn (EID_WIDER_BW_CHANNEL_SWITCH_ANN)
newCenterChanFreq1, 1;
}
IE vht_transmit_power_env (VHT_TRANSMIT_POWER_ENVELOPE)
IE transmit_power_env (EID_TRANSMIT_POWER_ENVELOPE)
{
bytes[2..5];
{
max_tx_pwr_count: 3;
max_tx_pwr_interpret: 3;
max_tx_pwr_category: 2;
}
tx_power[1..8];
}
IE ChannelSwitchWrapper (EID_CHANNEL_SWITCH_WRAPPER)
{
OPTIE IE WiderBWChanSwitchAnn;
OPTIE IE vht_transmit_power_env;
OPTIE IE transmit_power_env;
}
IE ExtCap (EID_EXT_CAP)
{
@ -3134,7 +3140,8 @@ IE he_op (EID_EXTN_ID_ELEMENT) OUI (0x24)
{ // control
ch_width: 2;
dup_bcon: 1;
reserved: 5;
reg_info: 3;
reserved: 2;
}
center_freq_seg0, 1;
center_freq_seg1, 1;
@ -3701,7 +3708,7 @@ FRAME Beacon2
OPTIE P2PBeacon;
OPTIE VHTCaps;
OPTIE VHTOperation;
OPTIE vht_transmit_power_env;
OPTIE transmit_power_env[0..8];
OPTIE ChannelSwitchWrapper;
OPTIE VHTExtBssLoad;
OPTIE ExtCap;
@ -4038,7 +4045,7 @@ FRAME ProbeResponse // 7.2.3.9
OPTIE VHTCaps;
OPTIE VHTOperation;
OPTIE vht_transmit_power_env;
OPTIE transmit_power_env[0..8];
OPTIE ChannelSwitchWrapper;
OPTIE VHTExtBssLoad;
OPTIE ExtCap;
@ -4083,6 +4090,7 @@ FRAME DeAuth // 7.2.3.11
OPTIE P2PDeAuth;
}
FRAME AddTSRequest // 7.4.2.1
{

View file

@ -26,7 +26,7 @@
*
*
* This file was automatically generated by 'framesc'
* Tue Oct 27 21:57:51 2020 from the following file(s):
* Mon Dec 7 14:06:11 2020 from the following file(s):
*
* dot11f.frms
*
@ -4701,39 +4701,42 @@ uint32_t dot11f_get_packed_ie_tgt_mac_addr(
#endif /* C++ */
/* EID 195 (0xc3) */
typedef struct sDot11fIEvht_transmit_power_env {
typedef struct sDot11fIEtransmit_power_env {
uint8_t present;
uint8_t num_bytes;
uint8_t bytes[5];
} tDot11fIEvht_transmit_power_env;
uint8_t max_tx_pwr_count:3;
uint8_t max_tx_pwr_interpret:3;
uint8_t max_tx_pwr_category:2;
uint8_t num_tx_power;
uint8_t tx_power[8];
} tDot11fIEtransmit_power_env;
#define DOT11F_EID_VHT_TRANSMIT_POWER_ENV (195)
#define DOT11F_EID_TRANSMIT_POWER_ENV (195)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_VHT_TRANSMIT_POWER_ENV_MIN_LEN (2)
#define DOT11F_IE_TRANSMIT_POWER_ENV_MIN_LEN (2)
#define DOT11F_IE_VHT_TRANSMIT_POWER_ENV_MAX_LEN (5)
#define DOT11F_IE_TRANSMIT_POWER_ENV_MAX_LEN (9)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
__must_check uint32_t dot11f_unpack_ie_vht_transmit_power_env(
__must_check uint32_t dot11f_unpack_ie_transmit_power_env(
tpAniSirGlobal,
uint8_t *,
uint8_t,
tDot11fIEvht_transmit_power_env*,
tDot11fIEtransmit_power_env*,
bool);
uint32_t dot11f_pack_ie_vht_transmit_power_env(
uint32_t dot11f_pack_ie_transmit_power_env(
tpAniSirGlobal,
tDot11fIEvht_transmit_power_env *,
tDot11fIEtransmit_power_env *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_ie_vht_transmit_power_env(
uint32_t dot11f_get_packed_ie_transmit_power_env(
tpAniSirGlobal,
tDot11fIEvht_transmit_power_env *,
tDot11fIEtransmit_power_env *,
uint32_t*);
#ifdef __cplusplus
@ -4904,9 +4907,9 @@ uint32_t dot11f_get_packed_ie_ChanSwitchAnn(
/* EID 196 (0xc4) */
typedef struct sDot11fIEChannelSwitchWrapper {
uint8_t present;
tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
tDot11fIEvht_transmit_power_env vht_transmit_power_env;
uint8_t present;
tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
tDot11fIEtransmit_power_env transmit_power_env;
} tDot11fIEChannelSwitchWrapper;
#define DOT11F_EID_CHANNELSWITCHWRAPPER (196)
@ -4914,7 +4917,7 @@ typedef struct sDot11fIEChannelSwitchWrapper {
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_CHANNELSWITCHWRAPPER_MIN_LEN (0)
#define DOT11F_IE_CHANNELSWITCHWRAPPER_MAX_LEN (12)
#define DOT11F_IE_CHANNELSWITCHWRAPPER_MAX_LEN (16)
#ifdef __cplusplus
extern "C" {
@ -4946,16 +4949,17 @@ uint32_t dot11f_get_packed_ie_channel_switch_wrapper(
typedef struct sDot11fIECountry {
uint8_t present;
uint8_t country[3];
uint8_t num_triplets;
uint8_t triplets[84][3];
uint8_t first_triplet[3];
uint8_t num_more_triplets;
uint8_t more_triplets[80][3];
} tDot11fIECountry;
#define DOT11F_EID_COUNTRY (7)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_COUNTRY_MIN_LEN (3)
#define DOT11F_IE_COUNTRY_MIN_LEN (6)
#define DOT11F_IE_COUNTRY_MAX_LEN (255)
#define DOT11F_IE_COUNTRY_MAX_LEN (246)
#ifdef __cplusplus
extern "C" {
@ -9463,7 +9467,8 @@ typedef struct sDot11fIEhe_op {
uint8_t primary_ch;
uint8_t ch_width:2;
uint8_t dup_bcon:1;
uint8_t reserved:5;
uint8_t reg_info:3;
uint8_t reserved:2;
uint8_t center_freq_seg0;
uint8_t center_freq_seg1;
uint8_t min_rate;
@ -10317,56 +10322,57 @@ uint32_t dot11f_get_packed_beacon1_size(tpAniSirGlobal pCtx,
#endif /* C++ */
typedef struct sDot11fBeacon2{
tDot11fIECountry Country;
tDot11fIEPowerConstraints PowerConstraints;
tDot11fIEChanSwitchAnn ChanSwitchAnn;
tDot11fIEext_chan_switch_ann ext_chan_switch_ann;
tDot11fIESuppOperatingClasses SuppOperatingClasses;
tDot11fIEQuiet Quiet;
tDot11fIETPCReport TPCReport;
tDot11fIEERPInfo ERPInfo;
tDot11fIEExtSuppRates ExtSuppRates;
tDot11fIERSNOpaque RSNOpaque;
tDot11fIEEDCAParamSet EDCAParamSet;
tDot11fIEAPChannelReport APChannelReport;
tDot11fIERRMEnabledCap RRMEnabledCap;
tDot11fIEMobilityDomain MobilityDomain;
tDot11fIEWPA WPA;
tDot11fIEHTCaps HTCaps;
tDot11fIEHTInfo HTInfo;
tDot11fIEsec_chan_offset_ele sec_chan_offset_ele;
tDot11fIEWMMInfoAp WMMInfoAp;
tDot11fIEWMMParams WMMParams;
tDot11fIEWMMCaps WMMCaps;
tDot11fIEWscBeacon WscBeacon;
tDot11fIEWAPI WAPI;
tDot11fIEESERadMgmtCap ESERadMgmtCap;
tDot11fIEESETrafStrmMet ESETrafStrmMet;
tDot11fIEESETxmitPower ESETxmitPower;
tDot11fIEP2PBeacon P2PBeacon;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
tDot11fIEvht_transmit_power_env vht_transmit_power_env;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEExtCap ExtCap;
tDot11fIEOperatingMode OperatingMode;
tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
tDot11fIEOBSSScanParameters OBSSScanParameters;
tDot11fIEfils_indication fils_indication;
tDot11fIEVendor1IE Vendor1IE;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEhe_6ghz_band_cap he_6ghz_band_cap;
tDot11fIEbss_color_change bss_color_change;
tDot11fIEmu_edca_param_set mu_edca_param_set;
tDot11fIEesp_information esp_information;
tDot11fIECountry Country;
tDot11fIEPowerConstraints PowerConstraints;
tDot11fIEChanSwitchAnn ChanSwitchAnn;
tDot11fIEext_chan_switch_ann ext_chan_switch_ann;
tDot11fIESuppOperatingClasses SuppOperatingClasses;
tDot11fIEQuiet Quiet;
tDot11fIETPCReport TPCReport;
tDot11fIEERPInfo ERPInfo;
tDot11fIEExtSuppRates ExtSuppRates;
tDot11fIERSNOpaque RSNOpaque;
tDot11fIEEDCAParamSet EDCAParamSet;
tDot11fIEAPChannelReport APChannelReport;
tDot11fIERRMEnabledCap RRMEnabledCap;
tDot11fIEMobilityDomain MobilityDomain;
tDot11fIEWPA WPA;
tDot11fIEHTCaps HTCaps;
tDot11fIEHTInfo HTInfo;
tDot11fIEsec_chan_offset_ele sec_chan_offset_ele;
tDot11fIEWMMInfoAp WMMInfoAp;
tDot11fIEWMMParams WMMParams;
tDot11fIEWMMCaps WMMCaps;
tDot11fIEWscBeacon WscBeacon;
tDot11fIEWAPI WAPI;
tDot11fIEESERadMgmtCap ESERadMgmtCap;
tDot11fIEESETrafStrmMet ESETrafStrmMet;
tDot11fIEESETxmitPower ESETxmitPower;
tDot11fIEP2PBeacon P2PBeacon;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
uint16_t num_transmit_power_env;
tDot11fIEtransmit_power_env transmit_power_env[8];
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEExtCap ExtCap;
tDot11fIEOperatingMode OperatingMode;
tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;
tDot11fIEOBSSScanParameters OBSSScanParameters;
tDot11fIEfils_indication fils_indication;
tDot11fIEVendor1IE Vendor1IE;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEhe_6ghz_band_cap he_6ghz_band_cap;
tDot11fIEbss_color_change bss_color_change;
tDot11fIEmu_edca_param_set mu_edca_param_set;
tDot11fIEesp_information esp_information;
} tDot11fBeacon2;
#define DOT11F_BEACON2 (8)
@ -10813,66 +10819,67 @@ uint32_t dot11f_get_packed_probe_request_size(tpAniSirGlobal pCtx,
#endif /* C++ */
typedef struct sDot11fProbeResponse{
tDot11fFfTimeStamp TimeStamp;
tDot11fFfBeaconInterval BeaconInterval;
tDot11fFfCapabilities Capabilities;
tDot11fIESSID SSID;
tDot11fIESuppRates SuppRates;
tDot11fIEFHParamSet FHParamSet;
tDot11fIEDSParams DSParams;
tDot11fIECFParams CFParams;
tDot11fIECountry Country;
tDot11fIEFHParams FHParams;
tDot11fIEFHPattTable FHPattTable;
tDot11fIEPowerConstraints PowerConstraints;
tDot11fIEChanSwitchAnn ChanSwitchAnn;
tDot11fIEext_chan_switch_ann ext_chan_switch_ann;
tDot11fIESuppOperatingClasses SuppOperatingClasses;
tDot11fIEQuiet Quiet;
tDot11fIETPCReport TPCReport;
tDot11fIEERPInfo ERPInfo;
tDot11fIEExtSuppRates ExtSuppRates;
tDot11fIERSNOpaque RSNOpaque;
tDot11fIEQBSSLoad QBSSLoad;
tDot11fIEEDCAParamSet EDCAParamSet;
tDot11fIERRMEnabledCap RRMEnabledCap;
tDot11fIEAPChannelReport APChannelReport;
tDot11fIEMobilityDomain MobilityDomain;
tDot11fIEWPA WPA;
tDot11fIEHTCaps HTCaps;
tDot11fIEHTInfo HTInfo;
tDot11fIEsec_chan_offset_ele sec_chan_offset_ele;
tDot11fIEWMMInfoAp WMMInfoAp;
tDot11fIEWMMParams WMMParams;
tDot11fIEWMMCaps WMMCaps;
tDot11fIEWAPI WAPI;
tDot11fIEESERadMgmtCap ESERadMgmtCap;
tDot11fIEESETrafStrmMet ESETrafStrmMet;
tDot11fIEESETxmitPower ESETxmitPower;
tDot11fIEWscProbeRes WscProbeRes;
tDot11fIEP2PProbeRes P2PProbeRes;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
tDot11fIEvht_transmit_power_env vht_transmit_power_env;
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEExtCap ExtCap;
tDot11fIEOBSSScanParameters OBSSScanParameters;
tDot11fIEfils_indication fils_indication;
tDot11fIEVendor1IE Vendor1IE;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEMBO_IE MBO_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEhe_6ghz_band_cap he_6ghz_band_cap;
tDot11fIEbss_color_change bss_color_change;
tDot11fIEmu_edca_param_set mu_edca_param_set;
tDot11fIEesp_information esp_information;
tDot11fFfTimeStamp TimeStamp;
tDot11fFfBeaconInterval BeaconInterval;
tDot11fFfCapabilities Capabilities;
tDot11fIESSID SSID;
tDot11fIESuppRates SuppRates;
tDot11fIEFHParamSet FHParamSet;
tDot11fIEDSParams DSParams;
tDot11fIECFParams CFParams;
tDot11fIECountry Country;
tDot11fIEFHParams FHParams;
tDot11fIEFHPattTable FHPattTable;
tDot11fIEPowerConstraints PowerConstraints;
tDot11fIEChanSwitchAnn ChanSwitchAnn;
tDot11fIEext_chan_switch_ann ext_chan_switch_ann;
tDot11fIESuppOperatingClasses SuppOperatingClasses;
tDot11fIEQuiet Quiet;
tDot11fIETPCReport TPCReport;
tDot11fIEERPInfo ERPInfo;
tDot11fIEExtSuppRates ExtSuppRates;
tDot11fIERSNOpaque RSNOpaque;
tDot11fIEQBSSLoad QBSSLoad;
tDot11fIEEDCAParamSet EDCAParamSet;
tDot11fIERRMEnabledCap RRMEnabledCap;
tDot11fIEAPChannelReport APChannelReport;
tDot11fIEMobilityDomain MobilityDomain;
tDot11fIEWPA WPA;
tDot11fIEHTCaps HTCaps;
tDot11fIEHTInfo HTInfo;
tDot11fIEsec_chan_offset_ele sec_chan_offset_ele;
tDot11fIEWMMInfoAp WMMInfoAp;
tDot11fIEWMMParams WMMParams;
tDot11fIEWMMCaps WMMCaps;
tDot11fIEWAPI WAPI;
tDot11fIEESERadMgmtCap ESERadMgmtCap;
tDot11fIEESETrafStrmMet ESETrafStrmMet;
tDot11fIEESETxmitPower ESETxmitPower;
tDot11fIEWscProbeRes WscProbeRes;
tDot11fIEP2PProbeRes P2PProbeRes;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
uint16_t num_transmit_power_env;
tDot11fIEtransmit_power_env transmit_power_env[8];
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEExtCap ExtCap;
tDot11fIEOBSSScanParameters OBSSScanParameters;
tDot11fIEfils_indication fils_indication;
tDot11fIEVendor1IE Vendor1IE;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEVendor3IE Vendor3IE;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEMBO_IE MBO_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEhe_6ghz_band_cap he_6ghz_band_cap;
tDot11fIEbss_color_change bss_color_change;
tDot11fIEmu_edca_param_set mu_edca_param_set;
tDot11fIEesp_information esp_information;
} tDot11fProbeResponse;
#define DOT11F_PROBERESPONSE (22)

View file

@ -700,9 +700,11 @@ populate_dot_11_f_ext_chann_switch_ann(struct mac_context *mac_ptr,
struct pe_session *session_entry);
void
populate_dot11f_vht_tx_power_env(struct mac_context *mac,
tDot11fIEvht_transmit_power_env *pDot11f,
enum phy_ch_width ch_width, uint32_t chan_freq);
populate_dot11f_tx_power_env(struct mac_context *mac,
tDot11fIEtransmit_power_env *pDot11f,
enum phy_ch_width ch_width, uint32_t chan_freq,
uint16_t *num_tpe, bool is_ch_switch);
/* / Populate a tDot11fIEChannelSwitchWrapper */
void
populate_dot11f_chan_switch_wrapper(struct mac_context *mac,

View file

@ -696,11 +696,12 @@ lim_send_probe_rsp_mgmt_frame(struct mac_context *mac_ctx,
populate_dot11f_vht_caps(mac_ctx, pe_session, &frm->VHTCaps);
populate_dot11f_vht_operation(mac_ctx, pe_session,
&frm->VHTOperation);
populate_dot11f_vht_tx_power_env(
mac_ctx,
&frm->vht_transmit_power_env,
pe_session->ch_width,
pe_session->curr_op_freq);
populate_dot11f_tx_power_env(mac_ctx,
&frm->transmit_power_env[0],
pe_session->ch_width,
pe_session->curr_op_freq,
&frm->num_transmit_power_env,
false);
/*
* we do not support multi users yet.
* populate_dot11f_vht_ext_bss_load( mac_ctx,

View file

@ -464,10 +464,12 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess
/*
populate_dot11f_vht_ext_bss_load( mac_ctx, &bcn2.VHTExtBssLoad);
*/
populate_dot11f_vht_tx_power_env(mac_ctx,
&bcn_2->vht_transmit_power_env,
session->ch_width,
session->curr_op_freq);
populate_dot11f_tx_power_env(mac_ctx,
&bcn_2->transmit_power_env[0],
session->ch_width,
session->curr_op_freq,
&bcn_2->num_transmit_power_env,
false);
populate_dot11f_qcn_ie(mac_ctx, session, &bcn_2->qcn_ie,
QCN_IE_ATTR_ID_ALL);
}
@ -484,7 +486,6 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess
&bcn_2->bss_color_change);
}
populate_dot11f_ext_cap(mac_ctx, is_vht_enabled, &bcn_2->ExtCap,
session);
@ -733,6 +734,8 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(struct mac_context *mac,
uint32_t *DefProbeRspIeBitmap,
tDot11fProbeResponse *prb_rsp)
{
uint8_t i;
uint16_t num_tpe = beacon2->num_transmit_power_env;
if (beacon2->Country.present) {
set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, WLAN_ELEMID_COUNTRY);
@ -860,13 +863,17 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(struct mac_context *mac,
(void *)&beacon2->VHTOperation,
sizeof(beacon2->VHTOperation));
}
if (beacon2->vht_transmit_power_env.present) {
set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
WLAN_ELEMID_VHT_TX_PWR_ENVLP);
qdf_mem_copy((void *)&prb_rsp->vht_transmit_power_env,
(void *)&beacon2->vht_transmit_power_env,
sizeof(beacon2->vht_transmit_power_env));
for (i = 0; i < num_tpe; i++) {
if (beacon2->transmit_power_env[i].present) {
set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
WLAN_ELEMID_VHT_TX_PWR_ENVLP);
qdf_mem_copy((void *)&prb_rsp->transmit_power_env[i],
(void *)&beacon2->transmit_power_env[i],
sizeof(beacon2->transmit_power_env[i]));
}
}
if (beacon2->VHTExtBssLoad.present) {
set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap,
WLAN_ELEMID_EXT_BSS_LOAD);

File diff suppressed because it is too large Load diff

View file

@ -264,13 +264,17 @@ populate_dot11_supp_operating_classes(struct mac_context *mac_ptr,
}
void
populate_dot11f_vht_tx_power_env(struct mac_context *mac,
tDot11fIEvht_transmit_power_env *pDot11f,
enum phy_ch_width ch_width, uint32_t chan_freq)
populate_dot11f_tx_power_env(struct mac_context *mac,
tDot11fIEtransmit_power_env *pDot11f,
enum phy_ch_width ch_width, uint32_t chan_freq,
uint16_t *num_tpe, bool is_ch_switch)
{
uint8_t num_tx_power, i, tx_power;
int reg_max;
if (!is_ch_switch)
*num_tpe = 1;
switch (ch_width) {
case CH_WIDTH_20MHZ:
/* Max Transmit Power count = 0 (20 MHz) */
@ -310,15 +314,15 @@ populate_dot11f_vht_tx_power_env(struct mac_context *mac,
tx_power = reg_max;
/* Ignore EID field */
pDot11f->present = 1;
pDot11f->num_bytes = num_tx_power + 2;
pDot11f[0].present = 1;
pDot11f[0].num_tx_power = num_tx_power + 2;
/*
* Max Transmit Power count and
* Max Transmit Power units = 0 (EIRP)
*/
pDot11f->bytes[0] = num_tx_power;
pDot11f[0].tx_power[0] = num_tx_power;
for (i = 0; i <= num_tx_power; i++)
pDot11f->bytes[i + 1] = tx_power;
pDot11f[0].tx_power[i + 1] = tx_power;
}
void
@ -356,13 +360,14 @@ populate_dot11f_chan_switch_wrapper(struct mac_context *mac,
pDot11f->WiderBWChanSwitchAnn.present = 1;
/*
* Add the VHT Transmit power Envelope Sublement.
* Add the Transmit power Envelope Sublement.
*/
if (pe_session->vhtCapability) {
populate_dot11f_vht_tx_power_env(mac,
&pDot11f->vht_transmit_power_env,
populate_dot11f_tx_power_env(mac,
&pDot11f->transmit_power_env,
pe_session->gLimChannelSwitch.ch_width,
pe_session->gLimChannelSwitch.primaryChannel);
pe_session->gLimChannelSwitch.primaryChannel,
NULL, true);
}
}
@ -394,6 +399,8 @@ populate_dot11f_country(struct mac_context *mac,
enum reg_wifi_band cur_triplet_band;
int chan_enum;
struct regulatory_channel *cur_chan_list;
uint8_t buffer_triplets[81][3];
uint8_t i, j, num_triplets = 0;
QDF_STATUS status;
cur_chan_list = qdf_mem_malloc(NUM_CHANNELS * sizeof(*cur_chan_list));
@ -414,19 +421,18 @@ populate_dot11f_country(struct mac_context *mac,
ctry_ie->country[REG_ALPHA2_LEN] = 0x04;
cur_triplet_valid = false;
ctry_ie->num_triplets = 0;
for (chan_enum = 0; chan_enum < NUM_CHANNELS; chan_enum++) {
if (wlan_reg_is_6ghz_chan_freq(
cur_chan_list[chan_enum].center_freq)) {
if (cur_triplet_valid) {
ctry_ie->triplets[ctry_ie->num_triplets][0] =
buffer_triplets[num_triplets][0] =
wlan_reg_freq_to_chan(mac->pdev,
cur_triplet_freq);
ctry_ie->triplets[ctry_ie->num_triplets][1] =
buffer_triplets[num_triplets][1] =
cur_triplet_num_chans;
ctry_ie->triplets[ctry_ie->num_triplets][2] =
buffer_triplets[num_triplets][2] =
cur_triplet_tx_power;
ctry_ie->num_triplets++;
num_triplets++;
cur_triplet_valid = false;
}
break;
@ -435,14 +441,14 @@ populate_dot11f_country(struct mac_context *mac,
if (cur_chan_list[chan_enum].chan_flags &
REGULATORY_CHAN_DISABLED) {
if (cur_triplet_valid) {
ctry_ie->triplets[ctry_ie->num_triplets][0] =
buffer_triplets[num_triplets][0] =
wlan_reg_freq_to_chan(mac->pdev,
cur_triplet_freq);
ctry_ie->triplets[ctry_ie->num_triplets][1] =
buffer_triplets[num_triplets][1] =
cur_triplet_num_chans;
ctry_ie->triplets[ctry_ie->num_triplets][2] =
buffer_triplets[num_triplets][2] =
cur_triplet_tx_power;
ctry_ie->num_triplets++;
num_triplets++;
cur_triplet_valid = false;
}
continue;
@ -455,14 +461,14 @@ populate_dot11f_country(struct mac_context *mac,
wlan_reg_freq_to_band(cur_chan_list[chan_enum].center_freq)))
cur_triplet_num_chans++;
else {
ctry_ie->triplets[ctry_ie->num_triplets][0] =
buffer_triplets[num_triplets][0] =
wlan_reg_freq_to_chan(mac->pdev,
cur_triplet_freq);
ctry_ie->triplets[ctry_ie->num_triplets][1] =
buffer_triplets[num_triplets][1] =
cur_triplet_num_chans;
ctry_ie->triplets[ctry_ie->num_triplets][2] =
buffer_triplets[num_triplets][2] =
cur_triplet_tx_power;
ctry_ie->num_triplets++;
num_triplets++;
cur_triplet_freq =
cur_chan_list[chan_enum].center_freq;
@ -481,12 +487,22 @@ populate_dot11f_country(struct mac_context *mac,
}
}
if (ctry_ie->num_triplets == 0) {
if (num_triplets == 0) {
/* at-least one triplet should be present */
qdf_mem_free(cur_chan_list);
return QDF_STATUS_SUCCESS;
}
ctry_ie->num_more_triplets = num_triplets - 1;
ctry_ie->first_triplet[0] = buffer_triplets[0][0];
ctry_ie->first_triplet[1] = buffer_triplets[0][1];
ctry_ie->first_triplet[2] = buffer_triplets[0][2];
for (i = 0; i < ctry_ie->num_more_triplets; i++) {
for (j = 0; j < 3; j++)
ctry_ie->more_triplets[i][j] =
buffer_triplets[i + 1][j];
}
ctry_ie->present = 1;
qdf_mem_free(cur_chan_list);
@ -6024,10 +6040,7 @@ QDF_STATUS
populate_dot11f_timing_advert_frame(struct mac_context *mac_ctx,
tDot11fTimingAdvertisementFrame *frame)
{
uint32_t val, len, j = 0;
uint8_t temp[CFG_MAX_STR_LEN], code[3];
tSirMacChanInfo *max_tx_power_data;
int32_t rem_length = 0, copied_length = 0;
uint32_t val = 0;
/* Capabilities */
val = mac_ctx->mlme_cfg->wep_params.is_privacy_enabled;
@ -6053,30 +6066,7 @@ populate_dot11f_timing_advert_frame(struct mac_context *mac_ctx,
(uint16_t)((val >> WNI_CFG_BLOCK_ACK_ENABLED_IMMEDIATE) & 1);
/* Country */
len = mac_ctx->mlme_cfg->power.max_tx_power_5.len;
max_tx_power_data =
(tSirMacChanInfo *)mac_ctx->mlme_cfg->power.max_tx_power_5.data;
rem_length = len;
while (rem_length >= (sizeof(tSirMacChanInfo))) {
temp[copied_length++] =
(uint8_t)wlan_reg_freq_to_chan(
mac_ctx->pdev,
max_tx_power_data[j].first_freq);
temp[copied_length++] = max_tx_power_data[j].numChannels;
temp[copied_length++] = max_tx_power_data[j].maxTxPower;
j++;
rem_length -= (sizeof(tSirMacChanInfo));
}
wlan_reg_read_current_country(mac_ctx->psoc, code);
qdf_mem_copy(&frame->Country, code, 2);
if (copied_length > MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE)
copied_length = MAX_SIZE_OF_TRIPLETS_IN_COUNTRY_IE;
frame->Country.num_triplets = (uint8_t)(copied_length / 3);
qdf_mem_copy((uint8_t *)&frame->Country.triplets, temp, copied_length);
frame->Country.present = 1;
populate_dot11f_country(mac_ctx, &frame->Country, NULL);
/* PowerConstraints */
frame->PowerConstraints.localPowerConstraints =

View file

@ -265,18 +265,23 @@ void convert_tim(struct mac_context *mac, tSirMacTim *pOld, tDot11fIETIM *pNew)
void convert_country(struct mac_context *mac,
tSirCountryInformation *pOld, tDot11fIECountry *pNew)
{
int i;
uint8_t i = 0;
qdf_mem_copy(pOld->countryString, pNew->country, COUNTRY_STRING_LENGTH);
pOld->numIntervals = pNew->num_triplets;
pOld->numIntervals = pNew->num_more_triplets;
for (i = 0; i < pNew->num_triplets; ++i) {
pOld->channelTransmitPower[i].channelNumber =
pNew->triplets[i][0];
pOld->channelTransmitPower[i].numChannel = pNew->triplets[i][1];
pOld->channelTransmitPower[i].maxTransmitPower =
pNew->triplets[i][2];
pOld->channelTransmitPower[i].channelNumber = pNew->first_triplet[0];
pOld->channelTransmitPower[i].numChannel = pNew->first_triplet[1];
pOld->channelTransmitPower[i].maxTransmitPower = pNew->first_triplet[2];
for (i = 0; i < pNew->num_more_triplets; i++) {
pOld->channelTransmitPower[i + 1].channelNumber =
pNew->more_triplets[i][0];
pOld->channelTransmitPower[i + 1].numChannel =
pNew->more_triplets[i][1];
pOld->channelTransmitPower[i + 1].maxTransmitPower =
pNew->more_triplets[i][2];
}
}

View file

@ -15449,17 +15449,6 @@ QDF_STATUS csr_send_join_req_msg(struct mac_context *mac, uint32_t sessionId,
csr_join_req->txLdpcIniFeatureEnabled =
(uint8_t)mac->mlme_cfg->ht_caps.tx_ldpc_enable;
if ((csr_is11h_supported(mac)) &&
(WLAN_REG_IS_5GHZ_CH_FREQ(bss_freq)) &&
(pIes->Country.present) &&
(!mac->mlme_cfg->sap_cfg.country_code_priority)) {
csr_save_to_channel_power2_g_5_g(mac,
pIes->Country.num_triplets *
sizeof(tSirMacChanInfo),
(tSirMacChanInfo *)
(&pIes->Country.triplets[0]));
csr_apply_power2_current(mac);
}
/*
* If RX LDPC has been disabled for 2.4GHz channels and enabled
* for 5Ghz for STA like persona then here is how to handle