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

Commit 133b224f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wlan: Set SAE auth type for PMKID cached connect request"

parents 288840c9 a4282180
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -4996,6 +4996,12 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
                                            eCSR_AUTH_TYPE_RSN_8021X_SHA256;
            } else
#endif
            if ((RSNAuthType == eCSR_AUTH_TYPE_SAE) &&
                ((pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
                 == IW_AUTH_KEY_MGMT_802_1X)) {
                 /* SAE case */
                 pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SAE;
            } else
            if ((RSNAuthType == eCSR_AUTH_TYPE_OWE) &&
                ((pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
                 == IW_AUTH_KEY_MGMT_802_1X)) {
+1 −1
Original line number Diff line number Diff line
@@ -1079,6 +1079,7 @@ typedef struct sSirSmeJoinReq
    tSirBssType         bsstype;                // add new type for BT -AMP STA and AP Modules
    tANI_U8             dot11mode;              // to support BT-AMP     
    tVOS_CON_MODE       staPersona;             //Persona
    bool                sae_pmk_cached;
    tANI_BOOLEAN        bOSENAssociation;       //HS2.0
    tANI_BOOLEAN        bWPSAssociation;       //WPS
    ePhyChanBondState   cbMode;                 // Pass CB mode value in Join.
@@ -1147,7 +1148,6 @@ typedef struct sSirSmeJoinReq
    tSirSupChnl         supportedChannels;
    bool force_24ghz_in_ht20;
    bool force_rsne_override;
    bool sae_pmk_cached;
    tSirBssDescription  bssDescription;
    /*
     * WARNING: Pls make bssDescription as last variable in struct
+1 −1
Original line number Diff line number Diff line
@@ -1226,9 +1226,9 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
                           FL("received Auth frame2 for unexpected auth algo num %d "
                           MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
                           MAC_ADDR_ARRAY(pHdr->sa));)
                }
                    break;
                }
            }

            if (pRxAuthFrameBody->authStatusCode ==
                eSIR_MAC_SUCCESS_STATUS)
+7 −0
Original line number Diff line number Diff line
@@ -992,6 +992,13 @@ limJoinReqSerDes(tpAniSirGlobal pMac, tpSirSmeJoinReq pJoinReq, tANI_U8 *pBuf)
        limLog(pMac, LOGE, FL("remaining len %d is too short"), len);
        return eSIR_FAILURE;
    }
    pJoinReq->sae_pmk_cached = *pBuf++;
    len--;
    if (limCheckRemainingLength(pMac, len) == eSIR_FAILURE)
    {
        limLog(pMac, LOGE, FL("remaining len %d is too short"), len);
        return eSIR_FAILURE;
    }

    pJoinReq->bOSENAssociation = *pBuf++;
    len--;
+25 −22
Original line number Diff line number Diff line
@@ -12881,20 +12881,20 @@ static void csr_update_pmk_cache(tCsrRoamSession *pSession,
    uint16_t cache_idx = pSession->CurCacheIndex;
    /* Add entry to the cache */
    if (!pmksa->ssid_len) {
        vos_copy_macaddr(
                (v_MACADDR_t *)pSession->PmkidCacheInfo[cache_idx].BSSID,
                (v_MACADDR_t *)pmksa->BSSID);
    pSession->PmkidCacheInfo[cache_idx].ssid_len = 0;
    } else {
    if (!pmksa->ssid_len) {
        vos_mem_copy(pSession->PmkidCacheInfo[cache_idx].ssid,
                pmksa->ssid, pmksa->ssid_len);
        pSession->PmkidCacheInfo[cache_idx].ssid_len =
            pmksa->ssid_len;
    }
    vos_copy_macaddr(
            (v_MACADDR_t *)pSession->PmkidCacheInfo[cache_idx].BSSID,
            (v_MACADDR_t *)pmksa->BSSID);
    vos_mem_copy(pSession->PmkidCacheInfo[cache_idx].cache_id,
            pmksa->cache_id, CACHE_ID_LEN);
    }
    vos_mem_copy(
            pSession->PmkidCacheInfo[cache_idx].PMKID,
            pmksa->PMKID, CSR_RSN_PMKID_SIZE);
@@ -13437,27 +13437,30 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
 *
 * Return: None
 */
static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req,
                                  tpAniSirGlobal mac, tCsrRoamSession *session)
static bool csr_update_sae_config(tSirMacAddr bssid, tpAniSirGlobal mac,
                                  tCsrRoamSession *session)
{
    tPmkidCacheInfo pmkid_cache;
    uint32_t index;
    bool sae_pmk_cached;
    vos_mem_copy(pmkid_cache.BSSID, csr_join_req->bssDescription.bssId,
                 VOS_MAC_ADDR_SIZE);
    vos_mem_copy(pmkid_cache.BSSID, bssid, VOS_MAC_ADDR_SIZE);
    csr_join_req->sae_pmk_cached =
    sae_pmk_cached =
              csr_lookup_pmkid_using_bssid(mac, session, &pmkid_cache, &index);
    VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
              "pmk_cached %d for BSSID=" MAC_ADDRESS_STR,
              csr_join_req->sae_pmk_cached,
              MAC_ADDR_ARRAY(csr_join_req->bssDescription.bssId));
              "pmk_cached %d for BSSID=" MAC_ADDRESS_STR, sae_pmk_cached,
              MAC_ADDR_ARRAY(bssid));
    return sae_pmk_cached;
}
#else
static void csr_update_sae_config(tSirSmeJoinReq *csr_join_req,
                                  tpAniSirGlobal mac, tCsrRoamSession *session)
{ }
static bool csr_update_sae_config(tSirMacAddr bssid, tpAniSirGlobal mac,
                                  tCsrRoamSession *session)
{
    return false;
}
#endif
////////////////////Mail box
@@ -13659,6 +13662,8 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
        //Persona
        *pBuf = (tANI_U8)pProfile->csrPersona;
        pBuf++;
        *pBuf = csr_update_sae_config(pBssDescription->bssId, pMac, pSession);
        pBuf++;
        *pBuf = (tANI_U8)pProfile->bOSENAssociation;
        pBuf++;
        *pBuf = (tANI_U8)pProfile->bWPSAssociation;
@@ -14198,8 +14203,6 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
        csrPrepareJoinReassocReqBuffer( pMac, pBssDescription, pBuf,
                (tANI_U8)pProfile->uapsd_mask);
        csr_update_sae_config(pMsg, pMac, pSession);
        status = palSendMBMessage(pMac->hHdd, pMsg );
        /* Memory allocated to pMsg will get free'd in palSendMBMessage */
        pMsg = NULL;