qcacld-3.0: Dont include ext caps in Assoc request if AP doesn't support

qcacld-2.0 to qcacld-3.0 propagation

Some AP doesn't announce Extended Capabilities IE in Probe Response.
Device should not send extended Capabilities if AP doesn't support.

Change-Id: I53215b866cb90f4addf45e3b6ed8af435eb57842
CRs-Fixed: 930199
This commit is contained in:
Agrawal Ashish 2016-02-22 13:27:06 +05:30 • committed by Akash Patel
commit 0f94b570ed
5 changed files with 16 additions and 3 deletions

View file

@ -148,6 +148,7 @@ typedef struct sSirProbeRespBeacon {
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
tDot11fIEVHTExtBssLoad VHTExtBssLoad;
tDot11fIEExtCap ext_cap;
tDot11fIEOperatingMode OperatingMode;
uint8_t WiderBWChanSwitchAnnPresent;
tDot11fIEWiderBWChanSwitchAnn WiderBWChanSwitchAnn;

View file

@ -475,6 +475,7 @@ typedef struct sPESession /* Added to Support BT-AMP */
struct obss_scanparam obss_ht40_scanparam;
/* Supported NSS is intersection of self and peer NSS */
bool supported_nss_1x1;
bool is_ext_caps_present;
} tPESession, *tpPESession;
/*-------------------------------------------------------------------------

View file

@ -215,6 +215,9 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
if (beacon_struct->countryInfoPresent)
session->country_info_present = true;
}
/* Check if Extended caps are present in probe resp or not */
if (beacon_struct->ext_cap.present)
session->is_ext_caps_present = true;
qdf_mem_free(beacon_struct);
return;
} /****** end lim_extract_ap_capability() ******/

View file

@ -1623,7 +1623,7 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
qdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0);
if (add_ie_len) {
if (add_ie_len && pe_session->is_ext_caps_present) {
qdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap),
0);
sir_status = lim_strip_extcap_update_struct(mac_ctx,
@ -1651,7 +1651,8 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
}
}
} else {
lim_log(mac_ctx, LOG1, FL("No additional IE for Assoc Req"));
lim_log(mac_ctx, LOG1,
FL("No addn IE or peer dosen't support addnIE for Assoc Req"));
extr_ext_flag = false;
}
@ -1800,7 +1801,9 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
&frm->vendor2_ie.VHTCaps);
vht_enabled = true;
}
populate_dot11f_ext_cap(mac_ctx, vht_enabled, &frm->ExtCap, pe_session);
if (pe_session->is_ext_caps_present)
populate_dot11f_ext_cap(mac_ctx, vht_enabled,
&frm->ExtCap, pe_session);
if (pe_session->pLimJoinReq->is11Rconnection) {
tSirBssDescription *bssdescr;

View file

@ -3647,6 +3647,11 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
&pBies->vendor2_ie.VHTOperation,
sizeof(tDot11fIEVHTOperation));
}
if (pBies->ExtCap.present) {
pBeaconStruct->ext_cap.present = 1;
qdf_mem_copy(&pBeaconStruct->ext_cap, &pBies->ExtCap,
sizeof(tDot11fIEExtCap));
}
qdf_mem_free(pBies);
return eSIR_SUCCESS;
} /* End sir_parse_beacon_ie. */