diff options
| -rw-r--r-- | CORE/CLD_TXRX/TLSHIM/tl_shim.c | 1 | ||||
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_assoc.h | 2 | ||||
| -rw-r--r-- | CORE/HDD/inc/wlan_hdd_cfg.h | 14 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg.c | 15 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 3 | ||||
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_tdls.c | 5 | ||||
| -rw-r--r-- | CORE/MAC/inc/qwlan_version.h | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/include/limFTDefs.h | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/include/limSession.h | 2 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c | 11 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limPropExtsUtils.c | 4 | ||||
| -rw-r--r-- | CORE/MAC/src/pe/lim/limSendManagementFrames.c | 7 | ||||
| -rw-r--r-- | CORE/SERVICES/BMI/ol_fw.c | 4 | ||||
| -rw-r--r-- | CORE/SERVICES/COMMON/ol_if_athvar.h | 3 | ||||
| -rw-r--r-- | CORE/SVC/src/logging/wlan_logging_sock_svc.c | 14 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_api.c | 17 | ||||
| -rw-r--r-- | CORE/VOSS/src/vos_sched.c | 2 | ||||
| -rw-r--r-- | Kbuild | 5 | ||||
| -rwxr-xr-x | firmware_bin/WCNSS_qcom_cfg.ini | 3 | ||||
| -rw-r--r-- | tools/fwdebuglog/parser.c | 2 |
20 files changed, 95 insertions, 27 deletions
diff --git a/CORE/CLD_TXRX/TLSHIM/tl_shim.c b/CORE/CLD_TXRX/TLSHIM/tl_shim.c index 5eed10d095e9..80a2b5a4eef8 100644 --- a/CORE/CLD_TXRX/TLSHIM/tl_shim.c +++ b/CORE/CLD_TXRX/TLSHIM/tl_shim.c @@ -1132,7 +1132,6 @@ adf_nbuf_t WLANTL_SendSTA_DataFrame(void *vos_ctx, u_int8_t sta_id, adf_nbuf_t ret; struct ol_txrx_peer_t *peer; - ENTER(); if (!tl_shim) { TLSHIM_LOGE("tl_shim is NULL"); return skb; diff --git a/CORE/HDD/inc/wlan_hdd_assoc.h b/CORE/HDD/inc/wlan_hdd_assoc.h index 72a1641cb898..2bf38aa511d6 100644 --- a/CORE/HDD/inc/wlan_hdd_assoc.h +++ b/CORE/HDD/inc/wlan_hdd_assoc.h @@ -33,7 +33,7 @@ #define HDD_MAX_NUM_IBSS_STA ( 32 ) #ifdef FEATURE_WLAN_TDLS #define HDD_MAX_NUM_TDLS_STA ( 8 ) -#define HDD_MAX_NUM_TDLS_STA_P_UAPSD ( 1 ) +#define HDD_MAX_NUM_TDLS_STA_P_UAPSD_OFFCHAN ( 1 ) #define TDLS_STA_INDEX_VALID(staId) \ (((staId) >= 1) && ((staId) < 0xFF)) #endif diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h index da06491635a6..f318c018d973 100644 --- a/CORE/HDD/inc/wlan_hdd_cfg.h +++ b/CORE/HDD/inc/wlan_hdd_cfg.h @@ -1154,6 +1154,13 @@ typedef enum #define CFG_RUNTIME_PM_AUTO_DEFAULT ( 500 ) #endif +#ifdef FEATURE_SECURE_FIRMWARE +#define CFG_ENABLE_FW_HASH_CHECK_NAME "gEnableFWHashCheck" +#define CFG_ENABLE_FW_HASH_CHECK_MIN ( 0 ) +#define CFG_ENABLE_FW_HASH_CHECK_MAX ( 1 ) +#define CFG_ENABLE_FW_HASH_CHECK_DEFAULT ( 1 ) +#endif + #define CFG_ENABLE_HOST_NSOFFLOAD_NAME "hostNSOffload" #define CFG_ENABLE_HOST_NSOFFLOAD_MIN ( 0 ) #define CFG_ENABLE_HOST_NSOFFLOAD_MAX ( 1 ) @@ -2492,8 +2499,8 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */ /* Number of buffers to be used for WLAN logging */ #define CFG_WLAN_LOGGING_NUM_BUF_NAME "wlanLoggingNumBuf" #define CFG_WLAN_LOGGING_NUM_BUF_MIN ( 4 ) -#define CFG_WLAN_LOGGING_NUM_BUF_MAX ( 64 ) -#define CFG_WLAN_LOGGING_NUM_BUF_DEFAULT ( 32 ) +#define CFG_WLAN_LOGGING_NUM_BUF_MAX ( 512 ) +#define CFG_WLAN_LOGGING_NUM_BUF_DEFAULT ( 256 ) #endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */ #define CFG_ENABLE_SIFS_BURST "gEnableSifsBurst" @@ -3441,6 +3448,9 @@ typedef struct uint32_t tsf_gpio_pin; uint8_t multicast_host_fw_msgs; uint32_t fine_time_meas_cap; +#ifdef FEATURE_SECURE_FIRMWARE + bool enable_fw_hash_check; +#endif } hdd_config_t; #ifdef WLAN_FEATURE_MBSSID diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c index 3558a4dc7a48..8978cc8de1b9 100644 --- a/CORE/HDD/src/wlan_hdd_cfg.c +++ b/CORE/HDD/src/wlan_hdd_cfg.c @@ -1703,6 +1703,15 @@ REG_TABLE_ENTRY g_registry_table[] = CFG_RUNTIME_PM_AUTO_MAX ), #endif +#ifdef FEATURE_SECURE_FIRMWARE + REG_VARIABLE(CFG_ENABLE_FW_HASH_CHECK_NAME, WLAN_PARAM_Integer, + hdd_config_t, enable_fw_hash_check, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_ENABLE_FW_HASH_CHECK_DEFAULT, + CFG_ENABLE_FW_HASH_CHECK_MIN, + CFG_ENABLE_FW_HASH_CHECK_MAX), +#endif + REG_VARIABLE( CFG_ENABLE_HOST_NSOFFLOAD_NAME, WLAN_PARAM_Integer, hdd_config_t, fhostNSOffload, VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, @@ -4019,8 +4028,10 @@ void print_hdd_cfg(hdd_context_t *pHddCtx) VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [runtime_pm] Value = [%u] ", pHddCtx->cfg_ini->runtime_pm); VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [runtime_pm_delay] Value = [%u] ", pHddCtx->cfg_ini->runtime_pm_delay); #endif - - +#ifdef FEATURE_SECURE_FIRMWARE + hddLog(LOG2, "Name = [enable_fw_hash_check] Value = [%u]", + pHddCtx->cfg_ini->enable_fw_hash_check); +#endif #ifdef FEATURE_WLAN_RA_FILTERING VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [RArateLimitInterval] Value = [%u] ", pHddCtx->cfg_ini->RArateLimitInterval); VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [IsRArateLimitEnabled] Value = [%u] ", pHddCtx->cfg_ini->IsRArateLimitEnabled); diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index ddfcdeb25622..c7db9f310667 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -9473,7 +9473,6 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, hddLog(LOGE, FL("not allowed to start SAP on DFS channel")); return -EOPNOTSUPP; } - WLANSAP_Set_Dfs_Ignore_CAC(hHal, iniConfig->ignoreCAC); /* * Set the JAPAN W53 disabled INI param @@ -9510,6 +9509,8 @@ static int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter, pConfig->ieee80211d = 0; } + WLANSAP_Set_Dfs_Ignore_CAC(hHal, iniConfig->ignoreCAC); + capab_info = pMgmt_frame->u.beacon.capab_info; pConfig->privacy = (pMgmt_frame->u.beacon.capab_info & diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c index 4b2f5d385f49..9eb772d54e6d 100644 --- a/CORE/HDD/src/wlan_hdd_tdls.c +++ b/CORE/HDD/src/wlan_hdd_tdls.c @@ -728,8 +728,9 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) pHddCtx->tdls_scan_ctxt.scan_request = NULL; if (pHddCtx->cfg_ini->fEnableTDLSSleepSta || - pHddCtx->cfg_ini->fEnableTDLSBufferSta) - pHddCtx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA_P_UAPSD; + pHddCtx->cfg_ini->fEnableTDLSBufferSta || + pHddCtx->cfg_ini->fEnableTDLSOffChannel) + pHddCtx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA_P_UAPSD_OFFCHAN; else pHddCtx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA; diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h index 8b53b46868bd..fa4bacbd5cc5 100644 --- a/CORE/MAC/inc/qwlan_version.h +++ b/CORE/MAC/inc/qwlan_version.h @@ -43,9 +43,9 @@ BRIEF DESCRIPTION: #define QWLAN_VERSION_MINOR 0 #define QWLAN_VERSION_PATCH 10 #define QWLAN_VERSION_EXTRA "" -#define QWLAN_VERSION_BUILD 111 +#define QWLAN_VERSION_BUILD 112 -#define QWLAN_VERSIONSTR "4.0.10.111" +#define QWLAN_VERSIONSTR "4.0.10.112" #define AR6320_REV1_VERSION 0x5000000 diff --git a/CORE/MAC/src/pe/include/limFTDefs.h b/CORE/MAC/src/pe/include/limFTDefs.h index d6a5afb40faf..9d3ba2a9dad8 100644 --- a/CORE/MAC/src/pe/include/limFTDefs.h +++ b/CORE/MAC/src/pe/include/limFTDefs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2015 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -43,7 +43,7 @@ Preprocessor definitions and constants ------------------------------------------------------------------------*/ #define SIR_MDIE_SIZE 3 // MD ID(2 bytes), Capability(1 byte) -#define MAX_FTIE_SIZE 256 // Max size limited to 256, on acct. of IW custom events +#define MAX_FTIE_SIZE 384 // Max size limited to 384, on acct. of IW custom events /*-------------------------------------------------------------------------- diff --git a/CORE/MAC/src/pe/include/limSession.h b/CORE/MAC/src/pe/include/limSession.h index 7ec1dccfadb3..5a62dfe24f62 100644 --- a/CORE/MAC/src/pe/include/limSession.h +++ b/CORE/MAC/src/pe/include/limSession.h @@ -491,6 +491,8 @@ typedef struct sPESession // Added to Support BT-AMP #ifdef FEATURE_WLAN_ESE uint8_t is_ese_version_ie_present; #endif + /* flag to indicate country code in beacon */ + tANI_U8 countryInfoPresent; } tPESession, *tpPESession; /*------------------------------------------------------------------------- diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c index 6eaa92299ad6..86e989749aa6 100644 --- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c +++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c @@ -2204,6 +2204,12 @@ __limProcessSmeJoinReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) /* Indicate whether spectrum management is enabled*/ psessionEntry->spectrumMgtEnabled = pSmeJoinReq->spectrumMgtIndicator; + + /* Enable the spectrum management if this is a DFS channel */ + if (psessionEntry->countryInfoPresent && + limIsconnectedOnDFSChannel(psessionEntry->currentOperChannel)) + psessionEntry->spectrumMgtEnabled = TRUE; + psessionEntry->isOSENConnection = pSmeJoinReq->isOSENConnection; @@ -2570,6 +2576,11 @@ __limProcessSmeReassocReq(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf) /* Indicate whether spectrum management is enabled*/ psessionEntry->spectrumMgtEnabled = pReassocReq->spectrumMgtIndicator; + /* Enable the spectrum management if this is a DFS channel */ + if (psessionEntry->countryInfoPresent && + limIsconnectedOnDFSChannel(psessionEntry->currentOperChannel)) + psessionEntry->spectrumMgtEnabled = TRUE; + psessionEntry->limPrevSmeState = psessionEntry->limSmeState; psessionEntry->limSmeState = eLIM_SME_WT_REASSOC_STATE; diff --git a/CORE/MAC/src/pe/lim/limPropExtsUtils.c b/CORE/MAC/src/pe/lim/limPropExtsUtils.c index 1017ddea7044..0b8f1a53d7c0 100644 --- a/CORE/MAC/src/pe/lim/limPropExtsUtils.c +++ b/CORE/MAC/src/pe/lim/limPropExtsUtils.c @@ -197,6 +197,10 @@ limExtractApCapability(tpAniSirGlobal pMac, tANI_U8 *pIE, tANI_U16 ieLen, limLog(pMac, LOGP, FL("Could not update local power constraint to cfg.")); } #endif + psessionEntry->countryInfoPresent = FALSE; + /* Initializing before first use */ + if (pBeaconStruct->countryInfoPresent) + psessionEntry->countryInfoPresent = TRUE; } vos_mem_free(pBeaconStruct); return; diff --git a/CORE/MAC/src/pe/lim/limSendManagementFrames.c b/CORE/MAC/src/pe/lim/limSendManagementFrames.c index 23c13801305c..762dbfa6c7d6 100644 --- a/CORE/MAC/src/pe/lim/limSendManagementFrames.c +++ b/CORE/MAC/src/pe/lim/limSendManagementFrames.c @@ -514,7 +514,12 @@ limSendProbeReqMgmtFrame(tpAniSirGlobal pMac, } } #endif - PopulateDot11fExtCap(pMac, isVHTEnabled, &pr.ExtCap, psessionEntry); + + if (psessionEntry != NULL) + PopulateDot11fExtCap(pMac, isVHTEnabled, &pr.ExtCap, psessionEntry); + else + limLog(pMac, LOGE, + FL("session entry null, ext capabilities will not be populated")); // That's it-- now we pack it. First, how much space are we going to // need? diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c index 4d2295fdbf92..ca03adb5d192 100644 --- a/CORE/SERVICES/BMI/ol_fw.c +++ b/CORE/SERVICES/BMI/ol_fw.c @@ -610,8 +610,8 @@ static int __ol_transfer_bin_file(struct ol_softc *scn, ATH_BIN_FILE file, tempEeprom = NULL; #ifdef FEATURE_SECURE_FIRMWARE - - if (ol_check_fw_hash(fw_entry->data, fw_entry_size, file)) { + if (scn->enable_fw_hash_check && + ol_check_fw_hash(fw_entry->data, fw_entry_size, file)) { pr_err("Hash Check failed for file:%s\n", filename); status = A_ERROR; goto end; diff --git a/CORE/SERVICES/COMMON/ol_if_athvar.h b/CORE/SERVICES/COMMON/ol_if_athvar.h index 13a8f7a3a64c..002e8fa1a7fc 100644 --- a/CORE/SERVICES/COMMON/ol_if_athvar.h +++ b/CORE/SERVICES/COMMON/ol_if_athvar.h @@ -296,6 +296,9 @@ struct ol_softc { bool enable_runtime_pm; u_int32_t runtime_pm_delay; #endif +#ifdef FEATURE_SECURE_FIRMWARE + bool enable_fw_hash_check; +#endif }; #ifdef PERE_IP_HDR_ALIGNMENT_WAR diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c index 71aa45cf2f11..bea69f6cac50 100644 --- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c +++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c @@ -161,15 +161,11 @@ static int wlan_send_sock_msg_to_app(tAniHdr *wmsg, int radio, static void set_default_logtoapp_log_level(void) { - vos_trace_setValue(VOS_MODULE_ID_WDI, VOS_TRACE_LEVEL_ALL, VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ALL, VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ALL, VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_PE, VOS_TRACE_LEVEL_ALL, VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ALL, VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_HDD_SOFTAP, VOS_TRACE_LEVEL_ALL, - VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ALL, VOS_TRUE); - vos_trace_setValue(VOS_MODULE_ID_PMC, VOS_TRACE_LEVEL_ALL, VOS_TRUE); + int i; + + /* module id 0 is reserved */ + for (i = 1; i < VOS_MODULE_ID_MAX; i++) + vos_trace_setValue(i, VOS_TRACE_LEVEL_ALL, VOS_TRUE); } static void clear_default_logtoapp_log_level(void) diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c index e7b4ff2b96e8..06a09ec64ea2 100644 --- a/CORE/VOSS/src/vos_api.c +++ b/CORE/VOSS/src/vos_api.c @@ -233,6 +233,22 @@ static inline void vos_runtime_pm_config(struct ol_softc *scn, hdd_context_t *pHddCtx) { } #endif +#if defined (FEATURE_SECURE_FIRMWARE) && defined (FEATURE_FW_HASH_CHECK) +static inline void vos_fw_hash_check_config(struct ol_softc *scn, + hdd_context_t *pHddCtx) +{ + scn->enable_fw_hash_check = pHddCtx->cfg_ini->enable_fw_hash_check; +} +#elif defined (FEATURE_SECURE_FIRMWARE) +static inline void vos_fw_hash_check_config(struct ol_softc *scn, + hdd_context_t *pHddCtx) +{ + scn->enable_fw_hash_check = true; +} +#else +static inline void vos_fw_hash_check_config(struct ol_softc *scn, + hdd_context_t *pHddCtx) { } +#endif /*--------------------------------------------------------------------------- @@ -371,6 +387,7 @@ VOS_STATUS vos_open( v_CONTEXT_t *pVosContext, v_SIZE_t hddContextSize ) #endif scn->enableRamdumpCollection = pHddCtx->cfg_ini->is_ramdump_enabled; + vos_fw_hash_check_config(scn, pHddCtx); vos_runtime_pm_config(scn, pHddCtx); /* Initialize BMI and Download firmware */ diff --git a/CORE/VOSS/src/vos_sched.c b/CORE/VOSS/src/vos_sched.c index 0e9944d1c14e..66435336495e 100644 --- a/CORE/VOSS/src/vos_sched.c +++ b/CORE/VOSS/src/vos_sched.c @@ -1014,8 +1014,6 @@ VosMCThread v_BOOL_t isWDresetInProgress(void) { - VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO, - "%s: Reset is in Progress...",__func__); if(gpVosWatchdogContext!=NULL) { return gpVosWatchdogContext->resetInProgress; @@ -1317,6 +1317,11 @@ ifeq ($(CONFIG_CNSS_SECURE_FW), y) CDEFINES += -DFEATURE_SECURE_FIRMWARE endif +#Enable/disable FW hash check for secure firmware feature +ifeq ($(CONFIG_CLD_DEBUG), y) +CDEFINES += -DFEATURE_FW_HASH_CHECK +endif + ifeq ($(CONFIG_ATH_PCIE_ACCESS_DEBUG), 1) CDEFINES += -DCONFIG_ATH_PCIE_ACCESS_DEBUG endif diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini index 9edba1980088..51f8a672fc85 100755 --- a/firmware_bin/WCNSS_qcom_cfg.ini +++ b/firmware_bin/WCNSS_qcom_cfg.ini @@ -631,6 +631,9 @@ gRuntimePM=1 gRuntimePMDelay=500 +# Enable to check FW hash if secure FW feature is enabled. It's for defconfig +# builds only since it will be ignored in performance/release builds. +gEnableFWHashCheck=1 END # Note: Configuration parser would not read anything past the END marker diff --git a/tools/fwdebuglog/parser.c b/tools/fwdebuglog/parser.c index a98364b78794..a73bfc97701f 100644 --- a/tools/fwdebuglog/parser.c +++ b/tools/fwdebuglog/parser.c @@ -93,6 +93,8 @@ diag_print_legacy_logs(const char *buf) record++; if (log_out) fprintf(log_out, "%s\n", buf); + else + return; if (record == max_records) { record = 0; fseek(log_out, record, SEEK_SET); |
