qcacld-3.0: Add support for VHT MCS 10&11

Add support to advertise the VHT MCS 10&11 support using vendor
specific IE to enable the MCS 10 and 11 support in VHT mode.

Change-Id: I2d197dcce20ab4aec617ca8a7f4a54b438fae635
CRs-Fixed: 2465662
This commit is contained in:
Kiran Kumar Lokere 2019-08-06 18:22:39 -07:00 • committed by nshrivas
commit 89f01f0fac
21 changed files with 776 additions and 419 deletions

View file

@ -756,6 +756,7 @@ struct wlan_mlme_powersave {
* @tx_bf_cap: Transmit bf capability
* @as_cap: Antenna sharing capability info
* @disable_ldpc_with_txbf_ap: Disable ldpc capability
* @vht_mcs_10_11_supp: VHT MCS 10 & 11 support
*/
struct mlme_vht_capabilities_info {
uint8_t supp_chan_width;
@ -799,6 +800,7 @@ struct mlme_vht_capabilities_info {
uint8_t tx_bf_cap;
uint8_t as_cap;
bool disable_ldpc_with_txbf_ap;
bool vht_mcs_10_11_supp;
};
/**

View file

@ -3121,6 +3121,9 @@ mlme_update_vht_cap(struct wlan_objmgr_psoc *psoc, struct wma_tgt_vht_cap *cfg)
if (vht_cap_info->short_gi_160mhz && !cfg->vht_short_gi_160)
vht_cap_info->short_gi_160mhz = cfg->vht_short_gi_160;
vht_cap_info->vht_mcs_10_11_supp = cfg->vht_mcs_10_11_supp;
mlme_legacy_debug(" vht_mcs_10_11_supp %d", cfg->vht_mcs_10_11_supp);
return QDF_STATUS_SUCCESS;
}

View file

@ -6201,41 +6201,6 @@ wlan_hdd_wifi_test_config_policy[
.type = NLA_U8},
};
/**
* wlan_hdd_add_qcn_ie() - Add QCN IE to a given IE buffer
* @ie_data: IE buffer
* @ie_len: length of the @ie_data
*
* Return: QDF_STATUS
*/
static QDF_STATUS wlan_hdd_add_qcn_ie(uint8_t *ie_data, uint16_t *ie_len)
{
tDot11fIEQCN_IE qcn_ie;
uint8_t qcn_ie_hdr[QCN_IE_HDR_LEN]
= {WLAN_ELEMID_VENDOR, DOT11F_IE_QCN_IE_MAX_LEN,
0x8C, 0xFD, 0xF0, 0x1};
if (((*ie_len) + QCN_IE_HDR_LEN +
QCN_IE_VERSION_SUBATTR_DATA_LEN) > MAX_DEFAULT_SCAN_IE_LEN) {
hdd_err("IE buffer not enough for QCN IE");
return QDF_STATUS_E_FAILURE;
}
/* Add QCN IE header */
qdf_mem_copy(ie_data + (*ie_len), qcn_ie_hdr, QCN_IE_HDR_LEN);
(*ie_len) += QCN_IE_HDR_LEN;
/* Retrieve Version sub-attribute data */
populate_dot11f_qcn_ie(&qcn_ie);
/* Add QCN IE data[version sub attribute] */
qdf_mem_copy(ie_data + (*ie_len), qcn_ie.version,
(QCN_IE_VERSION_SUBATTR_LEN));
(*ie_len) += (QCN_IE_VERSION_SUBATTR_LEN);
return QDF_STATUS_SUCCESS;
}
/**
* wlan_hdd_save_default_scan_ies() - API to store the default scan IEs
* @hdd_ctx: HDD context
@ -6279,8 +6244,9 @@ static int wlan_hdd_save_default_scan_ies(struct hdd_context *hdd_ctx,
/* Add QCN IE if g_qcn_ie_support INI is enabled */
if (add_qcn_ie)
wlan_hdd_add_qcn_ie(scan_info->default_scan_ies,
&(scan_info->default_scan_ies_len));
sme_add_qcn_ie(hdd_ctx->mac_handle,
scan_info->default_scan_ies,
&scan_info->default_scan_ies_len);
hdd_debug("Saved default scan IE:");
qdf_trace_hex_dump(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,

View file

@ -2612,9 +2612,21 @@ IE TimeAdvertisement (EID_TIME_ADVERTISEMENT) // 8.4.2.63
time_error[5];
}
IE QCN_IE (EID_VENDOR_SPECIFIC) OUI ( 0x8C, 0xFD, 0xF0, 0x01 )
const QCOM_VERSION_ATTR_ID = 1;
const QCOM_VHT_MCS_10_11_ATTR_ID = 2;
IE qcn_ie (EID_VENDOR_SPECIFIC) OUI ( 0x8C, 0xFD, 0xF0, 0x01 )
{
version[4];
OPTIE IE version_attr (QCOM_VERSION_ATTR_ID)
{
version, 1;
sub_version, 1;
}
OPTIE IE vht_mcs11_attr (QCOM_VHT_MCS_10_11_ATTR_ID)
{
vht_mcs_10_11_supp, 1;
}
}
IE esp_information (EID_EXTN_ID_ELEMENT) OUI ( 0x0B )
@ -3465,7 +3477,7 @@ FRAME Beacon // C.f. Sec. 7.2.3.1
OPTIE QComVendorIE;
OPTIE ESEVersion;
OPTIE MBO_IE;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
OPTIE he_op;
OPTIE bss_color_change;
@ -3561,7 +3573,7 @@ FRAME Beacon2
OPTIE hs20vendor_ie;
OPTIE QComVendorIE;
OPTIE ESEVersion;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
OPTIE he_op;
OPTIE bss_color_change;
@ -3633,7 +3645,7 @@ FRAME BeaconIEs
OPTIE ChannelSwitchWrapper;
OPTIE QComVendorIE;
OPTIE MBO_IE;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
OPTIE he_op;
OPTIE bss_color_change;
@ -3685,7 +3697,7 @@ FRAME AssocRequest // 7.2.3.4
OPTIE WFDIEOpaque;
OPTIE vendor_vht_ie;
OPTIE hs20vendor_ie;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
OPTIE osen_ie;
OPTIE roaming_consortium_sel;
@ -3729,7 +3741,7 @@ FRAME AssocResponse // 7.2.3.5
OPTIE fragment_ie;
OPTIE fils_kde;
OPTIE vendor_vht_ie;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
OPTIE he_op;
OPTIE bss_color_change;
@ -3829,7 +3841,7 @@ FRAME ProbeRequest // 7.2.3.8
OPTIE P2PProbeReq;
OPTIE VHTCaps;
OPTIE ExtCap;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
} // End frame ProbeRequest.
@ -3890,7 +3902,7 @@ FRAME ProbeResponse // 7.2.3.9
OPTIE QComVendorIE;
OPTIE ESEVersion;
OPTIE MBO_IE;
OPTIE QCN_IE;
OPTIE qcn_ie;
OPTIE he_cap;
OPTIE he_op;
OPTIE bss_color_change;

View file

@ -26,7 +26,7 @@
*
*
* This file was automatically generated by 'framesc'
* Fri May 31 20:00:27 2019 from the following file(s):
* Wed Aug 7 14:47:51 2019 from the following file(s):
*
* dot11f.frms
*
@ -2730,6 +2730,85 @@ uint32_t dot11f_get_packed_ie_R1KH_ID(
}; /* End extern "C". */
#endif /* C++ */
/* EID 1 (0x01) */
typedef struct sDot11fIEversion_attr {
uint8_t present;
uint8_t version;
uint8_t sub_version;
} tDot11fIEversion_attr;
#define DOT11F_EID_VERSION_ATTR (1)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_VERSION_ATTR_MIN_LEN (2)
#define DOT11F_IE_VERSION_ATTR_MAX_LEN (2)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
__must_check uint32_t dot11f_unpack_ie_version_attr(
tpAniSirGlobal,
uint8_t *,
uint8_t,
tDot11fIEversion_attr*,
bool);
uint32_t dot11f_pack_ie_version_attr(
tpAniSirGlobal,
tDot11fIEversion_attr *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_ie_version_attr(
tpAniSirGlobal,
tDot11fIEversion_attr *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* EID 2 (0x02) */
typedef struct sDot11fIEvht_mcs11_attr {
uint8_t present;
uint8_t vht_mcs_10_11_supp;
} tDot11fIEvht_mcs11_attr;
#define DOT11F_EID_VHT_MCS11_ATTR (2)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_VHT_MCS11_ATTR_MIN_LEN (1)
#define DOT11F_IE_VHT_MCS11_ATTR_MAX_LEN (1)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
__must_check uint32_t dot11f_unpack_ie_vht_mcs11_attr(
tpAniSirGlobal,
uint8_t *,
uint8_t,
tDot11fIEvht_mcs11_attr*,
bool);
uint32_t dot11f_pack_ie_vht_mcs11_attr(
tpAniSirGlobal,
tDot11fIEvht_mcs11_attr *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_ie_vht_mcs11_attr(
tpAniSirGlobal,
tDot11fIEvht_mcs11_attr *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* EID 51 (0x33) */
typedef struct sDot11fIEAPChannelReport {
uint8_t present;
@ -6395,45 +6474,6 @@ uint32_t dot11f_get_packed_ie_QBSSLoad(
}; /* End extern "C". */
#endif /* C++ */
/* EID 221 (0xdd) {OUI 0x8c, 0xfd, 0xf0, 0x01} */
typedef struct sDot11fIEQCN_IE {
uint8_t present;
uint8_t version[4];
} tDot11fIEQCN_IE;
#define DOT11F_EID_QCN_IE (221)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_QCN_IE_MIN_LEN (8)
#define DOT11F_IE_QCN_IE_MAX_LEN (8)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
__must_check uint32_t dot11f_unpack_ie_QCN_IE(
tpAniSirGlobal,
uint8_t *,
uint8_t,
tDot11fIEQCN_IE*,
bool);
uint32_t dot11f_pack_ie_QCN_IE(
tpAniSirGlobal,
tDot11fIEQCN_IE *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_ie_QCN_IE(
tpAniSirGlobal,
tDot11fIEQCN_IE *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* EID 221 (0xdd) {OUI 0x00, 0xa0, 0xc6} */
typedef struct sDot11fIEQComVendorIE {
uint8_t present;
@ -9270,6 +9310,46 @@ uint32_t dot11f_get_packed_ie_osen_ie(
}; /* End extern "C". */
#endif /* C++ */
/* EID 221 (0xdd) {OUI 0x8c, 0xfd, 0xf0, 0x01} */
typedef struct sDot11fIEqcn_ie {
uint8_t present;
tDot11fIEversion_attr version_attr;
tDot11fIEvht_mcs11_attr vht_mcs11_attr;
} tDot11fIEqcn_ie;
#define DOT11F_EID_QCN_IE (221)
/* N.B. These #defines do *not* include the EID & length */
#define DOT11F_IE_QCN_IE_MIN_LEN (4)
#define DOT11F_IE_QCN_IE_MAX_LEN (11)
#ifdef __cplusplus
extern "C" {
#endif /* C++ */
__must_check uint32_t dot11f_unpack_ie_qcn_ie(
tpAniSirGlobal,
uint8_t *,
uint8_t,
tDot11fIEqcn_ie*,
bool);
uint32_t dot11f_pack_ie_qcn_ie(
tpAniSirGlobal,
tDot11fIEqcn_ie *,
uint8_t *,
uint32_t,
uint32_t*);
uint32_t dot11f_get_packed_ie_qcn_ie(
tpAniSirGlobal,
tDot11fIEqcn_ie *,
uint32_t*);
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
/* EID 221 (0xdd) {OUI 0x50, 0x6f, 0x9a, 0x1d} */
typedef struct sDot11fIEroaming_consortium_sel {
uint8_t present;
@ -9505,7 +9585,7 @@ typedef struct sDot11fAssocRequest{
tDot11fIEWFDIEOpaque WFDIEOpaque;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEosen_ie osen_ie;
tDot11fIEroaming_consortium_sel roaming_consortium_sel;
@ -9570,7 +9650,7 @@ typedef struct sDot11fAssocResponse{
tDot11fIEfragment_ie fragment_ie;
tDot11fIEfils_kde fils_kde;
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEbss_color_change bss_color_change;
@ -9693,7 +9773,7 @@ typedef struct sDot11fBeacon{
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEMBO_IE MBO_IE;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEbss_color_change bss_color_change;
@ -9795,7 +9875,7 @@ typedef struct sDot11fBeacon2{
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEbss_color_change bss_color_change;
@ -9878,7 +9958,7 @@ typedef struct sDot11fBeaconIEs{
tDot11fIEChannelSwitchWrapper ChannelSwitchWrapper;
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEMBO_IE MBO_IE;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEbss_color_change bss_color_change;
@ -10221,7 +10301,7 @@ typedef struct sDot11fProbeRequest{
tDot11fIEP2PProbeReq P2PProbeReq;
tDot11fIEVHTCaps VHTCaps;
tDot11fIEExtCap ExtCap;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
} tDot11fProbeRequest;
@ -10299,7 +10379,7 @@ typedef struct sDot11fProbeResponse{
tDot11fIEQComVendorIE QComVendorIE;
tDot11fIEESEVersion ESEVersion;
tDot11fIEMBO_IE MBO_IE;
tDot11fIEQCN_IE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
tDot11fIEbss_color_change bss_color_change;

View file

@ -152,6 +152,7 @@ typedef struct sDphHashNode {
uint8_t vhtSupportedRxNss;
uint8_t vhtBeamFormerCapable;
uint8_t vht_su_bfee_capable;
uint8_t vht_mcs_10_11_supp;
#ifdef WLAN_FEATURE_11W
TX_TIMER pmfSaQueryTimer;
uint16_t pmfSaQueryCurrentTransId;

View file

@ -69,6 +69,10 @@
#define QCN_IE_VERSION_SUPPORTED 1
#define QCN_IE_SUBVERSION_SUPPORTED 0
#define QCN_IE_ATTR_ID_VERSION 1
#define QCN_IE_ATTR_ID_VHT_MCS11 2
#define QCN_IE_ATTR_ID_ALL 0xFF
#define SIZE_OF_FIXED_PARAM 12
#define SIZE_OF_TAG_PARAM_NUM 1
#define SIZE_OF_TAG_PARAM_LEN 1
@ -104,12 +108,6 @@ typedef struct sSirCountryInformation {
} channelTransmitPower[COUNTRY_INFO_MAX_CHANNEL];
} tSirCountryInformation, *tpSirCountryInformation;
typedef struct sSirQCNIE {
bool is_present;
uint8_t version;
uint8_t sub_version;
} tSirQCNIE, *tpSirQCNIE;
#ifdef WLAN_FEATURE_FILS_SK
#define SIR_MAX_IDENTIFIER_CNT 7
#define SIR_CACHE_IDENTIFIER_LEN 2
@ -281,7 +279,7 @@ typedef struct sSirProbeRespBeacon {
uint8_t MBO_capability;
bool assoc_disallowed;
uint8_t assoc_disallowed_reason;
tSirQCNIE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
#ifdef WLAN_FEATURE_11AX_BSS_COLOR
@ -359,6 +357,7 @@ typedef struct sSirAssocReq {
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEhs20vendor_ie hs20vendor_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEqcn_ie qcn_ie;
bool is_sae_authenticated;
} tSirAssocReq, *tpSirAssocReq;
@ -457,7 +456,7 @@ typedef struct sSirAssocRsp {
tDot11fIEvendor_vht_ie vendor_vht_ie;
tDot11fIEOBSSScanParameters obss_scanparams;
tDot11fTLVrssi_assoc_rej rssi_assoc_rej;
tSirQCNIE QCN_IE;
tDot11fIEqcn_ie qcn_ie;
tDot11fIEhe_cap he_cap;
tDot11fIEhe_op he_op;
bool mu_edca_present;
@ -1065,7 +1064,9 @@ QDF_STATUS
populate_dot11f_ext_cap(struct mac_context *mac, bool isVHTEnabled,
tDot11fIEExtCap *pDot11f, struct pe_session *pe_session);
void populate_dot11f_qcn_ie(tDot11fIEQCN_IE *pDot11f);
void populate_dot11f_qcn_ie(struct mac_context *mac,
tDot11fIEqcn_ie *qcn_ie,
uint8_t attr_id);
#ifdef WLAN_FEATURE_FILS_SK
/**

View file

@ -2303,11 +2303,14 @@ lim_add_sta(struct mac_context *mac_ctx,
#endif
add_sta_params->enable_su_tx_bformer =
sta_ds->vht_su_bfee_capable;
add_sta_params->vht_mcs_10_11_supp =
sta_ds->vht_mcs_10_11_supp;
}
pe_debug("TxChWidth %d vhtTxBFCap %d, su_bfer %d",
add_sta_params->ch_width, add_sta_params->vhtTxBFCapable,
add_sta_params->enable_su_tx_bformer);
pe_debug("TxChWidth %d vhtTxBFCap %d, su_bfer %d, vht_mcs11 %d",
add_sta_params->ch_width, add_sta_params->vhtTxBFCapable,
add_sta_params->enable_su_tx_bformer,
add_sta_params->vht_mcs_10_11_supp);
#ifdef FEATURE_WLAN_TDLS
if ((STA_ENTRY_PEER == sta_ds->staType) ||
(STA_ENTRY_TDLS_PEER == sta_ds->staType))
@ -3804,6 +3807,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
IS_BSS_VHT_CAPABLE(pBeaconStruct->
vendor_vht_ie.VHTCaps))) {
pAddBssParams->staContext.vhtCapable = 1;
pAddBssParams->staContext.vht_mcs_10_11_supp =
sta->vht_mcs_10_11_supp;
pAddBssParams->staContext.vhtSupportedRxNss =
sta->vhtSupportedRxNss;
if (pAssocRsp->VHTCaps.present)
@ -3861,8 +3867,9 @@ QDF_STATUS lim_sta_send_add_bss(struct mac_context *mac, tpSirAssocRsp pAssocRsp
pAddBssParams->staContext.vhtCapable,
pAddBssParams->staContext.ch_width,
sta_context->vhtTxBFCapable);
pe_debug("StaContext su_tx_bfer %d",
sta_context->enable_su_tx_bformer);
pe_debug("StaContext su_tx_bfer %d, vht_mcs11 %d",
sta_context->enable_su_tx_bformer,
pAddBssParams->staContext.vht_mcs_10_11_supp);
pAddBssParams->staContext.mimoPS =
(tSirMacHTMIMOPowerSaveState)

View file

@ -1644,6 +1644,17 @@ static bool lim_update_sta_ds(struct mac_context *mac_ctx, tpSirMacMgmtHdr hdr,
sta_ds->vht_su_bfee_capable);
}
sta_ds->vht_mcs_10_11_supp = 0;
if (IS_DOT11_MODE_HT(session->dot11mode) &&
sta_ds->mlmStaContext.vhtCapability) {
if (mac_ctx->mlme_cfg->vht_caps.vht_cap_info.
vht_mcs_10_11_supp &&
assoc_req->qcn_ie.present &&
assoc_req->qcn_ie.vht_mcs11_attr.present)
sta_ds->vht_mcs_10_11_supp =
assoc_req->qcn_ie.vht_mcs11_attr.
vht_mcs_10_11_supp;
}
lim_intersect_sta_he_caps(assoc_req, session, sta_ds);
if (lim_populate_matching_rate_set(mac_ctx, sta_ds,

View file

@ -156,26 +156,33 @@ void lim_update_assoc_sta_datas(struct mac_context *mac_ctx,
else if (assoc_rsp->vendor_vht_ie.VHTCaps.present)
vht_caps = &assoc_rsp->vendor_vht_ie.VHTCaps;
if (IS_DOT11_MODE_VHT(session_entry->dot11mode)) {
if ((vht_caps) && vht_caps->present) {
sta_ds->mlmStaContext.vhtCapability =
vht_caps->present;
/*
* If 11ac is supported and if the peer is
* sending VHT capabilities,
* then htMaxRxAMpduFactor should be
* overloaded with VHT maxAMPDULenExp
*/
sta_ds->htMaxRxAMpduFactor = vht_caps->maxAMPDULenExp;
if (session_entry->htSupportedChannelWidthSet) {
if (assoc_rsp->VHTOperation.present)
sta_ds->vhtSupportedChannelWidthSet =
if ((IS_DOT11_MODE_VHT(session_entry->dot11mode)) &&
((vht_caps) && vht_caps->present)) {
sta_ds->mlmStaContext.vhtCapability =
vht_caps->present;
/*
* If 11ac is supported and if the peer is
* sending VHT capabilities,
* then htMaxRxAMpduFactor should be
* overloaded with VHT maxAMPDULenExp
*/
sta_ds->htMaxRxAMpduFactor = vht_caps->maxAMPDULenExp;
if (session_entry->htSupportedChannelWidthSet) {
if (assoc_rsp->VHTOperation.present)
sta_ds->vhtSupportedChannelWidthSet =
assoc_rsp->VHTOperation.chanWidth;
else
sta_ds->vhtSupportedChannelWidthSet =
eHT_CHANNEL_WIDTH_40MHZ;
}
else
sta_ds->vhtSupportedChannelWidthSet =
eHT_CHANNEL_WIDTH_40MHZ;
}
sta_ds->vht_mcs_10_11_supp = 0;
if (mac_ctx->mlme_cfg->vht_caps.vht_cap_info.
vht_mcs_10_11_supp &&
assoc_rsp->qcn_ie.present &&
assoc_rsp->qcn_ie.vht_mcs11_attr.present)
sta_ds->vht_mcs_10_11_supp =
assoc_rsp->qcn_ie.vht_mcs11_attr.
vht_mcs_10_11_supp;
}
if (IS_DOT11_MODE_HE(session_entry->dot11mode))

View file

@ -345,8 +345,11 @@ lim_send_probe_req_mgmt_frame(struct mac_context *mac_ctx,
additional_ie, addn_ielen);
}
/* Add qcn_ie only if qcn ie is not present in additional_ie */
if (mac_ctx->mlme_cfg->sta.qcn_ie_support && !qcn_ie)
populate_dot11f_qcn_ie(&pr.QCN_IE);
if (!qcn_ie)
populate_dot11f_qcn_ie(mac_ctx, &pr.qcn_ie, QCN_IE_ATTR_ID_ALL);
else
populate_dot11f_qcn_ie(mac_ctx, &pr.qcn_ie,
QCN_IE_ATTR_ID_VHT_MCS11);
/*
* Extcap IE now support variable length, merge Extcap IE from addn_ie
@ -1187,6 +1190,8 @@ lim_send_assoc_rsp_mgmt_frame(struct mac_context *mac_ctx,
populate_dot11f_vht_operation(mac_ctx, pe_session,
&frm.vendor_vht_ie.VHTOperation);
is_vht = true;
populate_dot11f_qcn_ie(mac_ctx, &frm.qcn_ie,
QCN_IE_ATTR_ID_ALL);
}
populate_dot11f_ext_cap(mac_ctx, is_vht, &frm.ExtCap,
pe_session);
@ -1899,8 +1904,7 @@ lim_send_assoc_req_mgmt_frame(struct mac_context *mac_ctx,
populate_dot11f_ext_cap(mac_ctx, vht_enabled,
&frm->ExtCap, pe_session);
if (mac_ctx->mlme_cfg->sta.qcn_ie_support)
populate_dot11f_qcn_ie(&frm->QCN_IE);
populate_dot11f_qcn_ie(mac_ctx, &frm->qcn_ie, QCN_IE_ATTR_ID_ALL);
if (lim_is_session_he_capable(pe_session)) {
pe_debug("Populate HE IEs");

View file

@ -462,6 +462,8 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess
wlan_reg_freq_to_chan(
mac_ctx->pdev,
session->curr_op_freq));
populate_dot11f_qcn_ie(mac_ctx, &bcn_2->qcn_ie,
QCN_IE_ATTR_ID_ALL);
}
if (lim_is_session_he_capable(session)) {

File diff suppressed because it is too large Load diff

View file

@ -1159,13 +1159,24 @@ populate_dot11f_ext_cap(struct mac_context *mac,
return QDF_STATUS_SUCCESS;
}
void populate_dot11f_qcn_ie(tDot11fIEQCN_IE *pDot11f)
void populate_dot11f_qcn_ie(struct mac_context *mac,
tDot11fIEqcn_ie *qcn_ie,
uint8_t attr_id)
{
pDot11f->present = 1;
pDot11f->version[0] = QCN_IE_VERSION_SUBATTR_ID;
pDot11f->version[1] = QCN_IE_VERSION_SUBATTR_DATA_LEN;
pDot11f->version[2] = QCN_IE_VERSION_SUPPORTED;
pDot11f->version[3] = QCN_IE_SUBVERSION_SUPPORTED;
qcn_ie->present = 0;
if (mac->mlme_cfg->sta.qcn_ie_support &&
((attr_id == QCN_IE_ATTR_ID_ALL) ||
(attr_id == QCN_IE_ATTR_ID_VERSION))) {
qcn_ie->present = 1;
qcn_ie->version_attr.present = 1;
qcn_ie->version_attr.version = QCN_IE_VERSION_SUPPORTED;
qcn_ie->version_attr.sub_version = QCN_IE_SUBVERSION_SUPPORTED;
}
if (mac->mlme_cfg->vht_caps.vht_cap_info.vht_mcs_10_11_supp) {
qcn_ie->present = 1;
qcn_ie->vht_mcs11_attr.present = 1;
qcn_ie->vht_mcs11_attr.vht_mcs_10_11_supp = 1;
}
}
QDF_STATUS
@ -2507,16 +2518,9 @@ QDF_STATUS sir_convert_probe_frame2_struct(struct mac_context *mac,
}
}
if (pr->QCN_IE.present) {
pProbeResp->QCN_IE.is_present = true;
if (pr->QCN_IE.version[0] == QCN_IE_VERSION_SUBATTR_ID) {
pProbeResp->QCN_IE.version
= pr->QCN_IE.version[2];
pProbeResp->QCN_IE.sub_version
= pr->QCN_IE.version[3];
}
}
if (pr->qcn_ie.present)
qdf_mem_copy(&pProbeResp->qcn_ie, &pr->qcn_ie,
sizeof(tDot11fIEqcn_ie));
if (pr->he_cap.present) {
pe_debug("11AX: HE cap IE present");
@ -2721,6 +2725,9 @@ sir_convert_assoc_req_frame2_struct(struct mac_context *mac,
lim_log_vht_cap(mac, &pAssocReq->VHTCaps);
}
}
if (ar->qcn_ie.present)
qdf_mem_copy(&pAssocReq->qcn_ie, &ar->qcn_ie,
sizeof(tDot11fIEqcn_ie));
if (ar->he_cap.present) {
qdf_mem_copy(&pAssocReq->he_cap, &ar->he_cap,
sizeof(tDot11fIEhe_cap));
@ -3173,6 +3180,9 @@ sir_convert_assoc_resp_frame2_struct(struct mac_context *mac,
lim_log_vht_operation(mac, &pAssocRsp->VHTOperation);
}
if (ar->qcn_ie.present)
qdf_mem_copy(&pAssocRsp->qcn_ie, &ar->qcn_ie,
sizeof(tDot11fIEqcn_ie));
if (ar->he_cap.present) {
pe_debug("11AX: HE cap IE present");
qdf_mem_copy(&pAssocRsp->he_cap, &ar->he_cap,
@ -3951,15 +3961,9 @@ sir_parse_beacon_ie(struct mac_context *mac,
}
}
if (pBies->QCN_IE.present) {
pBeaconStruct->QCN_IE.is_present = true;
if (pBies->QCN_IE.version[0] == QCN_IE_VERSION_SUBATTR_ID) {
pBeaconStruct->QCN_IE.version
= pBies->QCN_IE.version[2];
pBeaconStruct->QCN_IE.sub_version
= pBies->QCN_IE.version[3];
}
}
if (pBies->qcn_ie.present)
qdf_mem_copy(&pBeaconStruct->qcn_ie, &pBies->qcn_ie,
sizeof(tDot11fIEqcn_ie));
if (pBies->he_cap.present) {
qdf_mem_copy(&pBeaconStruct->he_cap, &pBies->he_cap,
@ -4324,16 +4328,9 @@ sir_convert_beacon_frame2_struct(struct mac_context *mac,
}
}
if (pBeacon->QCN_IE.present) {
pBeaconStruct->QCN_IE.is_present = true;
if (pBeacon->QCN_IE.version[0]
== QCN_IE_VERSION_SUBATTR_ID) {
pBeaconStruct->QCN_IE.version
= pBeacon->QCN_IE.version[2];
pBeaconStruct->QCN_IE.sub_version
= pBeacon->QCN_IE.version[3];
}
}
if (pBeacon->qcn_ie.present)
qdf_mem_copy(&pBeaconStruct->qcn_ie, &pBeacon->qcn_ie,
sizeof(tDot11fIEqcn_ie));
if (pBeacon->he_cap.present) {
pe_debug("11AX: HE cap IE present");

View file

@ -2653,6 +2653,18 @@ QDF_STATUS sme_get_bss_transition_status(mac_handle_t mac_handle,
uint32_t sme_unpack_rsn_ie(mac_handle_t mac_handle, uint8_t *buf,
uint8_t buf_len, tDot11fIERSN *rsn_ie,
bool append_ie);
/**
* sme_add_qcn_ie: Adds QCN IE data to IE buffer
* @mac_handle: handle returned by mac_open
* @ie_data: ie buffer pointer
* @ie_len: ie length pointer
*
* Return: none
*/
void sme_add_qcn_ie(mac_handle_t mac_handle, uint8_t *ie_data,
uint16_t *ie_len);
/**
* sme_get_oper_chan_freq - gets the operating channel freq
* @vdev: vdev handle

View file

@ -14843,6 +14843,30 @@ uint32_t sme_unpack_rsn_ie(mac_handle_t mac_handle, uint8_t *buf,
return dot11f_unpack_ie_rsn(mac_ctx, buf, buf_len, rsn_ie, append_ie);
}
void sme_add_qcn_ie(mac_handle_t mac_handle, uint8_t *ie_data,
uint16_t *ie_len)
{
struct mac_context *mac_ctx = MAC_CONTEXT(mac_handle);
uint8_t qcn_ie[] = {WLAN_ELEMID_VENDOR, DOT11F_IE_QCN_IE_MAX_LEN,
0x8C, 0xFD, 0xF0, 0x1, QCN_IE_VERSION_SUBATTR_ID,
QCN_IE_VERSION_SUBATTR_DATA_LEN,
QCN_IE_VERSION_SUPPORTED,
QCN_IE_SUBVERSION_SUPPORTED};
if (!mac_ctx->mlme_cfg->sta.qcn_ie_support) {
sme_debug("QCN IE is not supported");
return;
}
if (((*ie_len) + sizeof(qcn_ie)) > MAX_DEFAULT_SCAN_IE_LEN) {
sme_err("IE buffer not enough for QCN IE");
return;
}
qdf_mem_copy(ie_data + (*ie_len), qcn_ie, sizeof(qcn_ie));
(*ie_len) += sizeof(qcn_ie);
}
#ifdef FEATURE_BSS_TRANSITION
/**
* sme_get_status_for_candidate() - Get bss transition status for candidate

View file

@ -15217,11 +15217,11 @@ static bool csr_enable_twt(struct mac_context *mac_ctx, tDot11fBeaconIEs *ie)
if ((IS_FEATURE_SUPPORTED_BY_FW(DOT11AX) ||
mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled) && ie &&
(ie->QCN_IE.present || ie->he_cap.twt_responder)) {
(ie->qcn_ie.present || ie->he_cap.twt_responder)) {
sme_debug("TWT is supported, hence disable UAPSD; twt req supp: %d,twt respon supp: %d, QCN_IE: %d",
mac_ctx->mlme_cfg->twt_cfg.is_twt_requestor_enabled,
ie->he_cap.twt_responder,
ie->QCN_IE.present);
ie->qcn_ie.present);
return true;
}
return false;

View file

@ -166,6 +166,7 @@ struct sAniProbeRspStruct {
* @htSmpsconfig: HT SMPS config
* @htLdpcCapable: HT LDPC capable
* @vhtLdpcCapable: VHT LDPC capable
* @vht_mcs_10_11_supp: VHT MCS 10 & 11 support
* @smesessionId: sme session id
* @wpa_rsn: RSN capable
* @capab_info: capabality info
@ -265,6 +266,7 @@ typedef struct {
bool send_smps_action;
uint8_t htLdpcCapable;
uint8_t vhtLdpcCapable;
uint8_t vht_mcs_10_11_supp;
uint8_t smesessionId;
uint8_t wpa_rsn;
uint16_t capab_info;

View file

@ -112,6 +112,7 @@ struct wma_tgt_ht_cap {
* @vht_mu_bformee: vht mu bformee
* @vht_max_ampdu_len_exp: vht max ampdu len exp
* @vht_txop_ps: vht txop ps
* @vht_mcs_10_11_supp: VHT MCS 10 & 11 support
*/
struct wma_tgt_vht_cap {
uint32_t vht_max_mpdu;
@ -127,6 +128,7 @@ struct wma_tgt_vht_cap {
uint32_t vht_mu_bformee;
uint32_t vht_max_ampdu_len_exp;
uint32_t vht_txop_ps;
uint32_t vht_mcs_10_11_supp;
};
/**

View file

@ -5341,6 +5341,7 @@ static void wma_update_target_ext_vht_cap(struct target_psoc_info *tgt_hdl,
uint32_t vht_cap_info_2g, vht_cap_info_5g;
struct wma_tgt_vht_cap tmp_vht_cap = {0}, tmp_cap = {0};
struct wlan_psoc_host_mac_phy_caps *mac_phy_cap;
uint32_t vht_mcs_10_11_supp = 0;
total_mac_phy_cnt = target_psoc_get_total_mac_phy_cnt(tgt_hdl);
num_hw_modes = target_psoc_get_num_hw_modes(tgt_hdl);
@ -5364,6 +5365,14 @@ static void wma_update_target_ext_vht_cap(struct target_psoc_info *tgt_hdl,
if (vht_cap_info_5g)
wma_derive_ext_vht_cap(&tmp_vht_cap,
vht_cap_info_5g);
if (WMI_GET_BITS(mac_phy_cap[i].vht_supp_mcs_5G, 16, 2) &&
WMI_VHT_MCS_NOTIFY_EXT_SS_GET(mac_phy_cap[i].
vht_supp_mcs_5G))
vht_mcs_10_11_supp = 1;
if (WMI_GET_BITS(mac_phy_cap[i].vht_supp_mcs_2G, 16, 2) &&
WMI_VHT_MCS_NOTIFY_EXT_SS_GET(mac_phy_cap[i].
vht_supp_mcs_2G))
vht_mcs_10_11_supp = 1;
}
if (qdf_mem_cmp(&tmp_cap, &tmp_vht_cap,
@ -5371,15 +5380,17 @@ static void wma_update_target_ext_vht_cap(struct target_psoc_info *tgt_hdl,
qdf_mem_copy(vht_cap, &tmp_vht_cap,
sizeof(struct wma_tgt_vht_cap));
}
vht_cap->vht_mcs_10_11_supp = vht_mcs_10_11_supp;
WMA_LOGD("%s: [ext vhtcap] max_mpdu %d supp_chan_width %x rx_ldpc %x\n"
"short_gi_80 %x tx_stbc %x rx_stbc %x txop_ps %x\n"
"su_bformee %x mu_bformee %x max_ampdu_len_exp %d", __func__,
"su_bformee %x mu_bformee %x max_ampdu_len_exp %d\n"
"vht_mcs_10_11_supp %d", __func__,
vht_cap->vht_max_mpdu, vht_cap->supp_chan_width,
vht_cap->vht_rx_ldpc, vht_cap->vht_short_gi_80,
vht_cap->vht_tx_stbc, vht_cap->vht_rx_stbc,
vht_cap->vht_txop_ps, vht_cap->vht_su_bformee,
vht_cap->vht_mu_bformee, vht_cap->vht_max_ampdu_len_exp);
vht_cap->vht_mu_bformee, vht_cap->vht_max_ampdu_len_exp,
vht_cap->vht_mcs_10_11_supp);
}
static void
@ -6426,14 +6437,14 @@ static void wma_print_mac_phy_capabilities(struct wlan_psoc_host_mac_phy_caps
WMA_LOGD("\t: ampdu_density[%d]", cap->ampdu_density);
WMA_LOGD("\t: max_bw_supported_2G[%d]", cap->max_bw_supported_2G);
WMA_LOGD("\t: ht_cap_info_2G[%d]", cap->ht_cap_info_2G);
WMA_LOGD("\t: vht_cap_info_2G[%d]", cap->vht_cap_info_2G);
WMA_LOGD("\t: vht_supp_mcs_2G[%d]", cap->vht_supp_mcs_2G);
WMA_LOGD("\t: vht_cap_info_2G[0x%0X]", cap->vht_cap_info_2G);
WMA_LOGD("\t: vht_supp_mcs_2G[0x%0X]", cap->vht_supp_mcs_2G);
WMA_LOGD("\t: tx_chain_mask_2G[%d]", cap->tx_chain_mask_2G);
WMA_LOGD("\t: rx_chain_mask_2G[%d]", cap->rx_chain_mask_2G);
WMA_LOGD("\t: max_bw_supported_5G[%d]", cap->max_bw_supported_5G);
WMA_LOGD("\t: ht_cap_info_5G[%d]", cap->ht_cap_info_5G);
WMA_LOGD("\t: vht_cap_info_5G[%d]", cap->vht_cap_info_5G);
WMA_LOGD("\t: vht_supp_mcs_5G[%d]", cap->vht_supp_mcs_5G);
WMA_LOGD("\t: vht_cap_info_5G[0x%0X]", cap->vht_cap_info_5G);
WMA_LOGD("\t: vht_supp_mcs_5G[0x%0X]", cap->vht_supp_mcs_5G);
WMA_LOGD("\t: tx_chain_mask_5G[%d]", cap->tx_chain_mask_5G);
WMA_LOGD("\t: rx_chain_mask_5G[%d]", cap->rx_chain_mask_5G);
WMA_LOGD("\t: he_cap_info_2G[0][%08x]", cap->he_cap_info_2G[0]);

View file

@ -1549,6 +1549,12 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
cmd->peer_nss = ((cmd->rx_mcs_set & VHT2x2MCSMASK)
== VHT2x2MCSMASK) ? 1 : 2;
}
if (params->vht_mcs_10_11_supp) {
WMI_SET_BITS(cmd->tx_mcs_set, 16, cmd->peer_nss,
((1 << cmd->peer_nss) - 1));
WMI_VHT_MCS_NOTIFY_EXT_SS_SET(cmd->tx_mcs_set, 1);
}
}
WMA_LOGD(FL("rx_max_rate: %d, rx_mcs: %x, tx_max_rate: %d, tx_mcs: %x"),