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

Commit 45e66bba authored by Pankaj Singh's avatar Pankaj Singh
Browse files

wlan: Save RSN auth type for RSN association

Save RSN auth type in related context for RSN assocoation.
Some OWE specific operation need to be done according to
this RSN auth type since we cannot tell if a STA / SAP is OWE,
WPA2 or OPEN by its auth type OPEN.

Change-Id: I17dd72c7adf1c663725ac58ce263f4408d9c967b
CRs-Fixed: 2734691
parent f69933fa
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
 * Copyright (c) 2013-2017, 2020 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -81,7 +81,7 @@ void hdd_softap_tkip_mic_fail_counter_measure(hdd_adapter_t*,v_BOOL_t);
int hdd_softap_unpackIE( tHalHandle halHandle,
                eCsrEncryptionType *pEncryptType,
                eCsrEncryptionType *mcEncryptType,
                eCsrAuthType *pAuthType,
                tCsrAuthList *akm_list,
                v_BOOL_t *pMFPCapable,
                v_BOOL_t *pMFPRequired,
                u_int16_t gen_ie_len,
+13 −9
Original line number Diff line number Diff line
@@ -11180,7 +11180,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
    struct ieee80211_mgmt *pMgmt_frame;
    v_U8_t *pIe=NULL;
    v_U16_t capab_info;
    eCsrAuthType RSNAuthType;
    eCsrEncryptionType RSNEncryptType;
    eCsrEncryptionType mcRSNEncryptType;
    int status = VOS_STATUS_SUCCESS, ret = 0;
@@ -11191,6 +11190,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
    struct qc_mac_acl_entry *acl_entry = NULL;
    hdd_config_t *iniConfig;
    v_SINT_t i;
    uint32_t ii;
    hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pHostapdAdapter);
    hdd_adapter_t *sta_adapter;
    tSmeConfigParams *psmeConfig;
@@ -11421,7 +11421,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
                        vos_get_context( VOS_MODULE_ID_SME, pVosContext),
                        &RSNEncryptType,
                        &mcRSNEncryptType,
                        &RSNAuthType,
                        &pConfig->akm_list,
                        &MFPCapable,
                        &MFPRequired,
                        pConfig->RSNWPAReqIE[1]+2,
@@ -11436,9 +11436,11 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
            pConfig->mcRSNEncryptType = mcRSNEncryptType;
            (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->ucEncryptType
                                                              = RSNEncryptType;
            hddLog( LOG1, FL("CSR AuthType = %d, "
                        "EncryptionType = %d mcEncryptionType = %d"),
                        RSNAuthType, RSNEncryptType, mcRSNEncryptType);
            hddLog( LOG1, FL("CSR EncryptionType = %d mcEncryptionType = %d"),
                    RSNEncryptType, mcRSNEncryptType);
            for (ii = 0; ii < pConfig->akm_list.numEntries; ii++)
                    hddLog(LOG1, FL("CSR AKM Suite [%d] = %d"), ii,
                        pConfig->akm_list.authType[ii]);
        }
    }
@@ -11474,7 +11476,7 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
                          vos_get_context( VOS_MODULE_ID_SME, pVosContext),
                          &RSNEncryptType,
                          &mcRSNEncryptType,
                          &RSNAuthType,
                          &pConfig->akm_list,
                          &MFPCapable,
                          &MFPRequired,
                          pConfig->RSNWPAReqIE[1]+2,
@@ -11489,9 +11491,11 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
                pConfig->mcRSNEncryptType = mcRSNEncryptType;
                (WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter))->ucEncryptType
                                                              = RSNEncryptType;
                hddLog( LOG1, FL("CSR AuthType = %d, "
                                "EncryptionType = %d mcEncryptionType = %d"),
                                RSNAuthType, RSNEncryptType, mcRSNEncryptType);
                hddLog(LOG1, FL("CSR EncryptionType= %d mcEncryptionType= %d"),
                       RSNEncryptType, mcRSNEncryptType);
                for (ii = 0; ii < pConfig->akm_list.numEntries; ii++)
                        hddLog(LOG1, FL("CSR AKM Suite [%d] = %d"), ii,
                            pConfig->akm_list.authType[ii]);
            }
        }
    }
+14 −10
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2018, 2020 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -1860,7 +1860,7 @@ int hdd_softap_unpackIE(
                tHalHandle halHandle,
                eCsrEncryptionType *pEncryptType,
                eCsrEncryptionType *mcEncryptType,
                eCsrAuthType *pAuthType,
                tCsrAuthList *akm_list,
                v_BOOL_t *pMFPCapable,
                v_BOOL_t *pMFPRequired,
                u_int16_t gen_ie_len,
@@ -1870,7 +1870,7 @@ int hdd_softap_unpackIE(
    tDot11fIEWPA dot11WPAIE; 
 
    tANI_U8 *pRsnIe; 
    tANI_U16 RSNIeLen;
    tANI_U16 RSNIeLen, i;
    tANI_U32 status;
    
    if (NULL == halHandle)
@@ -1915,11 +1915,12 @@ int hdd_softap_unpackIE(
                __func__, dot11RSNIE.pwise_cipher_suite_count );
        hddLog(LOG1, FL("%s: authentication suite count: %d"),
                __func__, dot11RSNIE.akm_suite_cnt);
        /*Here we have followed the apple base code, 
          but probably I suspect we can do something different*/
        //dot11RSNIE.akm_suite_cnt
        // Just translate the FIRST one 
        *pAuthType =  hdd_TranslateRSNToCsrAuthType(dot11RSNIE.akm_suite[0]);

        //Translate akms in akm suite
        for (i = 0; i < dot11RSNIE.akm_suite_cnt; i++)
            akm_list->authType[i] =
                hdd_TranslateRSNToCsrAuthType(dot11RSNIE.akm_suite[i]);
        akm_list->numEntries = dot11RSNIE.akm_suite_cnt;
        //dot11RSNIE.pwise_cipher_suite_count 
        *pEncryptType = hdd_TranslateRSNToCsrEncryptionType(dot11RSNIE.pwise_cipher_suites[0]);                     
        //dot11RSNIE.gp_cipher_suite_count 
@@ -1961,8 +1962,11 @@ int hdd_softap_unpackIE(
        hddLog(LOG1, FL("%s: WPA authentication suite count: %d"),
                __func__, dot11WPAIE.auth_suite_count);
        //dot11WPAIE.auth_suite_count
        // Just translate the FIRST one 
        *pAuthType =  hdd_TranslateWPAToCsrAuthType(dot11WPAIE.auth_suites[0]); 
        //Translate akms in akm suite
        for (i = 0; i < dot11WPAIE.auth_suite_count; i++)
            akm_list->authType[i] =
                hdd_TranslateWPAToCsrAuthType(dot11WPAIE.auth_suites[i]);
        akm_list->numEntries = dot11WPAIE.auth_suite_count;
        //dot11WPAIE.unicast_cipher_count 
        *pEncryptType = hdd_TranslateWPAToCsrEncryptionType(dot11WPAIE.unicast_ciphers[0]);                       
        //dot11WPAIE.unicast_cipher_count 
+2 −1
Original line number Diff line number Diff line
@@ -1244,6 +1244,7 @@ typedef struct sSirSmeAssocInd
    tANI_U8              uniSig;  // DPU signature for unicast packets
    tANI_U8              bcastSig; // DPU signature for broadcast packets
    tAniAuthType         authType;
    enum ani_akm_type    akm_type;
    tAniSSID             ssId; // SSID used by STA to associate
    tSirRSNie            rsnIE;// RSN IE received from peer
    tSirAddie            addIE;// Additional IE received from peer, which possibly include WSC IE and/or P2P IE
+10 −1
Original line number Diff line number Diff line
/*
 * Copyright (c) 2011-2013, 2016 The Linux Foundation. All rights reserved.
 * Copyright (c) 2011-2013, 2016, 2020 The Linux Foundation. All rights reserved.
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
@@ -256,4 +256,13 @@ tSirRetStatus peProcessMessages(tpAniSirGlobal pMac, tSirMsgQ* pMsg);
-----------------------------------------------------------------*/
v_VOID_t peFreeMsg( tpAniSirGlobal pMac, tSirMsgQ* pMsg);
/************************************************************/

/**
 * lim_translate_rsn_oui_to_akm_type() - translate RSN OUI to AKM type
 * @auth_suite: auth suite
 *
 * Return: AKM type
 */
enum ani_akm_type lim_translate_rsn_oui_to_akm_type(uint8_t auth_suite[4]);

#endif /* __LIM_API_H */
Loading