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

Commit 5b90c7a7 authored by SonicBSV's avatar SonicBSV
Browse files

prima: tag 'LA.UM.8.6.r1-04000-89xx.0'

parent 0f1e8a98
Loading
Loading
Loading
Loading
+26 −6
Original line number Original line Diff line number Diff line
@@ -3008,11 +3008,6 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_OPTIMIZE_CA_EVENT_ENABLE     ( 1 )
#define CFG_OPTIMIZE_CA_EVENT_ENABLE     ( 1 )
#define CFG_OPTIMIZE_CA_EVENT_DEFAULT    ( 0 )
#define CFG_OPTIMIZE_CA_EVENT_DEFAULT    ( 0 )


#define CFG_FWR_MEM_DUMP_NAME       "gEnableFwrMemDump"
#define CFG_FWR_MEM_DUMP_MAX        ( 1 )
#define CFG_FWR_MEM_DUMP_MIN        ( 0 )
#define CFG_FWR_MEM_DUMP_DEF        ( 1 )

#define CFG_ACTIVE_PASSIVE_CHAN_CONV_NAME "gActivePassiveChCon"
#define CFG_ACTIVE_PASSIVE_CHAN_CONV_NAME "gActivePassiveChCon"
#define CFG_ACTIVE_PASSIVE_CHAN_CONV_MIN  (0)
#define CFG_ACTIVE_PASSIVE_CHAN_CONV_MIN  (0)
#define CFG_ACTIVE_PASSIVE_CHAN_CONV_MAX  (1)
#define CFG_ACTIVE_PASSIVE_CHAN_CONV_MAX  (1)
@@ -3271,6 +3266,29 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_ENABLE_DEFAULT_SAP           "gEnabledefaultSAP"
#define CFG_ENABLE_DEFAULT_SAP           "gEnabledefaultSAP"
#define CFG_ENABLE_DEFAULT_SAP_DEFAULT   ""
#define CFG_ENABLE_DEFAULT_SAP_DEFAULT   ""


/*
 * <ini>
 * sae_enabled - Enable/Disable SAE support in driver
 * @Min: 0
 * @Max: 1
 * @Default: 1
 *
 * This ini is used to enable/disable SAE support in driver
 * Driver will update config to supplicant based on this config.
 *
 * Related: None
 *
 * Supported Feature: SAE
 * Usage: External
 *
 * </ini>
 */

#define CFG_IS_SAE_ENABLED_NAME    "sae_enabled"
#define CFG_IS_SAE_ENABLED_DEFAULT (1)
#define CFG_IS_SAE_ENABLED_MIN     (0)
#define CFG_IS_SAE_ENABLED_MAX     (1)

/*--------------------------------------------------------------------------- 
/*--------------------------------------------------------------------------- 
  Type declarations
  Type declarations
  -------------------------------------------------------------------------*/ 
  -------------------------------------------------------------------------*/ 
@@ -3814,7 +3832,6 @@ typedef struct
   v_U32_t                     linkFailTxCnt;
   v_U32_t                     linkFailTxCnt;
   v_BOOL_t                    ignorePeerHTopMode;
   v_BOOL_t                    ignorePeerHTopMode;
   v_U8_t                      gOptimizeCAevent;
   v_U8_t                      gOptimizeCAevent;
   v_BOOL_t                    enableFwrMemDump;
   v_U8_t                      gActivePassiveChCon;
   v_U8_t                      gActivePassiveChCon;
   v_U32_t                     cfgExtScanConcMode;
   v_U32_t                     cfgExtScanConcMode;
   v_U16_t                     rps_mask;
   v_U16_t                     rps_mask;
@@ -3888,6 +3905,9 @@ typedef struct
   bool                        indoor_channel_support;
   bool                        indoor_channel_support;
   bool                        force_rsne_override;
   bool                        force_rsne_override;
   char enabledefaultSAP[CFG_CONCURRENT_IFACE_MAX_LEN];
   char enabledefaultSAP[CFG_CONCURRENT_IFACE_MAX_LEN];
#ifdef WLAN_FEATURE_SAE
   bool                        is_sae_enabled;
#endif
} hdd_config_t;
} hdd_config_t;


/*--------------------------------------------------------------------------- 
/*--------------------------------------------------------------------------- 
+9 −25
Original line number Original line Diff line number Diff line
@@ -143,6 +143,15 @@ typedef struct {
}__attribute__((packed)) qcom_ie_age ;
}__attribute__((packed)) qcom_ie_age ;
#endif
#endif


#ifndef WLAN_AKM_SUITE_SAE
#define WLAN_AKM_SUITE_SAE 0x000FAC08
#endif

#ifndef WLAN_AKM_SUITE_OWE_1
#define WLAN_AKM_SUITE_OWE_1 0x000FAC12
#endif


enum qca_nl80211_vendor_subcmds {
enum qca_nl80211_vendor_subcmds {
    QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
    QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
    QCA_NL80211_VENDOR_SUBCMD_TEST = 1,
    QCA_NL80211_VENDOR_SUBCMD_TEST = 1,
@@ -200,8 +209,6 @@ enum qca_nl80211_vendor_subcmds {


    /* Get Wifi Specific Info */
    /* Get Wifi Specific Info */
    QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO = 61,
    QCA_NL80211_VENDOR_SUBCMD_GET_WIFI_INFO = 61,
    /* Start Wifi Memory Dump */
    QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_MEMORY_DUMP = 63,


    /*
    /*
     * APIs corresponding to the sub commands 65-68 are deprecated.
     * APIs corresponding to the sub commands 65-68 are deprecated.
@@ -482,7 +489,6 @@ enum qca_nl80211_vendor_subcmds_index {
    /*EXT TDLS*/
    /*EXT TDLS*/
    QCA_NL80211_VENDOR_SUBCMD_TDLS_STATE_CHANGE_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_TDLS_STATE_CHANGE_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_NAN_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_NAN_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_MEMORY_DUMP_INDEX,


    QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_MONITOR_RSSI_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_HOTLIST_AP_LOST_INDEX,
    QCA_NL80211_VENDOR_SUBCMD_EXTSCAN_HOTLIST_AP_LOST_INDEX,
@@ -1642,7 +1648,6 @@ enum qca_wlan_vendor_attr_offloaded_packets
 * @WIFI_LOGGER_WATCHDOG_TIMER_SUPPORTED - monitor FW health
 * @WIFI_LOGGER_WATCHDOG_TIMER_SUPPORTED - monitor FW health
 */
 */
enum wifi_logger_supported_features {
enum wifi_logger_supported_features {
    WIFI_LOGGER_MEMORY_DUMP_SUPPORTED = (1 << (0)),
    WIFI_LOGGER_PER_PACKET_TX_RX_STATUS_SUPPORTED = (1 << (1)),
    WIFI_LOGGER_PER_PACKET_TX_RX_STATUS_SUPPORTED = (1 << (1)),
    WIFI_LOGGER_CONNECT_EVENT_SUPPORTED = (1 << (2)),
    WIFI_LOGGER_CONNECT_EVENT_SUPPORTED = (1 << (2)),
    WIFI_LOGGER_POWER_EVENT_SUPPORTED = (1 << (3)),
    WIFI_LOGGER_POWER_EVENT_SUPPORTED = (1 << (3)),
@@ -1836,27 +1841,6 @@ backported_cfg80211_vendor_event_alloc(struct wiphy *wiphy,
int wlan_hdd_send_hang_reason_event(hdd_context_t *hdd_ctx,
int wlan_hdd_send_hang_reason_event(hdd_context_t *hdd_ctx,
				    unsigned int reason);
				    unsigned int reason);


/**
 * enum qca_wlan_vendor_attr_memory_dump - values for memory dump attributes
 * @QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_INVALID - Invalid
 * @QCA_WLAN_VENDOR_ATTR_REQUEST_ID - Indicate request ID
 * @QCA_WLAN_VENDOR_ATTR_MEMDUMP_SIZE - Indicate size of the memory dump
 * @QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_AFTER_LAST - To keep track of the last enum
 * @QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_MAX - max value possible for this type
 *
 * enum values are used for NL attributes for data used by
 * QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_MEMORY_DUMP sub command.
 */
enum qca_wlan_vendor_attr_memory_dump {
    QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_INVALID = 0,
    QCA_WLAN_VENDOR_ATTR_REQUEST_ID = 1,
    QCA_WLAN_VENDOR_ATTR_MEMDUMP_SIZE = 2,

    QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_AFTER_LAST,
    QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_MAX =
    QCA_WLAN_VENDOR_ATTR_MEMORY_DUMP_AFTER_LAST - 1,
};

#if defined(CFG80211_DISCONNECTED_V2) || \
#if defined(CFG80211_DISCONNECTED_V2) || \
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0))
(LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0))
static inline void wlan_hdd_cfg80211_indicate_disconnect(struct net_device *dev,
static inline void wlan_hdd_cfg80211_indicate_disconnect(struct net_device *dev,
+2 −12
Original line number Original line Diff line number Diff line
@@ -863,6 +863,7 @@ typedef struct hdd_hostapd_state_s
    int bssState;
    int bssState;
    vos_event_t vosEvent;
    vos_event_t vosEvent;
    VOS_STATUS vosStatus;
    VOS_STATUS vosStatus;
    vos_event_t sta_discon_event;
    v_BOOL_t bCommit; 
    v_BOOL_t bCommit; 


} hdd_hostapd_state_t;
} hdd_hostapd_state_t;
@@ -1368,7 +1369,7 @@ struct hdd_adapter_s
   v_BOOL_t isLinkLayerStatsSet;
   v_BOOL_t isLinkLayerStatsSet;
#endif
#endif
   /* DSCP to UP QoS Mapping */
   /* DSCP to UP QoS Mapping */
   sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_HDD_MAX_DSCP+1];
   sme_QosWmmUpType hddWmmDscpToUpMap[WLAN_MAX_DSCP+1];
   /* Lock for active sessions while processing deauth/Disassoc */
   /* Lock for active sessions while processing deauth/Disassoc */
   spinlock_t lock_for_active_session;
   spinlock_t lock_for_active_session;
   tSirFwStatsResult  fwStatsRsp;
   tSirFwStatsResult  fwStatsRsp;
@@ -1487,8 +1488,6 @@ struct hdd_fw_mem_dump_req_ctx {
 */
 */
typedef void (*hdd_fw_mem_dump_req_cb)(void *context);
typedef void (*hdd_fw_mem_dump_req_cb)(void *context);


int memdump_init(void);
int memdump_deinit(void);
void wlan_hdd_fw_mem_dump_cb(void *,tAniFwrDumpRsp *);
void wlan_hdd_fw_mem_dump_cb(void *,tAniFwrDumpRsp *);
int wlan_hdd_fw_mem_dump_req(hdd_context_t * pHddCtx);
int wlan_hdd_fw_mem_dump_req(hdd_context_t * pHddCtx);
void wlan_hdd_fw_mem_dump_req_cb(void *context);
void wlan_hdd_fw_mem_dump_req_cb(void *context);
@@ -2371,15 +2370,6 @@ int hdd_parse_disable_chan_cmd(hdd_adapter_t *adapter, tANI_U8 *ptr);
int hdd_get_disable_ch_list(hdd_context_t *hdd_ctx, tANI_U8 *buf,
int hdd_get_disable_ch_list(hdd_context_t *hdd_ctx, tANI_U8 *buf,
                            uint32_t buf_len);
                            uint32_t buf_len);


/**
 * hdd_is_memdump_supported() - to check if memdump feature support
 *
 * This function is used to check if memdump feature is supported in
 * the host driver
 *
 * Return: true if supported and false otherwise
 */
bool hdd_is_memdump_supported(void);


/**
/**
 * hdd_is_cli_iface_up() - check if there is any cli iface up
 * hdd_is_cli_iface_up() - check if there is any cli iface up
+0 −4
Original line number Original line Diff line number Diff line
@@ -402,10 +402,6 @@ extern int iw_set_auth(struct net_device *dev,struct iw_request_info *info,
extern int iw_get_auth(struct net_device *dev,struct iw_request_info *info,
extern int iw_get_auth(struct net_device *dev,struct iw_request_info *info,
                       union iwreq_data *wrqu,char *extra);
                       union iwreq_data *wrqu,char *extra);


VOS_STATUS iw_set_pno(struct net_device *dev, struct iw_request_info *info,
                      union iwreq_data *wrqu, char *extra, int nOffset);


VOS_STATUS iw_set_rssi_filter(struct net_device *dev, struct iw_request_info *info,
VOS_STATUS iw_set_rssi_filter(struct net_device *dev, struct iw_request_info *info,
                              union iwreq_data *wrqu, char *extra, int nOffset);
                              union iwreq_data *wrqu, char *extra, int nOffset);


+178 −56
Original line number Original line Diff line number Diff line
/*
/*
 * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
 *
 *
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
 *
 *
@@ -152,6 +152,13 @@ v_U8_t ccpRSNOui07[ HDD_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x06 }; // RSN-PSK-
v_U8_t ccpRSNOui08[ HDD_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x05 };
v_U8_t ccpRSNOui08[ HDD_RSN_OUI_SIZE ] = { 0x00, 0x0F, 0xAC, 0x05 };
#endif
#endif


#ifdef WLAN_FEATURE_SAE
v_U8_t ccp_rsn_oui_80[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x08};
v_U8_t ccp_rsn_oui_90[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x09};
#endif
/* OWE https://tools.ietf.org/html/rfc8110 */
uint8_t ccp_rsn_oui_18[HDD_RSN_OUI_SIZE] = {0x00, 0x0F, 0xAC, 0x12};

#if defined(WLAN_FEATURE_VOWIFI_11R)
#if defined(WLAN_FEATURE_VOWIFI_11R)
// Offset where the EID-Len-IE, start.
// Offset where the EID-Len-IE, start.
#define FT_ASSOC_RSP_IES_OFFSET 6 /* Capability(2) + AID(2) + Status Code(2)*/
#define FT_ASSOC_RSP_IES_OFFSET 6 /* Capability(2) + AID(2) + Status Code(2)*/
@@ -192,6 +199,53 @@ static eHalStatus hdd_RoamSetKeyCompleteHandler( hdd_adapter_t *pAdapter,
                                                eRoamCmdStatus roamStatus,
                                                eRoamCmdStatus roamStatus,
                                                eCsrRoamResult roamResult );
                                                eCsrRoamResult roamResult );


#if defined(WLAN_FEATURE_SAE) && \
	defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
/**
 * wlan_hdd_sae_callback() - Sends SAE info to supplicant
 * @adapter: pointer adapter context
 * @roam_info: pointer to roam info
 *
 * This API is used to send required SAE info to trigger SAE in supplicant.
 *
 * Return: None
 */
static void wlan_hdd_sae_callback(hdd_adapter_t *adapter,
                                  tCsrRoamInfo *roam_info)
{
   hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
   int flags;
   struct sir_sae_info *sae_info = roam_info->sae_info;
   struct cfg80211_external_auth_params params = {0};

   if (wlan_hdd_validate_context(hdd_ctx))
       return;
   if (!sae_info) {
       hddLog(LOGE, FL("SAE info in NULL"));
       return;
   }
   flags = vos_get_gfp_flags();

   params.key_mgmt_suite = 0x00;
   params.key_mgmt_suite |= 0x0F << 8;
   params.key_mgmt_suite |= 0xAC << 16;
   params.key_mgmt_suite |= 0x8 << 24;

   params.action = NL80211_EXTERNAL_AUTH_START;
   vos_mem_copy(params.bssid, sae_info->peer_mac_addr.bytes,
                VOS_MAC_ADDR_SIZE);
   vos_mem_copy(params.ssid.ssid, sae_info->ssid.ssId, sae_info->ssid.length);
   params.ssid.ssid_len = sae_info->ssid.length;

   cfg80211_external_auth_request(adapter->dev, &params, flags);
   hddLog(LOG1, FL("SAE: sent cmd"));
}
#else
static void wlan_hdd_sae_callback(hdd_adapter_t *adapter,
                                  tCsrRoamInfo *roam_info)
{ }
#endif

v_VOID_t hdd_connSetConnectionState( hdd_station_ctx_t *pHddStaCtx,
v_VOID_t hdd_connSetConnectionState( hdd_station_ctx_t *pHddStaCtx,
                                        eConnectionState connState )
                                        eConnectionState connState )
{
{
@@ -2428,13 +2482,10 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                }
                }
                return eHAL_STATUS_FAILURE;
                return eHAL_STATUS_FAILURE;
            }
            }
#ifdef WLAN_FEATURE_VOWIFI_11R
            if(pRoamInfo->u.pConnectedProfile->AuthType == eCSR_AUTH_TYPE_FT_RSN ||
                pRoamInfo->u.pConnectedProfile->AuthType == eCSR_AUTH_TYPE_FT_RSN_PSK )
            {


            //Association Response
            //Association Response
                pFTAssocRsp = (u8 *)(pRoamInfo->pbFrames + pRoamInfo->nBeaconLength +
            pFTAssocRsp = (u8 *)(pRoamInfo->pbFrames +
                                 pRoamInfo->nBeaconLength +
                                 pRoamInfo->nAssocReqLength);
                                 pRoamInfo->nAssocReqLength);
            if (pFTAssocRsp != NULL)
            if (pFTAssocRsp != NULL)
            {
            {
@@ -2443,7 +2494,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                hddLog(LOG1, "%s: AssocRsp is now at %02x%02x", __func__,
                hddLog(LOG1, "%s: AssocRsp is now at %02x%02x", __func__,
                       (unsigned int)pFTAssocRsp[0],
                       (unsigned int)pFTAssocRsp[0],
                       (unsigned int)pFTAssocRsp[1]);
                       (unsigned int)pFTAssocRsp[1]);
                    assocRsplen = pRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
                assocRsplen =
                         pRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
            }
            }
            else
            else
            {
            {
@@ -2463,7 +2515,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                    hddLog(LOG1, "%s: pFTAssocReq is now at %02x%02x", __func__,
                    hddLog(LOG1, "%s: pFTAssocReq is now at %02x%02x", __func__,
                           (unsigned int)pFTAssocReq[0],
                           (unsigned int)pFTAssocReq[0],
                           (unsigned int)pFTAssocReq[1]);
                           (unsigned int)pFTAssocReq[1]);
                        assocReqlen = pRoamInfo->nAssocReqLength - FT_ASSOC_REQ_IES_OFFSET;
                     assocReqlen =
                          pRoamInfo->nAssocReqLength - FT_ASSOC_REQ_IES_OFFSET;
                 }
                 }
                 else
                 else
                 {
                 {
@@ -2477,6 +2530,13 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                assocReqlen = 0;
                assocReqlen = 0;
            }
            }


            hddLog(LOG1, "assocReqlen %d assocRsplen %d", assocReqlen,
                   assocRsplen);

#ifdef WLAN_FEATURE_VOWIFI_11R
            if(pRoamInfo->u.pConnectedProfile->AuthType == eCSR_AUTH_TYPE_FT_RSN ||
                pRoamInfo->u.pConnectedProfile->AuthType == eCSR_AUTH_TYPE_FT_RSN_PSK )
            {
                if(ft_carrier_on)
                if(ft_carrier_on)
                {
                {
                    if ( !hddDisconInProgress )
                    if ( !hddDisconInProgress )
@@ -2487,8 +2547,6 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                                 "indication", __FUNCTION__, ft_carrier_on);
                                 "indication", __FUNCTION__, ft_carrier_on);
                        chan = ieee80211_get_channel(pAdapter->wdev.wiphy,
                        chan = ieee80211_get_channel(pAdapter->wdev.wiphy,
                                         (int)pRoamInfo->pBssDesc->channelId);
                                         (int)pRoamInfo->pBssDesc->channelId);
                        hddLog(LOG1, "assocReqlen %d assocRsplen %d", assocReqlen,
                                         assocRsplen);
                        if (pHddCtx->cfg_ini &&
                        if (pHddCtx->cfg_ini &&
                            pHddCtx->cfg_ini->gEnableRoamDelayStats)
                            pHddCtx->cfg_ini->gEnableRoamDelayStats)
                        {
                        {
@@ -2567,8 +2625,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
                         /* inform connect result to nl80211 */
                         /* inform connect result to nl80211 */
                         hdd_connect_result(dev, pRoamInfo->bssid,
                         hdd_connect_result(dev, pRoamInfo->bssid,
                                pRoamInfo,
                                pRoamInfo,
                                reqRsnIe, reqRsnLength,
                                pFTAssocReq, assocReqlen,
                                rspRsnIe, rspRsnLength,
                                pFTAssocRsp, assocRsplen,
                                WLAN_STATUS_SUCCESS,
                                WLAN_STATUS_SUCCESS,
                                GFP_KERNEL);
                                GFP_KERNEL);
                    }
                    }
@@ -4329,6 +4387,12 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
              else
              else
                  hddLog(LOG1, FL("UPDATE_SCAN_RESULT returned NULL"));
                  hddLog(LOG1, FL("UPDATE_SCAN_RESULT returned NULL"));
         }
         }

       case eCSR_ROAM_SAE_COMPUTE:
         if (pRoamInfo)
             wlan_hdd_sae_callback(pAdapter, pRoamInfo);
         break;

       case eCSR_ROAM_STA_CHANNEL_SWITCH:
       case eCSR_ROAM_STA_CHANNEL_SWITCH:
         {
         {
             hdd_adapter_t *pHostapdAdapter = NULL;
             hdd_adapter_t *pHostapdAdapter = NULL;
@@ -4375,9 +4439,32 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
    }
    }
    return( halStatus );
    return( halStatus );
}
}

#ifdef WLAN_FEATURE_SAE
/**
 * hdd_translate_sae_rsn_to_csr_auth() - Translate SAE RSN to CSR auth type
 * @auth_suite: auth suite
 * @auth_type: pointer to eCsrAuthType
 *
 * Return: None
 */
static void hdd_translate_sae_rsn_to_csr_auth(int8_t auth_suite[4],
                                              eCsrAuthType *auth_type)
{
        if (!memcmp(auth_suite, ccp_rsn_oui_80, 4))
                *auth_type = eCSR_AUTH_TYPE_SAE;
}
#else
static inline
void hdd_translate_sae_rsn_to_csr_auth(int8_t auth_suite[4],
                                       eCsrAuthType *auth_type)
{
}
#endif

eCsrAuthType hdd_TranslateRSNToCsrAuthType( u_int8_t auth_suite[4])
eCsrAuthType hdd_TranslateRSNToCsrAuthType( u_int8_t auth_suite[4])
{
{
    eCsrAuthType auth_type;
    eCsrAuthType auth_type = eCSR_AUTH_TYPE_UNKNOWN;
    // is the auth type supported?
    // is the auth type supported?
    if ( memcmp(auth_suite , ccpRSNOui01, 4) == 0)
    if ( memcmp(auth_suite , ccpRSNOui01, 4) == 0)
    {
    {
@@ -4415,9 +4502,20 @@ eCsrAuthType hdd_TranslateRSNToCsrAuthType( u_int8_t auth_suite[4])
        auth_type = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
        auth_type = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
    } else
    } else
#endif
#endif
    if (!memcmp(auth_suite, ccp_rsn_oui_18, 4))
    {
    {
        auth_type = eCSR_AUTH_TYPE_UNKNOWN;
       auth_type = eCSR_AUTH_TYPE_OWE;
    } else

    {
    /* If auth suite is of SAE, auth_type will be
     * overwritten in hdd_translate_sae_rsn_to_csr_auth
     */
     hdd_translate_sae_rsn_to_csr_auth(auth_suite, &auth_type);
     }
     }

    hddLog(LOG1, FL("auth_type : %d"), auth_type);

    return auth_type;
    return auth_type;
}
}


@@ -4552,6 +4650,7 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter,
       flag to 0 */
       flag to 0 */
    memset( &dot11WPAIE, 0 , sizeof(tDot11fIEWPA) );
    memset( &dot11WPAIE, 0 , sizeof(tDot11fIEWPA) );
    memset( &dot11RSNIE, 0 , sizeof(tDot11fIERSN) );
    memset( &dot11RSNIE, 0 , sizeof(tDot11fIERSN) );
    memset( PMKIDCache, 0 , sizeof(tPmkidCacheInfo) * 4);


    // Type check
    // Type check
    if ( gen_ie[0] ==  DOT11F_EID_RSN)
    if ( gen_ie[0] ==  DOT11F_EID_RSN)
@@ -4821,7 +4920,10 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
    ENTER();
    ENTER();


    pRoamProfile->AuthType.numEntries = 1;
    pRoamProfile->AuthType.numEntries = 1;
    hddLog( LOG1, "%s: pHddStaCtx->conn_info.authType = %d", __func__, pHddStaCtx->conn_info.authType);
    hddLog( LOG1,
           "%s: authType = %d RSNAuthType %d wpa_versions %d key_mgmt : 0x%x",
           __func__, pHddStaCtx->conn_info.authType, RSNAuthType,
           pWextState->wpaVersion, pWextState->authKeyMgmt);


    switch( pHddStaCtx->conn_info.authType)
    switch( pHddStaCtx->conn_info.authType)
    {
    {
@@ -4896,7 +4998,22 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
                                            eCSR_AUTH_TYPE_RSN_8021X_SHA256;
                                            eCSR_AUTH_TYPE_RSN_8021X_SHA256;
            } else
            } else
#endif
#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)) {
                /* OWE case */
                pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_OWE;
            } else
            if (RSNAuthType == eCSR_AUTH_TYPE_SAE) {
               /* SAE with open authentication case */
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SAE;
            } else
            if( (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
            if( (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_802_1X)
                    == IW_AUTH_KEY_MGMT_802_1X) {
                    == IW_AUTH_KEY_MGMT_802_1X) {
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN;
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN;
@@ -4904,7 +5021,8 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
            if ( (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_PSK)
            if ( (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_PSK)
                    == IW_AUTH_KEY_MGMT_PSK) {
                    == IW_AUTH_KEY_MGMT_PSK) {
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN_PSK;
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN_PSK;
            } else {
            } else
            {
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_UNKNOWN;
               pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_UNKNOWN;
            }
            }
        }
        }
@@ -4914,6 +5032,10 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)


          pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SHARED_KEY;
          pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SHARED_KEY;
          break;
          break;
       case eCSR_AUTH_TYPE_SAE:
          pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SAE;
          break;

        default:
        default:


#ifdef FEATURE_WLAN_ESE
#ifdef FEATURE_WLAN_ESE
Loading