Browse Source

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
Agrawal Ashish 9 years ago
parent
commit
0f94b570ed

+ 1 - 0
core/mac/src/include/parser_api.h

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

+ 1 - 0
core/mac/src/pe/include/lim_session.h

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

+ 3 - 0
core/mac/src/pe/lim/lim_prop_exts_utils.c

@@ -215,6 +215,9 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
 		if (beacon_struct->countryInfoPresent)
 		if (beacon_struct->countryInfoPresent)
 			session->country_info_present = true;
 			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);
 	qdf_mem_free(beacon_struct);
 	return;
 	return;
 } /****** end lim_extract_ap_capability() ******/
 } /****** end lim_extract_ap_capability() ******/

+ 6 - 3
core/mac/src/pe/lim/lim_send_management_frames.c

@@ -1623,7 +1623,7 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
 
 
 	qdf_mem_set((uint8_t *) frm, sizeof(tDot11fAssocRequest), 0);
 	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),
 		qdf_mem_set((uint8_t *) &extr_ext_cap, sizeof(tDot11fIEExtCap),
 			    0);
 			    0);
 		sir_status = lim_strip_extcap_update_struct(mac_ctx,
 		sir_status = lim_strip_extcap_update_struct(mac_ctx,
@@ -1651,7 +1651,8 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
 			}
 			}
 		}
 		}
 	} else {
 	} 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;
 		extr_ext_flag = false;
 	}
 	}
 
 
@@ -1800,7 +1801,9 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
 				&frm->vendor2_ie.VHTCaps);
 				&frm->vendor2_ie.VHTCaps);
 		vht_enabled = true;
 		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) {
 	if (pe_session->pLimJoinReq->is11Rconnection) {
 		tSirBssDescription *bssdescr;
 		tSirBssDescription *bssdescr;

+ 5 - 0
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -3647,6 +3647,11 @@ sir_parse_beacon_ie(tpAniSirGlobal pMac,
 				&pBies->vendor2_ie.VHTOperation,
 				&pBies->vendor2_ie.VHTOperation,
 				sizeof(tDot11fIEVHTOperation));
 				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);
 	qdf_mem_free(pBies);
 	return eSIR_SUCCESS;
 	return eSIR_SUCCESS;
 } /* End sir_parse_beacon_ie. */
 } /* End sir_parse_beacon_ie. */