aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDybios <dibyajyoti.samal@gmail.com>2020-12-05 14:31:09 -0800
committerlucasponez <lucasponez@outlook.com>2020-12-08 00:46:07 -0800
commitedaf0f24934025c888e4797728684429c83a9809 (patch)
treed7fd130e406c8e3a1121b5562622aea68c63f666
parent9b2eb7083b7dea7a614edce4edb5af018aee7385 (diff)
Merge commit '89e109303f999a4003953ddca3f2ce4eb9c2c4c1' as 'drivers/staging/prima'
-rw-r--r--drivers/staging/prima/Android.mk2
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h26
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h13
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_ftm.h5
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h2
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wext.h4
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c234
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c20
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c629
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c19
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_ftm.c46
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c172
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c117
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c16
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c480
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/aniGlobal.h2
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/aniSystemDefs.h4
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/qwlan_version.h2
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/sirApi.h32
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/sirMacProtDef.h5
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/wniApi.h5
-rw-r--r--drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/dot11f.frms22
-rw-r--r--drivers/staging/prima/CORE/MAC/src/include/dot11f.h86
-rw-r--r--drivers/staging/prima/CORE/MAC/src/include/sirParams.h17
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/include/limGlobal.h1
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/include/limSession.h17
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c98
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c76
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c144
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c27
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c12
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limSendManagementFrames.c76
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limSerDesUtils.c7
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limSession.c18
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.c35
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.h5
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limTypes.h10
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limUtils.c5
-rw-r--r--drivers/staging/prima/CORE/SAP/src/sapModule.c5
-rw-r--r--drivers/staging/prima/CORE/SME/inc/csrApi.h18
-rw-r--r--drivers/staging/prima/CORE/SME/inc/csrInternal.h1
-rw-r--r--drivers/staging/prima/CORE/SME/inc/sme_Api.h35
-rw-r--r--drivers/staging/prima/CORE/SME/inc/sme_Trace.h3
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c379
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c7
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrInsideApi.h16
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c13
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrUtil.c190
-rw-r--r--drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c107
-rw-r--r--drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c102
-rw-r--r--drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c6
-rw-r--r--drivers/staging/prima/CORE/VOSS/inc/vos_nvitem.h14
-rw-r--r--drivers/staging/prima/CORE/VOSS/inc/wlan_hdd_misc.h3
-rwxr-xr-xdrivers/staging/prima/CORE/VOSS/src/vos_nvitem.c74
-rw-r--r--drivers/staging/prima/CORE/VOSS/src/vos_sched.c10
-rw-r--r--drivers/staging/prima/CORE/VOSS/src/vos_sched.h8
-rw-r--r--drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c11
-rw-r--r--drivers/staging/prima/Kbuild55
-rw-r--r--drivers/staging/prima/Kconfig8
-rw-r--r--drivers/staging/prima/Makefile13
60 files changed, 1392 insertions, 2177 deletions
diff --git a/drivers/staging/prima/Android.mk b/drivers/staging/prima/Android.mk
index 43ccc6c87adf..ed92484abf39 100644
--- a/drivers/staging/prima/Android.mk
+++ b/drivers/staging/prima/Android.mk
@@ -136,7 +136,7 @@ endif
include $(CLEAR_VARS)
LOCAL_MODULE := $(WLAN_CHIPSET)_wlan.ko
LOCAL_MODULE_KBUILD_NAME := wlan.ko
-LOCAL_MODULE_TAGS := debug
+LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_DEBUG_ENABLE := true
ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED), true)
ifeq ($(WIFI_DRIVER_INSTALL_TO_KERNEL_OUT),true)
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
index debcefc5c6e1..969d419d1968 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -3266,29 +3266,6 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_ENABLE_DEFAULT_SAP "gEnabledefaultSAP"
#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
-------------------------------------------------------------------------*/
@@ -3905,9 +3882,6 @@ typedef struct
bool indoor_channel_support;
bool force_rsne_override;
char enabledefaultSAP[CFG_CONCURRENT_IFACE_MAX_LEN];
-#ifdef WLAN_FEATURE_SAE
- bool is_sae_enabled;
-#endif
} hdd_config_t;
/*---------------------------------------------------------------------------
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h
index 94e6949b0e2a..4413d4ead782 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg80211.h
@@ -143,15 +143,6 @@ typedef struct {
}__attribute__((packed)) qcom_ie_age ;
#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 {
QCA_NL80211_VENDOR_SUBCMD_UNSPEC = 0,
QCA_NL80211_VENDOR_SUBCMD_TEST = 1,
@@ -204,6 +195,9 @@ enum qca_nl80211_vendor_subcmds {
/* Get Concurrency Matrix */
QCA_NL80211_VENDOR_SUBCMD_GET_CONCURRENCY_MATRIX = 42,
QCA_NL80211_VENDOR_SUBCMD_APFIND = 52,
+
+ QCA_NL80211_VENDOR_SUBCMD_DO_ACS = 54, //IKLOCSEN-3054, MOTO Gambugge
+
/* Start Wifi Logger */
QCA_NL80211_VENDOR_SUBCMD_WIFI_LOGGER_START = 62,
@@ -495,6 +489,7 @@ enum qca_nl80211_vendor_subcmds_index {
QCA_NL80211_VENDOR_SUBCMD_NUD_STATS_GET_INDEX,
QCA_NL80211_VENDOR_SUBCMD_HANG_REASON_INDEX,
QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES_INDEX,
+ QCA_NL80211_VENDOR_SUBCMD_DO_ACS_INDEX, //IKLOCSEN-3054, MOTO Gambugge
};
/**
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_ftm.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_ftm.h
index 7c7fa9c05337..22817534846a 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_ftm.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_ftm.h
@@ -38,6 +38,9 @@
#define WLAN_FTM_SUCCESS 0
#define WLAN_FTM_FAILURE 1
+#define WLAN_FTM_WHITE_LIST_CMD 6
+#define WLAN_FTM_WHITE_LIST_BYTE 2
+
#define WLAN_FTM_START 1
#define WLAN_FTM_STOP 2
#define WLAN_FTM_CMD 3
@@ -220,5 +223,5 @@ typedef struct rateStr2rateIndex_s
int wlan_hdd_ftm_open(hdd_context_t *pHddCtx);
void wlan_hdd_process_ftm_cmd (hdd_context_t *pHddCtx,tAniNlHdr *wnl);
int wlan_hdd_ftm_close(hdd_context_t *pHddCtx);
-
+VOS_STATUS vos_is_tcmd_data_white_listed(u_int8_t *data, int len);
#endif
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
index aadd9fecdba4..3ad5876cc67c 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
@@ -863,7 +863,6 @@ typedef struct hdd_hostapd_state_s
int bssState;
vos_event_t vosEvent;
VOS_STATUS vosStatus;
- vos_event_t sta_discon_event;
v_BOOL_t bCommit;
} hdd_hostapd_state_t;
@@ -2022,6 +2021,7 @@ void wlan_hdd_reset_prob_rspies(hdd_adapter_t* pHostapdAdapter);
void hdd_prevent_suspend(uint32_t reason);
void hdd_allow_suspend(uint32_t reason);
void hdd_prevent_suspend_timeout(v_U32_t timeout, uint32_t reason);
+void hdd_prevent_suspend_after_scan(long hz); //Mot IKHSS7-28961 :Empty scan results
bool hdd_is_ssr_required(void);
void hdd_set_ssr_required(e_hdd_ssr_required value);
void hdd_set_pre_close(hdd_context_t *pHddCtx);
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wext.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wext.h
index 4d2ebb8a81fb..9e577bfbca5a 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wext.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_wext.h
@@ -402,6 +402,10 @@ 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,
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,
union iwreq_data *wrqu, char *extra, int nOffset);
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
index 3e6418fa8acf..1fe00265fc72 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -152,13 +152,6 @@ 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 };
#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)
// Offset where the EID-Len-IE, start.
#define FT_ASSOC_RSP_IES_OFFSET 6 /* Capability(2) + AID(2) + Status Code(2)*/
@@ -199,53 +192,6 @@ static eHalStatus hdd_RoamSetKeyCompleteHandler( hdd_adapter_t *pAdapter,
eRoamCmdStatus roamStatus,
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,
eConnectionState connState )
{
@@ -2495,61 +2441,55 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
}
return eHAL_STATUS_FAILURE;
}
-
- //Association Response
- pFTAssocRsp = (u8 *)(pRoamInfo->pbFrames +
- pRoamInfo->nBeaconLength +
- pRoamInfo->nAssocReqLength);
- if (pFTAssocRsp != NULL)
- {
- // pFTAssocRsp needs to point to the IEs
- pFTAssocRsp += FT_ASSOC_RSP_IES_OFFSET;
- hddLog(LOG1, "%s: AssocRsp is now at %02x%02x", __func__,
- (unsigned int)pFTAssocRsp[0],
- (unsigned int)pFTAssocRsp[1]);
- assocRsplen =
- pRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
- }
- else
- {
- hddLog(LOGE, "%s:AssocRsp is NULL", __func__);
- assocRsplen = 0;
- }
-
- //Association Request
- pFTAssocReq = (u8 *)(pRoamInfo->pbFrames +
- pRoamInfo->nBeaconLength);
- if (pFTAssocReq != NULL)
- {
- if(!ft_carrier_on)
- {
- // pFTAssocReq needs to point to the IEs
- pFTAssocReq += FT_ASSOC_REQ_IES_OFFSET;
- hddLog(LOG1, "%s: pFTAssocReq is now at %02x%02x", __func__,
- (unsigned int)pFTAssocReq[0],
- (unsigned int)pFTAssocReq[1]);
- assocReqlen =
- pRoamInfo->nAssocReqLength - FT_ASSOC_REQ_IES_OFFSET;
- }
- else
- {
- /* This should contain only the FTIEs */
- assocReqlen = pRoamInfo->nAssocReqLength;
- }
- }
- else
- {
- hddLog(LOGE, "%s:AssocReq is NULL", __func__);
- 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 )
{
+
+ //Association Response
+ pFTAssocRsp = (u8 *)(pRoamInfo->pbFrames + pRoamInfo->nBeaconLength +
+ pRoamInfo->nAssocReqLength);
+ if (pFTAssocRsp != NULL)
+ {
+ // pFTAssocRsp needs to point to the IEs
+ pFTAssocRsp += FT_ASSOC_RSP_IES_OFFSET;
+ hddLog(LOG1, "%s: AssocRsp is now at %02x%02x", __func__,
+ (unsigned int)pFTAssocRsp[0],
+ (unsigned int)pFTAssocRsp[1]);
+ assocRsplen = pRoamInfo->nAssocRspLength - FT_ASSOC_RSP_IES_OFFSET;
+ }
+ else
+ {
+ hddLog(LOGE, "%s:AssocRsp is NULL", __func__);
+ assocRsplen = 0;
+ }
+
+ //Association Request
+ pFTAssocReq = (u8 *)(pRoamInfo->pbFrames +
+ pRoamInfo->nBeaconLength);
+ if (pFTAssocReq != NULL)
+ {
+ if(!ft_carrier_on)
+ {
+ // pFTAssocReq needs to point to the IEs
+ pFTAssocReq += FT_ASSOC_REQ_IES_OFFSET;
+ hddLog(LOG1, "%s: pFTAssocReq is now at %02x%02x", __func__,
+ (unsigned int)pFTAssocReq[0],
+ (unsigned int)pFTAssocReq[1]);
+ assocReqlen = pRoamInfo->nAssocReqLength - FT_ASSOC_REQ_IES_OFFSET;
+ }
+ else
+ {
+ /* This should contain only the FTIEs */
+ assocReqlen = pRoamInfo->nAssocReqLength;
+ }
+ }
+ else
+ {
+ hddLog(LOGE, "%s:AssocReq is NULL", __func__);
+ assocReqlen = 0;
+ }
+
if(ft_carrier_on)
{
if ( !hddDisconInProgress )
@@ -2560,6 +2500,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
"indication", __FUNCTION__, ft_carrier_on);
chan = ieee80211_get_channel(pAdapter->wdev.wiphy,
(int)pRoamInfo->pBssDesc->channelId);
+ hddLog(LOG1, "assocReqlen %d assocRsplen %d", assocReqlen,
+ assocRsplen);
if (pHddCtx->cfg_ini &&
pHddCtx->cfg_ini->gEnableRoamDelayStats)
{
@@ -2638,8 +2580,8 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs
/* inform connect result to nl80211 */
hdd_connect_result(dev, pRoamInfo->bssid,
pRoamInfo,
- pFTAssocReq, assocReqlen,
- pFTAssocRsp, assocRsplen,
+ reqRsnIe, reqRsnLength,
+ rspRsnIe, rspRsnLength,
WLAN_STATUS_SUCCESS,
GFP_KERNEL);
}
@@ -4400,12 +4342,6 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
else
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:
{
hdd_adapter_t *pHostapdAdapter = NULL;
@@ -4452,32 +4388,9 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
}
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 auth_type = eCSR_AUTH_TYPE_UNKNOWN;
+ eCsrAuthType auth_type;
// is the auth type supported?
if ( memcmp(auth_suite , ccpRSNOui01, 4) == 0)
{
@@ -4515,20 +4428,9 @@ eCsrAuthType hdd_TranslateRSNToCsrAuthType( u_int8_t auth_suite[4])
auth_type = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
} else
#endif
- if (!memcmp(auth_suite, ccp_rsn_oui_18, 4))
- {
- 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);
-
+ auth_type = eCSR_AUTH_TYPE_UNKNOWN;
+ }
return auth_type;
}
@@ -4663,7 +4565,6 @@ static tANI_S32 hdd_ProcessGENIE(hdd_adapter_t *pAdapter,
flag to 0 */
memset( &dot11WPAIE, 0 , sizeof(tDot11fIEWPA) );
memset( &dot11RSNIE, 0 , sizeof(tDot11fIERSN) );
- memset( PMKIDCache, 0 , sizeof(tPmkidCacheInfo) * 4);
// Type check
if ( gen_ie[0] == DOT11F_EID_RSN)
@@ -4933,10 +4834,7 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
ENTER();
pRoamProfile->AuthType.numEntries = 1;
- hddLog( LOG1,
- "%s: authType = %d RSNAuthType %d wpa_versions %d key_mgmt : 0x%x",
- __func__, pHddStaCtx->conn_info.authType, RSNAuthType,
- pWextState->wpaVersion, pWextState->authKeyMgmt);
+ hddLog( LOG1, "%s: pHddStaCtx->conn_info.authType = %d", __func__, pHddStaCtx->conn_info.authType);
switch( pHddStaCtx->conn_info.authType)
{
@@ -5011,22 +4909,7 @@ 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)) {
- /* 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)
== IW_AUTH_KEY_MGMT_802_1X) {
pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN;
@@ -5034,8 +4917,7 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
if ( (pWextState->authKeyMgmt & IW_AUTH_KEY_MGMT_PSK)
== IW_AUTH_KEY_MGMT_PSK) {
pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_RSN_PSK;
- } else
- {
+ } else {
pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_UNKNOWN;
}
}
@@ -5045,10 +4927,6 @@ int hdd_set_csr_auth_type ( hdd_adapter_t *pAdapter, eCsrAuthType RSNAuthType)
pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SHARED_KEY;
break;
- case eCSR_AUTH_TYPE_SAE:
- pRoamProfile->AuthType.authType[0] = eCSR_AUTH_TYPE_SAE;
- break;
-
default:
#ifdef FEATURE_WLAN_ESE
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
index ea2050d974a3..f23de1835ba2 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
@@ -4033,14 +4033,6 @@ REG_VARIABLE( CFG_EXTSCAN_ENABLE, WLAN_PARAM_Integer,
VAR_FLAGS_NONE,
(void *)CFG_ENABLE_DEFAULT_SAP_DEFAULT),
-#ifdef WLAN_FEATURE_SAE
- REG_VARIABLE(CFG_IS_SAE_ENABLED_NAME, WLAN_PARAM_Integer,
- hdd_config_t, is_sae_enabled,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_IS_SAE_ENABLED_DEFAULT,
- CFG_IS_SAE_ENABLED_MIN,
- CFG_IS_SAE_ENABLED_MAX),
-#endif
};
/*
@@ -4257,17 +4249,6 @@ config_exit:
return vos_status;
}
-#ifdef WLAN_FEATURE_SAE
-static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx)
-{
- hddLog(LOG2, "Name = [%s] value = [%u]", CFG_IS_SAE_ENABLED_NAME,
- hdd_ctx->cfg_ini->is_sae_enabled);
-}
-#else
-static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx)
-{
-}
-#endif
static void print_hdd_cfg(hdd_context_t *pHddCtx)
{
@@ -4729,7 +4710,6 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
"Name = [%s] Value = [%s] ",
CFG_ENABLE_DEFAULT_SAP,
pHddCtx->cfg_ini->enabledefaultSAP);
- hdd_cfg_print_sae(pHddCtx);
}
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
index c59338cf2546..ef7c8fa960fd 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -347,7 +347,6 @@ wlan_hdd_txrx_stypes[NUM_NL80211_IFTYPES] = {
[NL80211_IFTYPE_STATION] = {
.tx = 0xffff,
.rx = BIT(SIR_MAC_MGMT_ACTION) |
- BIT(SIR_MAC_MGMT_AUTH) |
BIT(SIR_MAC_MGMT_PROBE_REQ),
},
[NL80211_IFTYPE_AP] = {
@@ -1683,8 +1682,7 @@ static int hdd_get_cached_station_remote(hdd_context_t *hdd_ctx,
MAC_ADDR_ARRAY(mac_addr.bytes));
return -EINVAL;
}
- if (sap_ctx->aStaInfo[stainfo->ucSTAId].isUsed == TRUE &&
- !sap_ctx->aStaInfo[stainfo->ucSTAId].isDeauthInProgress) {
+ if (sap_ctx->aStaInfo[stainfo->ucSTAId].isUsed == TRUE) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"peer " MAC_ADDRESS_STR " is in connected state",
MAC_ADDR_ARRAY(mac_addr.bytes));
@@ -4746,25 +4744,9 @@ static int __wlan_hdd_cfg80211_extscan_get_valid_channels(struct wiphy *wiphy,
int ret,len = 0;;
ENTER();
- ret = wlan_hdd_validate_context(pHddCtx);
- if (ret)
- return false;
-
- if (!pAdapter) {
- hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Invalid adapter"));
- return false;
- }
-
- if (pAdapter->device_mode != WLAN_HDD_INFRA_STATION) {
- hddLog(VOS_TRACE_LEVEL_DEBUG,
- FL("ext scans only supported on STA ifaces"));
- return false;
- }
- if (VOS_FTM_MODE == hdd_get_conparam()) {
- hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Command not allowed in FTM mode"));
- return false;
- }
+ if (!wlan_hdd_is_extscan_supported(pAdapter, pHddCtx))
+ return -EINVAL;
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_EXTSCAN_SUBCMD_CONFIG_PARAM_MAX,
data, dataLen,
@@ -6630,6 +6612,288 @@ static int wlan_hdd_cfg80211_firmware_roaming(struct wiphy *wiphy,
return ret;
}
+//IKLOCSEN-3054, MOTO Gambugge, 10/16/2017 – implement do_acs() in WLAN driver
+/**
+ * enum qca_wlan_vendor_attr_acs_offload
+ *
+ * @QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL: ACS selected primary channel
+ * @QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL: ACS selected secondary channel
+ * @QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE: hw_mode for ACS
+ * @QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED: indicate if HT capability is enabled
+ * @QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED: indicate HT capability
+ */
+enum qca_wlan_vendor_attr_acs_offload {
+ QCA_WLAN_VENDOR_ATTR_ACS_CHANNEL_INVALID = 0,
+ QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL,
+ QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL,
+ QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE,
+ QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED,
+ QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED,
+ QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED,
+ QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH,
+ QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST,
+ QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG0_CENTER_CHANNEL,
+ QCA_WLAN_VENDOR_ATTR_ACS_VHT_SEG1_CENTER_CHANNEL,
+ QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST,
+ /* keep last */
+ QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST,
+ QCA_WLAN_VENDOR_ATTR_ACS_MAX =
+ QCA_WLAN_VENDOR_ATTR_ACS_AFTER_LAST - 1
+};
+
+/**
+ * enum qca_wlan_vendor_acs_hw_mode
+ *
+ * @QCA_ACS_MODE_IEEE80211B: 11b mode
+ * @QCA_ACS_MODE_IEEE80211G: 11g mode
+ * @QCA_ACS_MODE_IEEE80211A: 11a mode
+ * @QCA_ACS_MODE_IEEE80211AD: 11ad mode
+ */
+ enum qca_wlan_vendor_acs_hw_mode {
+ QCA_ACS_MODE_IEEE80211B,
+ QCA_ACS_MODE_IEEE80211G,
+ QCA_ACS_MODE_IEEE80211A,
+ QCA_ACS_MODE_IEEE80211AD,
+ QCA_ACS_MODE_IEEE80211ANY,
+};
+
+static const struct nla_policy
+wlan_hdd_cfg80211_do_acs_policy[QCA_WLAN_VENDOR_ATTR_ACS_MAX+1] = {
+ [QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE] = { .type = NLA_U8 },
+ [QCA_WLAN_VENDOR_ATTR_ACS_HT_ENABLED] = { .type = NLA_FLAG },
+ [QCA_WLAN_VENDOR_ATTR_ACS_HT40_ENABLED] = { .type = NLA_FLAG },
+ [QCA_WLAN_VENDOR_ATTR_ACS_VHT_ENABLED] = { .type = NLA_FLAG },
+ [QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH] = { .type = NLA_U16 },
+ [QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST] = { .type = NLA_UNSPEC },
+ [QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST] = { .type = NLA_UNSPEC },
+};
+
+/**
+ * wlan_hdd_cfg80211_acs_ch_select_evt: Callback function for ACS evt
+ * @adapter: Pointer to SAP adapter struct
+ * @pri_channel: SAP ACS procedure selected Primary channel
+ * @sec_channel: SAP ACS procedure selected secondary channel
+ *
+ * This is a callback function from SAP module on ACS procedure is completed.
+ * This function send the ACS selected channel information to hostapd
+ *
+ * Return: None
+ */
+
+void wlan_hdd_cfg80211_acs_ch_select_evt(hdd_adapter_t *adapter, tChannelListInfo channel_list)
+{
+ hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+ struct sk_buff *vendor_event;
+ int ret_val;
+ uint16_t ch_width;
+
+ vendor_event = cfg80211_vendor_event_alloc(hdd_ctx->wiphy,
+ &(adapter->wdev),
+ 4 * sizeof(u8) + 1 * sizeof(u16) + 4 + NLMSG_HDRLEN,
+ QCA_NL80211_VENDOR_SUBCMD_DO_ACS_INDEX,
+ GFP_KERNEL);
+ if (!vendor_event) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "cfg80211_vendor_event_alloc failed");
+ return;
+ }
+
+ ret_val = nla_put_u8(vendor_event,
+ QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL,
+ channel_list.channels[0]);
+ if (ret_val) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "QCA_WLAN_VENDOR_ATTR_ACS_PRIMARY_CHANNEL put fail");
+ kfree_skb(vendor_event);
+ return;
+ }
+
+ ret_val = nla_put_u8(vendor_event,
+ QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL,
+ 0); // IKSWO-21203, Moto, gambugge, Fix channel set failure in nl80211 driver
+ if (ret_val) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "QCA_WLAN_VENDOR_ATTR_ACS_SECONDARY_CHANNEL put fail");
+ kfree_skb(vendor_event);
+ return;
+ }
+
+ ch_width = 20;
+
+ ret_val = nla_put_u16(vendor_event,
+ QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH,
+ ch_width);
+ if (ret_val) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "QCA_WLAN_VENDOR_ATTR_ACS_CHWIDTH put fail");
+ kfree_skb(vendor_event);
+ return;
+ }
+
+ if (channel_list.channels[channel_list.num_channels - 1] > 14)
+ ret_val = nla_put_u8(vendor_event,
+ QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE,
+ QCA_ACS_MODE_IEEE80211A);
+ else
+ ret_val = nla_put_u8(vendor_event,
+ QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE,
+ QCA_ACS_MODE_IEEE80211G);
+
+ if (ret_val) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE put fail");
+ kfree_skb(vendor_event);
+ return;
+ }
+
+ hddLog(VOS_TRACE_LEVEL_INFO, "ACS result for wlan0: PRI_CH: %d SEC_CH: %d",
+ channel_list.channels[0],
+ channel_list.channels[channel_list.num_channels - 1]);
+
+ cfg80211_vendor_event(vendor_event, GFP_KERNEL);
+
+ return;
+}
+
+/**
+ * __wlan_hdd_cfg80211_do_acs(): CFG80211 handler function for DO_ACS Vendor CMD
+ * @wiphy: Linux wiphy struct pointer
+ * @wdev: Linux wireless device struct pointer
+ * @data: ACS information from hostapd
+ * @data_len: ACS information length
+ *
+ * This function handle DO_ACS Vendor command from hostapd, parses ACS config
+ * and starts ACS procedure.
+ *
+ * Return: ACS procedure start status
+ */
+static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ VOS_STATUS status;
+ struct net_device *dev = wdev->netdev;
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
+ tChannelListInfo channel_list;
+ int currentBand = 0;
+ struct nlattr *tb[QCA_WLAN_VENDOR_ATTR_ACS_MAX + 1];
+ uint8_t hw_mode;
+ int i;
+
+ if (NULL == wdev) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: wdev is Null", __func__);
+ return -ENODEV;
+ }
+
+ if (NULL == wdev->netdev) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: dev is Null", __func__);
+ return -ENODEV;
+ }
+
+ status = nla_parse(tb, QCA_WLAN_VENDOR_ATTR_ACS_MAX, data, data_len,
+ wlan_hdd_cfg80211_do_acs_policy);
+ if (status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "DO_ACS NL CMD parsing failed");
+ return -EINVAL;
+ }
+
+ if (!tb[QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE]) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "Attr hw_mode failed");
+ return -EINVAL;
+ }
+ hw_mode = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_ACS_HW_MODE]);
+
+ /* hw_mode = a/b/g: QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST and
+ * QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST attrs are present, and
+ * QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST is used for obtaining the
+ * channel list, QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST is ignored
+ * since it contains the frequency values of the channels in
+ * the channel list.
+ * hw_mode = any: only QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST attr
+ * is present
+ */
+ if (tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]) {
+ char *tmp = nla_data(tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]);
+ channel_list.num_channels = nla_len(
+ tb[QCA_WLAN_VENDOR_ATTR_ACS_CH_LIST]);
+ if (channel_list.num_channels) {
+ memcpy(channel_list.channels, tmp,
+ channel_list.num_channels);
+ }
+ } else if (tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]) {
+ uint32_t *freq =
+ nla_data(tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]);
+ channel_list.num_channels = nla_len(
+ tb[QCA_WLAN_VENDOR_ATTR_ACS_FREQ_LIST]) /
+ sizeof(uint32_t);
+ if (channel_list.num_channels) {
+ /* convert frequency to channel */
+ for (i = 0; i < channel_list.num_channels; i++)
+ channel_list.channels[i] =
+ ieee80211_frequency_to_channel(freq[i]);
+ }
+ }
+
+ if (channel_list.num_channels >=1) {
+ if (hw_mode == QCA_ACS_MODE_IEEE80211A) {
+ currentBand =
+ (channel_list.channels[channel_list.num_channels - 1] >= 149) ? 3 :
+ (channel_list.channels[channel_list.num_channels - 1] >= 100) ? 2 :
+ (channel_list.channels[channel_list.num_channels - 1] >= 36) ? 1 : 0;
+ } else { // Auto 2.4 Ghz
+ currentBand = 0;
+ }
+ }
+
+ hddLog(VOS_TRACE_LEVEL_INFO,
+ "ACS Config for wlan0: HW_MODE: %d NUM CHANNELS: %d START_CH: %d"
+ "END_CH: %d currentBand: %d",
+ hw_mode,
+ channel_list.num_channels,
+ channel_list.channels[0],
+ channel_list.channels[channel_list.num_channels - 1],
+ currentBand);
+
+ status = WLANSAP_SetChannelRange(hHal,
+ channel_list.channels[0],
+ channel_list.channels[channel_list.num_channels - 1],
+ currentBand);
+
+ if (!VOS_IS_STATUS_SUCCESS(status)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s SetChannelRange Failed!!!",__func__);
+ return -EINVAL;
+ }
+
+ (WLAN_HDD_GET_CTX(pAdapter))->is_dynamic_channel_range_set = 1;
+ (WLAN_HDD_GET_CTX(pAdapter))->cfg_ini->apAutoChannelSelection = 1;
+
+ wlan_hdd_cfg80211_acs_ch_select_evt(pAdapter, channel_list);
+
+ return status;
+}
+
+/**
+* wlan_hdd_cfg80211_do_acs : CFG80211 handler function for DO_ACS Vendor CMD
+* @wiphy: Linux wiphy struct pointer
+* @wdev: Linux wireless device struct pointer
+* @data: ACS information from hostapd
+* @data_len: ACS information len
+*
+* This function handle DO_ACS Vendor command from hostapd, parses ACS config
+* and starts ACS procedure.
+*
+* Return: ACS procedure start status
+*/
+static int wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ const void *data, int data_len)
+{
+ int ret;
+
+ vos_ssr_protect(__func__);
+ ret = __wlan_hdd_cfg80211_do_acs(wiphy, wdev, data, data_len);
+ vos_ssr_unprotect(__func__);
+
+ return ret;
+}
+//END IKLOCSEN-3054
+
static const struct
nla_policy
qca_wlan_vendor_get_wifi_info_policy[
@@ -8491,6 +8755,13 @@ __wlan_hdd_cfg80211_get_logger_supp_feature(struct wiphy *wiphy,
features = 0;
+ if (hdd_ctx->cfg_ini->wlanLoggingEnable &&
+ hdd_ctx->cfg_ini->enableFatalEvent &&
+ hdd_ctx->is_fatal_event_log_sup) {
+ features |= WIFI_LOGGER_PER_PACKET_TX_RX_STATUS_SUPPORTED;
+ features |= WIFI_LOGGER_CONNECT_EVENT_SUPPORTED;
+ }
+
reply_skb = cfg80211_vendor_cmd_alloc_reply_skb(wiphy,
sizeof(uint32_t) + NLA_HDRLEN + NLMSG_HDRLEN);
if (!reply_skb) {
@@ -8661,8 +8932,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_TDLS_GET_STATUS,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
- WIPHY_VENDOR_CMD_NEED_NETDEV |
- WIPHY_VENDOR_CMD_NEED_RUNNING,
+ WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = wlan_hdd_cfg80211_exttdls_get_status
},
{
@@ -8676,8 +8946,7 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
.info.vendor_id = QCA_NL80211_VENDOR_ID,
.info.subcmd = QCA_NL80211_VENDOR_SUBCMD_NO_DFS_FLAG,
.flags = WIPHY_VENDOR_CMD_NEED_WDEV |
- WIPHY_VENDOR_CMD_NEED_NETDEV |
- WIPHY_VENDOR_CMD_NEED_RUNNING,
+ WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = wlan_hdd_cfg80211_disable_dfs_channels
},
{
@@ -8799,6 +9068,16 @@ const struct wiphy_vendor_command hdd_wiphy_vendor_commands[] =
WIPHY_VENDOR_CMD_NEED_NETDEV,
.doit = wlan_hdd_cfg80211_get_logger_supp_feature
},
+ //IKLOCSEN-3054, MOTO Gambugge, 10/16/2017 – implement do_acs() in WLAN driver
+ {
+ .info.vendor_id = QCA_NL80211_VENDOR_ID,
+ .info.subcmd = QCA_NL80211_VENDOR_SUBCMD_DO_ACS,
+ .flags = WIPHY_VENDOR_CMD_NEED_WDEV |
+ WIPHY_VENDOR_CMD_NEED_NETDEV |
+ WIPHY_VENDOR_CMD_NEED_RUNNING,
+ .doit = wlan_hdd_cfg80211_do_acs
+ },
+ //END IKLOCSEN-3054
};
/* vendor specific events */
@@ -8919,6 +9198,12 @@ struct nl80211_vendor_cmd_info wlan_hdd_cfg80211_vendor_events[] =
.vendor_id = QCA_NL80211_VENDOR_ID,
.subcmd = QCA_NL80211_VENDOR_SUBCMD_LINK_PROPERTIES,
},
+ //IKLOCSEN-3054, MOTO Gambugge, 10/16/2017 – implement do_acs() in WLAN driver
+ [QCA_NL80211_VENDOR_SUBCMD_DO_ACS_INDEX] = {
+ .vendor_id = QCA_NL80211_VENDOR_ID,
+ .subcmd = QCA_NL80211_VENDOR_SUBCMD_DO_ACS
+ },
+ //END IKLOCSEN-3054
};
/*
@@ -9070,32 +9355,6 @@ void wlan_hdd_cfg80211_scan_randomization_init(struct wiphy *wiphy)
}
#endif
-#if defined(WLAN_FEATURE_SAE) && \
- defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
-/**
- * wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature
- * @wiphy: Pointer to wiphy
- * @config: pointer to config
- *
- * This function is used to indicate the support of SAE
- *
- * Return: None
- */
-static
-void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
- hdd_config_t *config)
-{
- if (config->is_sae_enabled)
- wiphy->features |= NL80211_FEATURE_SAE;
-}
-#else
-static
-void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
- hdd_config_t *config)
-{
-}
-#endif
-
/*
* FUNCTION: wlan_hdd_cfg80211_init
* This function is called by hdd_wlan_startup()
@@ -9335,7 +9594,6 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->n_vendor_events = ARRAY_SIZE(wlan_hdd_cfg80211_vendor_events);
hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg);
- wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy, pCfg);
EXIT();
return 0;
@@ -14995,6 +15253,13 @@ static eHalStatus hdd_cfg80211_scan_done_callback(tHalHandle halHandle,
aborted = true;
}
+ if (!aborted) {
+ //Begin Mot IKHSS7-28961 : Dont allow sleep so that supplicant
+ // can fetch scan results before kerenel ages it out if slept immediately
+ // and sleep duration is more than the ageout time.
+ hdd_prevent_suspend_after_scan(HZ/4);
+ //END IKHSS7-28961
+ }
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
if (NET_DEV_IS_IFF_UP(pAdapter) &&
wlan_hdd_cfg80211_validate_scan_req(req, pHddCtx))
@@ -16254,10 +16519,7 @@ static int wlan_hdd_cfg80211_set_auth_type(hdd_adapter_t *pAdapter,
pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_CCKM_WPA;//eCSR_AUTH_TYPE_CCKM_RSN needs to be handled as well if required.
break;
#endif
- case NL80211_AUTHTYPE_SAE:
- hddLog(LOG1, "set authentication type to SAE");
- pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_SAE;
- break;
+
default:
hddLog(VOS_TRACE_LEVEL_ERROR,
@@ -16329,18 +16591,9 @@ static int wlan_hdd_set_akm_suite( hdd_adapter_t *pAdapter,
pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_802_1X;
break;
#endif
- case WLAN_AKM_SUITE_SAE:
- hddLog(LOG1, "setting key mgmt type to SAE");
- pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_802_1X;
- break;
-
- case WLAN_AKM_SUITE_OWE_1:
- hddLog(LOG1, "setting key mgmt type to OWE");
- pWextState->authKeyMgmt |= IW_AUTH_KEY_MGMT_802_1X;
- break;
default:
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Unsupported key mgmt type %x",
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Unsupported key mgmt type %d",
__func__, key_mgmt);
return -EINVAL;
@@ -16814,32 +17067,6 @@ int wlan_hdd_cfg80211_set_ie( hdd_adapter_t *pAdapter,
}
break;
#endif
- case SIR_MAC_REQUEST_EID_MAX:
- if (genie[0] == SIR_DH_PARAMETER_ELEMENT_EXT_EID)
- {
- v_U16_t curAddIELen = pWextState->assocAddIE.length;
- if (SIR_MAC_MAX_ADD_IE_LENGTH <
- (pWextState->assocAddIE.length + eLen))
- {
- hddLog(VOS_TRACE_LEVEL_FATAL, "Cannot accommodate assocAddIE "
- "Need bigger buffer space");
- VOS_ASSERT(0);
- return -ENOMEM;
- }
- hddLog(VOS_TRACE_LEVEL_INFO, "Set DH EXT IE(len %d)",
- eLen + 2);
- memcpy( pWextState->assocAddIE.addIEdata + curAddIELen,
- genie - 2, eLen + 2);
- pWextState->assocAddIE.length += eLen + 2;
- pWextState->roamProfile.pAddIEAssoc =
- pWextState->assocAddIE.addIEdata;
- pWextState->roamProfile.nAddIEAssocLength =
- pWextState->assocAddIE.length;
- }else {
- hddLog(VOS_TRACE_LEVEL_FATAL, "UNKNOWN EID: %X", genie[0]);
- }
- break;
-
default:
hddLog (VOS_TRACE_LEVEL_ERROR,
"%s Set UNKNOWN IE %X", __func__, elementId);
@@ -18356,6 +18583,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_devic
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
+ int ssidlen = pHddStaCtx->conn_info.SSID.SSID.length;
tANI_U32 rate_flags;
hdd_context_t *pHddCtx = (hdd_context_t*) wiphy_priv(wiphy);
@@ -18394,9 +18622,11 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_devic
if (pAdapter->device_mode == WLAN_HDD_SOFTAP)
return wlan_hdd_get_sap_stats(pAdapter, mac, sinfo);
- if ((eConnectionState_Associated != pHddStaCtx->conn_info.connState))
+ if ((eConnectionState_Associated != pHddStaCtx->conn_info.connState) ||
+ (0 == ssidlen))
{
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: Not associated", __func__);
+ hddLog(VOS_TRACE_LEVEL_INFO, "%s: Not associated or"
+ " Invalid ssidlen, %d", __func__, ssidlen);
/*To keep GUI happy*/
return 0;
}
@@ -19036,7 +19266,6 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
v_U8_t staId;
v_CONTEXT_t pVosContext = NULL;
ptSapContext pSapCtx = NULL;
- hdd_hostapd_state_t *hostap_state;
ENTER();
@@ -19061,7 +19290,6 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
|| (WLAN_HDD_P2P_GO == pAdapter->device_mode)
)
{
- hostap_state = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
pVosContext = ( WLAN_HDD_GET_CTX(pAdapter))->pvosContext;
pSapCtx = VOS_GET_SAP_CB(pVosContext);
if(pSapCtx == NULL){
@@ -19092,19 +19320,9 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
MAC_ADDRESS_STR,
__func__,
MAC_ADDR_ARRAY(pDelStaParams->peerMacAddr));
- vos_event_reset(&hostap_state->sta_discon_event);
vos_status = hdd_softap_sta_deauth(pAdapter, pDelStaParams);
if (VOS_IS_STATUS_SUCCESS(vos_status))
- {
pSapCtx->aStaInfo[i].isDeauthInProgress = TRUE;
- vos_status =
- vos_wait_single_event(
- &hostap_state->sta_discon_event,
- WLAN_WAIT_TIME_DISCONNECT);
- if (!VOS_IS_STATUS_SUCCESS(vos_status))
- hddLog(LOGE,"!!%s: ERROR: Deauth wait expired!!",
- __func__);
- }
}
}
}
@@ -19139,7 +19357,6 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
__func__,
MAC_ADDR_ARRAY(pDelStaParams->peerMacAddr));
- vos_event_reset(&hostap_state->sta_discon_event);
vos_status = hdd_softap_sta_deauth(pAdapter, pDelStaParams);
if (!VOS_IS_STATUS_SUCCESS(vos_status))
{
@@ -19151,11 +19368,7 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
MAC_ADDR_ARRAY(pDelStaParams->peerMacAddr));
return -ENOENT;
}
- vos_status =
- vos_wait_single_event(&hostap_state->sta_discon_event,
- WLAN_WAIT_TIME_DISCONNECT);
- if (!VOS_IS_STATUS_SUCCESS(vos_status))
- hddLog(LOGE,"!!%s: ERROR: Deauth wait expired!!", __func__);
+
}
}
@@ -19273,92 +19486,6 @@ static int wlan_hdd_cfg80211_add_station(struct wiphy *wiphy,
return ret;
}
-
-#if defined(WLAN_FEATURE_SAE) && \
- defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
-/*
- * wlan_hdd_is_pmksa_valid: API to validate pmksa
- * @pmksa: pointer to cfg80211_pmksa structure
- *
- * Return: True if valid else false
- */
-static inline bool wlan_hdd_is_pmksa_valid(struct cfg80211_pmksa *pmksa)
-{
- if (pmksa->bssid){
- return true;
- }
- else
- {
- hddLog(LOGE, FL(" Either of bssid (%p) is NULL"), pmksa->bssid);
- return false;
- }
-}
-
-/*
- * hdd_update_pmksa_info: API to update tPmkidCacheInfo from cfg80211_pmksa
- * @pmk_cache: pmksa from supplicant
- * @pmk_cache: pmk needs to be updated
- *
- * Return: None
- */
-static void hdd_update_pmksa_info(tPmkidCacheInfo *pmk_cache,
- struct cfg80211_pmksa *pmksa, bool is_delete)
-{
- if (pmksa->bssid) {
- hddLog(VOS_TRACE_LEVEL_DEBUG,"set PMKSA for " MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(pmksa->bssid));
- vos_mem_copy(pmk_cache->BSSID,
- pmksa->bssid, VOS_MAC_ADDR_SIZE);
- }
-
- if (is_delete)
- return;
-
- vos_mem_copy(pmk_cache->PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE);
- if (pmksa->pmk_len && (pmksa->pmk_len <= CSR_RSN_MAX_PMK_LEN)) {
- vos_mem_copy(pmk_cache->pmk, pmksa->pmk, pmksa->pmk_len);
- pmk_cache->pmk_len = pmksa->pmk_len;
- } else
- hddLog(VOS_TRACE_LEVEL_INFO, "pmk len is %zu", pmksa->pmk_len);
-}
-#else
-/*
- * wlan_hdd_is_pmksa_valid: API to validate pmksa
- * @pmksa: pointer to cfg80211_pmksa structure
- *
- * Return: True if valid else false
- */
-static inline bool wlan_hdd_is_pmksa_valid(struct cfg80211_pmksa *pmksa)
-{
- if (!pmksa->bssid) {
- hddLog(LOGE,FL("both bssid is NULL %p"), pmksa->bssid);
- return false;
- }
- return true;
-}
-
-/*
- * hdd_update_pmksa_info: API to update tPmkidCacheInfo from cfg80211_pmksa
- * @pmk_cache: pmksa from supplicant
- * @pmk_cache: pmk needs to be updated
- *
- * Return: None
- */
-static void hdd_update_pmksa_info(tPmkidCacheInfo *pmk_cache,
- struct cfg80211_pmksa *pmksa, bool is_delete)
-{
- hddLog(VOS_TRACE_LEVEL_INFO,"set PMKSA for " MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(pmksa->bssid));
- vos_mem_copy(pmk_cache->BSSID,
- pmksa->bssid, VOS_MAC_ADDR_SIZE);
-
- if (is_delete)
- return;
-
- vos_mem_copy(pmk_cache->PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE);
-}
-#endif
-
#ifdef FEATURE_WLAN_LFR
static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *dev,
@@ -19369,7 +19496,7 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device
eHalStatus result;
int status;
hdd_context_t *pHddCtx;
- tPmkidCacheInfo pmk_cache;
+ tPmkidCacheInfo pmk_id;
ENTER();
@@ -19385,13 +19512,14 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device
return -EINVAL;
}
- if (!pmksa->pmkid) {
- hddLog(LOGE, FL("pmksa->pmkid(%p) is NULL"), pmksa->pmkid);
+ if (!pmksa->bssid || !pmksa->pmkid) {
+ hddLog(LOGE, FL("pmksa->bssid(%pK) or pmksa->pmkid(%pK) is NULL"),
+ pmksa->bssid, pmksa->pmkid);
return -EINVAL;
}
- if (!wlan_hdd_is_pmksa_valid(pmksa))
- return -EINVAL;
+ hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: set PMKSA for " MAC_ADDRESS_STR,
+ __func__, MAC_ADDR_ARRAY(pmksa->bssid));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -19403,19 +19531,12 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device
// Retrieve halHandle
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
- vos_mem_zero(&pmk_cache, sizeof(pmk_cache));
-
- hdd_update_pmksa_info(&pmk_cache, pmksa, false);
+ vos_mem_copy(pmk_id.BSSID, pmksa->bssid, ETHER_ADDR_LEN);
+ vos_mem_copy(pmk_id.PMKID, pmksa->pmkid, CSR_RSN_PMKID_SIZE);
-
- /* Add to the PMKSA ID Cache in CSR
- * PMKSA cache will be having following
- * 1. pmkid id
- * 2. pmk 15733
- * 3. bssid or cache identifier
- */
- result = sme_RoamSetPMKIDCache(halHandle,pAdapter->sessionId,
- &pmk_cache, 1, FALSE);
+ /* Add to the PMKSA ID Cache in CSR */
+ result = sme_RoamSetPMKIDCache(halHandle,pAdapter->sessionId,
+ &pmk_id, 1, FALSE);
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_PMKSA,
@@ -19445,7 +19566,6 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device
tHalHandle halHandle;
hdd_context_t *pHddCtx;
int status = 0;
- tPmkidCacheInfo pmk_cache;
ENTER();
@@ -19461,9 +19581,13 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device
return -EINVAL;
}
- if (!wlan_hdd_is_pmksa_valid(pmksa))
- return -EINVAL;
+ if (!pmksa->bssid) {
+ hddLog(LOGE, FL("pmksa->bssid is NULL"));
+ return -EINVAL;
+ }
+ hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: deleting PMKSA for " MAC_ADDRESS_STR,
+ __func__, MAC_ADDR_ARRAY(pmksa->bssid));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -19478,15 +19602,10 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_DEL_PMKSA,
pAdapter->sessionId, 0));
-
- vos_mem_zero(&pmk_cache, sizeof(pmk_cache));
-
- hdd_update_pmksa_info(&pmk_cache, pmksa, true);
-
/* Delete the PMKID CSR cache */
if (eHAL_STATUS_SUCCESS !=
sme_RoamDelPMKIDfromCache(halHandle,
- pAdapter->sessionId, &pmk_cache, FALSE)) {
+ pAdapter->sessionId, pmksa->bssid, FALSE)) {
hddLog(LOGE, FL("Failed to delete PMKSA for "MAC_ADDRESS_STR),
MAC_ADDR_ARRAY(pmksa->bssid));
status = -EINVAL;
@@ -19559,64 +19678,6 @@ static int wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device
}
#endif
-#if defined(WLAN_FEATURE_SAE) && \
- defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
-/**
- * __wlan_hdd_cfg80211_external_auth() - Handle external auth
- * @wiphy: Pointer to wireless phy
- * @dev: net device
- * @params: Pointer to external auth params
- *
- * Return: 0 on success, negative errno on failure
- */
-static int
-__wlan_hdd_cfg80211_external_auth(struct wiphy *wiphy, struct net_device *dev,
- struct cfg80211_external_auth_params *params)
-{
- hdd_context_t *hdd_ctx = wiphy_priv(wiphy);
- hdd_adapter_t *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
- int ret;
-
- if (hdd_get_conparam() == VOS_FTM_MODE) {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Command not allowed in FTM mode"));
- return -EPERM;
- }
-
- ret = wlan_hdd_validate_context(hdd_ctx);
- if (ret)
- return ret;
-
- hddLog(VOS_TRACE_LEVEL_DEBUG, FL("external_auth status: %d"),
- params->status);
-
- sme_handle_sae_msg(hdd_ctx->hHal, adapter->sessionId, params->status);
-
- return ret;
-}
-
-/**
- * wlan_hdd_cfg80211_external_auth() - Handle external auth
- * @wiphy: Pointer to wireless phy
- * @dev: net device
- * @params: Pointer to external auth params
- *
- * Return: 0 on success, negative errno on failure
- */
-static int
-wlan_hdd_cfg80211_external_auth(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_external_auth_params *params)
-{
- int ret;
-
- vos_ssr_protect(__func__);
- ret = __wlan_hdd_cfg80211_external_auth(wiphy, dev, params);
- vos_ssr_unprotect(__func__);
-
- return ret;
-}
-#endif
-
#if defined(WLAN_FEATURE_VOWIFI_11R) && defined(KERNEL_SUPPORT_11R_CFG80211)
static int __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
struct net_device *dev,
@@ -22658,9 +22719,5 @@ static struct cfg80211_ops wlan_hdd_cfg80211_ops =
.channel_switch = wlan_hdd_cfg80211_channel_switch,
#endif
-#if defined(WLAN_FEATURE_SAE) && \
- defined(CFG80211_EXTERNAL_AUTH_SUPPORT)
- .external_auth = wlan_hdd_cfg80211_external_auth,
-#endif
};
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
index 43db79440b5a..f8f0da234e4e 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -443,6 +443,7 @@ VOS_STATUS hdd_enter_deep_sleep(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter)
VOS_STATUS hdd_exit_deep_sleep(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter)
{
VOS_STATUS vosStatus;
+ eHalStatus halStatus;
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: calling hdd_set_sme_config",__func__);
@@ -479,8 +480,24 @@ VOS_STATUS hdd_exit_deep_sleep(hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter)
goto err_voss_stop;
}
+
+ //Open a SME session for future operation
+ halStatus = sme_OpenSession( pHddCtx->hHal, hdd_smeRoamCallback, pHddCtx,
+ (tANI_U8 *)&pAdapter->macAddressCurrent,
+ &pAdapter->sessionId);
+ if ( !HAL_STATUS_SUCCESS( halStatus ) )
+ {
+ hddLog(VOS_TRACE_LEVEL_FATAL,"sme_OpenSession() failed with status code %08d [x%08x]",
+ halStatus, halStatus );
+ goto err_voss_stop;
+
+ }
+
pHddCtx->hdd_ps_state = eHDD_SUSPEND_NONE;
+ //Trigger the initial scan
+ hdd_wlan_initial_scan(pAdapter);
+
return VOS_STATUS_SUCCESS;
err_voss_stop:
@@ -1660,7 +1677,6 @@ void hdd_suspend_wlan(void)
pAdapterNode = pNext;
continue;
}
- dev_hold(pAdapter->dev);
/* Avoid multiple enter/exit BMPS in this while loop using
* hdd_enter_bmps flag
*/
@@ -1705,7 +1721,6 @@ void hdd_suspend_wlan(void)
__func__, ret);
}
status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
- dev_put(pAdapter->dev);
pAdapterNode = pNext;
}
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_ftm.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_ftm.c
index 6c1ab43c48de..a1319a2ceb70 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_ftm.c
@@ -3362,6 +3362,15 @@ void wlan_hdd_process_ftm_cmd
cmd_len -= (sizeof(wlan_hdd_ftm_request_t)- sizeof(pRequestBuf->ftmpkt.ftm_cmd_type));
pftm_data = pRequestBuf->ftmpkt.pFtmCmd;
+#ifdef WLAN_WHITE_LIST
+ //Check if the tcmd data for the FTM access is whitelisted
+ if (vos_is_tcmd_data_white_listed(
+ pftm_data, cmd_len) != VOS_STATUS_SUCCESS) {
+ pHddCtx->ftm.pResponseBuf->ftm_err_code = VOS_STATUS_E_PERM;
+ return;
+ }
+#endif
+
hostState = wlan_hdd_process_ftm_host_cmd(pHddCtx, pftm_data);
if (0 == hostState)
{
@@ -3446,6 +3455,43 @@ void wlan_hdd_process_ftm_cmd
return;
} /* wlan_adp_ftm_cmd() */
+
+/**---------------------------------------------------------------------------
+
+ \brief vos_is_tcmd_data_white_listed() -
+
+ This function is used white list the factory commands for user builds
+
+ \param - data - Pointer raw data which needs to be send to FTM.
+ - len - length of the paylod
+
+ \return - 0 for success, non zero for failure
+
+ --------------------------------------------------------------------------*/
+VOS_STATUS vos_is_tcmd_data_white_listed(u_int8_t *data, int len)
+{
+ //_OP_TX = Tx command
+ int iteration = 0;
+ u_int8_t whitelist_read_tx
+ [WLAN_FTM_WHITE_LIST_CMD][WLAN_FTM_WHITE_LIST_BYTE] = {
+ {0x50, 0x30}, /*set RF channel */
+ {0x4F, 0x30}, /*set internal configuration */
+ {0xC9, 0x32}, /*enable scpc mode */
+ {0x81, 0x30}, /*set data rate preamble frame */
+ /*number spacing and playlod */
+ {0x82, 0x30}, /*set Tx Power */
+ {0xA5, 0x30} /*turn on and off Tx */
+ };
+
+ for (iteration = 0; iteration < WLAN_FTM_WHITE_LIST_CMD; ++iteration) {
+ if ((vos_mem_compare(data,
+ &whitelist_read_tx[iteration][0], 2) == VOS_TRUE)) {
+ return VOS_STATUS_SUCCESS;
+ }
+ }
+ return VOS_STATUS_E_PERM;
+}
+
/**---------------------------------------------------------------------------
\brief wlan_ftm_priv_start_stop_ftm() -
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c
index 750edef8b2c5..65084423ffee 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -157,6 +157,7 @@ safeChannelType safeChannels[NUM_20MHZ_RF_CHANNELS] =
};
#endif /* FEATURE_WLAN_CH_AVOID */
+#define MIN_MTU_SIZE 256 // Motorola, IKHSS7-19443, A21623, Hotspot MTU changes
/*---------------------------------------------------------------------------
* Function definitions
*-------------------------------------------------------------------------*/
@@ -174,64 +175,19 @@ safeChannelType safeChannels[NUM_20MHZ_RF_CHANNELS] =
int __hdd_hostapd_open (struct net_device *dev)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_context_t *pHddCtx;
- VOS_STATUS status;
- v_BOOL_t in_standby = TRUE;
- hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
ENTER();
- if (test_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags)) {
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: session already opened for the adapter",
- __func__);
- return 0;
- }
-
- pHddCtx = (hdd_context_t*)pAdapter->pHddCtx;
- MTRACE(vos_trace(VOS_MODULE_ID_HDD, TRACE_CODE_HDD_OPEN_REQUEST,
- pAdapter->sessionId, pAdapter->device_mode));
- if (NULL == pHddCtx)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD context is Null", __func__);
- return -ENODEV;
- }
- status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
- while ( (NULL != pAdapterNode) && (VOS_STATUS_SUCCESS == status) )
- {
- if (test_bit(DEVICE_IFACE_OPENED, &pAdapterNode->pAdapter->event_flags))
- {
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: chip already out of standby",
- __func__);
- in_standby = FALSE;
- break;
- }
- else
- {
- status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
- pAdapterNode = pNext;
- }
- }
-
- if (TRUE == in_standby)
+ if(!test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags))
{
- if (VOS_STATUS_SUCCESS != wlan_hdd_exit_lowpower(pHddCtx, pAdapter))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failed to bring "
- "wlan out of power save", __func__);
- return -EINVAL;
- }
- }
-
- status = hdd_init_ap_mode( pAdapter, false);
- if( VOS_STATUS_SUCCESS != status ) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failed to create session for station mode",
- __func__);
- return -EINVAL;
+ //WMM_INIT OR BSS_START not completed
+ hddLog( LOGW, "Ignore hostadp open request");
+ EXIT();
+ return 0;
}
- set_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags);
-
+ MTRACE(vos_trace(VOS_MODULE_ID_HDD,
+ TRACE_CODE_HDD_HOSTAPD_OPEN_REQUEST, NO_SESSION, 0));
//Turn ON carrier state
netif_carrier_on(dev);
//Enable all Tx queues
@@ -284,14 +240,6 @@ int __hdd_hostapd_stop (struct net_device *dev)
//Turn OFF carrier state
netif_carrier_off(dev);
- if (test_bit(SME_SESSION_OPENED, &adapter->event_flags)) {
- hdd_stop_adapter(hdd_ctx, adapter, VOS_TRUE);
- hdd_deinit_adapter(hdd_ctx, adapter, TRUE);
- }
-
- clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
- adapter->dev->wireless_handlers = NULL;
-
if (!hdd_is_cli_iface_up(hdd_ctx))
sme_ScanFlushResult(hdd_ctx->hHal, 0);
@@ -378,6 +326,12 @@ int hdd_hostapd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
int __hdd_hostapd_change_mtu(struct net_device *dev, int new_mtu)
{
+// Motorola, IKHSS7-19443, A21623, Hotspot MTU changes
+ if ( (new_mtu < MIN_MTU_SIZE) || (new_mtu > IEEE80211_MAX_DATA_LEN - 26) )
+ return EINVAL;
+
+ dev->mtu = new_mtu;
+// End IKHSS7-19443
return 0;
}
@@ -721,10 +675,9 @@ static int hdd_hostapd_ioctl(struct net_device *dev,
static int __hdd_hostapd_set_mac_address(struct net_device *dev, void *addr)
{
struct sockaddr *psta_mac_addr = addr;
- hdd_adapter_t *pAdapter, *adapter_temp;
+ hdd_adapter_t *pAdapter;
hdd_context_t *pHddCtx;
- int ret = 0, i;
- v_MACADDR_t mac_addr;
+ int ret = 0;
ENTER();
pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
@@ -737,49 +690,10 @@ static int __hdd_hostapd_set_mac_address(struct net_device *dev, void *addr)
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
ret = wlan_hdd_validate_context(pHddCtx);
if (0 != ret)
+ {
return ret;
-
-
- memcpy(&mac_addr, psta_mac_addr->sa_data, sizeof(mac_addr));
- if(vos_is_macaddr_zero(&mac_addr)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "Zero Mac address");
- return -EINVAL;
- }
-
- if (vos_is_macaddr_broadcast(&mac_addr)) {
- hddLog(VOS_TRACE_LEVEL_ERROR,"MAC is Broadcast");
- return -EINVAL;
- }
-
- if (vos_is_macaddr_multicast(&mac_addr)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "Multicast Mac address");
- return -EINVAL;
}
-
-
- adapter_temp = hdd_get_adapter_by_macaddr(pHddCtx, mac_addr.bytes);
- if (adapter_temp) {
- if (!strcmp(adapter_temp->dev->name, dev->name))
- return 0;
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WLAN Mac Addr: "
- MAC_ADDRESS_STR, __func__,
- MAC_ADDR_ARRAY(mac_addr.bytes));
- return -EINVAL;
- }
-
- for (i = 0; i < VOS_MAX_CONCURRENCY_PERSONA; i++) {
- if (!vos_mem_compare(&pAdapter->macAddressCurrent.bytes,
- &pHddCtx->cfg_ini->intfMacAddr[i].bytes[0], VOS_MAC_ADDR_SIZE)) {
- memcpy(&pHddCtx->cfg_ini->intfMacAddr[i].bytes[0], mac_addr.bytes,
- VOS_MAC_ADDR_SIZE);
- break;
- }
- }
-
- memcpy(&pAdapter->macAddressCurrent, psta_mac_addr->sa_data, ETH_ALEN);
memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
-
EXIT();
return 0;
}
@@ -1590,8 +1504,6 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
memcpy(wrqu.addr.sa_data, &pSapEvent->sapevt.sapStationDisassocCompleteEvent.staMac,
sizeof(v_MACADDR_t));
hddLog(LOG1, " disassociated "MAC_ADDRESS_STR, MAC_ADDR_ARRAY(wrqu.addr.sa_data));
-
- vos_status = vos_event_set(&pHostapdState->sta_discon_event);
if (pSapEvent->sapevt.sapStationDisassocCompleteEvent.reason == eSAP_USR_INITATED_DISASSOC)
hddLog(LOG1," User initiated disassociation");
else
@@ -1706,15 +1618,14 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
break;
case eSAP_MAX_ASSOC_EXCEEDED:
- snprintf(maxAssocExceededEvent, IW_CUSTOM_MAX, "Peer %02x:%02x:%02x:%02x:%02x:%02x denied"
- " assoc due to Maximum Mobile Hotspot connections reached. Please disconnect"
- " one or more devices to enable the new device connection",
- pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[0],
- pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[1],
- pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[2],
- pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[3],
- pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[4],
- pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[5]);
+ /* Beging Motorola IKHSS7-18970 fpx478, 30/03/2012, nottification to MHS */
+ /* Redefining the Custom Message
+ * IW_CUSTOM_MAX will inform when STA is denied when assoc due to Maximum Mobile
+ * Hotspot connections reached. Please disconnect one or more devices to enable
+ * the new device connection, and we dont require the MAC address of the STA
+ */
+ snprintf(maxAssocExceededEvent, IW_CUSTOM_MAX, "eSAP_MAX_ASSOC_EXCEEDED");
+ /* END IKHSS7-18970 */
we_event = IWEVCUSTOM; /* Discovered a new node (AP mode). */
wrqu.data.pointer = maxAssocExceededEvent;
wrqu.data.length = strlen(maxAssocExceededEvent);
@@ -3357,7 +3268,7 @@ static int __iw_softap_set_trafficmonitor(struct net_device *dev,
union iwreq_data *wrqu, char *extra)
{
hdd_adapter_t *pAdapter;
- int *isSetTrafficMon = (int *)extra;
+ uint8_t *isSetTrafficMon; //IKSWO-89381
hdd_context_t *pHddCtx;
int status;
@@ -3381,12 +3292,16 @@ static int __iw_softap_set_trafficmonitor(struct net_device *dev,
hddLog(VOS_TRACE_LEVEL_INFO, "%s : ", __func__);
- if (NULL == isSetTrafficMon)
- {
- VOS_TRACE(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid SAP pointer from extra", __func__);
- return -ENOMEM;
+ //BEGIN MOT IKSWO-89381
+ isSetTrafficMon = (uint8_t *) kmalloc(wrqu->data.length+1, GFP_KERNEL);
+ if(copy_from_user((uint8_t *) isSetTrafficMon, (uint8_t *)(wrqu->data.pointer), wrqu->data.length)) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s -- copy_from_user --data pointer failed! bailing",
+ __func__);
+ kfree(isSetTrafficMon);
+ return -EFAULT;
}
+ //END MOT IKSWO-89381
if (TRUE == *isSetTrafficMon)
{
@@ -3395,6 +3310,7 @@ static int __iw_softap_set_trafficmonitor(struct net_device *dev,
{
VOS_TRACE( VOS_MODULE_ID_HDD_SOFTAP, VOS_TRACE_LEVEL_ERROR,
"%s: failed to Start Traffic Monitor timer ", __func__ );
+ kfree(isSetTrafficMon); //IKSWO-89381
return -EIO;
}
}
@@ -3405,11 +3321,13 @@ static int __iw_softap_set_trafficmonitor(struct net_device *dev,
{
VOS_TRACE( VOS_MODULE_ID_HDD_SOFTAP, VOS_TRACE_LEVEL_ERROR,
"%s: failed to Stop Traffic Monitor timer ", __func__ );
+ kfree(isSetTrafficMon); //IKSWO-89381
return -EIO;
}
}
+ kfree(isSetTrafficMon); //IKSWO-89381
EXIT();
return 0;
}
@@ -3985,6 +3903,7 @@ int __iw_softap_get_channel_list(struct net_device *dev,
tpChannelListInfo channel_list = (tpChannelListInfo) extra;
eCsrBand curBand = eCSR_BAND_ALL;
hdd_context_t *pHddCtx;
+ tpAniSirGlobal pMac; //IKSWO-79967
int ret = 0;
ENTER();
@@ -4014,6 +3933,7 @@ int __iw_softap_get_channel_list(struct net_device *dev,
hddLog(LOGE,FL("not able get the current frequency band"));
return -EIO;
}
+ pMac = PMAC_STRUCT( hHal ); //IKSWO-79967
wrqu->data.length = sizeof(tChannelListInfo);
ENTER();
@@ -4050,8 +3970,10 @@ int __iw_softap_get_channel_list(struct net_device *dev,
hddLog(LOGE,FL("Failed to get Domain ID, %d"),domainIdCurrentSoftap);
return -EIO;
}
-
- if(REGDOMAIN_FCC == domainIdCurrentSoftap &&
+ //BEGIN IKSWO-79967, check if current country need disable MHS 5G Band1
+ if( (VOS_TRUE == vos_IsDisableMhsBand1CountryCode(pMac->scan.countryCodeCurrent) ||
+ REGDOMAIN_FCC == domainIdCurrentSoftap) &&
+ //END IKSWO-79967
pHddCtx->cfg_ini->gEnableStrictRegulatoryForFCC )
{
for(i = 0; i < temp_num_channels; i++)
@@ -5631,12 +5553,6 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter, bool re_init)
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, ("ERROR: Hostapd HDD vos event init failed!!"));
return status;
}
- status = vos_event_init(&phostapdBuf->sta_discon_event);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR, "ERROR: Hostapd HDD sta disassoc event init failed!!");
- return status;
- }
#ifdef DHCP_SERVER_OFFLOAD
status = vos_event_init(&dhcp_status->vos_event);
if (!VOS_IS_STATUS_SUCCESS(status)) {
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
index cdc9f14dbd02..fa6b458d4497 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
@@ -226,6 +226,7 @@ static vos_wake_lock_t wlan_wake_lock;
/* set when SSR is needed after unload */
static e_hdd_ssr_required isSsrRequired = HDD_SSR_NOT_REQUIRED;
+static struct wake_lock wlan_wake_lock_scan; //Mot IKHSS7-28961: Incorrect empty scan results
//internal function declaration
static VOS_STATUS wlan_hdd_framework_restart(hdd_context_t *pHddCtx);
@@ -307,12 +308,7 @@ static int __hdd_netdev_notifier_call(struct notifier_block * nb,
unsigned long state,
void *ndev)
{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
- struct netdev_notifier_info *info = ndev;
- struct net_device *dev = info->dev;
-#else
struct net_device *dev = ndev;
-#endif
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
#ifdef WLAN_BTAMP_FEATURE
@@ -8065,12 +8061,6 @@ int __hdd_open(struct net_device *dev)
return -ENODEV;
}
- if (test_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags)) {
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: session already opened for the adapter",
- __func__);
- return 0;
- }
-
status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
while ( (NULL != pAdapterNode) && (VOS_STATUS_SUCCESS == status) )
{
@@ -8097,14 +8087,7 @@ int __hdd_open(struct net_device *dev)
return -EINVAL;
}
}
-
- status = hdd_init_station_mode( pAdapter );
- if( VOS_STATUS_SUCCESS != status ) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Failed to create session for station mode",
- __func__);
- return -EINVAL;
- }
-
+
set_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags);
if (hdd_connIsConnected(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter)))
{
@@ -8277,6 +8260,8 @@ int __hdd_stop (struct net_device *dev)
wlan_hdd_stop_mon(pHddCtx, true);
}
+ /* Make sure the interface is marked as closed */
+ clear_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags);
hddLog(VOS_TRACE_LEVEL_INFO, "%s: Disabling OS Tx queues", __func__);
/* Disable TX on the interface, after this hard_start_xmit() will not
@@ -8297,8 +8282,7 @@ int __hdd_stop (struct net_device *dev)
* Notice that the hdd_stop_adapter is requested not to close the session
* That is intentional to be able to scan if it is a STA/P2P interface
*/
- hdd_stop_adapter(pHddCtx, pAdapter, VOS_TRUE);
- clear_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags);
+ hdd_stop_adapter(pHddCtx, pAdapter, VOS_FALSE);
#ifdef FEATURE_WLAN_TDLS
mutex_lock(&pHddCtx->tdls_lock);
#endif
@@ -8351,15 +8335,13 @@ int __hdd_stop (struct net_device *dev)
}
}
- pAdapter->dev->wireless_handlers = NULL;
-
/*
* Upon wifi turn off, DUT has to flush the scan results so if
* this is the last cli iface, flush the scan database.
*/
if (!hdd_is_cli_iface_up(pHddCtx))
sme_ScanFlushResult(pHddCtx->hHal, 0);
-
+
EXIT();
return 0;
}
@@ -8920,11 +8902,10 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName,
static int __hdd_set_mac_address(struct net_device *dev, void *addr)
{
hdd_adapter_t *pAdapter;
- hdd_adapter_t *adapter_temp;
hdd_context_t *pHddCtx;
struct sockaddr *psta_mac_addr = addr;
- int ret = 0, i;
- v_MACADDR_t mac_addr;
+ eHalStatus halStatus = eHAL_STATUS_SUCCESS;
+ int ret = 0;
ENTER();
pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
@@ -8937,47 +8918,15 @@ static int __hdd_set_mac_address(struct net_device *dev, void *addr)
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
ret = wlan_hdd_validate_context(pHddCtx);
if (0 != ret)
+ {
return ret;
-
- memcpy(&mac_addr, psta_mac_addr->sa_data, sizeof(mac_addr));
- if(vos_is_macaddr_zero(&mac_addr)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "Zero Mac address");
- return -EINVAL;
}
- if (vos_is_macaddr_broadcast(&mac_addr)) {
- hddLog(VOS_TRACE_LEVEL_ERROR,"MAC is Broadcast");
- return -EINVAL;
- }
-
- if (vos_is_macaddr_multicast(&mac_addr)) {
- hddLog(VOS_TRACE_LEVEL_ERROR, "Multicast Mac address");
- return -EINVAL;
- }
- adapter_temp = hdd_get_adapter_by_macaddr(pHddCtx, mac_addr.bytes);
- if (adapter_temp) {
- if (!strcmp(adapter_temp->dev->name, dev->name))
- return 0;
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WLAN Mac Addr: "
- MAC_ADDRESS_STR, __func__,
- MAC_ADDR_ARRAY(mac_addr.bytes));
- return -EINVAL;
- }
-
- for (i = 0; i < VOS_MAX_CONCURRENCY_PERSONA; i++) {
- if (!vos_mem_compare(&pAdapter->macAddressCurrent.bytes,
- &pHddCtx->cfg_ini->intfMacAddr[i].bytes[0], VOS_MAC_ADDR_SIZE)) {
- memcpy(&pHddCtx->cfg_ini->intfMacAddr[i].bytes[0], mac_addr.bytes,
- VOS_MAC_ADDR_SIZE);
- break;
- }
- }
memcpy(&pAdapter->macAddressCurrent, psta_mac_addr->sa_data, ETH_ALEN);
memcpy(dev->dev_addr, psta_mac_addr->sa_data, ETH_ALEN);
EXIT();
- return 0;
+ return halStatus;
}
/**---------------------------------------------------------------------------
@@ -9855,6 +9804,9 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
#endif
hdd_initialize_adapter_common(pAdapter);
+ status = hdd_init_station_mode( pAdapter );
+ if( VOS_STATUS_SUCCESS != status )
+ goto err_free_netdev;
status = hdd_register_interface( pAdapter, rtnl_held );
if( VOS_STATUS_SUCCESS != status )
@@ -9911,12 +9863,16 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
pAdapter->device_mode = session_type;
hdd_initialize_adapter_common(pAdapter);
+ status = hdd_init_ap_mode(pAdapter, false);
+ if( VOS_STATUS_SUCCESS != status )
+ goto err_free_netdev;
status = hdd_sta_id_hash_attach(pAdapter);
if (VOS_STATUS_SUCCESS != status)
{
hddLog(VOS_TRACE_LEVEL_FATAL,
FL("failed to attach hash for session %d"), session_type);
+ hdd_deinit_adapter(pHddCtx, pAdapter, rtnl_held);
goto err_free_netdev;
}
@@ -12783,6 +12739,13 @@ end:
hdd_request_put(request);
}
+//Begin Mot IKHSS7-28961 : Incorrect emtpty scan results because of againg out
+void hdd_prevent_suspend_after_scan(long hz)
+{
+ wake_lock_timeout(&wlan_wake_lock_scan, hz);
+}
+//END IKHSS7-28961
+
/**---------------------------------------------------------------------------
\brief hdd_exchange_version_and_caps() - HDD function to exchange version and capability
@@ -14587,6 +14550,7 @@ static int hdd_driver_init( void)
ENTER();
vos_wake_lock_init(&wlan_wake_lock, "wlan");
+ vos_wake_lock_init(&wlan_wake_lock_scan, "wlan_scan"); //Mot IKHSS7-28961: Incorrect empty scan
pr_info("%s: loading driver v%s\n", WLAN_MODULE_NAME,
QWLAN_VERSIONSTR TIMER_MANAGER_STR MEMORY_DEBUG_STR);
@@ -14608,6 +14572,7 @@ static int hdd_driver_init( void)
if (max_retries >= 10) {
hddLog(VOS_TRACE_LEVEL_FATAL,"%s: WCNSS driver not ready", __func__);
vos_wake_lock_destroy(&wlan_wake_lock);
+ vos_wake_lock_destroy(&wlan_wake_lock_scan);
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
wlan_logging_sock_deinit_svc();
#endif
@@ -14680,6 +14645,7 @@ static int hdd_driver_init( void)
vos_mem_exit();
#endif
vos_wake_lock_destroy(&wlan_wake_lock);
+ vos_wake_lock_destroy(&wlan_wake_lock_scan); //Mot IKHSS7-28961: Incorrect empty scan results
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
wlan_logging_sock_deinit_svc();
#endif
@@ -14840,6 +14806,7 @@ static void hdd_driver_exit(void)
done:
vos_wake_lock_destroy(&wlan_wake_lock);
+ vos_wake_lock_destroy(&wlan_wake_lock_scan); //Mot IKHSS7-28961: Incorrect empty scan results
pr_info("%s: driver unloaded\n", WLAN_MODULE_NAME);
}
@@ -15193,6 +15160,27 @@ wlan_hdd_is_GO_power_collapse_allowed (hdd_context_t* pHddCtx)
return FALSE;
}
+
+// BEGIN MOTOROLA IKJB42MAIN-274, dpn473, 01/02/2013, Add flag to disable/enable MCC mode
+v_U8_t hdd_get_mcc_mode( void )
+{
+ v_CONTEXT_t pVosContext = vos_get_global_context( VOS_MODULE_ID_HDD, NULL );
+ hdd_context_t *pHddCtx;
+
+ if (NULL != pVosContext)
+ {
+ pHddCtx = vos_get_context( VOS_MODULE_ID_HDD, pVosContext);
+ if (NULL != pHddCtx)
+ {
+ return (v_U8_t)pHddCtx->cfg_ini->enableMCC;
+ }
+ }
+ /* we are in an invalid state :( */
+ hddLog(LOGE, "%s: Invalid context", __func__);
+ return (v_U8_t)0;
+}
+// END IKJB42MAIN-274
+
/* Decide whether to allow/not the apps power collapse.
* Allow apps power collapse if we are in connected state.
* if not, allow only if we are in IMPS */
@@ -15841,8 +15829,7 @@ v_U8_t hdd_is_fw_logging_enabled(void)
pHddCtx = vos_get_context(VOS_MODULE_ID_HDD,
vos_get_global_context(VOS_MODULE_ID_HDD, NULL));
- return (pHddCtx && pHddCtx->cfg_ini->wlanLoggingEnable &&
- pHddCtx->cfg_ini->enableMgmtLogging);
+ return (pHddCtx && pHddCtx->cfg_ini->enableMgmtLogging);
}
/*
@@ -15855,10 +15842,8 @@ v_U8_t hdd_is_fw_ev_logging_enabled(void)
pHddCtx = vos_get_context(VOS_MODULE_ID_HDD,
vos_get_global_context(VOS_MODULE_ID_HDD, NULL));
- return (pHddCtx && pHddCtx->cfg_ini->wlanLoggingEnable &&
- pHddCtx->cfg_ini->enableFWLogging);
+ return (pHddCtx && pHddCtx->cfg_ini->enableFWLogging);
}
-
/*
* API to find if there is any session connected
*/
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c
index 3b1b38f418c7..90d98da8ce89 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_p2p.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1289,7 +1289,6 @@ int __wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
uint8_t home_ch = 0;
#endif
- eHalStatus hal_status;
ENTER();
@@ -1314,18 +1313,6 @@ int __wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,
hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d type: %d",
__func__, pAdapter->device_mode, type);
- /* When frame to be transmitted is auth mgmt, then trigger
- * sme_send_mgmt_tx to send auth frame.
- */
- if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) &&
- (type == SIR_MAC_MGMT_FRAME && subType == SIR_MAC_MGMT_AUTH)) {
- hal_status = sme_send_mgmt_tx(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId, buf, len);
- if (HAL_STATUS_SUCCESS(hal_status))
- return 0;
- else
- return -EINVAL;
- }
if ((type == SIR_MAC_MGMT_FRAME) &&
(subType == SIR_MAC_MGMT_ACTION) &&
@@ -2560,7 +2547,6 @@ hdd_delete_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
{
wlan_hdd_release_intf_addr(hdd_ctx, adapter->macAddressCurrent.bytes);
hdd_stop_adapter(hdd_ctx, adapter, VOS_TRUE);
- hdd_deinit_adapter(hdd_ctx, adapter, TRUE);
hdd_close_adapter(hdd_ctx, adapter, rtnl_held);
}
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
index 1bb4e182d3c9..8d7374894c67 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
@@ -4134,6 +4134,13 @@ static int __iw_set_priv(struct net_device *dev,
hddLog( VOS_TRACE_LEVEL_INFO, "pnoforce");
/*TODO: support pnoforce*/
}
+ else if( strncasecmp(cmd, "pno",3) == 0 ) {
+
+ hddLog( VOS_TRACE_LEVEL_INFO, "pno");
+ vos_status = iw_set_pno(dev, info, wrqu, cmd, 3);
+ kfree(cmd);
+ return (vos_status == VOS_STATUS_SUCCESS) ? 0 : -EINVAL;
+ }
else if( strncasecmp(cmd, "rssifilter",10) == 0 ) {
hddLog( VOS_TRACE_LEVEL_INFO, "rssifilter");
vos_status = iw_set_rssi_filter(dev, info, wrqu, cmd, 10);
@@ -9721,6 +9728,426 @@ static int iw_get_statistics(struct net_device *dev,
return ret;
}
#ifdef FEATURE_WLAN_SCAN_PNO
+
+/*Max Len for PNO notification*/
+#define MAX_PNO_NOTIFY_LEN 100
+void found_pref_network_cb (void *callbackContext,
+ tSirPrefNetworkFoundInd *pPrefNetworkFoundInd)
+{
+ hdd_adapter_t* pAdapter = (hdd_adapter_t*)callbackContext;
+ union iwreq_data wrqu;
+ char buf[MAX_PNO_NOTIFY_LEN+1];
+
+ hddLog(VOS_TRACE_LEVEL_WARN, "A preferred network was found: %s with rssi: -%d",
+ pPrefNetworkFoundInd->ssId.ssId, pPrefNetworkFoundInd->rssi);
+
+ // create the event
+ memset(&wrqu, 0, sizeof(wrqu));
+ memset(buf, 0, sizeof(buf));
+
+ snprintf(buf, MAX_PNO_NOTIFY_LEN, "QCOM: Found preferred network: %s with RSSI of -%u",
+ pPrefNetworkFoundInd->ssId.ssId,
+ (unsigned int)pPrefNetworkFoundInd->rssi);
+
+ wrqu.data.pointer = buf;
+ wrqu.data.length = strlen(buf);
+
+ // send the event
+
+ wireless_send_event(pAdapter->dev, IWEVCUSTOM, &wrqu, buf);
+
+}
+
+
+/*string based input*/
+VOS_STATUS iw_set_pno(struct net_device *dev, struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra, int nOffset)
+{
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ /* pnoRequest is a large struct, so we make it static to avoid stack
+ overflow. This API is only invoked via ioctl, so it is
+ serialized by the kernel rtnl_lock and hence does not need to be
+ reentrant */
+ tSirPNOScanReq pnoRequest = {0};
+ char *ptr, *data;
+ v_U8_t i,j, ucParams, ucMode;
+ size_t len;
+ eHalStatus status = eHAL_STATUS_FAILURE;
+ /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "PNO data len %d data %s",
+ wrqu->data.length,
+ extra);
+
+ if (wrqu->data.length <= nOffset )
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN, "PNO input is not correct");
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ pnoRequest.enable = 0;
+ pnoRequest.ucNetworksCount = 0;
+ /*-----------------------------------------------------------------------
+ Input is string based and expected to be like this:
+
+ <enabled> <netw_count>
+ for each network:
+ <ssid_len> <ssid> <authentication> <encryption>
+ <ch_num> <channel_list optional> <bcast_type> <rssi_threshold>
+ <scan_timers> <scan_time> <scan_repeat> <scan_time> <scan_repeat>
+
+ e.g:
+ 1 2 4 test 0 0 3 1 6 11 2 40 5 test2 4 4 6 1 2 3 4 5 6 1 0 2 5 2 300 0
+
+ this translates into:
+ -----------------------------
+ enable PNO
+ look for 2 networks:
+ test - with authentication type 0 and encryption type 0,
+ that can be found on 3 channels: 1 6 and 11 ,
+ SSID bcast type is unknown (directed probe will be sent if AP not found)
+ and must meet -40dBm RSSI
+
+ test2 - with auth and enrytption type 4/4
+ that can be found on 6 channels 1, 2, 3, 4, 5 and 6
+ bcast type is non-bcast (directed probe will be sent)
+ and must not meet any RSSI threshold
+
+ scan every 5 seconds 2 times, scan every 300 seconds until stopped
+ -----------------------------------------------------------------------*/
+
+ /* making sure argument string ends with '\0' */
+ len = (wrqu->data.length-nOffset) + 1;
+ data = vos_mem_malloc(len);
+ if (NULL == data) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ FL("fail to allocate memory %zu"), len);
+ return -EINVAL;
+ }
+ vos_mem_zero(data, len);
+ vos_mem_copy(data, &extra[nOffset], (len-1));
+ ptr = data;
+
+ if (1 != sscanf(ptr," %hhu%n", &(pnoRequest.enable), &nOffset))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "PNO enable input is not valid %s",ptr);
+ vos_mem_free(data);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ if ( 0 == pnoRequest.enable )
+ {
+ /*Disable PNO*/
+ memset(&pnoRequest, 0, sizeof(pnoRequest));
+ status = sme_SetPreferredNetworkList(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ &pnoRequest,
+ pAdapter->sessionId,
+ found_pref_network_cb, pAdapter);
+ if (eHAL_STATUS_SUCCESS != status)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: failed to disable PNO", __func__);
+ vos_mem_free(data);
+ return VOS_STATUS_E_FAILURE;
+ }
+ pHddCtx->isPnoEnable = FALSE;
+ vos_mem_free(data);
+ return VOS_STATUS_SUCCESS;
+ }
+
+ if (TRUE == pHddCtx->isPnoEnable)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
+ FL("already PNO is enabled"));
+ vos_mem_free(data);
+ return -EBUSY;
+ }
+ pHddCtx->isPnoEnable = TRUE;
+
+ ptr += nOffset;
+
+ if (1 != sscanf(ptr," %hhu %n", &(pnoRequest.ucNetworksCount), &nOffset))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "PNO count input not valid %s",ptr);
+ goto error;
+ }
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "PNO enable %d networks count %d offset %d",
+ pnoRequest.enable,
+ pnoRequest.ucNetworksCount,
+ nOffset);
+
+ /* Parameters checking:
+ ucNetworksCount has to be larger than 0*/
+ if (( 0 == pnoRequest.ucNetworksCount ) ||
+ ( pnoRequest.ucNetworksCount > SIR_PNO_MAX_SUPP_NETWORKS ))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN, "Network input is not correct");
+ goto error;
+ }
+
+ ptr += nOffset;
+
+ pnoRequest.aNetworks =
+ vos_mem_malloc(sizeof(tSirNetworkType)*pnoRequest.ucNetworksCount);
+ if (pnoRequest.aNetworks == NULL)
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("failed to allocate memory aNetworks %u"),
+ (uint32)sizeof(tSirNetworkType)*pnoRequest.ucNetworksCount);
+ goto error;
+ }
+ vos_mem_zero(pnoRequest.aNetworks,
+ sizeof(tSirNetworkType)*pnoRequest.ucNetworksCount);
+
+ for ( i = 0; i < pnoRequest.ucNetworksCount; i++ )
+ {
+
+ pnoRequest.aNetworks[i].ssId.length = 0;
+
+ ucParams = sscanf(ptr," %hhu %n",
+ &(pnoRequest.aNetworks[i].ssId.length),&nOffset);
+
+ if (1 != ucParams)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "PNO ssid length input is not valid %s",ptr);
+ goto error;
+ }
+
+ if (( 0 == pnoRequest.aNetworks[i].ssId.length ) ||
+ ( pnoRequest.aNetworks[i].ssId.length > 32 ) )
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "SSID Len %d is not correct for network %d",
+ pnoRequest.aNetworks[i].ssId.length, i);
+ goto error;
+ }
+
+ /*Advance to SSID*/
+ ptr += nOffset;
+
+ memcpy(pnoRequest.aNetworks[i].ssId.ssId, ptr,
+ pnoRequest.aNetworks[i].ssId.length);
+ ptr += pnoRequest.aNetworks[i].ssId.length;
+
+ ucParams = sscanf(ptr," %u %u %hhu %n",
+ &(pnoRequest.aNetworks[i].authentication),
+ &(pnoRequest.aNetworks[i].encryption),
+ &(pnoRequest.aNetworks[i].ucChannelCount),
+ &nOffset);
+
+ if ( 3 != ucParams )
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
+ "Incorrect cmd %s",ptr);
+ goto error;
+ }
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "PNO len %d ssid 0x%08x%08x%08x%08x%08x%08x%08x%08x"
+ "auth %d encry %d channel count %d offset %d",
+ pnoRequest.aNetworks[i].ssId.length,
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[0]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[4]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[8]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[12]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[16]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[20]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[24]),
+ *((v_U32_t *) &pnoRequest.aNetworks[i].ssId.ssId[28]),
+ pnoRequest.aNetworks[i].authentication,
+ pnoRequest.aNetworks[i].encryption,
+ pnoRequest.aNetworks[i].ucChannelCount,
+ nOffset );
+
+ /*Advance to channel list*/
+ ptr += nOffset;
+
+ if (SIR_PNO_MAX_NETW_CHANNELS < pnoRequest.aNetworks[i].ucChannelCount)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
+ "Incorrect number of channels");
+ goto error;
+ }
+
+ if ( 0 != pnoRequest.aNetworks[i].ucChannelCount)
+ {
+ for ( j = 0; j < pnoRequest.aNetworks[i].ucChannelCount; j++)
+ {
+ if (1 != sscanf(ptr," %hhu %n",
+ &(pnoRequest.aNetworks[i].aChannels[j]),
+ &nOffset))
+ { VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "PNO network channel input is not valid %s",ptr);
+ goto error;
+ }
+ if (!IS_CHANNEL_VALID(pnoRequest.aNetworks[i].aChannels[j])) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ FL("invalid channel: %hhu"),
+ pnoRequest.aNetworks[i].aChannels[j]);
+ goto error;
+ }
+
+ /*Advance to next channel number*/
+ ptr += nOffset;
+ }
+ }
+
+ if (1 != sscanf(ptr," %u %n",
+ &(pnoRequest.aNetworks[i].bcastNetwType),
+ &nOffset))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "PNO broadcast network type input is not valid %s",ptr);
+ goto error;
+ }
+ if (pnoRequest.aNetworks[i].bcastNetwType > 2) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ FL("invalid bcast nw type: %u"),
+ pnoRequest.aNetworks[i].bcastNetwType);
+ goto error;
+ }
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "PNO bcastNetwType %d offset %d",
+ pnoRequest.aNetworks[i].bcastNetwType,
+ nOffset );
+
+ /*Advance to rssi Threshold*/
+ ptr += nOffset;
+
+ if (1 != sscanf(ptr," %hhu %n",
+ &(pnoRequest.aNetworks[i].rssiThreshold),
+ &nOffset))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "PNO rssi threshold input is not valid %s",ptr);
+ goto error;
+ }
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "PNO rssi %d offset %d",
+ pnoRequest.aNetworks[i].rssiThreshold,
+ nOffset );
+ /*Advance to next network*/
+ ptr += nOffset;
+ }/*For ucNetworkCount*/
+
+ ucParams = sscanf(ptr," %hhu %n",
+ &(pnoRequest.scanTimers.ucScanTimersCount),
+ &nOffset);
+
+ /*Read the scan timers*/
+ if (( 1 == ucParams ) && ( pnoRequest.scanTimers.ucScanTimersCount > 0 ))
+ {
+ ptr += nOffset;
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "Scan timer count %d offset %d",
+ pnoRequest.scanTimers.ucScanTimersCount,
+ nOffset );
+
+ if ( SIR_PNO_MAX_SCAN_TIMERS < pnoRequest.scanTimers.ucScanTimersCount )
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Incorrect cmd - too many scan timers");
+ goto error;
+ }
+
+ for ( i = 0; i < pnoRequest.scanTimers.ucScanTimersCount; i++ )
+ {
+ ucParams = sscanf(ptr," %u %u %n",
+ &(pnoRequest.scanTimers.aTimerValues[i].uTimerValue),
+ &( pnoRequest.scanTimers.aTimerValues[i].uTimerRepeat),
+ &nOffset);
+
+ if (2 != ucParams)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Incorrect cmd - diff params then expected %d", ucParams);
+ goto error;
+ }
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "PNO Timer value %d Timer repeat %d offset %d",
+ pnoRequest.scanTimers.aTimerValues[i].uTimerValue,
+ pnoRequest.scanTimers.aTimerValues[i].uTimerRepeat,
+ nOffset );
+
+ ptr += nOffset;
+ }
+
+ }
+ else
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "No scan timers provided param count %d scan timers %d",
+ ucParams, pnoRequest.scanTimers.ucScanTimersCount );
+
+ /*Scan timers defaults to 5 minutes*/
+ pnoRequest.scanTimers.ucScanTimersCount = 1;
+ pnoRequest.scanTimers.aTimerValues[0].uTimerValue = 60;
+ pnoRequest.scanTimers.aTimerValues[0].uTimerRepeat = 0;
+ }
+
+ ucParams = sscanf(ptr," %hhu %n",&(ucMode), &nOffset);
+
+ pnoRequest.modePNO = ucMode;
+ /*for LA we just expose suspend option*/
+ if (( 1 != ucParams )||( ucMode >= SIR_PNO_MODE_MAX ))
+ {
+ pnoRequest.modePNO = SIR_PNO_MODE_ON_SUSPEND;
+ }
+ pnoRequest.p24GProbeTemplate = vos_mem_malloc(SIR_PNO_MAX_PB_REQ_SIZE);
+ if (pnoRequest.p24GProbeTemplate == NULL){
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("failed to allocate memory p24GProbeTemplate %u"),
+ SIR_PNO_MAX_PB_REQ_SIZE);
+ goto error;
+ }
+
+ pnoRequest.p5GProbeTemplate = vos_mem_malloc(SIR_PNO_MAX_PB_REQ_SIZE);
+ if (pnoRequest.p5GProbeTemplate == NULL){
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ FL("failed to allocate memory p5GProbeTemplate %u"),
+ SIR_PNO_MAX_PB_REQ_SIZE);
+ goto error;
+ }
+
+ vos_mem_zero(pnoRequest.p24GProbeTemplate, SIR_PNO_MAX_PB_REQ_SIZE);
+ vos_mem_zero(pnoRequest.p5GProbeTemplate, SIR_PNO_MAX_PB_REQ_SIZE);
+
+ status = sme_SetPreferredNetworkList(WLAN_HDD_GET_HAL_CTX(pAdapter), &pnoRequest,
+ pAdapter->sessionId,
+ found_pref_network_cb, pAdapter);
+ if (eHAL_STATUS_SUCCESS == status)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "%s: PNO enabled", __func__);
+ vos_mem_free(data);
+ return VOS_STATUS_SUCCESS;
+ }
+error:
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Failed to enable PNO", __func__);
+ pHddCtx->isPnoEnable = FALSE;
+ if (pnoRequest.aNetworks)
+ vos_mem_free(pnoRequest.aNetworks);
+ if (pnoRequest.p24GProbeTemplate)
+ vos_mem_free(pnoRequest.p24GProbeTemplate);
+ if (pnoRequest.p5GProbeTemplate)
+ vos_mem_free(pnoRequest.p5GProbeTemplate);
+
+ vos_mem_free(data);
+ return VOS_STATUS_E_FAILURE;
+}/*iw_set_pno*/
+
VOS_STATUS iw_set_rssi_filter(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra, int nOffset)
{
@@ -9741,6 +10168,55 @@ VOS_STATUS iw_set_rssi_filter(struct net_device *dev, struct iw_request_info *in
sme_SetRSSIFilter(WLAN_HDD_GET_HAL_CTX(pAdapter), rssiThreshold);
return VOS_STATUS_SUCCESS;
}
+
+
+static int __iw_set_pno_priv(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ hdd_adapter_t *pAdapter;
+ hdd_context_t *pHddCtx;
+ int ret = 0;
+ VOS_STATUS status;
+
+ ENTER();
+ pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ if (NULL == pAdapter)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Adapter is NULL",__func__);
+ return -EINVAL;
+ }
+
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret)
+ {
+ return ret;
+ }
+
+
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
+ "Set PNO Private");
+
+ status = iw_set_pno(dev,info,wrqu,extra,0);
+
+ EXIT();
+ return status;
+}
+
+static int iw_set_pno_priv(struct net_device *dev,
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
+{
+ int ret;
+
+ vos_ssr_protect(__func__);
+ ret = __iw_set_pno_priv(dev, info, wrqu, extra);
+ vos_ssr_unprotect(__func__);
+
+ return ret;
+}
#endif /*FEATURE_WLAN_SCAN_PNO*/
//Common function to SetBand
@@ -10507,6 +10983,10 @@ static const iw_handler we_private[] = {
,
[WLAN_SET_PACKET_FILTER_PARAMS - SIOCIWFIRSTPRIV] = iw_set_packet_filter_params
#endif
+#ifdef FEATURE_WLAN_SCAN_PNO
+ ,
+ [WLAN_SET_PNO - SIOCIWFIRSTPRIV] = iw_set_pno_priv
+#endif
,
[WLAN_SET_BAND_CONFIG - SIOCIWFIRSTPRIV] = iw_set_band_config,
[WLAN_PRIV_SET_MCBC_FILTER - SIOCIWFIRSTPRIV] = iw_set_dynamic_mcbc_filter,
diff --git a/drivers/staging/prima/CORE/MAC/inc/aniGlobal.h b/drivers/staging/prima/CORE/MAC/inc/aniGlobal.h
index 87153886c174..db919d587020 100644
--- a/drivers/staging/prima/CORE/MAC/inc/aniGlobal.h
+++ b/drivers/staging/prima/CORE/MAC/inc/aniGlobal.h
@@ -244,8 +244,6 @@ typedef struct sLimTimers
*/
TX_TIMER gLimActiveToPassiveChannelTimer;
TX_TIMER g_lim_ap_ecsa_timer;
- /* SAE authentication related timer */
- TX_TIMER sae_auth_timer;
//********************TIMER SECTION ENDS**************************************************
// ALL THE FIELDS BELOW THIS CAN BE ZEROED OUT in limInitialize
//****************************************************************************************
diff --git a/drivers/staging/prima/CORE/MAC/inc/aniSystemDefs.h b/drivers/staging/prima/CORE/MAC/inc/aniSystemDefs.h
index 3594ef35a3a0..0eb1cce4205b 100644
--- a/drivers/staging/prima/CORE/MAC/inc/aniSystemDefs.h
+++ b/drivers/staging/prima/CORE/MAC/inc/aniSystemDefs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2014, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -84,8 +84,6 @@ typedef enum eAniAuthType
#if defined WLAN_FEATURE_VOWIFI_11R
eSIR_FT_AUTH,
#endif
- eSIR_AUTH_TYPE_SAE = 3,
- eSIR_AUTH_TYPE_OWE = 4,
#if defined FEATURE_WLAN_ESE
eSIR_LEAP_AUTH = 0x80,
#endif
diff --git a/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h b/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
index 848bf424833a..07a6af758a88 100644
--- a/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
+++ b/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
@@ -46,6 +46,6 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_BUILD 85
-#define QWLAN_VERSIONSTR "3.0.11.85.9"
+#define QWLAN_VERSIONSTR "3.0.11.85"
#endif /* QWLAN_VERSION_H */
diff --git a/drivers/staging/prima/CORE/MAC/inc/sirApi.h b/drivers/staging/prima/CORE/MAC/inc/sirApi.h
index 768c9890c789..4f7e7db790e2 100644
--- a/drivers/staging/prima/CORE/MAC/inc/sirApi.h
+++ b/drivers/staging/prima/CORE/MAC/inc/sirApi.h
@@ -149,8 +149,6 @@ typedef tANI_U8 tSirVersionString[SIR_VERSION_STRING_LEN];
#define PERIODIC_TX_PTRN_MAX_SIZE 1536
#define MAXNUM_PERIODIC_TX_PTRNS 6
-/* Cache ID length */
-#define CACHE_ID_LEN 2
#ifdef WLAN_FEATURE_EXTSCAN
@@ -1079,7 +1077,6 @@ 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.
@@ -6452,33 +6449,4 @@ struct sir_feature_caps_params {
void *user_data;
};
-/**
- * struct sae_info - SAE info used for commit/confirm messages
- * @msg_type: Message type
- * @msg_len: length of message
- * @vdev_id: vdev id
- * @peer_mac_addr: peer MAC address
- * @ssid: SSID
- */
-struct sir_sae_info {
- uint16_t msg_type;
- uint16_t msg_len;
- uint32_t vdev_id;
- v_MACADDR_t peer_mac_addr;
- tSirMacSSid ssid;
-};
-
-/**
- * struct sir_sae_msg - SAE msg used for message posting
- * @message_type: message type
- * @length: message length
- * @session_id: SME session id
- * @sae_status: SAE status, 0: Success, Non-zero: Failure.
- */
-struct sir_sae_msg {
- uint16_t message_type;
- uint16_t length;
- uint16_t session_id;
- uint8_t sae_status;
-};
#endif /* __SIR_API_H */
diff --git a/drivers/staging/prima/CORE/MAC/inc/sirMacProtDef.h b/drivers/staging/prima/CORE/MAC/inc/sirMacProtDef.h
index 02c94d23ec48..ac66b75dab65 100644
--- a/drivers/staging/prima/CORE/MAC/inc/sirMacProtDef.h
+++ b/drivers/staging/prima/CORE/MAC/inc/sirMacProtDef.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2016, 2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -463,9 +463,6 @@
#define SIR_MAC_OUI_VERSION_1 1
-/* OWE DH Parameter element https://tools.ietf.org/html/rfc8110 */
-#define SIR_DH_PARAMETER_ELEMENT_EXT_EID 32
-
// OUI and type definition for WPA IE in network byte order
#define SIR_MAC_WPA_OUI 0x01F25000
#define SIR_MAC_WME_OUI 0x02F25000
diff --git a/drivers/staging/prima/CORE/MAC/inc/wniApi.h b/drivers/staging/prima/CORE/MAC/inc/wniApi.h
index 67839ebea3f6..0ea1e5c8a5a4 100644
--- a/drivers/staging/prima/CORE/MAC/inc/wniApi.h
+++ b/drivers/staging/prima/CORE/MAC/inc/wniApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013, 2016-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2013, 2016-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -401,9 +401,6 @@ enum eWniMsgTypes
eWNI_SME_ECSA_CHAN_CHANGE_REQ,
eWNI_SME_ECSA_CHAN_CHANGE_RSP,
eWNI_SME_STA_DEL_BA_REQ,
- eWNI_SME_TRIGGER_SAE,
- eWNI_SME_SEND_MGMT_FRAME_TX,
- eWNI_SME_SEND_SAE_MSG,
eWNI_SME_MSG_TYPES_END
};
diff --git a/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/dot11f.frms b/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/dot11f.frms
index 394ef8858e5f..179b95c093dd 100644
--- a/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/dot11f.frms
+++ b/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/dot11f.frms
@@ -120,22 +120,6 @@ const EID_EXT_CAP = 127;
const EID_OPERATING_MODE = 199;
const EID_WIDER_BW_CHANNEL_SWITCH_ANN= 194;
const EID_VENDOR_SPECIFIC = 221;
-/**
- * Extended Element ID
- *
- * As part of IEEE-802.11-2016 spec, extended element ID is introduced(9.4.2.1)
- * Elements are defined to have a common general format consisting of a 1 octet
- * Element ID field, a 1 octet Length field, an optional 1 octet Element ID
- * Extension field, and a variable-length element-specific Information field.
- * Each element is identified by the contents of the Element ID and, when
- * present, Element ID Extension fields as defined in this standard. An Extended
- * Element ID is a combination of an Element ID and an Element ID Extension for
- * those elements that have a defined Element ID Extension. The Length field
- * specifies the number of octets following the Length field. The presence of
- * the Element ID Extension field is determined by the Element ID field having
- * value of 255
- */
-const EID_EXTN_ID_ELEMENT = 255;
const SIR_MAC_PROP_EXT_RATES_TYPE = 0;
const SIR_MAC_PROP_AP_NAME_TYPE = 1;
@@ -2906,11 +2890,6 @@ CONTAINERIE RICDataDesc
OPTIE WMMSchedule;
}
-IE dh_parameter_element (EID_EXTN_ID_ELEMENT) OUI ( 0x20 )
-{
- group[2];
- public_key[0..255];
-}
/////////////////////////////////////////////////////////////////////////////
// MULTIIEs //
/////////////////////////////////////////////////////////////////////////////
@@ -3560,7 +3539,6 @@ FRAME AssocRequest // 7.2.3.4
OPTIE QOSCapsStation;
OPTIE RRMEnabledCap;
OPTIE MobilityDomain;
- OPTIE dh_parameter_element;
OPTIE WPAOpaque;
OPTIE HTCaps;
OPTIE WMMCaps;
diff --git a/drivers/staging/prima/CORE/MAC/src/include/dot11f.h b/drivers/staging/prima/CORE/MAC/src/include/dot11f.h
index 81d072cd91f9..25085dd83b5f 100644
--- a/drivers/staging/prima/CORE/MAC/src/include/dot11f.h
+++ b/drivers/staging/prima/CORE/MAC/src/include/dot11f.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -32,7 +32,7 @@
* \brief Structures, function prototypes & definitions
* for working with 802.11 Frames
* This file was automatically generated by 'framesc'
- * Mon Jul 22 17:48:28 2019 from the following file(s):
+ * Tue Aug 28 09:50:49 2018 from the following file(s):
*
* dot11f.frms
*
@@ -6191,33 +6191,6 @@ tANI_U32 dot11fGetPackedIEWscReassocRes(tpAniSirGlobal, tDot11fIEWscReassocRes*,
#ifdef __cplusplus
}; /* End extern "C". */
#endif /* C++ */
-// EID 255 (0xff) Extended EID 32 (0x20)
-typedef struct sDot11fIEdh_parameter_element {
- tANI_U8 present;
- tANI_U8 group[2];
- tANI_U8 num_public_key;
- tANI_U8 public_key[255];
-} tDot11fIEdh_parameter_element;
-
-#define DOT11F_EID_DH_PARAMETER_ELEMENT ( 255 )
-
-// N.B. These #defines do *not* include the EID & length
-#define DOT11F_IE_DH_PARAMETER_ELEMENT_MIN_LEN ( 2 )
-
-#define DOT11F_IE_DH_PARAMETER_ELEMENT_MAX_LEN ( 257 )
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* C++ */
-tANI_U32 dot11fUnpackIedh_parameter_element(tpAniSirGlobal, tANI_U8*,tANI_U8, tDot11fIEdh_parameter_element*);
-
-tANI_U32 dot11fPackIedh_parameter_element(tpAniSirGlobal, tDot11fIEdh_parameter_element*, tANI_U8*, tANI_U32, tANI_U32*);
-
-tANI_U32 dot11fGetPackedIEdh_parameter_element(tpAniSirGlobal, tDot11fIEdh_parameter_element*, tANI_U32*);
-
-#ifdef __cplusplus
-}; /* End extern "C". */
-#endif /* C++ */
// EID 60 (0x3c)
typedef struct sDot11fIEext_chan_switch_ann {
tANI_U8 present;
@@ -6424,34 +6397,33 @@ tANI_U32 dot11fGetPackedAddTSResponseSize(tpAniSirGlobal pCtx, tDot11fAddTSRespo
#endif /* C++ */
typedef struct sDot11fAssocRequest{
- tDot11fFfCapabilities Capabilities;
- tDot11fFfListenInterval ListenInterval;
- tDot11fIESSID SSID;
- tDot11fIESuppRates SuppRates;
- tDot11fIEExtSuppRates ExtSuppRates;
- tDot11fIEPowerCaps PowerCaps;
- tDot11fIESuppChannels SuppChannels;
- tDot11fIERSNOpaque RSNOpaque;
- tDot11fIEQOSCapsStation QOSCapsStation;
- tDot11fIERRMEnabledCap RRMEnabledCap;
- tDot11fIEMobilityDomain MobilityDomain;
- tDot11fIEdh_parameter_element dh_parameter_element;
- tDot11fIEWPAOpaque WPAOpaque;
- tDot11fIEHTCaps HTCaps;
- tDot11fIEWMMCaps WMMCaps;
- tDot11fIEWMMInfoStation WMMInfoStation;
- tDot11fIEAirgo Airgo;
- tDot11fIEWscIEOpaque WscIEOpaque;
- tDot11fIEWAPIOpaque WAPIOpaque;
- tDot11fIEESERadMgmtCap ESERadMgmtCap;
- tDot11fIEESEVersion ESEVersion;
- tDot11fIEP2PIEOpaque P2PIEOpaque;
- tDot11fIEWFDIEOpaque WFDIEOpaque;
- tDot11fIEVHTCaps VHTCaps;
- tDot11fIEExtCap ExtCap;
- tDot11fIEOperatingMode OperatingMode;
- tDot11fIEQosMapSet QosMapSet;
- tDot11fIEhs20vendor_ie hs20vendor_ie;
+ tDot11fFfCapabilities Capabilities;
+ tDot11fFfListenInterval ListenInterval;
+ tDot11fIESSID SSID;
+ tDot11fIESuppRates SuppRates;
+ tDot11fIEExtSuppRates ExtSuppRates;
+ tDot11fIEPowerCaps PowerCaps;
+ tDot11fIESuppChannels SuppChannels;
+ tDot11fIERSNOpaque RSNOpaque;
+ tDot11fIEQOSCapsStation QOSCapsStation;
+ tDot11fIERRMEnabledCap RRMEnabledCap;
+ tDot11fIEMobilityDomain MobilityDomain;
+ tDot11fIEWPAOpaque WPAOpaque;
+ tDot11fIEHTCaps HTCaps;
+ tDot11fIEWMMCaps WMMCaps;
+ tDot11fIEWMMInfoStation WMMInfoStation;
+ tDot11fIEAirgo Airgo;
+ tDot11fIEWscIEOpaque WscIEOpaque;
+ tDot11fIEWAPIOpaque WAPIOpaque;
+ tDot11fIEESERadMgmtCap ESERadMgmtCap;
+ tDot11fIEESEVersion ESEVersion;
+ tDot11fIEP2PIEOpaque P2PIEOpaque;
+ tDot11fIEWFDIEOpaque WFDIEOpaque;
+ tDot11fIEVHTCaps VHTCaps;
+ tDot11fIEExtCap ExtCap;
+ tDot11fIEOperatingMode OperatingMode;
+ tDot11fIEQosMapSet QosMapSet;
+ tDot11fIEhs20vendor_ie hs20vendor_ie;
} tDot11fAssocRequest;
#define DOT11F_ASSOCREQUEST ( 5 )
diff --git a/drivers/staging/prima/CORE/MAC/src/include/sirParams.h b/drivers/staging/prima/CORE/MAC/src/include/sirParams.h
index fd792ed89c51..497323c1f175 100644
--- a/drivers/staging/prima/CORE/MAC/src/include/sirParams.h
+++ b/drivers/staging/prima/CORE/MAC/src/include/sirParams.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -266,20 +266,6 @@ typedef struct sSirMbMsgP2p
tANI_U32 data[1];
} tSirMbMsgP2p, *tpSirMbMsgP2p;
-/**
- * struct sir_mgmt_msg - Structure used to send auth frame from CSR to LIM
- * @type: Message type
- * @msg_len: Message length
- * @session_id: session id
- * @data: Pointer to data tobe transmitted
- */
-struct sir_mgmt_msg {
- uint16_t type;
- uint16_t msg_len;
- uint8_t session_id;
- uint8_t *data;
-};
-
/// Message queue definitions
// msgtype(2bytes) reserved(2bytes) bodyptr(4bytes) bodyval(4bytes)
// NOTE tSirMsgQ should be always multiples of WORD(4Bytes)
@@ -927,7 +913,6 @@ struct sir_mgmt_msg {
#define SIR_LIM_REASSOC_MBB_RSP_TIMEOUT (SIR_LIM_TIMEOUT_MSG_START + 0x2A)
#endif
-#define SIR_LIM_AUTH_SAE_TIMEOUT (SIR_LIM_TIMEOUT_MSG_START + 0x2B)
#define SIR_LIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE (SIR_LIM_TIMEOUT_MSG_START + 0x2C)
#define SIR_LIM_AUTH_RETRY_TIMEOUT (SIR_LIM_TIMEOUT_MSG_START + 0x2D)
#define SIR_LIM_SAP_ECSA_TIMEOUT (SIR_LIM_TIMEOUT_MSG_START + 0x2E)
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/include/limGlobal.h b/drivers/staging/prima/CORE/MAC/src/pe/include/limGlobal.h
index 31ecfbb495a7..150184dd32cf 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/include/limGlobal.h
+++ b/drivers/staging/prima/CORE/MAC/src/pe/include/limGlobal.h
@@ -184,7 +184,6 @@ typedef enum eLimMlmStates
eLIM_MLM_WT_FT_REASSOC_RSP_STATE,
#endif
eLIM_MLM_P2P_LISTEN_STATE,
- eLIM_MLM_WT_SAE_AUTH_STATE,
} tLimMlmStates;
// 11h channel quiet states
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/include/limSession.h b/drivers/staging/prima/CORE/MAC/src/pe/include/limSession.h
index 49e99e047c14..75ff4f408624 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/include/limSession.h
+++ b/drivers/staging/prima/CORE/MAC/src/pe/include/limSession.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -372,7 +372,6 @@ typedef struct sPESession // Added to Support BT-AMP
tDot11fIEVHTOperation vht_operation;
bool force_24ghz_in_ht20;
int8_t def_max_tx_pwr;
- bool sae_pmk_cached;
}tPESession, *tpPESession;
#define LIM_MAX_ACTIVE_SESSIONS 4
@@ -481,19 +480,9 @@ tpPESession peFindSessionByPeerSta(tpAniSirGlobal pMac, tANI_U8* sa, tANI_U8* s
--------------------------------------------------------------------------*/
tpPESession peFindSessionByStaId(tpAniSirGlobal pMac, tANI_U8 staid, tANI_U8* sessionId);
+
+
-/**
- * pe_find_session_by_sme_session_id() - looks up the PE session for given sme
- * session id
- * @mac_ctx: pointer to global adapter context
- * @sme_session_id: sme session id
- *
- * Looks up the PE session for given sme session id
- *
- * Return: pe session entry for given sme session if found else NULL
- */
-tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
- uint8_t sme_session_id);
/*--------------------------------------------------------------------------
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
index 0abfed6285c3..894549f781a3 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessAuthFrame.c
@@ -101,41 +101,6 @@ static inline unsigned int isAuthValid(tpAniSirGlobal pMac, tpSirMacAuthFrameBod
return valid;
}
-#ifdef WLAN_FEATURE_SAE
-/**
- * lim_process_sae_auth_frame()-Process SAE authentication frame
- * @mac_ctx: MAC context
- * @rx_pkt_info: Rx packet
- * @pe_session: PE session
- *
- * Return: None
- */
-static void lim_process_sae_auth_frame(tpAniSirGlobal mac_ctx,
- uint8_t *rx_pkt_info,
- tpPESession pe_session)
-{
- tpSirMacMgmtHdr mac_hdr;
-
- mac_hdr = WDA_GET_RX_MAC_HEADER(rx_pkt_info);
-
- limLog(mac_ctx, LOG1, FL("Received SAE Auth frame type %d subtype %d"),
- mac_hdr->fc.type, mac_hdr->fc.subType);
-
- if (pe_session->limMlmState != eLIM_MLM_WT_SAE_AUTH_STATE)
- limLog(mac_ctx, LOGE,
- FL("received SAE auth response in unexpected state %x"),
- pe_session->limMlmState);
-
- limSendSmeMgmtFrameInd(mac_ctx, pe_session->peSessionId,
- rx_pkt_info, pe_session,
- WDA_GET_RX_RSSI_DB(rx_pkt_info));
-}
-#else
-static void lim_process_sae_auth_frame(tpAniSirGlobal mac_ctx,
- uint8_t *rx_pkt_info,
- tpPESession pe_session)
-{}
-#endif
/**
* limProcessAuthFrame
@@ -197,7 +162,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
tpDphHashNode pStaDs = NULL;
tANI_U16 assocId = 0;
tANI_U16 currSeqNo = 0;
- tANI_U16 auth_alg = 0;
/* Added For BT -AMP support */
// Get pointer to Authentication frame header and body
@@ -235,9 +199,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
- auth_alg = *(uint16_t *)pBody;
- limLog(pMac, LOG1, FL("auth_alg %d "), auth_alg);
-
//PELOG3(sirDumpBuf(pMac, SIR_LIM_MODULE_ID, LOG3, (tANI_U8*)pBd, ((tpHalBufDesc) pBd)->mpduDataOffset + frameLen);)
//Restore default failure timeout
@@ -627,10 +588,6 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
goto free;
} // else if (wlan_cfgGetInt(CFG_PRIVACY_OPTION_IMPLEMENTED))
- } else if ((auth_alg ==
- eSIR_AUTH_TYPE_SAE) && (LIM_IS_STA_ROLE(psessionEntry))) {
- lim_process_sae_auth_frame(pMac, pRxPacketInfo, psessionEntry);
- goto free;
} // if (fc.wep)
else
{
@@ -726,22 +683,13 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
)
{
limLog(pMac, LOGE,
- FL("Auth frame received in mlm state: %d(staId: %d, assocId: %d)"),
- pStaDs->mlmStaContext.mlmState,
+ FL("STA is already connected but received auth frame"
+ "Send the Deauth and lim Delete Station Context"
+ "(staId: %d, assocId: %d) "),
pStaDs->staIndex, assocId);
- if (pStaDs->mlmStaContext.mlmState ==
- eLIM_MLM_LINK_ESTABLISHED_STATE) {
- limLog(pMac, LOGE,
- FL("STA is already connected but received auth frame"
- "Send the Deauth and lim Delete Station Context"
- "(staId: %d, assocId: %d) "),
- pStaDs->staIndex, assocId);
- limSendDeauthMgmtFrame(pMac,
- eSIR_MAC_UNSPEC_FAILURE_REASON,
- (tANI_U8 *) pHdr->sa,
- psessionEntry, FALSE);
- limTriggerSTAdeletion(pMac, pStaDs, psessionEntry);
- }
+ limSendDeauthMgmtFrame(pMac, eSIR_MAC_UNSPEC_FAILURE_REASON,
+ (tANI_U8 *) pHdr->sa, psessionEntry, FALSE);
+ limTriggerSTAdeletion(pMac, pStaDs, psessionEntry);
goto free;
}
}
@@ -1205,29 +1153,19 @@ limProcessAuthFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tpPESession pse
if (pRxAuthFrameBody->authAlgoNumber !=
pMac->lim.gpLimMlmAuthReq->authType)
{
- /*
- * Auth algo is open in rx auth frame when auth type is SAE and
- * PMK is cached as driver sent auth algo as open in tx frame
- * as well.
+ /**
+ * Received Authentication frame with an auth
+ * algorithm other than one requested.
+ * Wait until Authentication Failure Timeout.
*/
- if ((pMac->lim.gpLimMlmAuthReq->authType ==
- eSIR_AUTH_TYPE_SAE) && psessionEntry->sae_pmk_cached) {
- limLog(pMac, LOGW,
- FL("rx Auth frame2 auth algo %d in SAE PMK case"),
- pRxAuthFrameBody->authAlgoNumber);
- } else {
- /**
- * Received Authentication frame with an auth
- * algorithm other than one requested.
- * Wait until Authentication Failure Timeout.
- */
- // Log error
- PELOGW(limLog(pMac, LOGW,
- FL("received Auth frame2 for unexpected auth algo num %d "
- MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
- MAC_ADDR_ARRAY(pHdr->sa));)
- break;
- }
+
+ // Log error
+ PELOGW(limLog(pMac, LOGW,
+ FL("received Auth frame2 for unexpected auth algo number %d "
+ MAC_ADDRESS_STR), pRxAuthFrameBody->authAlgoNumber,
+ MAC_ADDR_ARRAY(pHdr->sa));)
+
+ break;
}
if (pRxAuthFrameBody->authStatusCode ==
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
index eb2c9310d618..6c8e41bf57b5 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMessageQueue.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -82,7 +82,6 @@
#include "vos_types.h"
#include "vos_packet.h"
#include "vos_memory.h"
-#include "limSecurityUtils.h"
/* This value corresponds to 500 ms */
#define MAX_PROBEREQ_TIME 50
@@ -93,69 +92,8 @@
#define CHECK_BIT(value, mask) ((value) & (1 << (mask)))
-#define IEEE80211_STATUS_SUCCESS 0
-
void limLogSessionStates(tpAniSirGlobal pMac);
-#ifdef WLAN_FEATURE_SAE
-/**
- * lim_process_sae_msg() - Process SAE message
- * @mac: Global MAC pointer
- * @body: Buffer pointer
- *
- * Return: None
- */
-static void lim_process_sae_msg(tpAniSirGlobal mac, struct sir_sae_msg *body)
-{
- struct sir_sae_msg *sae_msg = body;
- tpPESession session;
-
- if (!sae_msg) {
- limLog(mac, LOGE, FL("SAE msg is NULL"));
- return;
- }
-
- session = pe_find_session_by_sme_session_id(mac, sae_msg->session_id);
- if (session == NULL) {
- limLog(mac, LOGE, FL("SAE:Unable to find session"));
- return;
- }
-
- if (session->pePersona != VOS_STA_MODE) {
- limLog(mac, LOGE, FL("SAE:Not supported in this mode %d"),
- session->pePersona);
- return;
- }
-
- limLog(mac, LOG1, FL("SAE:status %d limMlmState %d pePersona %d"),
- sae_msg->sae_status, session->limMlmState,
- session->pePersona);
- switch (session->limMlmState) {
- case eLIM_MLM_WT_SAE_AUTH_STATE:
- /* SAE authentication is completed. Restore from auth state */
- if (tx_timer_running(&mac->lim.limTimers.sae_auth_timer))
- limDeactivateAndChangeTimer(mac, eLIM_AUTH_SAE_TIMER);
- /* success */
- if (sae_msg->sae_status == IEEE80211_STATUS_SUCCESS)
- limRestoreFromAuthState(mac, eSIR_SME_SUCCESS,
- eSIR_MAC_SUCCESS_STATUS, session);
- else
- limRestoreFromAuthState(mac, eSIR_SME_AUTH_REFUSED,
- eSIR_MAC_UNSPEC_FAILURE_STATUS, session);
- break;
- default:
- /* SAE msg is received in unexpected state */
- limLog(mac, LOGE, FL("received SAE msg in state %X"),
- session->limMlmState);
- limPrintMlmState(mac, LOGE, session->limMlmState);
- break;
- }
-}
-#else
-static void lim_process_sae_msg(tpAniSirGlobal mac, struct sir_sae_msg *body)
-{}
-#endif
-
/** -------------------------------------------------------------
\fn defMsgDecision
\brief The function decides whether to defer a message or not in limProcessMessage function
@@ -1831,12 +1769,6 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
limMsg->bodyptr = NULL;
break;
- case eWNI_SME_SEND_MGMT_FRAME_TX:
- lim_send_mgmt_frame_tx(pMac, limMsg);
- vos_mem_free(limMsg->bodyptr);
- limMsg->bodyptr = NULL;
- break;
-
#ifdef WLAN_FEATURE_RMC
case eWNI_SME_ENABLE_RMC_REQ:
case eWNI_SME_DISABLE_RMC_REQ:
@@ -2090,7 +2022,6 @@ limProcessMessages(tpAniSirGlobal pMac, tpSirMsgQ limMsg)
#ifdef WLAN_FEATURE_LFR_MBB
case SIR_LIM_PREAUTH_MBB_RSP_TIMEOUT:
case SIR_LIM_REASSOC_MBB_RSP_TIMEOUT:
- case SIR_LIM_AUTH_SAE_TIMEOUT:
#endif
// These timeout messages are handled by MLM sub module
@@ -2622,11 +2553,6 @@ send_chan_switch_resp:
case eWNI_SME_STA_DEL_BA_REQ:
limStaDelBASession(pMac);
break;
- case eWNI_SME_SEND_SAE_MSG:
- lim_process_sae_msg(pMac, limMsg->bodyptr);
- vos_mem_free((v_VOID_t*)limMsg->bodyptr);
- limMsg->bodyptr = NULL;
- break;
default:
vos_mem_free((v_VOID_t*)limMsg->bodyptr);
limMsg->bodyptr = NULL;
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index 774812b62d2f..b55954a400cc 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -100,49 +100,6 @@ limSetChannel(tpAniSirGlobal pMac, tANI_U8 channel, tANI_U8 secChannelOffset, tP
#define IS_MLM_SCAN_REQ_BACKGROUND_SCAN_AGGRESSIVE(pMac) (pMac->lim.gpLimMlmScanReq->backgroundScanMode == eSIR_AGGRESSIVE_BACKGROUND_SCAN)
#define IS_MLM_SCAN_REQ_BACKGROUND_SCAN_NORMAL(pMac) (pMac->lim.gpLimMlmScanReq->backgroundScanMode == eSIR_NORMAL_BACKGROUND_SCAN)
- /**
- * lim_process_sae_auth_timeout() - This function is called to process sae
- * auth timeout
- * @mac_ctx: Pointer to Global MAC structure
- *
- * @Return: None
- */
-static void lim_process_sae_auth_timeout(tpAniSirGlobal mac_ctx)
-{
- tpPESession session;
-
- session = peFindSessionBySessionId(mac_ctx,
- mac_ctx->lim.limTimers.sae_auth_timer.sessionId);
- if (session == NULL) {
- limLog(mac_ctx, LOGE,
- FL("Session does not exist for given session id"));
- return;
- }
-
- limLog(mac_ctx, LOG1,
- FL("SAE auth timeout sessionid %d mlmstate %X SmeState %X"),
- session->peSessionId, session->limMlmState, session->limSmeState);
-
- switch (session->limMlmState) {
- case eLIM_MLM_WT_SAE_AUTH_STATE:
- /*
- * SAE authentication is not completed. Restore from
- * auth state.
- */
- if (session->pePersona == VOS_STA_MODE)
- limRestoreFromAuthState(mac_ctx, eSIR_SME_AUTH_TIMEOUT_RESULT_CODE,
- eSIR_MAC_UNSPEC_FAILURE_REASON, session);
- break;
- default:
- /* SAE authentication is timed out in unexpected state */
- limLog(mac_ctx, LOGE,
- FL("received unexpected SAE auth timeout in state %X"),
- session->limMlmState);
- limPrintMlmState(mac_ctx, LOGE, session->limMlmState);
- break;
- }
-}
-
/**
* limProcessMlmReqMessages()
*
@@ -223,9 +180,6 @@ limProcessMlmReqMessages(tpAniSirGlobal pMac, tpSirMsgQ Msg)
case LIM_MLM_ADDBA_REQ: limProcessMlmAddBAReq( pMac, Msg->bodyptr ); break;
case LIM_MLM_ADDBA_RSP: limProcessMlmAddBARsp( pMac, Msg->bodyptr ); break;
case LIM_MLM_DELBA_REQ: limProcessMlmDelBAReq( pMac, Msg->bodyptr ); break;
- case SIR_LIM_AUTH_SAE_TIMEOUT:
- lim_process_sae_auth_timeout(pMac);
- break;
case LIM_MLM_TSPEC_REQ:
default:
break;
@@ -864,15 +818,9 @@ void limDoSendAuthMgmtFrame(tpAniSirGlobal pMac, tpPESession psessionEntry)
{
tSirMacAuthFrameBody authFrameBody;
- /* Mark auth algo as open when auth type is SAE and PMK is cached */
- if ((pMac->lim.gpLimMlmAuthReq->authType == eSIR_AUTH_TYPE_SAE) &&
- psessionEntry->sae_pmk_cached) {
- authFrameBody.authAlgoNumber = eSIR_OPEN_SYSTEM;
- } else {
- authFrameBody.authAlgoNumber =
- (tANI_U8) pMac->lim.gpLimMlmAuthReq->authType;
- }
//Prepare & send Authentication frame
+ authFrameBody.authAlgoNumber =
+ (tANI_U8) pMac->lim.gpLimMlmAuthReq->authType;
authFrameBody.authTransactionSeqNumber = SIR_MAC_AUTH_FRAME_1;
authFrameBody.authStatusCode = 0;
pMac->authAckStatus = LIM_AUTH_ACK_NOT_RCD;
@@ -2514,79 +2462,7 @@ error:
limPostSmeMessage(pMac, LIM_MLM_JOIN_CNF, (tANI_U32 *) &mlmJoinCnf);
} /*** limProcessMlmJoinReq() ***/
-#ifdef WLAN_FEATURE_SAE
-/**
- * lim_process_mlm_auth_req_sae() - Handle SAE authentication
- * @mac_ctx: global MAC context
- * @session: PE session entry
- *
- * This function is called by lim_process_mlm_auth_req to handle SAE
- * authentication.
- *
- * Return: tSirRetStatus
- */
-static VOS_STATUS lim_process_mlm_auth_req_sae(tpAniSirGlobal mac_ctx,
- tpPESession session)
-{
- VOS_STATUS status = VOS_STATUS_SUCCESS;
- struct sir_sae_info *sae_info;
- vos_msg_t msg;
-
- sae_info = vos_mem_malloc(sizeof(*sae_info));
- if (sae_info == NULL) {
- limLog(mac_ctx, LOGP, FL("Memory allocation failed"));
- return VOS_STATUS_E_FAILURE;
- }
-
- sae_info->msg_type = eWNI_SME_TRIGGER_SAE;
- sae_info->msg_len = sizeof(*sae_info);
- sae_info->vdev_id = session->smeSessionId;
-
- vos_mem_copy(sae_info->peer_mac_addr.bytes, session->bssId,
- VOS_MAC_ADDR_SIZE);
-
- sae_info->ssid.length = session->ssId.length;
- vos_mem_copy(sae_info->ssid.ssId, session->ssId.ssId,
- session->ssId.length);
- limLog(mac_ctx, LOG1, FL("vdev_id %d ssid %.*s "MAC_ADDRESS_STR""),
- sae_info->vdev_id, sae_info->ssid.length,sae_info->ssid.ssId,
- MAC_ADDR_ARRAY(sae_info->peer_mac_addr.bytes));
-
- msg.type = eWNI_SME_TRIGGER_SAE;
- msg.bodyptr = sae_info;
- msg.bodyval = 0;
-
- if (VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MQ_ID_SME, &msg))
- {
- limLog(mac_ctx, LOGE, FL("%s failed to post msg to self "),
- __func__);
- vos_mem_free((void *)sae_info);
- status = VOS_STATUS_E_FAILURE;
- }
-
- session->limMlmState = eLIM_MLM_WT_SAE_AUTH_STATE;
-
- MTRACE(macTrace(mac_ctx, TRACE_CODE_MLM_STATE, session->peSessionId,
- session->limMlmState));
-
- mac_ctx->lim.limTimers.sae_auth_timer.sessionId = session->peSessionId;
- /* Activate SAE auth timer */
- MTRACE(macTrace(mac_ctx, TRACE_CODE_TIMER_ACTIVATE,
- session->peSessionId, eLIM_AUTH_SAE_TIMER));
- if (tx_timer_activate(&mac_ctx->lim.limTimers.sae_auth_timer)
- != TX_SUCCESS) {
- limLog(mac_ctx, LOGE, FL("could not start Auth SAE timer"));
- }
- return status;
-}
-#else
-static VOS_STATUS lim_process_mlm_auth_req_sae(tpAniSirGlobal mac_ctx,
- tpPESession session)
-{
- return VOS_STATUS_E_NOSUPPORT;
-}
-#endif
/**
* limProcessMlmAuthReq()
@@ -2734,21 +2610,7 @@ limProcessMlmAuthReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
pMac->lim.gpLimMlmAuthReq->peerMacAddr);
psessionEntry->limPrevMlmState = psessionEntry->limMlmState;
- if ((pMac->lim.gpLimMlmAuthReq->authType == eSIR_AUTH_TYPE_SAE) &&
- !psessionEntry->sae_pmk_cached) {
- if (lim_process_mlm_auth_req_sae(pMac, psessionEntry) !=
- VOS_STATUS_SUCCESS) {
- mlmAuthCnf.resultCode = eSIR_SME_INVALID_PARAMETERS;
- goto end;
- } else {
- limLog(pMac, LOG1,
- FL("lim_process_mlm_auth_req_sae is successful"));
- return;
- }
- } else {
- psessionEntry->limMlmState = eLIM_MLM_WT_AUTH_FRAME2_STATE;
- }
-
+ psessionEntry->limMlmState = eLIM_MLM_WT_AUTH_FRAME2_STATE;
MTRACE(macTrace(pMac, TRACE_CODE_MLM_STATE, psessionEntry->peSessionId, psessionEntry->limMlmState));
//assign appropriate sessionId to the timer object
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 371e27f4ccf6..b224b6a37186 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -1685,31 +1685,6 @@ static void __limProcessClearDfsChannelList(tpAniSirGlobal pMac,
sizeof(tSirDFSChannelList), 0);
}
-#ifdef WLAN_FEATURE_SAE
-/**
- * lim_update_sae_config()- This API update SAE session info to csr config
- * from join request.
- * @session: PE session
- * @sme_join_req: pointer to join request
- *
- * Return: None
- */
-static void lim_update_sae_config(tpPESession session,
- tpSirSmeJoinReq sme_join_req)
-{
- session->sae_pmk_cached = sme_join_req->sae_pmk_cached;
-
- VOS_TRACE(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_DEBUG,
- FL("pmk_cached %d for BSSID=" MAC_ADDRESS_STR),
- session->sae_pmk_cached,
- MAC_ADDR_ARRAY(sme_join_req->bssDescription.bssId));
-}
-#else
-static inline void lim_update_sae_config(tpPESession session,
- tpSirSmeJoinReq sme_join_req)
-{}
-#endif
-
/**
* __limProcessSmeJoinReq()
*
@@ -2028,8 +2003,6 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
#endif
psessionEntry->txLdpcIniFeatureEnabled = pSmeJoinReq->txLdpcIniFeatureEnabled;
- lim_update_sae_config(psessionEntry, pSmeJoinReq);
-
if (psessionEntry->bssType == eSIR_INFRASTRUCTURE_MODE)
{
psessionEntry->limSystemRole = eLIM_STA_ROLE;
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c
index e364e73a2130..bffffb04198a 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c
@@ -518,14 +518,10 @@ limRestoreFromAuthState(tpAniSirGlobal pMac, tSirResultCodes resultCode, tANI_U1
* retry is needed also cancel the auth rety timer
*/
pMac->authAckStatus = LIM_AUTH_ACK_RCD_SUCCESS;
- /* Auth retry and AUth failure timers are not started for SAE
- * Change' timer for future activations
- */
- if (tx_timer_running(&pMac->lim.limTimers.gLimPeriodicAuthRetryTimer))
- limDeactivateAndChangeTimer(pMac, eLIM_AUTH_RETRY_TIMER);
- /* Change' timer for future activations */
- if (tx_timer_running(&pMac->lim.limTimers.gLimAuthFailureTimer))
- limDeactivateAndChangeTimer(pMac, eLIM_AUTH_FAIL_TIMER);
+ // 'Change' timer for future activations
+ limDeactivateAndChangeTimer(pMac, eLIM_AUTH_RETRY_TIMER);
+ // 'Change' timer for future activations
+ limDeactivateAndChangeTimer(pMac, eLIM_AUTH_FAIL_TIMER);
#if 0
if (wlan_cfgGetStr(pMac, WNI_CFG_BSSID, currentBssId, &cfg) != eSIR_SUCCESS)
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSendManagementFrames.c
index c776cfb448e0..c47fa718571b 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSendManagementFrames.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSendManagementFrames.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -7333,77 +7333,3 @@ limSendRMCActionFrame(tpAniSirGlobal pMac,
} // End limSendRMCActionFrame.
#endif /* WLAN_FEATURE_RMC */
-
-/**
- * lim_tx_mgmt_frame() - Transmits Auth mgmt frame
- * @mac_ctx Pointer to Global MAC structure
- * @mb_msg: Received message info
- * @msg_len: Received message length
- * @packet: Packet to be transmitted
- * @frame: Received frame
- *
- * Return: None
- */
-static void lim_tx_mgmt_frame(tpAniSirGlobal mac_ctx,
- struct sir_mgmt_msg *mb_msg, uint32_t msg_len,
- void *packet, uint8_t *frame)
-{
- tpSirMacFrameCtl fc = (tpSirMacFrameCtl)mb_msg->data;
- eHalStatus hal_status;
- uint8_t sme_session_id = 0;
- tpPESession session;
-
- sme_session_id = mb_msg->session_id;
- session = pe_find_session_by_sme_session_id(mac_ctx, sme_session_id);
- if (session == NULL) {
- limLog(mac_ctx, LOGP,
- FL("session not found for given sme session"));
- return;
- }
- MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_MGMT,
- session->peSessionId, fc->subType));
- mac_ctx->authAckStatus = LIM_AUTH_ACK_NOT_RCD;
- hal_status =
- halTxFrameWithTxComplete(mac_ctx, packet, (uint16_t)msg_len,
- HAL_TXRX_FRM_802_11_MGMT,
- ANI_TXDIR_TODS,
- 7, limTxComplete, frame,
- limAuthTxCompleteCnf,
- 0, mac_ctx->lim.txBdToken);
- MTRACE(vos_trace(VOS_MODULE_ID_PE, TRACE_CODE_TX_COMPLETE,
- session->peSessionId, hal_status));
- if (!HAL_STATUS_SUCCESS(hal_status)) {
- limLog(mac_ctx, LOGP,
- FL("*** Could not send Auth frame, retCode=%X ***"),
- hal_status);
- mac_ctx->authAckStatus = LIM_AUTH_ACK_RCD_FAILURE;
- limDiagEventReport(mac_ctx, WLAN_PE_DIAG_AUTH_REQ_EVENT,
- session, eSIR_FAILURE, eSIR_FAILURE);
- /* Pkt will be freed up by the callback */
- }
-}
-
-void lim_send_mgmt_frame_tx(tpAniSirGlobal mac_ctx, tpSirMsgQ msg)
-{
- struct sir_mgmt_msg *mb_msg = (struct sir_mgmt_msg *)msg->bodyptr;
- uint32_t msg_len;
- tpSirMacFrameCtl fc = (tpSirMacFrameCtl)mb_msg->data;
- uint8_t sme_session_id;
- eHalStatus halstatus;
- uint8_t *frame;
- void *packet;
-
- msg_len = mb_msg->msg_len - sizeof(*mb_msg);
- limLog(mac_ctx, LOG1, FL("sending fc->type: %d fc->subType: %d"),
- fc->type, fc->subType);
- sme_session_id = mb_msg->session_id;
- halstatus = palPktAlloc(mac_ctx->hHdd, HAL_TXRX_FRM_802_11_MGMT,
- (uint16_t)msg_len, (void **)&frame,
- (void **)&packet);
- if (!HAL_STATUS_SUCCESS(halstatus)) {
- limLog(mac_ctx, LOGP, FL("call to bufAlloc failed for AUTH frame"));
- return;
- }
- vos_mem_copy(frame, mb_msg->data, msg_len);
- lim_tx_mgmt_frame(mac_ctx, mb_msg, msg_len, packet, frame);
-}
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSerDesUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSerDesUtils.c
index ea0ebf49e1d5..6e14ba5fe001 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSerDesUtils.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSerDesUtils.c
@@ -992,13 +992,6 @@ 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--;
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSession.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSession.c
index 667032d65f83..23c53bd616d7 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSession.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSession.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2014, 2016-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2014, 2016-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -276,22 +276,6 @@ tpPESession peFindSessionByBssIdx(tpAniSirGlobal pMac, tANI_U8 bssIdx)
return NULL;
}
-tpPESession pe_find_session_by_sme_session_id(tpAniSirGlobal mac_ctx,
- tANI_U8 sme_session_id)
-{
- uint8_t i;
-
- for (i = 0; i < mac_ctx->lim.maxBssId; i++) {
- if ((mac_ctx->lim.gpSession[i].valid) &&
- (mac_ctx->lim.gpSession[i].smeSessionId == sme_session_id))
- return &mac_ctx->lim.gpSession[i];
- }
- limLog(mac_ctx, LOG4, FL("Session lookup fails for smeSessionID: %d"),
- sme_session_id);
-
- return NULL;
-}
-
/*--------------------------------------------------------------------------
\brief peFindSessionBySessionId() - looks up the PE session given the session ID.
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.c
index f5bb4d32aeda..5a5163a4be3d 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -56,11 +56,6 @@
#define LIM_JOIN_PROBE_REQ_TIMER_MS 200
#define LIM_AUTH_RETRY_TIMER_MS 60
-/*
- * SAE auth timer of 5secs. This is required for duration of entire SAE
- * authentication.
- */
-#define LIM_AUTH_SAE_TIMER_MS 5000
//default beacon interval value used in HB timer interval calculation
#define LIM_HB_TIMER_BEACON_INTERVAL 100
@@ -436,18 +431,6 @@ limCreateTimers(tpAniSirGlobal pMac)
goto err_timer;
}
- /*
- * SAE auth timer of 5secs. This is required for duration of entire SAE
- * authentication.
- */
- if ((tx_timer_create(&pMac->lim.limTimers.sae_auth_timer,
- "SAE AUTH Timer", limTimerHandler, SIR_LIM_AUTH_SAE_TIMEOUT,
- SYS_MS_TO_TICKS(LIM_AUTH_SAE_TIMER_MS), 0, TX_NO_ACTIVATE)) !=
- TX_SUCCESS) {
- limLog(pMac, LOGP, FL("could not create SAE AUTH Timer"));
- goto err_timer;
- }
-
if (wlan_cfgGetInt(pMac, WNI_CFG_BACKGROUND_SCAN_PERIOD,
&cfgValue) != eSIR_SUCCESS)
{
@@ -801,7 +784,6 @@ limCreateTimers(tpAniSirGlobal pMac)
tx_timer_delete(&pMac->lim.limTimers.gLimP2pSingleShotNoaInsertTimer);
tx_timer_delete(&pMac->lim.limTimers.gLimActiveToPassiveChannelTimer);
tx_timer_delete(&pMac->lim.limTimers.g_lim_ap_ecsa_timer);
- tx_timer_delete(&pMac->lim.limTimers.sae_auth_timer);
if(NULL != pMac->lim.gLimPreAuthTimerTable.pTable)
{
@@ -1953,21 +1935,6 @@ limDeactivateAndChangeTimer(tpAniSirGlobal pMac, tANI_U32 timerId)
limLog(pMac, LOGE, FL("Unable to change g_lim_ap_ecsa_timer timer"));
}
- case eLIM_AUTH_SAE_TIMER:
- if (tx_timer_deactivate(&pMac->lim.limTimers.sae_auth_timer)
- != TX_SUCCESS) {
- limLog(pMac, LOGP, FL("Unable to deactivate SAE auth timer"));
- return;
- }
- /* Change timer to reactivate it in future */
- val = SYS_MS_TO_TICKS(LIM_AUTH_SAE_TIMER_MS);
- if (tx_timer_change(&pMac->lim.limTimers.sae_auth_timer,
- val, 0) != TX_SUCCESS) {
- limLog(pMac, LOGP, FL("unable to change SAE auth timer"));
- return;
- }
- break;
-
break;
default:
// Invalid timerId. Log error
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.h b/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.h
index 41d65a6efb3e..2b10fdc635ca 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.h
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limTimerUtils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2015, 2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015, 2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -79,10 +79,9 @@ enum
eLIM_CONVERT_ACTIVE_CHANNEL_TO_PASSIVE,
eLIM_AUTH_RETRY_TIMER,
eLIM_AP_ECSA_TIMER,
- eLIM_AUTH_SAE_TIMER
#ifdef WLAN_FEATURE_LFR_MBB
eLIM_PREAUTH_MBB_RSP_TIMER,
- eLIM_REASSOC_MBB_RSP_TIMER,
+ eLIM_REASSOC_MBB_RSP_TIMER
#endif
};
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limTypes.h b/drivers/staging/prima/CORE/MAC/src/pe/lim/limTypes.h
index aaffe0c0f6c9..6d0ca496a593 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limTypes.h
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limTypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1142,14 +1142,6 @@ tSirRetStatus lim_process_sme_del_ba_ses_req(tpAniSirGlobal pMac,
void lim_send_chan_switch_action_frame(tpAniSirGlobal mac_ctx,
uint16_t new_channel, tpPESession session_entry);
-/**
- * lim_send_mgmt_frame_tx() - Sends mgmt frame
- * @mac_ctx Pointer to Global MAC structure
- * @msg: Received message info
- *
- * Return: None
- */
-void lim_send_mgmt_frame_tx(tpAniSirGlobal mac_ctx, tpSirMsgQ msg);
#endif /* __LIM_TYPES_H */
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limUtils.c
index a35cff5f7320..e0f4560c0fc7 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limUtils.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limUtils.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1141,9 +1141,6 @@ limCleanupMlm(tpAniSirGlobal pMac)
tx_timer_deactivate(&pMac->lim.limTimers.g_lim_ap_ecsa_timer);
tx_timer_delete(&pMac->lim.limTimers.g_lim_ap_ecsa_timer);
- tx_timer_deactivate(&pMac->lim.limTimers.sae_auth_timer);
- tx_timer_delete(&pMac->lim.limTimers.sae_auth_timer);
-
pMac->lim.gLimTimersCreated = 0;
}
diff --git a/drivers/staging/prima/CORE/SAP/src/sapModule.c b/drivers/staging/prima/CORE/SAP/src/sapModule.c
index e6109599ec62..276ac4d5ab65 100644
--- a/drivers/staging/prima/CORE/SAP/src/sapModule.c
+++ b/drivers/staging/prima/CORE/SAP/src/sapModule.c
@@ -683,6 +683,9 @@ WLANSAP_StartBss
}
}
+//BEGIN MOT a19110 IKSWO-8490 Comment out initialisation of
+//acl list. We use driver ioctl to set it
+#if 0
// Copy MAC filtering settings to sap context
pSapCtx->eSapMacAddrAclMode = pConfig->SapMacaddr_acl;
vos_mem_copy(pSapCtx->acceptMacList, pConfig->accept_mac, sizeof(pConfig->accept_mac));
@@ -691,6 +694,8 @@ WLANSAP_StartBss
vos_mem_copy(pSapCtx->denyMacList, pConfig->deny_mac, sizeof(pConfig->deny_mac));
pSapCtx->nDenyMac = pConfig->num_deny_mac;
sapSortMacList(pSapCtx->denyMacList, pSapCtx->nDenyMac);
+#endif
+//END IKSWO-8490
/* Fill in the event structure for FSM */
sapEvent.event = eSAP_HDD_START_INFRA_BSS;
diff --git a/drivers/staging/prima/CORE/SME/inc/csrApi.h b/drivers/staging/prima/CORE/SME/inc/csrApi.h
index c1ec650551c4..7d3212eb7502 100644
--- a/drivers/staging/prima/CORE/SME/inc/csrApi.h
+++ b/drivers/staging/prima/CORE/SME/inc/csrApi.h
@@ -46,7 +46,6 @@ typedef enum
// MAC layer authentication types
eCSR_AUTH_TYPE_OPEN_SYSTEM,
eCSR_AUTH_TYPE_SHARED_KEY,
- eCSR_AUTH_TYPE_SAE,
eCSR_AUTH_TYPE_AUTOSWITCH,
// Upper layer authentication types
@@ -72,7 +71,6 @@ typedef enum
eCSR_AUTH_TYPE_RSN_PSK_SHA256,
eCSR_AUTH_TYPE_RSN_8021X_SHA256,
#endif
- eCSR_AUTH_TYPE_OWE,
eCSR_NUM_OF_SUPPORT_AUTH_TYPE,
eCSR_AUTH_TYPE_FAILED = 0xff,
eCSR_AUTH_TYPE_UNKNOWN = eCSR_AUTH_TYPE_FAILED,
@@ -220,7 +218,6 @@ typedef enum
#define CSR_SCAN_TIME_DEFAULT 0
#define CSR_VALUE_IGNORED 0xFFFFFFFF
#define CSR_RSN_PMKID_SIZE 16
-#define CSR_RSN_MAX_PMK_LEN 48
#define CSR_MAX_PMKID_ALLOWED 32
#define CSR_WEP40_KEY_LEN 5
#define CSR_WEP104_KEY_LEN 13
@@ -528,7 +525,6 @@ typedef enum
eCSR_ROAM_ECSA_BCN_TX_IND,
eCSR_ROAM_ECSA_CHAN_CHANGE_RSP,
eCSR_ROAM_STA_CHANNEL_SWITCH,
- eCSR_ROAM_SAE_COMPUTE,
}eRoamCmdStatus;
@@ -848,11 +844,6 @@ typedef struct tagPmkidCacheInfo
{
tCsrBssid BSSID;
tANI_U8 PMKID[CSR_RSN_PMKID_SIZE];
- uint8_t pmk[CSR_RSN_MAX_PMK_LEN];
- uint8_t pmk_len;
- uint8_t ssid_len;
- uint8_t ssid[SIR_MAC_MAX_SSID_LENGTH];
- uint8_t cache_id[CACHE_ID_LEN];
}tPmkidCacheInfo;
#ifdef FEATURE_WLAN_WAPI
@@ -1365,9 +1356,6 @@ typedef struct tagCsrRoamInfo
struct sir_channel_chanege_rsp *ap_chan_change_rsp;
tSirSmeChanInfo chan_info;
tSirMacHTChannelWidth ch_width;
-#ifdef WLAN_FEATURE_SAE
- struct sir_sae_info *sae_info;
-#endif
}tCsrRoamInfo;
typedef struct tagCsrFreqScanInfo
@@ -1667,12 +1655,6 @@ typedef eHalStatus (*csrRoamSessionCloseCallback)(void *pContext);
///////////////////////////////////////////Common Roam ends
-#ifdef WLAN_FEATURE_SAE
-#define CSR_IS_AUTH_TYPE_SAE(auth_type) \
- (eCSR_AUTH_TYPE_SAE == auth_type)
-#else
-#define CSR_IS_AUTH_TYPE_SAE(auth_type) (false)
-#endif
/* ---------------------------------------------------------------------------
\fn csrSetChannels
diff --git a/drivers/staging/prima/CORE/SME/inc/csrInternal.h b/drivers/staging/prima/CORE/SME/inc/csrInternal.h
index 77a4dd2cd831..8a7a8e844022 100644
--- a/drivers/staging/prima/CORE/SME/inc/csrInternal.h
+++ b/drivers/staging/prima/CORE/SME/inc/csrInternal.h
@@ -1076,7 +1076,6 @@ typedef struct tagCsrRoamStruct
tANI_U32 deauthRspStatus;
tANI_BOOLEAN pending_roam_disable;
vos_spin_lock_t roam_state_lock;
- tSirMacAddr spoof_mac_addr;
}tCsrRoamStruct;
diff --git a/drivers/staging/prima/CORE/SME/inc/sme_Api.h b/drivers/staging/prima/CORE/SME/inc/sme_Api.h
index 0acded19fea1..51c9425fa246 100644
--- a/drivers/staging/prima/CORE/SME/inc/sme_Api.h
+++ b/drivers/staging/prima/CORE/SME/inc/sme_Api.h
@@ -3731,9 +3731,9 @@ eHalStatus smeIssueFastRoamNeighborAPEvent (tHalHandle hHal,
eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
- tPmkidCacheInfo *pmksa,
+ const tANI_U8 *pBSSId,
#else
- tPmkidCacheInfo *pmksa,
+ tANI_U8 *pBSSId,
#endif
tANI_BOOLEAN flush_cache );
@@ -4115,35 +4115,4 @@ bool sme_is_sta_key_exchange_in_progress(tHalHandle hal, uint8_t session_id);
*/
VOS_STATUS sme_process_msg_callback(tHalHandle hal, vos_msg_t *msg);
-/**
- * sme_send_mgmt_tx() - Sends mgmt frame from CSR to LIM
- * @hal: The handle returned by mac_open
- * @session_id: session id
- * @buf: pointer to frame
- * @len: frame length
- *
- * Return: eHalStatus
- */
-eHalStatus sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id,
- const uint8_t *buf, uint32_t len);
-
-#ifdef WLAN_FEATURE_SAE
-/**
- * sme_handle_sae_msg() - Sends SAE message received from supplicant
- * @hal: The handle returned by mac_open
- * @session_id: session id
- * @sae_status: status of SAE authentication
- *
- * Return: HAL_STATUS
- */
-eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
- uint8_t sae_status);
-#else
-static inline eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
- uint8_t sae_status)
-{
- return eHAL_STATUS_SUCCESS;
-}
-#endif
-
#endif //#if !defined( __SME_API_H )
diff --git a/drivers/staging/prima/CORE/SME/inc/sme_Trace.h b/drivers/staging/prima/CORE/SME/inc/sme_Trace.h
index 9fd44957f73c..77ff1d689031 100644
--- a/drivers/staging/prima/CORE/SME/inc/sme_Trace.h
+++ b/drivers/staging/prima/CORE/SME/inc/sme_Trace.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -146,7 +146,6 @@ enum {
TRACE_CODE_SME_RX_HDD_LPHB_CONFIG_REQ,
#endif /* FEATURE_WLAN_LPHB */
TRACE_CODE_SME_RX_HDD_ROAM_DEL_PMKIDCACHE,
- TRACE_CODE_SME_RX_HDD_SEND_MGMT_TX,
TRACE_CODE_SME_TX_HDD_CAP_TSF_REQ,
TRACE_CODE_SME_TX_HDD_GET_TSF_REQ,
TRACE_CODE_SME_DEL_STA_BA_SESSION_REQ,
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
index 17c7ee416cb7..b74a343a2bf3 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -121,51 +121,6 @@ static tCsrRoamSession csrRoamRoamSession[CSR_ROAM_SESSION_MAX];
/*--------------------------------------------------------------------------
Type declarations
------------------------------------------------------------------------*/
-
-#ifdef WLAN_FEATURE_SAE
-/**
- * csr_sae_callback - Update SAE info to CSR roam session
- * @mac_ctx: MAC context
- * @msg_ptr: pointer to SAE message
- *
- * API to update SAE info to roam csr session
- *
- * Return: QDF_STATUS
- */
-static VOS_STATUS csr_sae_callback(tpAniSirGlobal mac_ctx, tSirSmeRsp *msg_ptr)
-{
- tCsrRoamInfo roam_info;
- uint32_t session_id;
- struct sir_sae_info *sae_info;
-
- sae_info = (struct sir_sae_info *) msg_ptr;
- if (!sae_info) {
- smsLog(mac_ctx, LOGE, "SAE info is NULL");
- return VOS_STATUS_E_FAILURE;
- }
-
- smsLog(mac_ctx, LOG1, FL("vdev_id %d "MAC_ADDRESS_STR""),
- sae_info->vdev_id,
- MAC_ADDR_ARRAY(sae_info->peer_mac_addr.bytes));
-
- session_id = sae_info->vdev_id;
- if (session_id == CSR_SESSION_ID_INVALID)
- return VOS_STATUS_E_FAILURE;
-
- roam_info.sae_info = sae_info;
- csrRoamCallCallback(mac_ctx, session_id, &roam_info, 0,
- eCSR_ROAM_SAE_COMPUTE, eCSR_ROAM_RESULT_NONE);
-
- return VOS_STATUS_SUCCESS;
-}
-#else
-static inline VOS_STATUS csr_sae_callback(tpAniSirGlobal mac_ctx,
- tSirSmeRsp *msg_ptr)
-{
- return VOS_STATUS_SUCCESS;
-}
-#endif
-
#ifdef FEATURE_WLAN_DIAG_SUPPORT_CSR
int diagAuthTypeFromCSRType(eCsrAuthType authType)
{
@@ -3367,11 +3322,8 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
pBssConfig->uCfgDot11Mode = eCSR_CFG_DOT11_MODE_11A;
}
}
- smsLog(pMac, LOG1,
- FL("phyMode %d uCfgDot11Mode %d negotiatedAuthType %d"),
- pProfile->phyMode, pBssConfig->uCfgDot11Mode,
- pProfile->negotiatedAuthType);
-
+ smsLog(pMac, LOG1, FL("phyMode %d uCfgDot11Mode %d"),
+ pProfile->phyMode, pBssConfig->uCfgDot11Mode);
//Qos
if ((pBssConfig->uCfgDot11Mode != eCSR_CFG_DOT11_MODE_11N) &&
(pMac->roam.configParam.WMMSupportMode == eCsrRoamWmmNoQos))
@@ -3408,10 +3360,6 @@ eHalStatus csrRoamPrepareBssConfig(tpAniSirGlobal pMac, tCsrRoamProfile *pProfil
case eCSR_AUTH_TYPE_AUTOSWITCH:
pBssConfig->authType = eSIR_AUTO_SWITCH;
break;
- case eCSR_AUTH_TYPE_SAE:
- pBssConfig->authType = eSIR_AUTH_TYPE_SAE;
- break;
-
}
//short slot time
if( eCSR_CFG_DOT11_MODE_11B != cfgDot11Mode )
@@ -3554,10 +3502,6 @@ static eHalStatus csrRoamPrepareBssConfigFromProfile(tpAniSirGlobal pMac, tCsrRo
case eCSR_AUTH_TYPE_AUTOSWITCH:
pBssConfig->authType = eSIR_AUTO_SWITCH;
break;
- case eCSR_AUTH_TYPE_SAE:
- pBssConfig->authType = eSIR_AUTH_TYPE_SAE;
- break;
-
}
//short slot time
if( WNI_CFG_PHY_MODE_11B != pBssConfig->uCfgDot11Mode )
@@ -4610,11 +4554,6 @@ static void csrRoamAssignDefaultParam( tpAniSirGlobal pMac, tSmeCmd *pCommand )
case eCSR_AUTH_TYPE_AUTOSWITCH:
pCommand->u.roamCmd.roamProfile.negotiatedAuthType = eCSR_AUTH_TYPE_AUTOSWITCH;
break;
- case eCSR_AUTH_TYPE_SAE:
- pCommand->u.roamCmd.roamProfile.negotiatedAuthType =
- eCSR_AUTH_TYPE_SAE;
- break;
-
}
pCommand->u.roamCmd.roamProfile.negotiatedUCEncryptionType =
pCommand->u.roamCmd.roamProfile.EncryptionType.encryptionType[0];
@@ -4651,7 +4590,7 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
eCsrJoinState eRoamState = eCsrStopRoaming;
tScanResultList *pBSSList = (tScanResultList *)pCommand->u.roamCmd.hBSSList;
tANI_BOOLEAN fDone = eANI_BOOLEAN_FALSE;
- tCsrRoamInfo *roamInfo, *pRoamInfo = NULL;
+ tCsrRoamInfo roamInfo, *pRoamInfo = NULL;
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
v_U8_t acm_mask = 0;
#endif
@@ -4665,21 +4604,14 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return (eCsrStopRoaming);
}
-
- roamInfo = vos_mem_malloc(sizeof(tCsrRoamInfo));
- if (!roamInfo) {
- smsLog(pMac, LOGE, FL("roamInfo empty"));
- return (eCsrStopRoaming);
- }
-
+
do
{
// Check for Cardbus eject condition, before trying to Roam to any BSS
//***if( !balIsCardPresent(pAdapter) ) break;
- vos_mem_copy (roamInfo->bssid, &pSession->joinFailStatusCode.bssId,
- sizeof(tSirMacAddr));
-
+ vos_mem_set(&roamInfo, sizeof(roamInfo), 0);
+ vos_mem_copy (&roamInfo.bssid, &pSession->joinFailStatusCode.bssId, sizeof(tSirMacAddr));
if(NULL != pBSSList)
{
// When handling AP's capability change, continue to associate to
@@ -4704,13 +4636,11 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
else
{
//We need to indicate to HDD that we are done with this one.
- //this shall not be NULL
- roamInfo->pBssDesc = pCommand->u.roamCmd.pLastRoamBss;
- roamInfo->statusCode =
- pSession->joinFailStatusCode.statusCode;
- roamInfo->reasonCode =
- pSession->joinFailStatusCode.reasonCode;
- pRoamInfo = roamInfo;
+ //vos_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+ roamInfo.pBssDesc = pCommand->u.roamCmd.pLastRoamBss; //this shall not be NULL
+ roamInfo.statusCode = pSession->joinFailStatusCode.statusCode;
+ roamInfo.reasonCode = pSession->joinFailStatusCode.reasonCode;
+ pRoamInfo = &roamInfo;
}
}
while(pCommand->u.roamCmd.pRoamBssEntry)
@@ -4795,7 +4725,7 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
csrSetAbortRoamingCommand(pMac, pCommand);
break;
}
- vos_mem_set(roamInfo, sizeof(roamInfo), 0);
+ vos_mem_set(&roamInfo, sizeof(roamInfo), 0);
if(pScanResult)
{
tDot11fBeaconIEs *pIesLocal = (tDot11fBeaconIEs *)pScanResult->Result.pvIes;
@@ -4806,8 +4736,8 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
eRoamState = eCsrStopRoaming;
break;
}
- roamInfo->pBssDesc = &pScanResult->Result.BssDescriptor;
- pCommand->u.roamCmd.pLastRoamBss = roamInfo->pBssDesc;
+ roamInfo.pBssDesc = &pScanResult->Result.BssDescriptor;
+ pCommand->u.roamCmd.pLastRoamBss = roamInfo.pBssDesc;
//No need to put uapsd_mask in if the BSS doesn't support uAPSD
if( pCommand->u.roamCmd.roamProfile.uapsd_mask &&
CSR_IS_QOS_BSS(pIesLocal) &&
@@ -4831,12 +4761,10 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
{
pCommand->u.roamCmd.roamProfile.uapsd_mask = 0;
}
- roamInfo->pProfile = pProfile;
+ roamInfo.pProfile = pProfile;
pSession->bRefAssocStartCnt++;
- csrRoamCallCallback(pMac, sessionId, roamInfo,
- pCommand->u.roamCmd.roamId,
- eCSR_ROAM_ASSOCIATION_START,
- eCSR_ROAM_RESULT_NONE );
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
+ eCSR_ROAM_ASSOCIATION_START, eCSR_ROAM_RESULT_NONE );
}
if ( NULL == pCommand->u.roamCmd.pRoamBssEntry )
{
@@ -4940,14 +4868,13 @@ static eCsrJoinState csrRoamJoinNextBss( tpAniSirGlobal pMac, tSmeCmd *pCommand,
{
pSession->bRefAssocStartCnt--;
//Complete the last association attemp because a new one is about to be tried
- pRoamInfo = roamInfo;
+ pRoamInfo = &roamInfo;
csrRoamCallCallback(pMac, sessionId, pRoamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_ASSOCIATION_COMPLETION,
eCSR_ROAM_RESULT_NOT_ASSOCIATED);
}
}
- vos_mem_free(roamInfo);
return( eRoamState );
}
@@ -5070,7 +4997,7 @@ eHalStatus csrProcessFTReassocRoamCommand ( tpAniSirGlobal pMac, tSmeCmd *pComma
eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
{
eHalStatus status = eHAL_STATUS_SUCCESS;
- tCsrRoamInfo *roamInfo;
+ tCsrRoamInfo roamInfo;
tANI_U32 sessionId = pCommand->sessionId;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
@@ -5079,7 +5006,6 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return eHAL_STATUS_FAILURE;
}
-
smsLog(pMac, LOG1, FL("Roam Reason : %d, sessionId: %d"),
pCommand->u.roamCmd.roamReason, sessionId);
switch ( pCommand->u.roamCmd.roamReason )
@@ -5119,24 +5045,15 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
}
else
{
- roamInfo = vos_mem_malloc(sizeof(tCsrRoamInfo));
- if (!roamInfo) {
- smsLog(pMac, LOGE, FL("roamInfo empty"));
- return eHAL_STATUS_FAILURE;
- }
-
- roamInfo->reasonCode = eCsrRoamReasonStaCapabilityChanged;
- csrRoamCallCallback(pMac, pSession->sessionId, roamInfo, 0,
- eCSR_ROAM_ROAMING_START,
- eCSR_ROAM_RESULT_NONE);
+ roamInfo.reasonCode = eCsrRoamReasonStaCapabilityChanged;
+ csrRoamCallCallback(pMac, pSession->sessionId, &roamInfo, 0, eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
pSession->roamingReason = eCsrReassocRoaming;
- roamInfo->pBssDesc = pSession->pConnectBssDesc;
- roamInfo->pProfile = &pCommand->u.roamCmd.roamProfile;
+ roamInfo.pBssDesc = pSession->pConnectBssDesc;
+ roamInfo.pProfile = &pCommand->u.roamCmd.roamProfile;
pSession->bRefAssocStartCnt++;
- csrRoamCallCallback(pMac, sessionId, roamInfo, pCommand->u.roamCmd.roamId,
+ csrRoamCallCallback( pMac, sessionId, &roamInfo, pCommand->u.roamCmd.roamId,
eCSR_ROAM_ASSOCIATION_START, eCSR_ROAM_RESULT_NONE );
- vos_mem_free(roamInfo);
smsLog(pMac, LOG1, FL(" calling csrRoamIssueReassociate"));
status = csrRoamIssueReassociate( pMac, sessionId, pSession->pConnectBssDesc, pIes,
&pCommand->u.roamCmd.roamProfile );
@@ -5229,7 +5146,6 @@ eHalStatus csrRoamProcessCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand )
}
break;
}
-
return (status);
}
@@ -5375,7 +5291,7 @@ eHalStatus csrRoamSaveSecurityRspIE(tpAniSirGlobal pMac,
(eCSR_AUTH_TYPE_RSN_PSK_SHA256 == authType) ||
(eCSR_AUTH_TYPE_RSN_8021X_SHA256 == authType)
#endif /* FEATURE_WLAN_WAPI */
- || (eCSR_AUTH_TYPE_SAE == authType))
+ )
{
if( !pIesLocal && (!HAL_STATUS_SUCCESS(csrGetParsedBssDescriptionIEs(pMac, pSirBssDesc, &pIesLocal))) )
{
@@ -8698,7 +8614,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
tScanResultHandle hBSSList;
tANI_BOOLEAN fCallCallback, fRemoveCmd;
eHalStatus status;
- tCsrRoamInfo *roamInfo;
+ tCsrRoamInfo roamInfo;
tCsrScanResultFilter *pScanFilter = NULL;
tANI_U32 roamId = 0;
tCsrRoamProfile *pCurRoamProfile = NULL;
@@ -8707,19 +8623,13 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
#endif
tANI_U32 sessionId;
tCsrRoamSession *pSession = NULL;
- tSirSmeDisassocRsp *SmeDisassocRsp = NULL;
- SmeDisassocRsp = vos_mem_malloc(sizeof(tSirSmeDisassocRsp));
- if (!SmeDisassocRsp) {
- smsLog(pMac, LOGE, FL("SmeDisassocRsp empty"));
- return;
- }
+ tSirSmeDisassocRsp SmeDisassocRsp;
- csrSerDesUnpackDiassocRsp((tANI_U8 *)pSmeRsp, SmeDisassocRsp);
- sessionId = SmeDisassocRsp->sessionId;
- statusCode = SmeDisassocRsp->statusCode;
+ csrSerDesUnpackDiassocRsp((tANI_U8 *)pSmeRsp, &SmeDisassocRsp);
+ sessionId = SmeDisassocRsp.sessionId;
+ statusCode = SmeDisassocRsp.statusCode;
- vos_mem_free(SmeDisassocRsp);
smsLog( pMac, LOG2, "csrRoamRoamingStateDisassocRspProcessor sessionId %d", sessionId);
if ( csrIsConnStateInfra( pMac, sessionId ) )
@@ -8733,7 +8643,7 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
if ( CSR_IS_ROAM_SUBSTATE_DISASSOC_NO_JOIN( pMac, sessionId ) )
{
smsLog( pMac, LOG2, "***eCsrNothingToJoin***");
@@ -8835,22 +8745,15 @@ void csrRoamRoamingStateDisassocRspProcessor( tpAniSirGlobal pMac, tSirSmeDisass
smsLog( pMac, LOGE, "%s: NO commands are active", __func__ );
}
- roamInfo = vos_mem_malloc(sizeof(tCsrRoamInfo));
- if (!roamInfo) {
- smsLog(pMac, LOGE, FL("roamInfo empty"));
- goto POST_ROAM_FAILURE;
- }
/* Notify HDD about handoff and provide the BSSID too */
- roamInfo->reasonCode = eCsrRoamReasonBetterAP;
+ roamInfo.reasonCode = eCsrRoamReasonBetterAP;
- vos_mem_copy(roamInfo->bssid,
+ vos_mem_copy(roamInfo.bssid,
pMac->roam.neighborRoamInfo.csrNeighborRoamProfile.BSSIDs.bssid,
sizeof(tSirMacAddr));
- csrRoamCallCallback(pMac, sessionId, roamInfo, 0,
- eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
-
- vos_mem_free(roamInfo);
+ csrRoamCallCallback(pMac,sessionId, &roamInfo, 0,
+ eCSR_ROAM_ROAMING_START, eCSR_ROAM_RESULT_NONE);
/* Copy the connected profile to apply the same for this connection as well */
pCurRoamProfile = vos_mem_malloc(sizeof(tCsrRoamProfile));
@@ -8889,17 +8792,11 @@ POST_ROAM_FAILURE:
if (pCurRoamProfile)
vos_mem_free(pCurRoamProfile);
- roamInfo = vos_mem_malloc(sizeof(tCsrRoamInfo));
- if (!roamInfo) {
- smsLog(pMac, LOGE, FL("roamInfo empty"));
- return;
- }
-
/* Inform the upper layers that the reassoc failed */
- csrRoamCallCallback(pMac, sessionId, roamInfo, 0,
- eCSR_ROAM_FT_REASSOC_FAILED, eSIR_SME_SUCCESS);
+ vos_mem_zero(&roamInfo, sizeof(tCsrRoamInfo));
+ csrRoamCallCallback(pMac, sessionId,
+ &roamInfo, 0, eCSR_ROAM_FT_REASSOC_FAILED, eSIR_SME_SUCCESS);
- vos_mem_free(roamInfo);
/*
* Issue a disassoc request so that PE/LIM uses this to clean-up the FT session.
* Upon success, we would re-enter this routine after receiving the disassoc
@@ -9001,7 +8898,7 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
{
tSirSmeRsp *pSmeRsp;
tSmeIbssPeerInd *pIbssPeerInd;
- tCsrRoamInfo *roamInfo;
+ tCsrRoamInfo roamInfo;
// TODO Session Id need to be acquired in this function
tANI_U32 sessionId = 0;
pSmeRsp = (tSirSmeRsp *)pMsgBuf;
@@ -9088,42 +8985,28 @@ void csrRoamingStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
case eWNI_SME_IBSS_PEER_DEPARTED_IND:
pIbssPeerInd = (tSmeIbssPeerInd*)pSmeRsp;
smsLog(pMac, LOGE, "CSR: Peer departed notification from LIM in joining state");
- roamInfo = vos_mem_malloc(sizeof(tCsrRoamInfo));
- if (!roamInfo) {
- smsLog(pMac, LOGE, FL("roamInfo empty"));
- return;
- }
- roamInfo->staId = (tANI_U8)pIbssPeerInd->staId;
- roamInfo->ucastSig = (tANI_U8)pIbssPeerInd->ucastSig;
- roamInfo->bcastSig = (tANI_U8)pIbssPeerInd->bcastSig;
- vos_mem_copy(roamInfo->peerMac, pIbssPeerInd->peerAddr,
+ vos_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+ roamInfo.staId = (tANI_U8)pIbssPeerInd->staId;
+ roamInfo.ucastSig = (tANI_U8)pIbssPeerInd->ucastSig;
+ roamInfo.bcastSig = (tANI_U8)pIbssPeerInd->bcastSig;
+ vos_mem_copy(&roamInfo.peerMac, pIbssPeerInd->peerAddr,
sizeof(tCsrBssid));
- csrRoamCallCallback(pMac, sessionId, roamInfo, 0,
+ csrRoamCallCallback(pMac, sessionId, &roamInfo, 0,
eCSR_ROAM_CONNECT_STATUS_UPDATE,
eCSR_ROAM_RESULT_IBSS_PEER_DEPARTED);
- vos_mem_free(roamInfo);
break;
case eWNI_SME_LOST_LINK_PARAMS_IND:
{
tpSirSmeLostLinkParamsInd pLostLinkParamsInd = (tpSirSmeLostLinkParamsInd)pSmeRsp;
+ tCsrRoamInfo roamInfo, *pRoamInfo = NULL;
eCsrRoamResult result = eCSR_ROAM_RESULT_NONE;
- roamInfo = vos_mem_malloc(sizeof(tCsrRoamInfo));
- if (!roamInfo) {
- smsLog(pMac, LOGE, FL("roamInfo empty"));
- return;
- }
- roamInfo->u.pLostLinkParams = &pLostLinkParamsInd->info;
+ vos_mem_set(&roamInfo, sizeof(tCsrRoamInfo), 0);
+ roamInfo.u.pLostLinkParams = &pLostLinkParamsInd->info;
+ pRoamInfo = &roamInfo;
csrRoamCallCallback(pMac, pLostLinkParamsInd->sessionId,
- roamInfo, 0, eCSR_ROAM_LOST_LINK_PARAMS_IND,
- result);
- vos_mem_free(roamInfo);
+ pRoamInfo, 0, eCSR_ROAM_LOST_LINK_PARAMS_IND, result);
break;
}
- case eWNI_SME_TRIGGER_SAE:
- smsLog(pMac, LOG1, FL("Invoke SAE callback"));
- csr_sae_callback(pMac, pSmeRsp);
- break;
-
default:
smsLog(pMac, LOG1,
FL("Unexpected message type = %d[0x%X] received in substate %s"),
@@ -12925,49 +12808,6 @@ tANI_U32 csrRoamGetNumBKIDCache(tpAniSirGlobal pMac, tANI_U32 sessionId)
return (pMac->roam.roamSession[sessionId].NumBkidCache);
}
#endif /* FEATURE_WLAN_WAPI */
-
-static void csr_update_pmk_cache(tCsrRoamSession *pSession,
- tPmkidCacheInfo *pmksa)
-{
- uint16_t cache_idx = pSession->CurCacheIndex;
-
- /* Add entry to the cache */
- pSession->PmkidCacheInfo[cache_idx].ssid_len = 0;
- 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);
-
- pSession->PmkidCacheInfo[cache_idx].pmk_len = 0;
- if (pmksa->pmk_len && pmksa->pmk_len <= CSR_RSN_MAX_PMK_LEN) {
- vos_mem_copy(pSession->PmkidCacheInfo[cache_idx].pmk,
- pmksa->pmk, pmksa->pmk_len);
- pSession->PmkidCacheInfo[cache_idx].pmk_len = pmksa->pmk_len;
- }
-
- /* Increment the CSR local cache index */
- if (cache_idx < (CSR_MAX_PMKID_ALLOWED - 1))
- pSession->CurCacheIndex++;
- else
- pSession->CurCacheIndex = 0;
-
- pSession->NumPmkidCache++;
- if (pSession->NumPmkidCache > CSR_MAX_PMKID_ALLOWED)
- pSession->NumPmkidCache = CSR_MAX_PMKID_ALLOWED;
-}
-
eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
tPmkidCacheInfo *pPMKIDCache,
tANI_U32 numItems,
@@ -13019,10 +12859,25 @@ eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
pmksa = &pPMKIDCache[i];
/* Delete the entry if present */
- csrRoamDelPMKIDfromCache(pMac,sessionId,pmksa,FALSE);
-
- csr_update_pmk_cache(pSession, pmksa);
+ csrRoamDelPMKIDfromCache(pMac,sessionId,pmksa->BSSID,FALSE);
+
+ /* Add entry to the cache */
+ vos_mem_copy(
+ pSession->PmkidCacheInfo[pSession->CurCacheIndex].BSSID,
+ pmksa->BSSID, VOS_MAC_ADDR_SIZE);
+ vos_mem_copy(
+ pSession->PmkidCacheInfo[pSession->CurCacheIndex].PMKID,
+ pmksa->PMKID, CSR_RSN_PMKID_SIZE);
+
+ /* Increment the CSR local cache index */
+ if (pSession->CurCacheIndex < (CSR_MAX_PMKID_ALLOWED - 1))
+ pSession->CurCacheIndex++;
+ else
+ pSession->CurCacheIndex = 0;
+ pSession->NumPmkidCache++;
+ if(pSession->NumPmkidCache > CSR_MAX_PMKID_ALLOWED)
+ pSession->NumPmkidCache = CSR_MAX_PMKID_ALLOWED;
}
}
}
@@ -13031,9 +12886,9 @@ eHalStatus csrRoamSetPMKIDCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
- tPmkidCacheInfo *pmksa,
+ const tANI_U8 *pBSSId,
#else
- tPmkidCacheInfo *pmksa,
+ tANI_U8 *pBSSId,
#endif
tANI_BOOLEAN flush_cache )
{
@@ -13042,7 +12897,6 @@ eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
tANI_U32 Index;
tANI_U32 CurIndex;
tANI_U32 i;
- tPmkidCacheInfo *cached_pmksa;
if(!pSession)
{
@@ -13058,28 +12912,20 @@ eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
if (!flush_cache) {
for (Index = 0; Index < CSR_MAX_PMKID_ALLOWED; Index++) {
- cached_pmksa = &pSession->PmkidCacheInfo[Index];
- if (((!cached_pmksa->ssid_len) &&
- vos_is_macaddr_equal((v_MACADDR_t *)cached_pmksa->BSSID,
- (v_MACADDR_t *)pmksa->BSSID))) {
- fMatchFound = 1;
-
- } else if ((!vos_mem_compare(cached_pmksa->ssid,
- pmksa->ssid, pmksa->ssid_len)) &&
- (!vos_mem_compare(cached_pmksa->cache_id,
- pmksa->cache_id, CACHE_ID_LEN)))
- fMatchFound = 1;
-
- if(fMatchFound) {
+ if (vos_mem_compare(pSession->PmkidCacheInfo[Index].BSSID,
+ pBSSId, VOS_MAC_ADDR_SIZE)) {
+ fMatchFound = 1;
+
/* Clear this - the matched entry */
- vos_mem_zero(cached_pmksa, sizeof(tPmkidCacheInfo));
+ vos_mem_zero(&pSession->PmkidCacheInfo[Index],
+ sizeof(tPmkidCacheInfo));
break;
}
}
if (Index == CSR_MAX_PMKID_ALLOWED && !fMatchFound) {
- smsLog(pMac, LOG1, FL("No such PMKSA entry exists "));
-
+ smsLog(pMac, LOG1, FL("No such PMKSA entry exists "MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(pBSSId));
}
else {
/* Match Found */
@@ -13481,40 +13327,6 @@ static eHalStatus csrRoamStartWds( tpAniSirGlobal pMac, tANI_U32 sessionId, tCsr
return( status );
}
-#ifdef WLAN_FEATURE_SAE
-/*
- * csr_update_sae_config: Copy SAE info to join request
- * @profile: pointer to profile
- * @csr_join_req: csr join request
- *
- * Return: None
- */
-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, bssid, VOS_MAC_ADDR_SIZE);
-
- 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, sae_pmk_cached,
- MAC_ADDR_ARRAY(bssid));
-
- return sae_pmk_cached;
-}
-#else
-static bool csr_update_sae_config(tSirMacAddr bssid, tpAniSirGlobal mac,
- tCsrRoamSession *session)
-{
- return false;
-}
-#endif
-
////////////////////Mail box
//pBuf is caller allocated memory point to &(tSirSmeJoinReq->rsnIE.rsnIEdata[ 0 ]) + pMsg->rsnIE.length;
@@ -13714,8 +13526,6 @@ 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;
@@ -15842,7 +15652,7 @@ eHalStatus csrSendMBStartBssReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, eCs
//Persona
*pBuf = (tANI_U8)pParam->bssPersona;
pBuf++;
-
+
//txLdpcIniFeatureEnabled
*pBuf = (tANI_U8)(tANI_U8)pMac->roam.configParam.txLdpcEnable;
pBuf++;
@@ -17841,13 +17651,6 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
currChannelListInfo = &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
- pSession = CSR_GET_SESSION( pMac, sessionId );
- if (!pSession) {
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "%s:pSession is null", __func__);
- return eHAL_STATUS_FAILURE;
- }
-
if (0 == csrRoamIsRoamOffloadScanEnabled(pMac))
{
smsLog( pMac, LOGE,"isRoamOffloadScanEnabled not set");
@@ -17860,21 +17663,6 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
return eHAL_STATUS_FAILURE;
}
- /* Roaming is not supported currently for SAE authentication */
- if (pSession->pCurRoamProfile &&
- CSR_IS_AUTH_TYPE_SAE(pSession->pCurRoamProfile->AuthType.authType[0])) {
- smsLog(pMac, LOGE, "Roaming not suppprted for SAE connection");
- return eHAL_STATUS_SUCCESS;
- }
-
- /* Roaming is not supported currently for OWE akm */
- if (pSession->pCurRoamProfile &&
- (pSession->pCurRoamProfile->AuthType.authType[0] == eCSR_AUTH_TYPE_OWE))
- {
- smsLog(pMac, LOGE, "Roaming not suppprted for OWE connection");
- return eHAL_STATUS_SUCCESS;
- }
-
/*The Dynamic Config Items Update may happen even if the state is in INIT.
* It is important to ensure that the command is passed down to the FW only
* if the Infra Station is in a connected state.A connected station could also be
@@ -17916,6 +17704,13 @@ eHalStatus csrRoamOffloadScan(tpAniSirGlobal pMac, tANI_U8 command, tANI_U8 reas
"%s: Not able to find the sessionId for Roam Offload scan request", __func__);
return eHAL_STATUS_FAILURE;
}
+ pSession = CSR_GET_SESSION( pMac, sessionId );
+ if (NULL == pSession)
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s:pSession is null", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
pBssDesc = pSession->pConnectBssDesc;
if (pBssDesc == NULL)
{
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
index 72aecc0bfb9a..90f835474f75 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
@@ -123,6 +123,7 @@ tCsrIgnoreChannels countryIgnoreList[MAX_COUNTRY_IGNORE] = {
tCsrIgnoreChannels countryIgnoreList[MAX_COUNTRY_IGNORE] = { };
#endif //CONFIG_ENABLE_LINUX_REG
+#define CSR_IS_SOCIAL_CHANNEL(channel) (((channel) == 1) || ((channel) == 6) || ((channel) == 11) )
//*** This is temporary work around. It need to call CCM api to get to CFG later
/// Get string parameter value
extern tSirRetStatus wlan_cfgGetStr(tpAniSirGlobal, tANI_U16, tANI_U8*, tANI_U32*);
@@ -6668,8 +6669,6 @@ eHalStatus csrProcessMacAddrSpoofCommand( tpAniSirGlobal pMac, tSmeCmd *pCommand
// spoof mac address
vos_mem_copy((tANI_U8 *)pMsg->macAddr,
(tANI_U8 *)pCommand->u.macAddrSpoofCmd.macAddr, sizeof(tSirMacAddr));
- vos_mem_copy((tANI_U8 *)pMac->roam.spoof_mac_addr,
- (tANI_U8 *)pCommand->u.macAddrSpoofCmd.macAddr, sizeof(tSirMacAddr));
pMsg->spoof_mac_oui =
pal_cpu_to_be16(pCommand->u.macAddrSpoofCmd.spoof_mac_oui);
@@ -7061,7 +7060,9 @@ eHalStatus csrScanCopyRequest(tpAniSirGlobal pMac, tCsrScanRequest *pDstReq, tCs
{
if((csrRoamIsValidChannel(pMac,
pSrcReq->ChannelInfo.
- ChannelList[index])))
+ ChannelList[index])) ||
+ ((eCSR_SCAN_P2P_DISCOVERY == pSrcReq->requestType) &&
+ CSR_IS_SOCIAL_CHANNEL(pSrcReq->ChannelInfo.ChannelList[index])))
{
/*Skiipping DFS Channels for 1st scan */
if(NV_CHANNEL_DFS ==
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrInsideApi.h b/drivers/staging/prima/CORE/SME/src/csr/csrInsideApi.h
index 7d80c89c9219..81c3f166050c 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrInsideApi.h
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrInsideApi.h
@@ -1112,9 +1112,9 @@ eHalStatus csrScanCreateEntryInScanCache(tpAniSirGlobal pMac, tANI_U32 sessionId
eHalStatus csrUpdateChannelList(tpAniSirGlobal pMac);
eHalStatus csrRoamDelPMKIDfromCache( tpAniSirGlobal pMac, tANI_U32 sessionId,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
- tPmkidCacheInfo *pmksa,
+ const tANI_U8 *pBSSId,
#else
- tPmkidCacheInfo *pmksa,
+ tANI_U8 *pBSSId,
#endif
tANI_BOOLEAN flush_cache );
tANI_BOOLEAN csrElectedCountryInfo(tpAniSirGlobal pMac);
@@ -1123,18 +1123,6 @@ void csrClearVotesForCountryInfo(tpAniSirGlobal pMac);
void csr_remove_bssid_from_scan_list(tpAniSirGlobal pMac,
tSirMacAddr bssid);
-/**
- * csr_lookup_pmkid_using_bssid() - lookup pmkid using bssid
- * @mac: pointer to mac
- * @session: sme session pointer
- * @pmk_cache: pointer to pmk cache
- * @index: index value needs to be seached
- *
- * Return: true if pmkid is found else false
- */
-bool csr_lookup_pmkid_using_bssid(tpAniSirGlobal mac, tCsrRoamSession *session,
- tPmkidCacheInfo *pmk_cache, uint32_t *index);
-
#ifdef WLAN_FEATURE_AP_HT40_24G
eHalStatus csrSetHT2040Mode(tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U8 cbMode);
#endif
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c b/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c
index 338899d16d5d..229ed17c075d 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrNeighborRoam.c
@@ -3814,18 +3814,9 @@ VOS_STATUS csrNeighborRoamTransitToCFGChanScan(tpAniSirGlobal pMac)
tpCsrChannelInfo currChannelListInfo;
tANI_U8 scanChannelList[WNI_CFG_VALID_CHANNEL_LIST_LEN];
int outputNumOfChannels = 0;
+#ifdef FEATURE_WLAN_LFR
tANI_U32 sessionId = pNeighborRoamInfo->csrSessionId;
- VOS_STATUS vos_status;
-
- vos_status = WLANTL_updateSpoofMacAddr(pMac->roam.gVosContext,
- (v_MACADDR_t*)&pMac->roam.spoof_mac_addr,
- (v_MACADDR_t*)&pMac->roam.roamSession[sessionId].selfMacAddr);
- if (vos_status != VOS_STATUS_SUCCESS)
- {
- smsLog(pMac, LOGE, FL("Failed to update MAC Spoof Addr in TL"));
- return vos_status;
- }
-
+#endif
currChannelListInfo = &pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo;
if (
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c b/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
index a9bec9509669..3d23fa502b3e 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2017, 2019-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -70,22 +70,7 @@ tANI_U8 csrRSNOui[][ CSR_RSN_OUI_SIZE ] = {
{ 0x00, 0x40, 0x96, 0x00 }, // CCKM
{ 0x00, 0x0F, 0xAC, 0x06 }, // BIP (encryption type) or RSN-PSK-SHA256 (authentication type)
/* RSN-8021X-SHA256 (authentication type) */
- { 0x00, 0x0F, 0xAC, 0x05 },
-#ifdef WLAN_FEATURE_SAE
-#define ENUM_SAE 9
- /* SAE */
- {0x00, 0x0F, 0xAC, 0x08},
-#define ENUM_FT_SAE 10
- /* FT SAE */
- {0x00, 0x0F, 0xAC, 0x09},
-#else
- {0x00, 0x00, 0x00, 0x00},
- {0x00, 0x00, 0x00, 0x00},
- #endif
- /* define new oui here */
-#define ENUM_OWE 11
- /* OWE https://tools.ietf.org/html/rfc8110 */
- {0x00, 0x0F, 0xAC, 0x12},
+ { 0x00, 0x0F, 0xAC, 0x05 }
};
#ifdef FEATURE_WLAN_WAPI
@@ -1321,7 +1306,6 @@ get_eRoamCmdStatus_str(eRoamCmdStatus val)
CASE_RETURN_STR(eCSR_ROAM_LOST_LINK_PARAMS_IND);
CASE_RETURN_STR(eCSR_ROAM_ECSA_BCN_TX_IND);
CASE_RETURN_STR(eCSR_ROAM_ECSA_CHAN_CHANGE_RSP);
- CASE_RETURN_STR(eCSR_ROAM_SAE_COMPUTE);
default:
return "unknown";
}
@@ -2861,14 +2845,7 @@ tANI_BOOLEAN csrIsProfileRSN( tCsrRoamProfile *pProfile )
case eCSR_AUTH_TYPE_RSN_PSK_SHA256:
case eCSR_AUTH_TYPE_RSN_8021X_SHA256:
#endif
- fRSNProfile = true;
- break;
- case eCSR_AUTH_TYPE_SAE:
- fRSNProfile = true;
- break;
-
- case eCSR_AUTH_TYPE_OWE:
- fRSNProfile = true;
+ fRSNProfile = TRUE;
break;
default:
@@ -3614,42 +3591,6 @@ static tANI_BOOLEAN csrIsAuthRSN8021xSha256(tpAniSirGlobal pMac,
}
#endif
-#ifdef WLAN_FEATURE_SAE
-/**
- * csr_is_auth_wpa_sae() - check whether oui is SAE
- * @mac: Global MAC context
- * @all_suites: pointer to all supported akm suites
- * @suite_count: all supported akm suites count
- * @oui: Oui needs to be matched
- *
- * Return: True if OUI is SAE, false otherwise
- */
-static bool csr_is_auth_wpa_sae(tpAniSirGlobal mac,
- uint8_t all_suites[][CSR_RSN_OUI_SIZE],
- uint8_t suite_count, uint8_t oui[])
-{
- return csrIsOuiMatch(mac, all_suites, suite_count, csrRSNOui[ENUM_SAE],
- oui);
-}
-#endif
-
-/**
- * csr_is_auth_wpa_sae() - check whether oui is OWE
- * @mac: Global MAC context
- * @all_suites: pointer to all supported akm suites
- * @suite_count: all supported akm suites count
- * @oui: Oui needs to be matched
- *
- * Return: True if OUI is SAE, false otherwise
- */
-static bool csr_is_auth_wpa_owe(tpAniSirGlobal mac,
- uint8_t all_suites[][CSR_RSN_OUI_SIZE],
- uint8_t suite_count, uint8_t oui[])
-{
- return csrIsOuiMatch
- (mac, all_suites, suite_count, csrRSNOui[ENUM_OWE], oui);
-}
-
static tANI_BOOLEAN csrIsAuthWpa( tpAniSirGlobal pMac, tANI_U8 AllSuites[][CSR_WPA_OUI_SIZE],
tANI_U8 cAllSuites,
tANI_U8 Oui[] )
@@ -3767,48 +3708,6 @@ tANI_U8 csrGetOUIIndexFromCipher( eCsrEncryptionType enType )
return OUIIndex;
}
-#ifdef WLAN_FEATURE_SAE
-/**
- * csr_check_sae_auth() - update negotiated auth if matches to SAE auth type
- * @mac_ctx: pointer to mac context
- * @authsuites: auth suites
- * @c_auth_suites: auth suites count
- * @authentication: authentication
- * @auth_type: authentication type list
- * @index: current counter
- * @neg_authtype: pointer to negotiated auth
- *
- * Return: None
- */
-static void csr_check_sae_auth(tpAniSirGlobal mac_ctx,
- uint8_t authsuites[][CSR_RSN_OUI_SIZE],
- uint8_t c_auth_suites,
- uint8_t authentication[],
- tCsrAuthList *auth_type,
- uint8_t index, eCsrAuthType *neg_authtype)
-{
- if ((*neg_authtype == eCSR_AUTH_TYPE_UNKNOWN) &&
- csr_is_auth_wpa_sae(mac_ctx, authsuites, c_auth_suites,
- authentication)) {
- if (eCSR_AUTH_TYPE_SAE == auth_type->authType[index])
- *neg_authtype = eCSR_AUTH_TYPE_SAE;
- if (eCSR_AUTH_TYPE_OPEN_SYSTEM == auth_type->authType[index])
- *neg_authtype = eCSR_AUTH_TYPE_OPEN_SYSTEM;
- }
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- FL("negotiated auth type is %d"), *neg_authtype);
-}
-#else
-static void csr_check_sae_auth(tpAniSirGlobal mac_ctx,
- uint8_t authsuites[][CSR_RSN_OUI_SIZE],
- uint8_t c_auth_suites,
- uint8_t authentication[],
- tCsrAuthList *auth_type,
- uint8_t index, eCsrAuthType *neg_authtype)
-{
-}
-#endif
-
tANI_BOOLEAN csrGetRSNInformation( tHalHandle hHal, tCsrAuthList *pAuthType, eCsrEncryptionType enType, tCsrEncryptionList *pMCEncryption,
tDot11fIERSN *pRSNIe,
tANI_U8 *UnicastCypher,
@@ -3871,11 +3770,6 @@ tANI_BOOLEAN csrGetRSNInformation( tHalHandle hHal, tCsrAuthList *pAuthType, eCs
for (i = 0 ; i < pAuthType->numEntries; i++)
{
//Ciphers are supported, Match authentication algorithm and pick first matching authtype.
-
- /* Set SAE as first preference */
- csr_check_sae_auth(pMac, AuthSuites, cAuthSuites,
- Authentication, pAuthType, i, &negAuthType);
-
#ifdef WLAN_FEATURE_VOWIFI_11R
/* Changed the AKM suites according to order of preference */
if ( csrIsFTAuthRSN( pMac, AuthSuites, cAuthSuites, Authentication ) )
@@ -3921,12 +3815,6 @@ tANI_BOOLEAN csrGetRSNInformation( tHalHandle hHal, tCsrAuthList *pAuthType, eCs
negAuthType = eCSR_AUTH_TYPE_RSN_8021X_SHA256;
}
#endif
- if ((negAuthType == eCSR_AUTH_TYPE_UNKNOWN) &&
- csr_is_auth_wpa_owe(pMac, AuthSuites,
- cAuthSuites, Authentication)) {
- if (eCSR_AUTH_TYPE_OWE == pAuthType->authType[i])
- negAuthType = eCSR_AUTH_TYPE_OWE;
- }
// The 1st auth type in the APs RSN IE, to match stations connecting
// profiles auth type will cause us to exit this loop
@@ -4095,30 +3983,8 @@ tANI_BOOLEAN csrIsRSNMatch( tHalHandle hHal, tCsrAuthList *pAuthType,
return( fRSNMatch );
}
-bool csr_lookup_pmkid_using_bssid(tpAniSirGlobal mac,
- tCsrRoamSession *session,
- tPmkidCacheInfo *pmk_cache,
- uint32_t *index)
-{
- uint32_t i;
- tPmkidCacheInfo *session_pmk;
-
- for (i = 0; i < session->NumPmkidCache; i++) {
- session_pmk = &session->PmkidCacheInfo[i];
- if (vos_is_macaddr_equal((v_MACADDR_t *)pmk_cache->BSSID,
- (v_MACADDR_t *)session_pmk->BSSID)) {
- /* match found */
- *index = i;
- return true;
- }
- }
-
- return false;
-}
-
-tANI_BOOLEAN csrLookupPMKID(tpAniSirGlobal pMac, tANI_U32 sessionId,
- tPmkidCacheInfo *pmk_cache)
+tANI_BOOLEAN csrLookupPMKID( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U8 *pBSSId, tANI_U8 *pPMKId )
{
tANI_BOOLEAN fRC = FALSE, fMatchFound = FALSE;
tANI_U32 Index;
@@ -4138,29 +4004,26 @@ tANI_BOOLEAN csrLookupPMKID(tpAniSirGlobal pMac, tANI_U32 sessionId,
pSession->fIgnorePMKIDCache = FALSE;
return fRC;
}
+
+ do
+ {
+ for( Index=0; Index < CSR_MAX_PMKID_ALLOWED; Index++ )
+ {
+ if( vos_mem_compare(pBSSId, pSession->PmkidCacheInfo[Index].BSSID, sizeof(tCsrBssid)) )
+ {
+ // match found
+ fMatchFound = TRUE;
+ break;
+ }
+ }
- /* If not able to find using cache id or ssid_len is not present */
- fMatchFound = csr_lookup_pmkid_using_bssid(pMac, pSession, pmk_cache,
- &Index);
-
- if (!fMatchFound) {
- smsLog(pMac, LOG2, "No PMKID Match Found");
- return false;
- }
-
- if (pSession->PmkidCacheInfo[Index].pmk_len > CSR_RSN_MAX_PMK_LEN) {
- smsLog(pMac, LOG2, "PMK length %d is invalid",
- pSession->PmkidCacheInfo[Index].pmk_len);
- return false;
- }
-
- vos_mem_copy(pmk_cache->PMKID, pSession->PmkidCacheInfo[Index].PMKID, CSR_RSN_PMKID_SIZE);
- vos_mem_copy(pmk_cache->pmk, pSession->PmkidCacheInfo[Index].pmk,
- pSession->PmkidCacheInfo[Index].pmk_len);
- pmk_cache->pmk_len = pSession->PmkidCacheInfo[Index].pmk_len;
+ if( !fMatchFound ) break;
- fRC = TRUE;
+ vos_mem_copy(pPMKId, pSession->PmkidCacheInfo[Index].PMKID, CSR_RSN_PMKID_SIZE);
+ fRC = TRUE;
+ }
+ while( 0 );
smsLog(pMac, LOG1, "csrLookupPMKID called return match = %d pMac->roam.NumPmkidCache = %d",
fRC, pSession->NumPmkidCache);
@@ -4180,7 +4043,7 @@ tANI_U8 csrConstructRSNIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile
tCsrRSNAuthIe *pAuthSuite;
tCsrRSNCapabilities RSNCapabilities;
tCsrRSNPMKIe *pPMK;
- tPmkidCacheInfo pmkid_cache;
+ tANI_U8 PMKId[CSR_RSN_PMKID_SIZE];
uint32_t ret;
#ifdef WLAN_FEATURE_11W
tANI_U8 *pGroupMgmtCipherSuite;
@@ -4191,8 +4054,6 @@ tANI_U8 csrConstructRSNIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile
smsLog(pMac, LOGW, "%s called...", __func__);
- vos_mem_zero(&pmkid_cache, sizeof(pmkid_cache));
-
do
{
if ( !csrIsProfileRSN( pProfile ) ) break;
@@ -4250,19 +4111,16 @@ tANI_U8 csrConstructRSNIe( tHalHandle hHal, tANI_U32 sessionId, tCsrRoamProfile
*(tANI_U16 *)( &pAuthSuite->AuthOui[ 1 ] ) = *((tANI_U16 *)(&RSNCapabilities));
pPMK = (tCsrRSNPMKIe *)( ((tANI_U8 *)(&pAuthSuite->AuthOui[ 1 ])) + sizeof(tANI_U16) );
- vos_mem_copy((v_MACADDR_t *)pmkid_cache.BSSID,
- (v_MACADDR_t *)pSirBssDesc->bssId, VOS_MAC_ADDR_SIZE);
if (
#ifdef FEATURE_WLAN_ESE
(eCSR_AUTH_TYPE_CCKM_RSN != negAuthType) &&
#endif
- csrLookupPMKID( pMac, sessionId, &pmkid_cache))
+ csrLookupPMKID( pMac, sessionId, pSirBssDesc->bssId, &(PMKId[0]) ) )
{
pPMK->cPMKIDs = 1;
- vos_mem_copy(pPMK->PMKIDList[0].PMKID, pmkid_cache.PMKID,
- CSR_RSN_PMKID_SIZE);
+ vos_mem_copy(pPMK->PMKIDList[0].PMKID, PMKId, CSR_RSN_PMKID_SIZE);
}
else
{
diff --git a/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c b/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
index 94f44a12a508..a859cdd6ba17 100644
--- a/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
+++ b/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
@@ -4488,9 +4488,9 @@ eHalStatus sme_RoamSetPMKIDCache( tHalHandle hHal, tANI_U8 sessionId,
eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,18,0))
- tPmkidCacheInfo *pmksa,
+ const tANI_U8 *pBSSId,
#else
- tPmkidCacheInfo *pmksa,
+ tANI_U8 *pBSSId,
#endif
tANI_BOOLEAN flush_cache )
{
@@ -4505,7 +4505,7 @@ eHalStatus sme_RoamDelPMKIDfromCache( tHalHandle hHal, tANI_U8 sessionId,
if( CSR_IS_SESSION_VALID( pMac, sessionId ) )
{
status = csrRoamDelPMKIDfromCache( pMac, sessionId,
- pmksa, flush_cache );
+ pBSSId, flush_cache );
}
else
{
@@ -15324,104 +15324,3 @@ uint32_t sme_unpack_rsn_ie(tHalHandle hal, uint8_t *buf,
return dot11fUnpackIeRSN(mac_ctx, buf, buf_len, rsn_ie);
}
-
-/**
- * sme_prepare_mgmt_tx() - Prepares mgmt frame
- * @hal: The handle returned by mac_open
- * @session_id: session id
- * @buf: pointer to frame
- * @len: frame length
- *
- * Return: eHalStatus
- */
-static eHalStatus sme_prepare_mgmt_tx(tHalHandle hal, uint8_t session_id,
- const uint8_t *buf, uint32_t len)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
- vos_msg_t vos_message;
- struct sir_mgmt_msg *msg;
- uint16_t msg_len;
-
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
- ("prepares auth frame"));
-
- msg_len = sizeof(*msg) + len;
- msg = vos_mem_malloc(msg_len);
- if (msg == NULL) {
- status = eHAL_STATUS_FAILED_ALLOC;
- } else {
- msg->type = eWNI_SME_SEND_MGMT_FRAME_TX;
- msg->msg_len = msg_len;
- msg->session_id = session_id;
- msg->data = (uint8_t *)msg + sizeof(*msg);
- vos_mem_copy(msg->data, buf, len);
- vos_message.bodyptr = msg;
- vos_message.type = eWNI_SME_SEND_MGMT_FRAME_TX;
- vos_status = vos_mq_post_message(VOS_MQ_ID_PE, &vos_message);
- if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
- vos_mem_free(msg);
- status = eHAL_STATUS_FAILURE;
- }
- }
- return status;
-}
-
-eHalStatus sme_send_mgmt_tx(tHalHandle hal, uint8_t session_id,
- const uint8_t *buf, uint32_t len)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal mac = PMAC_STRUCT(hal);
-
- MTRACE(vos_trace(VOS_MODULE_ID_SME,
- TRACE_CODE_SME_RX_HDD_SEND_MGMT_TX, session_id, 0));
-
- status = sme_AcquireGlobalLock(&mac->sme);
- if (HAL_STATUS_SUCCESS(status)) {
- status = sme_prepare_mgmt_tx(hal, session_id, buf, len);
- sme_ReleaseGlobalLock(&mac->sme);
- }
-
- return status;
-}
-
-#ifdef WLAN_FEATURE_SAE
-eHalStatus sme_handle_sae_msg(tHalHandle hal, uint8_t session_id,
- uint8_t sae_status)
-{
- eHalStatus hal_status = eHAL_STATUS_SUCCESS;
- tpAniSirGlobal mac = PMAC_STRUCT(hal);
- struct sir_sae_msg *sae_msg;
- vos_msg_t vos_message;
- VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
-
- hal_status = sme_AcquireGlobalLock(&mac->sme);
- if (HAL_STATUS_SUCCESS(hal_status)) {
- sae_msg = vos_mem_malloc(sizeof(*sae_msg));
- if (!sae_msg) {
- hal_status = eHAL_STATUS_FAILED_ALLOC;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
- "SAE: memory allocation failed");
- } else {
- sae_msg->message_type = eWNI_SME_SEND_SAE_MSG;
- sae_msg->length = sizeof(*sae_msg);
- sae_msg->session_id = session_id;
- sae_msg->sae_status = sae_status;
- vos_message.bodyptr = sae_msg;
- vos_message.type = eWNI_SME_SEND_SAE_MSG;
- VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_DEBUG,
- "SAE: sae_status %d session_id %d", sae_msg->sae_status,
- sae_msg->session_id);
-
- vos_status = vos_mq_post_message(VOS_MQ_ID_PE, &vos_message);
- if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
- vos_mem_free(sae_msg);
- hal_status = eHAL_STATUS_FAILURE;
- }
- }
- sme_ReleaseGlobalLock(&mac->sme);
-}
-
-return hal_status;
-}
-#endif
diff --git a/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c b/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c
index d22f1f88d1e5..a47bbc198ee0 100644
--- a/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c
+++ b/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/dot11f.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -30,7 +30,7 @@
* \brief Structures, functions & definitions for
* working with 802.11 Frames
* This file was automatically generated by 'framesc'
- * Mon Jul 22 17:48:28 2019 from the following file(s):
+ * Tue Aug 28 09:50:49 2018 from the following file(s):
*
* dot11f.frms
*
@@ -7770,29 +7770,6 @@ tANI_U32 dot11fUnpackIeWscReassocRes(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8
#define SigIeWscReassocRes ( 0x008e )
-tANI_U32 dot11fUnpackIedh_parameter_element(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEdh_parameter_element *pDst)
-{
- tANI_U32 status = DOT11F_PARSE_SUCCESS;
- (void) pBuf; (void)ielen; /* Shutup the compiler */
- if (pDst->present) status = DOT11F_DUPLICATE_IE;
- pDst->present = 1;
- if (unlikely(ielen < 2)) {
- pDst->present = 0;
- return DOT11F_INCOMPLETE_IE;
- }
-
- DOT11F_MEMCPY(pCtx, pDst->group, pBuf, 2);
- pBuf += 2;
- ielen -= (tANI_U8)2;
- pDst->num_public_key = (tANI_U8)( ielen );
- DOT11F_MEMCPY(pCtx, pDst->public_key, pBuf, ( ielen ) );
- (void)pCtx;
- return status;
-} /* End dot11fUnpackIedh_parameter_element. */
-
-#define SigIedh_parameter_element ( 0x008f )
-
-
tANI_U32 dot11fUnpackIeext_chan_switch_ann(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEext_chan_switch_ann *pDst)
{
tANI_U32 status = DOT11F_PARSE_SUCCESS;
@@ -7833,7 +7810,7 @@ tANI_U32 dot11fUnpackIeext_chan_switch_ann(tpAniSirGlobal pCtx, tANI_U8 *pBuf, t
return status;
} /* End dot11fUnpackIeext_chan_switch_ann. */
-#define SigIeext_chan_switch_ann ( 0x0090 )
+#define SigIeext_chan_switch_ann ( 0x008f )
tANI_U32 dot11fUnpackIehs20vendor_ie(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEhs20vendor_ie *pDst)
@@ -7889,7 +7866,7 @@ tANI_U32 dot11fUnpackIehs20vendor_ie(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8
return status;
} /* End dot11fUnpackIehs20vendor_ie. */
-#define SigIehs20vendor_ie ( 0x0091 )
+#define SigIehs20vendor_ie ( 0x0090 )
tANI_U32 dot11fUnpackIesec_chan_offset(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U8 ielen, tDot11fIEsec_chan_offset *pDst)
@@ -7908,7 +7885,7 @@ tANI_U32 dot11fUnpackIesec_chan_offset(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_
return status;
} /* End dot11fUnpackIesec_chan_offset. */
-#define SigIesec_chan_offset ( 0x0092 )
+#define SigIesec_chan_offset ( 0x0091 )
static const tFFDefn FFS_AddBAReq[] = {
@@ -8553,7 +8530,6 @@ tANI_U32 dot11fUnpackAddTSResponse(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32
{offsetof(tDot11fAssocRequest, QOSCapsStation), offsetof(tDot11fIEQOSCapsStation, present), 0, "QOSCapsStation" , 0, 3, 3, SigIeQOSCapsStation, {0, 0, 0, 0, 0}, 0, DOT11F_EID_QOSCAPSSTATION, 0, 0, },
{offsetof(tDot11fAssocRequest, RRMEnabledCap), offsetof(tDot11fIERRMEnabledCap, present), 0, "RRMEnabledCap" , 0, 7, 7, SigIeRRMEnabledCap, {0, 0, 0, 0, 0}, 0, DOT11F_EID_RRMENABLEDCAP, 0, 0, },
{offsetof(tDot11fAssocRequest, MobilityDomain), offsetof(tDot11fIEMobilityDomain, present), 0, "MobilityDomain" , 0, 5, 5, SigIeMobilityDomain, {0, 0, 0, 0, 0}, 0, DOT11F_EID_MOBILITYDOMAIN, 0, 0, },
- {offsetof(tDot11fAssocRequest, dh_parameter_element), offsetof(tDot11fIEdh_parameter_element, present), 0, "dh_parameter_element" , 0, 4, 259, SigIedh_parameter_element, {0, 0, 0, 0, 0}, 0, DOT11F_EID_DH_PARAMETER_ELEMENT, 32, 0, },
{offsetof(tDot11fAssocRequest, WPAOpaque), offsetof(tDot11fIEWPAOpaque, present), 0, "WPAOpaque" , 0, 8, 255, SigIeWPAOpaque, {0, 80, 242, 1, 0}, 4, DOT11F_EID_WPAOPAQUE, 0, 0, },
{offsetof(tDot11fAssocRequest, HTCaps), offsetof(tDot11fIEHTCaps, present), 0, "HTCaps" , 0, 28, 60, SigIeHTCaps, {0, 0, 0, 0, 0}, 0, DOT11F_EID_HTCAPS, 0, 0, },
{offsetof(tDot11fAssocRequest, WMMCaps), offsetof(tDot11fIEWMMCaps, present), 0, "WMMCaps" , 0, 9, 9, SigIeWMMCaps, {0, 80, 242, 2, 5}, 5, DOT11F_EID_WMMCAPS, 0, 0, },
@@ -8728,17 +8704,6 @@ tANI_U32 dot11fUnpackAssocRequest(tpAniSirGlobal pCtx, tANI_U8 *pBuf, tANI_U32 n
FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("resourceReqCap (1): %d\n"), pFrm->MobilityDomain.resourceReqCap);
FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved (6): %d\n"), pFrm->MobilityDomain.reserved);
}
- FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("dh_parameter_element:\n"));
- if (!pFrm->dh_parameter_element.present)
- {
- FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n"));
- }
- else
- {
- FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->dh_parameter_element.group, 2);
- FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("num_public_key: %d.\n"), pFrm->dh_parameter_element.num_public_key);
- FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* ) pFrm->dh_parameter_element.public_key, pFrm->dh_parameter_element.num_public_key);
- }
FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("WPAOpaque:\n"));
if (!pFrm->WPAOpaque.present)
{
@@ -23242,9 +23207,6 @@ static tANI_U32 UnpackCore(tpAniSirGlobal pCtx,
case SigIeWscReassocRes:
status |= dot11fUnpackIeWscReassocRes(pCtx, pBufRemaining, len, ( tDot11fIEWscReassocRes* )(pFrm + pIe->offset + sizeof(tDot11fIEWscReassocRes)*countOffset) );
break;
- case SigIedh_parameter_element:
- status |= dot11fUnpackIedh_parameter_element(pCtx, pBufRemaining, len, ( tDot11fIEdh_parameter_element* )(pFrm + pIe->offset + sizeof(tDot11fIEdh_parameter_element)*countOffset) );
- break;
case SigIeext_chan_switch_ann:
status |= dot11fUnpackIeext_chan_switch_ann(pCtx, pBufRemaining, len, ( tDot11fIEext_chan_switch_ann* )(pFrm + pIe->offset + sizeof(tDot11fIEext_chan_switch_ann)*countOffset) );
break;
@@ -25618,11 +25580,6 @@ static tANI_U32 GetPackedSizeCore(tpAniSirGlobal pCtx,
offset = sizeof(tDot11fIEWscReassocRes);
status |= dot11fGetPackedIEWscReassocRes(pCtx, ( tDot11fIEWscReassocRes* )(pFrm + pIe->offset + offset * i ), pnNeeded);
break;
- case SigIedh_parameter_element:
- offset = sizeof(tDot11fIEdh_parameter_element);
- byteCount = ((tDot11fIEdh_parameter_element* )(pFrm + pIe->offset + sizeof(tDot11fIEdh_parameter_element) * i ))->num_public_key + 2;
- pIePresent = ( (tDot11fIEdh_parameter_element* )(pFrm + pIe->offset + offset * i ))->present;
- break;
case SigIeext_chan_switch_ann:
offset = sizeof(tDot11fIEext_chan_switch_ann);
byteCount = 4;
@@ -34277,41 +34234,6 @@ tANI_U32 dot11fPackIeWscReassocRes(tpAniSirGlobal pCtx,
return status;
} /* End dot11fPackIeWscReassocRes. */
-tANI_U32 dot11fPackIedh_parameter_element(tpAniSirGlobal pCtx,
- tDot11fIEdh_parameter_element *pSrc,
- tANI_U8 *pBuf,
- tANI_U32 nBuf,
- tANI_U32 *pnConsumed)
-{
- tANI_U8* pIeLen = 0;
- tANI_U32 nConsumedOnEntry = *pnConsumed;
- tANI_U32 nNeeded = 0U;
- nNeeded += (pSrc->num_public_key + 2);
- while ( pSrc->present )
- {
- if ( nNeeded > nBuf ) return DOT11F_BUFFER_OVERFLOW;
- *pBuf = 255;
- ++pBuf; ++(*pnConsumed);
- pIeLen = pBuf;
- ++pBuf; ++(*pnConsumed);
- *pBuf = 32;
- ++pBuf; ++(*pnConsumed);
- DOT11F_MEMCPY(pCtx, pBuf, pSrc->group, 2);
- *pnConsumed += 2;
- pBuf += 2;
- DOT11F_MEMCPY(pCtx, pBuf, &( pSrc->public_key ), pSrc->num_public_key);
- *pnConsumed += pSrc->num_public_key;
- // fieldsEndFlag = 1
- break;
- }
- (void)pCtx;
- if (pIeLen)
- {
- *pIeLen = *pnConsumed - nConsumedOnEntry - 2;
- }
- return DOT11F_PARSE_SUCCESS;
-} /* End dot11fPackIedh_parameter_element. */
-
tANI_U32 dot11fPackIeext_chan_switch_ann(tpAniSirGlobal pCtx,
tDot11fIEext_chan_switch_ann *pSrc,
tANI_U8 *pBuf,
@@ -35167,17 +35089,6 @@ tANI_U32 dot11fPackAssocRequest(tpAniSirGlobal pCtx, tDot11fAssocRequest *pFrm,
FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("resourceReqCap (1): %d\n"), pFrm->MobilityDomain.resourceReqCap);
FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("reserved (6): %d\n"), pFrm->MobilityDomain.reserved);
}
- FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("dh_parameter_element:\n"));
- if (!pFrm->dh_parameter_element.present)
- {
- FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("Not present.\n"));
- }
- else
- {
- FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* )&pFrm->dh_parameter_element.group, 2);
- FRAMES_LOG1(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("num_public_key: %d.\n"), pFrm->dh_parameter_element.num_public_key);
- FRAMES_DUMP(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), ( tANI_U8* ) pFrm->dh_parameter_element.public_key, pFrm->dh_parameter_element.num_public_key);
- }
FRAMES_LOG0(pCtx, FRAMES_SEV_FOR_FRAME(pCtx, DOT11F_ASSOCREQUEST), FRFL("WPAOpaque:\n"));
if (!pFrm->WPAOpaque.present)
{
@@ -48648,9 +48559,6 @@ static tANI_U32 PackCore(tpAniSirGlobal pCtx,
case SigIeWscReassocRes:
status |= dot11fPackIeWscReassocRes(pCtx, ( tDot11fIEWscReassocRes* )(pSrc + pIe->offset + sizeof(tDot11fIEWscReassocRes) * i ), pBufRemaining, nBufRemaining, &len);
break;
- case SigIedh_parameter_element:
- status |= dot11fPackIedh_parameter_element(pCtx, ( tDot11fIEdh_parameter_element* )(pSrc + pIe->offset + sizeof(tDot11fIEdh_parameter_element) * i ), pBufRemaining, nBufRemaining, &len);
- break;
case SigIeext_chan_switch_ann:
status |= dot11fPackIeext_chan_switch_ann(pCtx, ( tDot11fIEext_chan_switch_ann* )(pSrc + pIe->offset + sizeof(tDot11fIEext_chan_switch_ann) * i ), pBufRemaining, nBufRemaining, &len);
break;
diff --git a/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c b/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c
index 981dd2d833ab..c90dbafae745 100644
--- a/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c
+++ b/drivers/staging/prima/CORE/SYS/legacy/src/utils/src/macTrace.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2017, 2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -586,9 +586,6 @@ tANI_U8* macTraceGetSmeMsgString( tANI_U16 smeMsg )
CASE_RETURN_STRING(eWNI_SME_ECSA_IE_BEACON_COMP_IND);
CASE_RETURN_STRING(eWNI_SME_ECSA_CHAN_CHANGE_REQ);
CASE_RETURN_STRING(eWNI_SME_ECSA_CHAN_CHANGE_RSP);
- CASE_RETURN_STRING(eWNI_SME_TRIGGER_SAE);
- CASE_RETURN_STRING(eWNI_SME_SEND_MGMT_FRAME_TX);
- CASE_RETURN_STRING(eWNI_SME_SEND_SAE_MSG);
default:
return( (tANI_U8*)"UNKNOWN" );
break;
@@ -1002,7 +999,6 @@ tANI_U8* macTraceGetLimMsgString( tANI_U16 limMsg )
#endif
- CASE_RETURN_STRING(SIR_LIM_AUTH_SAE_TIMEOUT);
CASE_RETURN_STRING(SIR_LIM_AUTH_RETRY_TIMEOUT);
CASE_RETURN_STRING(SIR_LIM_SAP_ECSA_TIMEOUT);
diff --git a/drivers/staging/prima/CORE/VOSS/inc/vos_nvitem.h b/drivers/staging/prima/CORE/VOSS/inc/vos_nvitem.h
index fd1928cd3fae..77f290ca0e92 100644
--- a/drivers/staging/prima/CORE/VOSS/inc/vos_nvitem.h
+++ b/drivers/staging/prima/CORE/VOSS/inc/vos_nvitem.h
@@ -818,6 +818,20 @@ void vos_getCurrentCountryCode
);
#endif
+//BEGIN IKSWO-79967, add function to check if current country need disable MHS 5G Band1
+/**------------------------------------------------------------------------
+ \brief vos_IsDisableB1Countrycode -
+ \param countrycode
+ \return TRUE if country need disable MHS Band 1
+ \sa
+ -------------------------------------------------------------------------*/
+
+v_BOOL_t vos_IsDisableMhsBand1CountryCode
+(
+ tANI_U8 *cc
+);
+//END IKSWO-79967
+
int vos_update_nv_table_from_wiphy_band(void *hdd_ctx,
void *wiphy,v_U8_t nBandCapability);
diff --git a/drivers/staging/prima/CORE/VOSS/inc/wlan_hdd_misc.h b/drivers/staging/prima/CORE/VOSS/inc/wlan_hdd_misc.h
index 7c2d62ad86c3..eb2398d02627 100644
--- a/drivers/staging/prima/CORE/VOSS/inc/wlan_hdd_misc.h
+++ b/drivers/staging/prima/CORE/VOSS/inc/wlan_hdd_misc.h
@@ -76,5 +76,8 @@ VOS_STATUS hdd_read_cfg_file(v_VOID_t *pCtx, char *pFileName, v_VOID_t *pBuffer,
tVOS_CONCURRENCY_MODE hdd_get_concurrency_mode ( void );
+// BEGIN MOTOROLA IKJB42MAIN-274, dpn473, 01/02/2013, Add flag to disable/enable MCC mode
+v_U8_t hdd_get_mcc_mode( void );
+// END IKJB42MAIN-274
#endif /* WLAN_HDD_MISC_H */
diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c b/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c
index a3c4b4d2930c..3d042410e54d 100755
--- a/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c
+++ b/drivers/staging/prima/CORE/VOSS/src/vos_nvitem.c
@@ -186,6 +186,53 @@ chan_to_ht_40_index_map chan_to_ht_40_index[NUM_20MHZ_RF_CHANNELS] =
{RF_CHAN_BOND_163, INVALID_RF_CHANNEL}, //RF_CHAN_165,
};
+//BEGIN IKSWO-79967, add disable MHS Band1 country list
+typedef struct
+{
+ v_U16_t countryCount;
+ v_COUNTRYCODE_t countryCode[MAX_COUNTRY_COUNT];
+} DisableMhsBand1CountryTable_t;
+static DisableMhsBand1CountryTable_t disableMhsBand1CountryInfoTable =
+{
+ 33,
+ {
+ {'A', 'T'},
+ {'B', 'E'},
+ {'B', 'G'},
+ {'C', 'H'},
+ {'C', 'Y'},
+ {'C', 'Z'},
+ {'D', 'E'},
+ {'D', 'K'},
+ {'E', 'E'},
+ {'E', 'L'},
+ {'E', 'S'},
+ {'F', 'I'},
+ {'F', 'R'},
+ {'H', 'R'},
+ {'H', 'U'},
+ {'I', 'E'},
+ {'I', 'S'},
+ {'I', 'T'},
+ {'L', 'I'},
+ {'L', 'T'},
+ {'L', 'U'},
+ {'L', 'V'},
+ {'M', 'T'},
+ {'N', 'L'},
+ {'N', 'O'},
+ {'P', 'L'},
+ {'P', 'T'},
+ {'R', 'O'},
+ {'S', 'E'},
+ {'S', 'I'},
+ {'S', 'K'},
+ {'T', 'R'},
+ {'U', 'K'},
+ }
+};
+//END IKSWO-79967
+
static CountryInfoTable_t countryInfoTable =
{
/* the first entry in the table is always the world domain */
@@ -3829,7 +3876,12 @@ int vos_update_nv_table_from_wiphy_band(void *hdd_ctx,
for (j = 0; j < wiphy->bands[i]->n_channels; j++)
{
if (HDD_NL80211_BAND_2GHZ == i && eCSR_BAND_5G == nBandCapability)
- wiphy->bands[i]->channels[j].flags |= IEEE80211_CHAN_DISABLED;
+ {
+ if (WLAN_HDD_IS_SOCIAL_CHANNEL(wiphy->bands[i]->channels[j].center_freq) )
+ wiphy->bands[i]->channels[j].flags &= ~IEEE80211_CHAN_DISABLED;
+ else
+ wiphy->bands[i]->channels[j].flags |= IEEE80211_CHAN_DISABLED;
+ }
else if (HDD_NL80211_BAND_5GHZ == i && eCSR_BAND_24 == nBandCapability)
wiphy->bands[i]->channels[j].flags |= IEEE80211_CHAN_DISABLED;
@@ -4572,6 +4624,26 @@ void vos_getCurrentCountryCode( tANI_U8 *cc)
vos_mem_copy(cc, linux_reg_cc, 2);
}
+//BEGIN IKSWO-79967, add function to check if current country need disable MHS 5G Band1
+/**------------------------------------------------------------------------
+ \brief vos_IsDisableB1Countrycode -
+ \param countrycode
+ \return TRUE if country need disable MHS Band 1
+ \sa
+ -------------------------------------------------------------------------*/
+
+v_BOOL_t vos_IsDisableMhsBand1CountryCode(tANI_U8 *cc)
+{
+ int i;
+ for (i = 0; i < disableMhsBand1CountryInfoTable.countryCount; i++)
+ {
+ if (memcmp(cc, disableMhsBand1CountryInfoTable.countryCode[i], VOS_COUNTRY_CODE_LEN) == 0)
+ return VOS_TRUE;
+ }
+ return VOS_FALSE;
+}
+//END IKSWO-79967
+
#else
/**------------------------------------------------------------------------
diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_sched.c b/drivers/staging/prima/CORE/VOSS/src/vos_sched.c
index 2fa2b6a4d8e1..19d6f0b41907 100644
--- a/drivers/staging/prima/CORE/VOSS/src/vos_sched.c
+++ b/drivers/staging/prima/CORE/VOSS/src/vos_sched.c
@@ -2226,13 +2226,3 @@ void vos_dump_thread_stacks(int threadId)
vos_dump_stack(TX_Thread);
vos_dump_stack(RX_Thread);
}
-
-int vos_get_gfp_flags(void)
-{
- int flags = GFP_KERNEL;
-
- if (in_interrupt() || in_atomic() || irqs_disabled())
- flags = GFP_ATOMIC;
-
- return flags;
-}
diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_sched.h b/drivers/staging/prima/CORE/VOSS/src/vos_sched.h
index 8d75a8b96aac..3a92a65498c3 100644
--- a/drivers/staging/prima/CORE/VOSS/src/vos_sched.h
+++ b/drivers/staging/prima/CORE/VOSS/src/vos_sched.h
@@ -550,11 +550,5 @@ void vos_wd_reset_thread_stuck_count(int threadId);
bool vos_is_wd_thread(int threadId);
void vos_dump_stack(uint8_t value);
void vos_dump_thread_stacks(int threadId);
-/**
- * vos_get_gfp_flags(): get GFP flags
- *
- * Based on the scheduled context, return GFP flags
- * Return: gfp flags
- */
-int vos_get_gfp_flags(void);
+
#endif // #if !defined __VOSS_SCHED_H
diff --git a/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c b/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c
index fac44a7ea282..ac424e72bfb0 100644
--- a/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c
+++ b/drivers/staging/prima/CORE/WDI/CP/src/wlan_qct_wdi.c
@@ -12807,7 +12807,6 @@ WDI_ProcessAddPeriodicTxPtrnInd
wpt_uint8 selfStaIdx = 0;
wpt_uint8 ucCurrentBSSSesIdx;
WDI_BSSSessionType* pBSSSes = NULL;
- wpt_macAddr dst_addr;
/*-------------------------------------------------------------------------
Sanity check
@@ -12851,12 +12850,9 @@ WDI_ProcessAddPeriodicTxPtrnInd
return WDI_STATUS_E_FAILURE;
}
- vos_mem_copy(dst_addr,
- &pAddPeriodicTxPtrnParams->wdiAddPeriodicTxPtrnParams.ucPattern[0],
- VOS_MAC_ADDR_SIZE);
-
ucCurrentBSSSesIdx = WDI_FindAssocSession( pWDICtx,
- dst_addr,
+ pAddPeriodicTxPtrnParams->
+ wdiAddPeriodicTxPtrnParams.macAddr,
&pBSSSes);
if ( NULL == pBSSSes )
{
@@ -12864,7 +12860,8 @@ WDI_ProcessAddPeriodicTxPtrnInd
"%s: Association sequence for this BSS does not exist. macBSSID "
MAC_ADDRESS_STR,
__func__,
- MAC_ADDR_ARRAY(dst_addr));
+ MAC_ADDR_ARRAY(pAddPeriodicTxPtrnParams->
+ wdiAddPeriodicTxPtrnParams.macAddr));
wpalMemoryFree(pSendBuffer);
return WDI_STATUS_E_NOT_ALLOWED;
}
diff --git a/drivers/staging/prima/Kbuild b/drivers/staging/prima/Kbuild
index 25bcf5250103..3add791c4653 100644
--- a/drivers/staging/prima/Kbuild
+++ b/drivers/staging/prima/Kbuild
@@ -23,12 +23,6 @@ ifeq ($(KERNEL_BUILD), 0)
#Flag to enable Legacy Fast Roaming(LFR)
CONFIG_PRIMA_WLAN_LFR := y
-#Flag to enable SAE
- CONFIG_WLAN_FEATURE_SAE := y
-
-#Flag to enable OWE
- CONFIG_WLAN_AKM_SUITE_OWE := y
-
#Flag to enable Legacy Fast Roaming(LFR) Make Before Break
CONFIG_PRIMA_WLAN_LFR_MBB := y
@@ -67,8 +61,8 @@ SAP_AUTH_OFFLOAD := y
# To enable CONFIG_QCOM_ESE_UPLOAD, dependent config
# CONFIG_QCOM_ESE must be enabled.
-CONFIG_QCOM_ESE := n
-CONFIG_QCOM_ESE_UPLOAD := n
+CONFIG_QCOM_ESE := y
+CONFIG_QCOM_ESE_UPLOAD := y
# Feature flags which are not (currently) configurable via Kconfig
@@ -106,9 +100,9 @@ else
endif # ANDROID_BUILD_TOP
else
ifneq ($(ANDROID_BUILD_TOP),)
- WLAN_BLD_DIR := $(ANDROID_BUILD_TOP)/device/qcom/sdm429w/common/opensource/wlan
+ WLAN_BLD_DIR := $(ANDROID_BUILD_TOP)/device/qcom/msm8909w/opensource/wlan
else
- WLAN_BLD_DIR := $(BOARD_OPENSOURCE_DIR)/wlan
+ WLAN_BLD_DIR := device/qcom/msm8909w/opensource/wlan
endif # ANDROID_BUILD_TOP
endif # TARGET_SUPPORTS_WEARABLES
endif # WLAN_PROPRIETARY
@@ -622,7 +616,6 @@ CDEFINES := -DANI_BUS_TYPE_PLATFORM=1 \
-DFEATURE_WLAN_PAL_TIMER_DISABLE \
-DFEATURE_WLAN_PAL_MEM_DISABLE \
-DFEATURE_WLAN_CH144 \
- -DWLAN_BUG_ON_SKB_ERROR \
-DWLAN_DXE_LOW_RESOURCE_TIMER \
-DWLAN_LOGGING_SOCK_SVC_ENABLE \
-DWLAN_FEATURE_LINK_LAYER_STATS \
@@ -681,20 +674,30 @@ endif
ifeq ($(CONFIG_PRIMA_WLAN_LFR),y)
CDEFINES += -DFEATURE_WLAN_LFR
-endif
-
-ifeq ($(CONFIG_WLAN_FEATURE_SAE),y)
-CDEFINES += -DWLAN_FEATURE_SAE
-endif
-
-ifeq ($(CONFIG_WLAN_AKM_SUITE_OWE),y)
-CDEFINES += -DWLAN_AKM_SUITE_OWE
+#Begin fjdw67 Motorola, IKJB42MAIN-6385 - LFR roaming instrumentation
+CDEFINES += -DFEATURE_WLAN_LFR_METRICS
+#End IKJB42MAIN-6385
endif
ifeq ($(CONFIG_PRIMA_WLAN_LFR_MBB),y)
CDEFINES += -DWLAN_FEATURE_LFR_MBB
endif
+# WLAN_WHITE_LIST - WLAN Radiated Power Test
+# For user software build, wlan driver needs to allow the factory
+# commnds only for Tx_opcode and NART commands based off 12M doc
+# commans whitelisted are :
+# set RF channel
+# set internal configuration
+# enable scpc mode
+# set data rate preamble frame number spacinf and playlod
+# set Tx Power
+# turn on Tx
+# turn off Tx
+ifeq ($(TARGET_BUILD_VARIANT),user)
+CDEFINES += -DWLAN_WHITE_LIST
+endif
+
ifeq ($(CONFIG_PRIMA_WLAN_OKC),y)
CDEFINES += -DFEATURE_WLAN_OKC
endif
@@ -712,6 +715,9 @@ endif
# enable the MAC Address auto-generation feature
CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
+# Moto read MACs from boot params instead of NV file
+CDEFINES += -DMOTO_UTAGS_MAC
+
ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
CDEFINES += -DWLAN_FEATURE_11W
endif
@@ -760,7 +766,7 @@ CDEFINES += -DEXISTS_MSM_SMSM
endif
# Fix build for GCC 4.7
-EXTRA_CFLAGS += $(call cc-option,-Wno-maybe-uninitialized) -Wno-unused-function -Wno-enum-conversion -Wno-array-bounds -Wno-pointer-bool-conversion -Wno-parentheses-equality -Wno-typedef-redefinition -Wno-empty-body -Wno-non-literal-null-conversion
+EXTRA_CFLAGS += -Wno-unused-function
ifeq ($(CONFIG_WLAN_OFFLOAD_PACKETS),y)
CDEFINES += -DWLAN_FEATURE_OFFLOAD_PACKETS
@@ -776,3 +782,12 @@ KBUILD_CPPFLAGS += $(CDEFINES)
obj-$(CONFIG_PRIMA_WLAN) += $(MODNAME).o
obj-$(CONFIG_PRONTO_WLAN) += $(MODNAME).o
$(MODNAME)-y := $(OBJS)
+
+subdir-ccflags-y += \
+ -Wno-array-bounds \
+ -Wno-empty-body \
+ -Wno-enum-conversion \
+ -Wno-non-literal-null-conversion \
+ -Wno-parentheses-equality \
+ -Wno-pointer-bool-conversion \
+ -Wno-typedef-redefinition
diff --git a/drivers/staging/prima/Kconfig b/drivers/staging/prima/Kconfig
index 3ab6841dcb44..e3fcf736961b 100644
--- a/drivers/staging/prima/Kconfig
+++ b/drivers/staging/prima/Kconfig
@@ -41,10 +41,6 @@ config WLAN_FEATURE_11W
bool "Enable the WLAN 802.11w Protected Management Frames feature"
default n
-config QCOM_TDLS
- bool "Enable TDLS feature"
- default n
-
config QCOM_VOWIFI_11R
bool "Enable Fast Transition (11r) feature"
default n
@@ -57,4 +53,8 @@ config WLAN_OFFLOAD_PACKETS
bool "Enable offload packets feature"
default n
+config QCOM_TDLS
+ bool "Enable TDLS feature"
+ default n
+
endif # PRIMA_WLAN || PRONTO_WLAN
diff --git a/drivers/staging/prima/Makefile b/drivers/staging/prima/Makefile
index 2d704585558a..d5c94f00a43c 100644
--- a/drivers/staging/prima/Makefile
+++ b/drivers/staging/prima/Makefile
@@ -14,17 +14,4 @@ clean::
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd Module.symvers
rm -rf .tmp_versions
-# Moto read MACs from boot params instead of NV file
-CDEFINES += -DMOTO_UTAGS_MAC
-# Fix build for GCC 4.7
-EXTRA_CFLAGS += -Wno-unused-function
-
-subdir-ccflags-y += \
- -Wno-array-bounds \
- -Wno-empty-body \
- -Wno-enum-conversion \
- -Wno-non-literal-null-conversion \
- -Wno-parentheses-equality \
- -Wno-pointer-bool-conversion \
- -Wno-typedef-redefinition