Browse Source

qcacld-3.0: Ignore security mismatch during WPS registration

qcacld-2.0 to qcacld-3.0 propagation

During WPS registration process the psession encryption type is 0.
Now if AP's beacon have RSN IE, while processing beacons security
mismatch is detected and DUT sends unicast probe request without
WPS IE.

To avoid this ignore security mismatch during WPS registration.

Change-Id: Ic1b4de116ec6a99749ec3d8ba28b29d52190c344
CRs-Fixed: 967553
Abhishek Singh 9 years ago
parent
commit
f78bd2d501

+ 1 - 0
core/mac/inc/sir_api.h

@@ -1089,6 +1089,7 @@ typedef struct sSirSmeJoinReq {
 	uint8_t cc_switch_mode;
 #endif
 	enum tQDF_ADAPTER_MODE staPersona;       /* Persona */
+	bool wps_registration;
 	ePhyChanBondState cbMode;       /* Pass CB mode value in Join. */
 
 	/*This contains the UAPSD Flag for all 4 AC

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

@@ -261,6 +261,7 @@ typedef struct sPESession       /* Added to Support BT-AMP */
 	uint8_t ssidHidden;
 	bool fwdWPSPBCProbeReq;
 	uint8_t wps_state;
+	bool wps_registration;
 
 	uint8_t limQosEnabled:1;        /* 11E */
 	uint8_t limWmeEnabled:1;        /* WME */

+ 11 - 4
core/mac/src/pe/lim/lim_api.c

@@ -1289,9 +1289,10 @@ lim_enc_type_matched(tpAniSirGlobal mac_ctx,
 		FL("Beacon/Probe:: Privacy :%d WPA Present:%d RSN Present: %d"),
 		bcn->capabilityInfo.privacy, bcn->wpaPresent, bcn->rsnPresent);
 	lim_log(mac_ctx, LOG1,
-		FL("session:: Privacy :%d EncyptionType: %d OSEN %d"),
+		FL("session:: Privacy :%d EncyptionType: %d OSEN %d WPS %d"),
 		SIR_MAC_GET_PRIVACY(session->limCurrentBssCaps),
-		session->encryptType, session->isOSENConnection);
+		session->encryptType, session->isOSENConnection,
+		session->wps_registration);
 
 	/*
 	 * This is handled by sending probe req due to IOT issues so
@@ -1327,12 +1328,18 @@ lim_enc_type_matched(tpAniSirGlobal mac_ctx,
 		(session->encryptType == eSIR_ED_AES_128_CMAC)))
 		return true;
 
-	/* For HS2.0, RSN ie is not present
+	/*
+	 * For HS2.0, RSN ie is not present
 	 * in beacon. Therefore no need to
 	 * check for security type in case
 	 * OSEN session.
+	 * For WPS registration session no need to detect
+	 * detect security mismatch as it wont match and
+	 * driver may end up sending probe request without
+	 * WPS IE during WPS registration process.
 	 */
-	if (session->isOSENConnection)
+	if (session->isOSENConnection ||
+	   session->wps_registration)
 		return true;
 
 	return false;

+ 1 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -1714,6 +1714,7 @@ __lim_process_sme_join_req(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
 		session->statypeForBss = STA_ENTRY_PEER;
 		session->limWmeEnabled = sme_join_req->isWMEenabled;
 		session->limQosEnabled = sme_join_req->isQosEnabled;
+		session->wps_registration = sme_join_req->wps_registration;
 
 		/* Store vendor specfic IE for CISCO AP */
 		ie_len = (bss_desc->length + sizeof(bss_desc->length) -

+ 1 - 0
core/sme/src/csr/csr_api_roam.c

@@ -13769,6 +13769,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
 			pMac->roam.configParam.cc_switch_mode;
 #endif
 		csr_join_req->staPersona = (uint8_t) pProfile->csrPersona;
+		csr_join_req->wps_registration = pProfile->bWPSAssociation;
 		csr_join_req->cbMode = (uint8_t) pSession->bssParams.cbMode;
 		sms_log(pMac, LOG2,
 			  FL("CSR PERSONA=%d CSR CbMode %d"),