Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e548fab6 authored by Pragaspathi Thilagaraj's avatar Pragaspathi Thilagaraj Committed by Gerrit - the friendly Code Review server
Browse files

qcacld-3.0: Add logic to ignore PMF check for STA test mode

In testbed STA mode the RSNE may not match with APUT and thus
driver fails to filter AP from scan cache as PMF capability
mismatch.

With this change driver will ignore PMF capability check and
proceed with connection to send auth and assoc to APUT.

Change-Id: I1bf5947fb08574941eaf1845ec1e36ee9b030dd0
CRs-Fixed: 2263302
parent d1b02df8
Loading
Loading
Loading
Loading
+67 −19
Original line number Diff line number Diff line
@@ -5745,6 +5745,72 @@ static tANI_BOOLEAN csrIsRateSetMatch( tpAniSirGlobal pMac,

}

/**
 * csr_match_security() - wrapper to check if the security is matching
 * @mac_ctx: mac context
 * @filter: scan filter
 * @bss_desc: BSS Descriptor
 * @ies_ptr:  Pointer to the IE fields
 * @neg_auth_type: Negotiated Auth type with the AP
 * @neg_uc_cipher: Negotiated unicast cipher suite
 * @neg_mc_cipher: Negotiated multicast cipher
 *
 * Return: true if matched else false.
 */
#ifdef WLAN_FEATURE_11W
static inline bool csr_match_security(tpAniSirGlobal pMac,
        tCsrScanResultFilter *filter, tSirBssDescription *bss_desc,
        tDot11fBeaconIEs *ies_ptr, eCsrAuthType *neg_auth,
        eCsrEncryptionType *neg_uc,
        eCsrEncryptionType *neg_mc)
{

        if (!filter)
                return false;

        if (filter->bWPSAssociation || filter->bOSENAssociation)
                return true;

        if (filter->ignore_pmf_cap)
                return csrIsSecurityMatch(pMac, &filter->authType,
                                             &filter->EncryptionType,
                                             &filter->mcEncryptionType,
                                             NULL, NULL, NULL,
                                             bss_desc, ies_ptr, neg_auth,
                                             neg_uc, neg_mc);
        else
                return csrIsSecurityMatch(pMac, &filter->authType,
                                             &filter->EncryptionType,
                                             &filter->mcEncryptionType,
                                             &filter->MFPEnabled,
                                             &filter->MFPRequired,
                                             &filter->MFPCapable,
                                             bss_desc, ies_ptr, neg_auth,
                                             neg_uc, neg_mc);

}
#else
static inline bool csr_match_security(tpAniSirGlobal mac_ctx,
        tCsrScanResultFilter *filter, tSirBssDescription *bss_desc,
        tDot11fBeaconIEs *ies_ptr, eCsrAuthType *neg_auth,
        eCsrEncryptionType *neg_uc,
        eCsrEncryptionType *neg_mc)

{
        if (!filter)
                return false;

        if (filter->bWPSAssociation || filter->bOSENAssociation)
                return true;

        return csrIsSecurityMatch(mac_ctx, &filter->authType,
                                  &filter->EncryptionType,
                                  &filter->mcEncryptionType,
                                  NULL, NULL, NULL,
                                  bss_desc, ies_ptr, neg_auth,
                                  neg_uc, neg_mc);
}
#endif

//ppIes can be NULL. If caller want to get the *ppIes allocated by this function, pass in *ppIes = NULL
tANI_BOOLEAN csrMatchBSS( tHalHandle hHal, tSirBssDescription *pBssDesc, tCsrScanResultFilter *pFilter, 
@@ -5820,25 +5886,7 @@ tANI_BOOLEAN csrMatchBSS( tHalHandle hHal, tSirBssDescription *pBssDesc, tCsrSca
        }
#endif
        if ( !csrIsPhyModeMatch( pMac, pFilter->phyMode, pBssDesc, NULL, NULL, pIes ) ) break;
        if ( (!pFilter->bWPSAssociation) && (!pFilter->bOSENAssociation) &&
#ifdef WLAN_FEATURE_11W
             !csrIsSecurityMatch( pMac, &pFilter->authType,
                                  &pFilter->EncryptionType,
                                  &pFilter->mcEncryptionType,
                                  &pFilter->MFPEnabled,
                                  &pFilter->MFPRequired,
                                  &pFilter->MFPCapable,
                                  pBssDesc, pIes, pNegAuth,
                                  pNegUc, pNegMc )
#else
             !csrIsSecurityMatch( pMac, &pFilter->authType,
                                  &pFilter->EncryptionType,
                                  &pFilter->mcEncryptionType,
                                  NULL, NULL, NULL,
                                  pBssDesc, pIes, pNegAuth,
                                  pNegUc, pNegMc )
#endif
                                                   ) break;
        if ( !csr_match_security(pMac, pFilter, pBssDesc, pIes, pNegAuth, pNegUc, pNegMc)) break;
        if ( !csrIsCapabilitiesMatch( pMac, pFilter->BSSType, pBssDesc ) ) break;
        if ( !csrIsRateSetMatch( pMac, &pIes->SuppRates, &pIes->ExtSuppRates ) ) break;
        //Tush-QoS: validate first if asked for APSD or WMM association