summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-07-17 04:42:32 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-07-17 04:42:32 -0700
commitf70333b47650f500ff97bf6ee68f89b3c85373f2 (patch)
treee4683fbe8e51bbf82b3874b523654f8e02757a2b
parent1775d5604b12ba884ce1399398363411c2308c83 (diff)
parentf5dd19e4b9090d370eff5364473300126476528d (diff)
Merge "Release 1.0.0.147 QCACLD WLAN Driver"
-rw-r--r--CORE/HDD/inc/qc_sap_ioctl.h22
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h16
-rw-r--r--CORE/HDD/inc/wlan_hdd_tgt_cfg.h7
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c20
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c1094
-rw-r--r--CORE/HDD/src/wlan_hdd_ftm.c3
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c93
-rwxr-xr-xCORE/HDD/src/wlan_hdd_main.c272
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c10
-rw-r--r--CORE/HDD/src/wlan_hdd_tx_rx.c16
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c385
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/SERVICES/COMMON/dbglog_id.h41
-rw-r--r--CORE/SERVICES/COMMON/targaddrs.h6
-rw-r--r--CORE/SERVICES/COMMON/wlan_module_ids.h3
-rw-r--r--CORE/SERVICES/COMMON/wma_api.h3
-rw-r--r--CORE/SERVICES/COMMON/wmi_services.h4
-rw-r--r--CORE/SERVICES/COMMON/wmi_tlv_defs.h64
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified.h216
-rw-r--r--CORE/SERVICES/COMMON/wmi_version.h2
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c24
-rw-r--r--CORE/SERVICES/HIF/USB/if_usb.c13
-rw-r--r--CORE/SERVICES/HIF/USB/usbdrv.c7
-rw-r--r--CORE/SERVICES/WMA/regdomain.h20
-rw-r--r--CORE/SERVICES/WMA/wma.c243
-rw-r--r--CORE/SERVICES/WMA/wma.h2
-rw-r--r--CORE/SERVICES/WMI/wmi_tlv_helper.c14
-rw-r--r--CORE/SERVICES/WMI/wmi_unified.c21
-rw-r--r--CORE/SME/inc/sme_Api.h7
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c14
-rw-r--r--CORE/SVC/inc/wlan_logging_sock_svc.h26
-rw-r--r--CORE/SVC/src/logging/wlan_logging_sock_svc.c27
-rw-r--r--CORE/UTILS/FWLOG/dbglog_host.c15
-rw-r--r--CORE/VOSS/inc/vos_api.h4
-rw-r--r--CORE/VOSS/src/vos_api.c9
-rw-r--r--CORE/VOSS/src/vos_nvitem.c10
-rw-r--r--Kbuild5
-rwxr-xr-xfirmware_bin/WCNSS_qcom_cfg.ini2
38 files changed, 1354 insertions, 1390 deletions
diff --git a/CORE/HDD/inc/qc_sap_ioctl.h b/CORE/HDD/inc/qc_sap_ioctl.h
index 3e41ae19b3d2..e5d693a90575 100644
--- a/CORE/HDD/inc/qc_sap_ioctl.h
+++ b/CORE/HDD/inc/qc_sap_ioctl.h
@@ -91,22 +91,6 @@ typedef enum {
eQC_WPS_ASSOC_RSP_IE
} eQCWPSType;
-/*
- * MLME state manipulation request. QCSAP_MLME_ASSOC
- * is used for station mode only. The other types are used for station or ap mode.
- */
-struct sQcSapreq_mlme {
- u_int8_t im_op; /* operation to perform */
-#define QCSAP_MLME_ASSOC 1 /* associate station */
-#define QCSAP_MLME_DISASSOC 2 /* disassociate station */
-#define QCSAP_MLME_DEAUTH 3 /* deauthenticate station */
-#define QCSAP_MLME_AUTHORIZE 4 /* authorize station */
-#define QCSAP_MLME_UNAUTHORIZE 5 /* unauthorize station */
-#define QCSAP_MLME_MICFAILURE 6 /* TKIP MICFAILURE */
- u_int16_t im_reason; /* 802.11 reason code */
- u_int8_t im_macaddr[QCSAP_ADDR_LEN];
-};
-
/*
* Retrieve the WPA/RSN information element for an associated station.
@@ -156,8 +140,7 @@ typedef struct
#define QCSAP_IOCTL_SETPARAM (SIOCIWFIRSTPRIV+0)
#define QCSAP_IOCTL_GETPARAM (SIOCIWFIRSTPRIV+1)
/* (SIOCIWFIRSTPRIV+2) is unused */
-#define QCSAP_IOCTL_SETMLME (SIOCIWFIRSTPRIV+3)
-
+/* (SIOCIWFIRSTPRIV+3) is unused */
#define QCSAP_IOCTL_GET_STAWPAIE (SIOCIWFIRSTPRIV+4)
#define QCSAP_IOCTL_SETWPAIE (SIOCIWFIRSTPRIV+5)
#define QCSAP_IOCTL_STOPBSS (SIOCIWFIRSTPRIV+6)
@@ -209,8 +192,7 @@ typedef struct
enum {
QCSAP_PARAM_MAX_ASSOC = 1,
QCSAP_PARAM_GET_WLAN_DBG,
- QCSAP_PARAM_MODULE_DOWN_IND,
- QCSAP_PARAM_CLR_ACL,
+ QCSAP_PARAM_CLR_ACL = 4,
QCSAP_PARAM_ACL_MODE,
QCSAP_PARAM_HIDE_SSID,
QCSAP_PARAM_AUTO_CHANNEL,
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 7b55aa937e01..6504a58bbbe6 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -2463,6 +2463,14 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_IBSS_PS_WARMUP_TIME_MAX (65535)
#define CFG_IBSS_PS_WARMUP_TIME_DEFAULT (0)
+/*
+ * IBSS Power Save Enable/Disable 1 RX
+ * chain usage during the ATIM window
+ */
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_NAME "gIbssPs1RxChainInAtim"
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN (0)
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX (1)
+#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_DEFAULT (0)
#define CFG_SAP_MAX_NO_PEERS "gSoftApMaxPeers"
#define CFG_SAP_MAX_NO_PEERS_MIN (1)
@@ -2703,6 +2711,11 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_WLAN_LOGGING_NUM_BUF_DEFAULT ( 32 )
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
+#define CFG_ENABLE_SIFS_BURST "gEnableSifsBurst"
+#define CFG_ENABLE_SIFS_BURST_MIN ( 0 )
+#define CFG_ENABLE_SIFS_BURST_MAX ( 1 )
+#define CFG_ENABLE_SIFS_BURST_DEFAULT ( 0 )
+
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@@ -3161,6 +3174,7 @@ typedef struct
v_U32_t ibssInactivityCount;
v_U32_t ibssTxSpEndInactivityTime;
v_U32_t ibssPsWarmupTime;
+ v_U32_t ibssPs1RxChainInAtimEnable;
v_BOOL_t enableTCPChkSumOffld;
v_BOOL_t enableIPChecksumOffload;
@@ -3291,6 +3305,8 @@ typedef struct
v_U32_t wlanLoggingFEToConsole;
v_U32_t wlanLoggingNumBuf;
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
+
+ v_BOOL_t enableSifsBurst;
} hdd_config_t;
#ifdef WLAN_FEATURE_MBSSID
diff --git a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
index df0ecd2c134b..b8c6f6b0f333 100644
--- a/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_tgt_cfg.h
@@ -82,13 +82,6 @@ struct hdd_tgt_vht_cap {
};
#endif
-struct regulatory {
- u_int32_t reg_domain;
- u_int32_t eeprom_rd_ext;
- u_int16_t country_code;
- u_int8_t alpha2[3];
- const void *regpair;
-};
struct hdd_tgt_cfg {
u_int32_t target_fw_version;
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index e7fff767f9df..ec95067de29c 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3263,6 +3263,13 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_IBSS_PS_WARMUP_TIME_MIN,
CFG_IBSS_PS_WARMUP_TIME_MAX ),
+ REG_VARIABLE( CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, ibssPs1RxChainInAtimEnable,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_DEFAULT,
+ CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN,
+ CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX ),
+
#ifndef QCA_WIFI_ISOC
REG_VARIABLE( CFG_THERMAL_TEMP_MIN_LEVEL0_NAME, WLAN_PARAM_Integer,
hdd_config_t, thermalTempMinLevel0,
@@ -3718,6 +3725,13 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_WLAN_LOGGING_NUM_BUF_MIN,
CFG_WLAN_LOGGING_NUM_BUF_MAX ),
#endif /* WLAN_LOGGING_SOCK_SVC_ENABLE */
+
+ REG_VARIABLE( CFG_ENABLE_SIFS_BURST, WLAN_PARAM_Integer,
+ hdd_config_t, enableSifsBurst,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_SIFS_BURST_DEFAULT,
+ CFG_ENABLE_SIFS_BURST_MIN,
+ CFG_ENABLE_SIFS_BURST_MAX ),
};
#ifdef WLAN_FEATURE_MBSSID
@@ -4190,6 +4204,9 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gIbssInactivityTime] Value = [%u] ",pHddCtx->cfg_ini->ibssInactivityCount);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gIbssTxSpEndInactivityTime] Value = [%u] ",pHddCtx->cfg_ini->ibssTxSpEndInactivityTime);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [gIbssPsWarmupTime] Value = [%u] ",pHddCtx->cfg_ini->ibssPsWarmupTime);
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Name = [gIbssPs1RxChainInAtim] Value = [%u] ",
+ pHddCtx->cfg_ini->ibssPs1RxChainInAtimEnable);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH, "Name = [fDfsPhyerrFilterOffload] Value = [%u] ",pHddCtx->cfg_ini->fDfsPhyerrFilterOffload);
#ifdef IPA_OFFLOAD
@@ -4240,6 +4257,9 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
"Name = [isRoamOffloadEnabled] Value = [%u]",
pHddCtx->cfg_ini->isRoamOffloadEnabled);
#endif
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
+ "Name = [gEnableSifsBurst] Value = [%u]",
+ pHddCtx->cfg_ini->enableSifsBurst);
}
#define CFG_VALUE_MAX_LEN 256
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 84369c3e6360..e10decdd6fc1 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -692,6 +692,15 @@ static struct index_vht_data_rate_type supported_vht_mcs_rate_nss2[] =
};
#endif /* WLAN_FEATURE_11AC */
+/*array index ponints to MCS and array value points respective rssi*/
+static int rssiMcsTbl[][10] =
+{
+/*MCS 0 1 2 3 4 5 6 7 8 9*/
+ {-82, -79, -77, -74, -70, -66, -65, -64, -59, -57}, //20
+ {-79, -76, -74, -71, -67, -63, -62, -61, -56, -54}, //40
+ {-76, -73, -71, -68, -64, -60, -59, -58, -53, -51} //80
+};
+
extern struct net_device_ops net_ops_struct;
#ifdef WLAN_NL80211_TESTMODE
@@ -2874,13 +2883,6 @@ static int wlan_hdd_cfg80211_ll_stats_set(struct wiphy *wiphy,
return -EINVAL;
}
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("HDD adapter is Null"));
- return -ENODEV;
- }
-
if (nla_parse(tb_vendor, QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX,
(struct nlattr *)data,
data_len, qca_wlan_vendor_ll_set_policy))
@@ -2979,13 +2981,6 @@ static int wlan_hdd_cfg80211_ll_stats_get(struct wiphy *wiphy,
return -EINVAL ;
}
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
if (!pAdapter->isLinkLayerStatsSet)
{
hddLog(VOS_TRACE_LEVEL_FATAL,
@@ -3077,13 +3072,6 @@ static int wlan_hdd_cfg80211_ll_stats_clear(struct wiphy *wiphy,
return -EINVAL;
}
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
if (!pAdapter->isLinkLayerStatsSet)
{
hddLog(VOS_TRACE_LEVEL_FATAL,
@@ -5405,54 +5393,47 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy,
struct net_device *dev)
#endif
{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx = NULL;
hdd_scaninfo_t *pScanInfo = NULL;
hdd_adapter_t *staAdapter = NULL;
- VOS_STATUS status;
- tSirUpdateIE updateIE;
+ VOS_STATUS status = VOS_STATUS_E_FAILURE;
+ tSirUpdateIE updateIE;
+ beacon_data_t *old;
+ int ret;
ENTER();
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter context is Null", __func__);
- return -ENODEV;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_STOP_AP,
pAdapter->sessionId, pAdapter->device_mode));
+
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- status = wlan_hdd_validate_context(pHddCtx);
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return ret;
+ }
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
- return status;
+ if (!(pAdapter->device_mode == WLAN_HDD_SOFTAP ||
+ pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ return -EOPNOTSUPP;
}
staAdapter = hdd_get_adapter(pAdapter->pHddCtx, WLAN_HDD_INFRA_STATION);
- if (NULL == staAdapter)
- {
+ if (NULL == staAdapter) {
staAdapter = hdd_get_adapter(pAdapter->pHddCtx, WLAN_HDD_P2P_CLIENT);
- if (NULL == staAdapter)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
- "%s: HDD adapter context for STA/P2P-CLI is Null",
- __func__);
+ if (NULL == staAdapter) {
+ hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
+ FL("HDD adapter context for STA/P2P-CLI is Null"));
}
}
pScanInfo = &pAdapter->scan_info;
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__,pAdapter->device_mode);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d"), pAdapter->device_mode);
- if ((pScanInfo != NULL) && pScanInfo->mScanPending && staAdapter)
- {
+ if ((pScanInfo != NULL) && pScanInfo->mScanPending && staAdapter) {
long ret;
INIT_COMPLETION(pScanInfo->abortscan_event_var);
@@ -5461,104 +5442,87 @@ static int wlan_hdd_cfg80211_stop_ap (struct wiphy *wiphy,
ret = wait_for_completion_interruptible_timeout(
&pScanInfo->abortscan_event_var,
msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN));
- if (ret <= 0)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("Timeout occurred while waiting for abortscan %ld"),
- ret);
+ if (ret <= 0) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Timeout occurred while waiting for abortscan %ld"),
+ ret);
VOS_ASSERT(pScanInfo->mScanPending);
}
}
hdd_hostapd_stop(dev);
- if ((pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- )
- {
- beacon_data_t *old;
-
- old = pAdapter->sessionCtx.ap.beacon;
-
- if (!old)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("session(%d) beacon data points to NULL"),
- pAdapter->sessionId);
- return -EINVAL;
- }
+ old = pAdapter->sessionCtx.ap.beacon;
+ if (!old) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Session(%d) beacon data points to NULL"),
+ pAdapter->sessionId);
+ return -EINVAL;
+ }
- hdd_cleanup_actionframe(pHddCtx, pAdapter);
+ hdd_cleanup_actionframe(pHddCtx, pAdapter);
- mutex_lock(&pHddCtx->sap_lock);
- if(test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags))
- {
+ mutex_lock(&pHddCtx->sap_lock);
+ if (test_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags)) {
#ifdef WLAN_FEATURE_MBSSID
- status = WLANSAP_StopBss(WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
+ status = WLANSAP_StopBss(WLAN_HDD_GET_SAP_CTX_PTR(pAdapter));
#else
- status = WLANSAP_StopBss(pHddCtx->pvosContext);
+ status = WLANSAP_StopBss(pHddCtx->pvosContext);
#endif
- if (VOS_IS_STATUS_SUCCESS(status))
- {
- hdd_hostapd_state_t *pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
+ if (VOS_IS_STATUS_SUCCESS(status)) {
+ hdd_hostapd_state_t *pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pAdapter);
- status = vos_wait_single_event(&pHostapdState->vosEvent, 10000);
+ status = vos_wait_single_event(&pHostapdState->vosEvent, 10000);
- if (!VOS_IS_STATUS_SUCCESS(status))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- ("%s: ERROR: HDD vos wait for single_event failed!!"),
- __func__);
- VOS_ASSERT(0);
- }
+ if (!VOS_IS_STATUS_SUCCESS(status)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("HDD vos wait for single_event failed!!"));
+ VOS_ASSERT(0);
}
- clear_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags);
- /* BSS stopped, clear the active sessions for this device mode */
- wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode);
}
- mutex_unlock(&pHddCtx->sap_lock);
+ clear_bit(SOFTAP_BSS_STARTED, &pAdapter->event_flags);
+ /* BSS stopped, clear the active sessions for this device mode */
+ wlan_hdd_decr_active_session(pHddCtx, pAdapter->device_mode);
+ }
+ mutex_unlock(&pHddCtx->sap_lock);
- if(status != VOS_STATUS_SUCCESS)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s:Error!!! Stopping the BSS",__func__);
- return -EINVAL;
- }
+ if (status != VOS_STATUS_SUCCESS) {
+ hddLog(VOS_TRACE_LEVEL_FATAL, FL("Stopping the BSS"));
+ return -EINVAL;
+ }
- vos_mem_copy(updateIE.bssid, pAdapter->macAddressCurrent.bytes,
- sizeof(tSirMacAddr));
- updateIE.smeSessionId = pAdapter->sessionId;
- updateIE.ieBufferlength = 0;
- updateIE.pAdditionIEBuffer = NULL;
- updateIE.append = VOS_FALSE;
- updateIE.notify = VOS_FALSE;
- if (sme_UpdateAddIE(WLAN_HDD_GET_HAL_CTX(pAdapter),
- &updateIE, eUPDATE_IE_PROBE_BCN) == eHAL_STATUS_FAILURE) {
- hddLog(LOGE, FL("Could not pass on PROBE_RSP_BCN data to PE"));
- }
+ vos_mem_copy(updateIE.bssid, pAdapter->macAddressCurrent.bytes,
+ sizeof(tSirMacAddr));
+ updateIE.smeSessionId = pAdapter->sessionId;
+ updateIE.ieBufferlength = 0;
+ updateIE.pAdditionIEBuffer = NULL;
+ updateIE.append = VOS_TRUE;
+ updateIE.notify = VOS_TRUE;
+ if (sme_UpdateAddIE(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ &updateIE, eUPDATE_IE_PROBE_BCN) == eHAL_STATUS_FAILURE) {
+ hddLog(LOGE, FL("Could not pass on PROBE_RSP_BCN data to PE"));
+ }
- if (sme_UpdateAddIE(WLAN_HDD_GET_HAL_CTX(pAdapter),
- &updateIE, eUPDATE_IE_ASSOC_RESP) == eHAL_STATUS_FAILURE) {
- hddLog(LOGE, FL("Could not pass on ASSOC_RSP data to PE"));
- }
+ if (sme_UpdateAddIE(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ &updateIE, eUPDATE_IE_ASSOC_RESP) == eHAL_STATUS_FAILURE) {
+ hddLog(LOGE, FL("Could not pass on ASSOC_RSP data to PE"));
+ }
- // Reset WNI_CFG_PROBE_RSP Flags
- wlan_hdd_reset_prob_rspies(pAdapter);
+ // Reset WNI_CFG_PROBE_RSP Flags
+ wlan_hdd_reset_prob_rspies(pAdapter);
- pAdapter->sessionCtx.ap.beacon = NULL;
- kfree(old);
+ pAdapter->sessionCtx.ap.beacon = NULL;
+ kfree(old);
#ifdef WLAN_FEATURE_P2P_DEBUG
- if((pAdapter->device_mode == WLAN_HDD_P2P_GO) &&
- (globalP2PConnectionStatus == P2P_GO_COMPLETED_STATE))
- {
- hddLog(LOGE,"[P2P State] From GO completed to Inactive state "
- "GO got removed");
- globalP2PConnectionStatus = P2P_NOT_ACTIVE;
- }
-#endif
+ if((pAdapter->device_mode == WLAN_HDD_P2P_GO) &&
+ (globalP2PConnectionStatus == P2P_GO_COMPLETED_STATE)) {
+ hddLog(LOGE,"[P2P State] From GO completed to Inactive state "
+ "GO got removed");
+ globalP2PConnectionStatus = P2P_NOT_ACTIVE;
}
+#endif
EXIT();
- return status;
+ return ret;
}
#if (LINUX_VERSION_CODE > KERNEL_VERSION(3,3,0))
@@ -5567,27 +5531,12 @@ static int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
struct net_device *dev,
struct cfg80211_ap_settings *params)
{
- hdd_adapter_t *pAdapter;
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
int status;
ENTER();
- if (NULL == dev)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Device is Null", __func__);
- return -ENODEV;
- }
-
- pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_START_AP, pAdapter->sessionId,
params-> beacon_interval));
@@ -5667,11 +5616,12 @@ static int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
static int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
- struct net_device *dev,
- struct cfg80211_beacon_data *params)
+ struct net_device *dev,
+ struct cfg80211_beacon_data *params)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
+ beacon_data_t *old,*new;
int status;
ENTER();
@@ -5679,53 +5629,45 @@ static int wlan_hdd_cfg80211_change_beacon(struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CHANGE_BEACON,
pAdapter->sessionId, pAdapter->device_mode));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__, pAdapter->device_mode);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d"), pAdapter->device_mode);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
return status;
}
- if ((pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- )
- {
- beacon_data_t *old,*new;
-
- old = pAdapter->sessionCtx.ap.beacon;
-
- if (!old)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- FL("session(%d) beacon data points to NULL"),
- pAdapter->sessionId);
- return -EINVAL;
- }
+ if (!(pAdapter->device_mode == WLAN_HDD_SOFTAP ||
+ pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ return -EOPNOTSUPP;
+ }
- status = wlan_hdd_cfg80211_alloc_new_beacon(pAdapter, &new, params, 0);
+ old = pAdapter->sessionCtx.ap.beacon;
- if(status != VOS_STATUS_SUCCESS) {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: Error!!! Allocating the new beacon",__func__);
- return -EINVAL;
- }
+ if (!old) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ FL("session(%d) beacon data points to NULL"),
+ pAdapter->sessionId);
+ return -EINVAL;
+ }
- pAdapter->sessionCtx.ap.beacon = new;
+ status = wlan_hdd_cfg80211_alloc_new_beacon(pAdapter, &new, params, 0);
- status = wlan_hdd_cfg80211_start_bss(pAdapter, params, NULL, 0, 0);
+ if (status != VOS_STATUS_SUCCESS) {
+ hddLog(VOS_TRACE_LEVEL_FATAL, FL("new beacon alloc failed"));
+ return -EINVAL;
}
+ pAdapter->sessionCtx.ap.beacon = new;
+ status = wlan_hdd_cfg80211_start_bss(pAdapter, params, NULL, 0, 0);
+
EXIT();
return status;
}
-#endif //(LINUX_VERSION_CODE > KERNEL_VERSION(3,3,0))
+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(3,3,0)) */
static int __wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
struct net_device *dev,
@@ -5735,36 +5677,37 @@ static int __wlan_hdd_cfg80211_change_bss (struct wiphy *wiphy,
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int ret = 0;
eHalStatus halStatus;
- v_CONTEXT_t pVosContext = pHddCtx->pvosContext;
ENTER();
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CHANGE_BSS,
pAdapter->sessionId, params->ap_isolate));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d, ap_isolate = %d",
- __func__,pAdapter->device_mode,
- params->ap_isolate);
- if (!pVosContext)
- return -EINVAL;
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d, ap_isolate = %d"),
+ pAdapter->device_mode, params->ap_isolate);
- if((pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO)
- )
- {
- /* ap_isolate == -1 means that in change bss, upper layer doesn't
- * want to update this parameter */
- if (-1 != params->ap_isolate)
- {
- pAdapter->sessionCtx.ap.apDisableIntraBssFwd = !!params->ap_isolate;
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return ret;
+ }
- halStatus = sme_ApDisableIntraBssFwd(pHddCtx->hHal,
- pAdapter->sessionId,
- pAdapter->sessionCtx.ap.apDisableIntraBssFwd);
- if (!HAL_STATUS_SUCCESS(halStatus))
- {
- ret = -EINVAL;
- }
+ if (!(pAdapter->device_mode == WLAN_HDD_SOFTAP ||
+ pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ return -EOPNOTSUPP;
+ }
+
+ /* ap_isolate == -1 means that in change bss, upper layer doesn't
+ * want to update this parameter */
+ if (-1 != params->ap_isolate) {
+ pAdapter->sessionCtx.ap.apDisableIntraBssFwd = !!params->ap_isolate;
+
+ halStatus = sme_ApDisableIntraBssFwd(pHddCtx->hHal,
+ pAdapter->sessionId,
+ pAdapter->sessionCtx.ap.apDisableIntraBssFwd);
+ if (!HAL_STATUS_SUCCESS(halStatus)) {
+ ret = -EINVAL;
}
}
@@ -5863,13 +5806,6 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy,
ENTER();
- if (!pAdapter)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Adapter context is null", __func__);
- return -ENODEV;
- }
-
pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
status = wlan_hdd_validate_context(pHddCtx);
if (0 != status)
@@ -6345,11 +6281,10 @@ static int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
ENTER();
- if (NULL == pHddCtx || NULL == pHddCtx->cfg_ini)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "Invalid arguments");
- return -EINVAL;
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return ret;
}
if ((eTDLS_SUPPORT_NOT_ENABLED == pHddCtx->tdls_mode) ||
@@ -6528,57 +6463,39 @@ static int wlan_hdd_change_station(struct wiphy *wiphy,
tANI_U8 isBufSta = 0;
tANI_U8 isOffChannelSupported = 0;
#endif
- ENTER();
+ int ret;
- if ((NULL == pAdapter))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "invalid adapter ");
- return -EINVAL;
- }
+ ENTER();
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CHANGE_STATION,
pAdapter->sessionId, params->listen_interval));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
-
- if (0 != wlan_hdd_validate_context(pHddCtx))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
- return -EINVAL;
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return ret;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- if (!pHddStaCtx)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD station context is null", __func__);
- return -EINVAL;
- }
-
vos_mem_copy(STAMacAddress.bytes, mac, sizeof(v_MACADDR_t));
- if ((pAdapter->device_mode == WLAN_HDD_SOFTAP)
- || (pAdapter->device_mode == WLAN_HDD_P2P_GO))
- {
- if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED))
- {
+ if ((pAdapter->device_mode == WLAN_HDD_SOFTAP) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_GO)) {
+ if (params->sta_flags_set & BIT(NL80211_STA_FLAG_AUTHORIZED)) {
status = hdd_softap_change_STA_state( pAdapter, &STAMacAddress,
WLANTL_STA_AUTHENTICATED);
- if (status != VOS_STATUS_SUCCESS)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: Not able to change TL state to AUTHENTICATED", __func__);
+ if (status != VOS_STATUS_SUCCESS) {
+ hddLog(VOS_TRACE_LEVEL_INFO,
+ FL("Not able to change TL state to AUTHENTICATED"));
return -EINVAL;
}
}
- }
- else if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION)
- || (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) {
+ } else if ((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT)) {
#ifdef FEATURE_WLAN_TDLS
if (params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) {
StaParams.capability = params->capability;
@@ -6591,13 +6508,11 @@ static int wlan_hdd_change_station(struct wiphy *wiphy,
* are an incremental of 1 else an incremental of 4 till the number
* of channels.
*/
- if (0 != params->supported_channels_len)
- {
+ if (0 != params->supported_channels_len) {
int i = 0, j = 0, k = 0, no_of_channels = 0;
for (i = 0 ; i < params->supported_channels_len &&
- j < SIR_MAC_MAX_SUPP_CHANNELS; i += 2)
- {
+ j < SIR_MAC_MAX_SUPP_CHANNELS; i += 2) {
int wifi_chan_index;
StaParams.supported_channels[j] = params->supported_channels[i];
@@ -6606,8 +6521,7 @@ static int wlan_hdd_change_station(struct wiphy *wiphy,
no_of_channels = params->supported_channels[i + 1];
for (k = 1; k <= no_of_channels &&
- j < SIR_MAC_MAX_SUPP_CHANNELS - 1; k++)
- {
+ j < SIR_MAC_MAX_SUPP_CHANNELS - 1; k++) {
StaParams.supported_channels[j + 1] =
StaParams.supported_channels[j] + wifi_chan_index;
j += 1;
@@ -6625,8 +6539,7 @@ static int wlan_hdd_change_station(struct wiphy *wiphy,
vos_mem_copy(StaParams.extn_capability, params->ext_capab,
sizeof(StaParams.extn_capability));
- if (NULL != params->ht_capa)
- {
+ if (NULL != params->ht_capa) {
StaParams.htcap_present = 1;
vos_mem_copy(&StaParams.HTCap, params->ht_capa, sizeof(tSirHTCap));
}
@@ -6655,8 +6568,7 @@ static int wlan_hdd_change_station(struct wiphy *wiphy,
"[%d]: %0x", i, StaParams.supported_rates[i]);
}
- if (NULL != params->vht_capa)
- {
+ if (NULL != params->vht_capa) {
StaParams.vhtcap_present = 1;
vos_mem_copy(&StaParams.VHTCap, params->vht_capa, sizeof(tSirVHTCap));
}
@@ -6671,27 +6583,27 @@ static int wlan_hdd_change_station(struct wiphy *wiphy,
isOffChannelSupported = 1;
}
}
- status = wlan_hdd_tdls_set_peer_caps( pAdapter, mac,
+
+ status = wlan_hdd_tdls_set_peer_caps(pAdapter, mac,
&StaParams, isBufSta,
isOffChannelSupported);
-
if (VOS_STATUS_SUCCESS != status) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: wlan_hdd_tdls_set_peer_caps failed!", __func__);
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("wlan_hdd_tdls_set_peer_caps failed!"));
return -EINVAL;
}
- status = wlan_hdd_tdls_add_station(wiphy, dev, mac, 1, &StaParams);
+ status = wlan_hdd_tdls_add_station(wiphy, dev, mac, 1, &StaParams);
if (VOS_STATUS_SUCCESS != status) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: sme_ChangeTdlsPeerSta failed!", __func__);
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("wlan_hdd_tdls_add_station failed!"));
return -EINVAL;
}
}
#endif
}
EXIT();
- return status;
+ return ret;
}
/*
@@ -7273,11 +7185,6 @@ static int wlan_hdd_cfg80211_key_mgmt_set_pmk(struct wiphy *wiphy,
hdd_station_ctx_t *pHddStaCtx;
ENTER();
- if ((NULL == pAdapter)) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "invalid adapter");
- return -EINVAL;
- }
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
@@ -7322,13 +7229,6 @@ static int __wlan_hdd_cfg80211_set_default_key( struct wiphy *wiphy,
ENTER();
- if ((NULL == pAdapter))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "invalid adapter");
- return -EINVAL;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_DEFAULT_KEY,
pAdapter->sessionId, key_index));
@@ -8435,7 +8335,8 @@ int __wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
* set to 1. Because of this, driver is assuming that this is not
* wildcard scan and so is not aging out the scan results.
*/
- if (request->ssids && '\0' == request->ssids->ssid[0])
+ if ((request->ssids) && (request->n_ssids == 1) &&
+ ('\0' == request->ssids->ssid[0]))
{
request->n_ssids = 0;
}
@@ -9649,12 +9550,6 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy,
ENTER();
- if (!pAdapter) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Adapter context is null", __func__);
- return -EINVAL;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_CONNECT,
pAdapter->sessionId, pAdapter->device_mode));
@@ -9882,8 +9777,6 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR( dev );
- tCsrRoamProfile *pRoamProfile =
- &(WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter))->roamProfile;
int status;
hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
@@ -9896,100 +9789,81 @@ static int __wlan_hdd_cfg80211_disconnect( struct wiphy *wiphy,
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_DISCONNECT,
pAdapter->sessionId, reason));
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",
- __func__,pAdapter->device_mode);
-
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: Disconnect called with reason code %d",
- __func__, reason);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode (%d) reason code(%d)"),
+ pAdapter->device_mode, reason);
status = wlan_hdd_validate_context(pHddCtx);
if (0 != status)
{
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
return status;
}
- if (NULL != pRoamProfile)
- {
- /*issue disconnect request to SME, if station is in connected state*/
- if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated) ||
- (pHddStaCtx->conn_info.connState == eConnectionState_Connecting))
- {
- eCsrRoamDisconnectReason reasonCode =
- eCSR_DISCONNECT_REASON_UNSPECIFIED;
- hdd_scaninfo_t *pScanInfo;
- switch(reason)
- {
- case WLAN_REASON_MIC_FAILURE:
- reasonCode = eCSR_DISCONNECT_REASON_MIC_ERROR;
- break;
+ /* Issue disconnect request to SME, if station is in connected state */
+ if ((pHddStaCtx->conn_info.connState == eConnectionState_Associated) ||
+ (pHddStaCtx->conn_info.connState == eConnectionState_Connecting)) {
+ eCsrRoamDisconnectReason reasonCode =
+ eCSR_DISCONNECT_REASON_UNSPECIFIED;
+ hdd_scaninfo_t *pScanInfo;
+ switch (reason) {
+ case WLAN_REASON_MIC_FAILURE:
+ reasonCode = eCSR_DISCONNECT_REASON_MIC_ERROR;
+ break;
- case WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY:
- case WLAN_REASON_DISASSOC_AP_BUSY:
- case WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA:
- reasonCode = eCSR_DISCONNECT_REASON_DISASSOC;
- break;
+ case WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY:
+ case WLAN_REASON_DISASSOC_AP_BUSY:
+ case WLAN_REASON_CLASS3_FRAME_FROM_NONASSOC_STA:
+ reasonCode = eCSR_DISCONNECT_REASON_DISASSOC;
+ break;
- case WLAN_REASON_PREV_AUTH_NOT_VALID:
- case WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA:
- reasonCode = eCSR_DISCONNECT_REASON_DEAUTH;
- break;
+ case WLAN_REASON_PREV_AUTH_NOT_VALID:
+ case WLAN_REASON_CLASS2_FRAME_FROM_NONAUTH_STA:
+ reasonCode = eCSR_DISCONNECT_REASON_DEAUTH;
+ break;
- case WLAN_REASON_DEAUTH_LEAVING:
- default:
- reasonCode = eCSR_DISCONNECT_REASON_UNSPECIFIED;
- break;
- }
- pHddStaCtx->conn_info.connState = eConnectionState_NotConnected;
- pScanInfo = &pAdapter->scan_info;
- if (pScanInfo->mScanPending)
- {
- hddLog(VOS_TRACE_LEVEL_INFO, "Disconnect is in progress, "
- "Aborting Scan");
- hdd_abort_mac_scan(pHddCtx, pAdapter->sessionId,
- eCSR_SCAN_ABORT_DEFAULT);
- }
+ case WLAN_REASON_DEAUTH_LEAVING:
+ default:
+ reasonCode = eCSR_DISCONNECT_REASON_UNSPECIFIED;
+ break;
+ }
+ pHddStaCtx->conn_info.connState = eConnectionState_NotConnected;
+ pScanInfo = &pAdapter->scan_info;
+ if (pScanInfo->mScanPending) {
+ hddLog(VOS_TRACE_LEVEL_INFO, "Disconnect is in progress, "
+ "Aborting Scan");
+ hdd_abort_mac_scan(pHddCtx, pAdapter->sessionId,
+ eCSR_SCAN_ABORT_DEFAULT);
+ }
#ifdef FEATURE_WLAN_TDLS
- /* First clean up the tdls peers if any */
- for (staIdx = 0 ; staIdx < HDD_MAX_NUM_TDLS_STA; staIdx++)
- {
- if ((pHddCtx->tdlsConnInfo[staIdx].sessionId == pAdapter->sessionId) &&
- (pHddCtx->tdlsConnInfo[staIdx].staId))
- {
- uint8 *mac;
- mac = pHddCtx->tdlsConnInfo[staIdx].peerMac.bytes;
- VOS_TRACE(VOS_MODULE_ID_HDD, TDLS_LOG_LEVEL,
- "%s: call sme_DeleteTdlsPeerSta staId %d sessionId %d " MAC_ADDRESS_STR,
- __func__, pHddCtx->tdlsConnInfo[staIdx].staId, pAdapter->sessionId,
- MAC_ADDR_ARRAY(mac));
- sme_DeleteTdlsPeerSta(WLAN_HDD_GET_HAL_CTX(pAdapter),
- pAdapter->sessionId,
- mac);
- }
- }
-#endif
- hddLog(LOG1, FL("Disconnecting with reasoncode:%u"), reasonCode);
- status = wlan_hdd_disconnect(pAdapter, reasonCode);
- if ( 0 != status )
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s wlan_hdd_disconnect failure, returned %d",
- __func__, (int)status );
- return -EINVAL;
+ /* First clean up the tdls peers if any */
+ for (staIdx = 0 ; staIdx < HDD_MAX_NUM_TDLS_STA; staIdx++) {
+ if ((pHddCtx->tdlsConnInfo[staIdx].sessionId == pAdapter->sessionId) &&
+ (pHddCtx->tdlsConnInfo[staIdx].staId)) {
+ uint8 *mac;
+ mac = pHddCtx->tdlsConnInfo[staIdx].peerMac.bytes;
+ hddLog(TDLS_LOG_LEVEL,
+ "%s: call sme_DeleteTdlsPeerSta staId %d sessionId %d " MAC_ADDRESS_STR,
+ __func__, pHddCtx->tdlsConnInfo[staIdx].staId,
+ pAdapter->sessionId,
+ MAC_ADDR_ARRAY(mac));
+ sme_DeleteTdlsPeerSta(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId,
+ mac);
}
}
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: unexpected cfg disconnect called while in state (%d)",
- __func__, pHddStaCtx->conn_info.connState);
+#endif
+ hddLog(LOG1, FL("Disconnecting with reasoncode:%u"), reasonCode);
+ status = wlan_hdd_disconnect(pAdapter, reasonCode);
+ if (0 != status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("failure, returned %d"), status);
+ return -EINVAL;
}
- }
- else
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: No valid roam profile", __func__);
+ } else {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("unexpected cfg disconnect called while in state (%d)"),
+ pHddStaCtx->conn_info.connState);
}
return status;
@@ -10194,9 +10068,8 @@ static int __wlan_hdd_cfg80211_join_ibss(struct wiphy *wiphy,
params->bssid = vos_mem_malloc(sizeof(VOS_MAC_ADDR_SIZE));
if (!params->bssid)
{
- hddLog (VOS_TRACE_LEVEL_ERROR,
- "%s:Failed memory allocation", __func__);
- return -EIO;
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("Memory allocation failed"));
+ return -ENOMEM;
}
vos_mem_copy((v_U8_t *)params->bssid,
(v_U8_t *)&pHddCtx->cfg_ini->IbssBssid.bytes[0],
@@ -10321,6 +10194,7 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
tCsrRoamProfile *pRoamProfile;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int status;
+ eHalStatus hal_status;
ENTER();
@@ -10328,36 +10202,35 @@ static int __wlan_hdd_cfg80211_leave_ibss(struct wiphy *wiphy,
TRACE_CODE_HDD_CFG80211_LEAVE_IBSS,
pAdapter->sessionId, eCSR_DISCONNECT_REASON_IBSS_LEAVE));
status = wlan_hdd_validate_context(pHddCtx);
-
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
return status;
}
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: device_mode = %d",__func__,pAdapter->device_mode);
- if (NULL == pWextState)
- {
- hddLog (VOS_TRACE_LEVEL_ERROR, "%s ERROR: Data Storage Corruption",
- __func__);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("device_mode = %d"), pAdapter->device_mode);
+ if (NULL == pWextState) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("Data Storage Corruption"));
return -EIO;
}
pRoamProfile = &pWextState->roamProfile;
/* Issue disconnect only if interface type is set to IBSS */
- if (eCSR_BSS_TYPE_START_IBSS != pRoamProfile->BSSType)
- {
- hddLog (VOS_TRACE_LEVEL_ERROR, "%s: BSS Type is not set to IBSS",
- __func__);
+ if (eCSR_BSS_TYPE_START_IBSS != pRoamProfile->BSSType) {
+ hddLog (VOS_TRACE_LEVEL_ERROR, FL("BSS Type is not set to IBSS"));
return -EINVAL;
}
/* Issue Disconnect request */
INIT_COMPLETION(pAdapter->disconnect_comp_var);
- sme_RoamDisconnect( WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId,
- eCSR_DISCONNECT_REASON_IBSS_LEAVE);
+ hal_status = sme_RoamDisconnect(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ pAdapter->sessionId,
+ eCSR_DISCONNECT_REASON_IBSS_LEAVE);
+ if (!HAL_STATUS_SUCCESS(hal_status)) {
+ hddLog(LOGE,
+ FL("sme_RoamDisconnect failed hal_status(%d)"), hal_status);
+ return -EAGAIN;
+ }
return 0;
}
@@ -10761,7 +10634,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
tANI_U8 rateFlag = 1;
tANI_U8 i, j, rssidx;
tANI_U8 nss = 1;
- int status;
+ int status, mode = 0, maxHtIdx;
struct index_vht_data_rate_type *supported_vht_mcs_rate;
struct index_data_rate_type *supported_mcs_rate;
@@ -10811,8 +10684,6 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
pAdapter->hdd_stats.ClassA_stat.mcs_index,
myRate);
}
-
- myRate = 0;
}
#endif
#ifdef LINKSPEED_DEBUG_ENABLED
@@ -10917,10 +10788,9 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
maxRate = (currentRate > maxRate)?currentRate:maxRate;
}
/* Get MCS Rate Set --
- Only if we are connected in non legacy mode and always reporting max speed (or)
- if we have good rssi */
- if (((0 == rssidx) ||
- (eHDD_LINK_SPEED_REPORT_MAX == pCfg->reportMaxLinkSpeed)) &&
+ Only if we are connected in non legacy mode and not reporting
+ actual speed */
+ if ((3 != rssidx) &&
!(rate_flags & eHAL_TX_RATE_LEGACY))
{
if (0 != ccmCfgGetStr(WLAN_HDD_GET_HAL_CTX(pAdapter), WNI_CFG_CURRENT_MCS_SET,
@@ -10937,6 +10807,14 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
&supported_vht_mcs_rate_nss1 :
&supported_vht_mcs_rate_nss2);
+ if (rate_flags & eHAL_TX_RATE_VHT80)
+ mode = 2;
+ else if ((rate_flags & eHAL_TX_RATE_VHT40) ||
+ (rate_flags & eHAL_TX_RATE_HT40))
+ mode = 1;
+ else
+ mode = 0;
+
/* VHT80 rate has seperate rate table */
if (rate_flags & (eHAL_TX_RATE_VHT20|eHAL_TX_RATE_VHT40|eHAL_TX_RATE_VHT80))
{
@@ -10963,6 +10841,18 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
maxMCSIdx = 9;
}
+ if (rssidx != 0)
+ {
+ for (i=0; i <= maxMCSIdx ; i++)
+ {
+ if (sinfo->signal <= rssiMcsTbl[mode][i])
+ {
+ maxMCSIdx = i;
+ break;
+ }
+ }
+ }
+
if (rate_flags & eHAL_TX_RATE_VHT80)
{
currentRate = supported_vht_mcs_rate[pAdapter->hdd_stats.ClassA_stat.mcs_index].supported_VHT80_rate[rateFlag];
@@ -11002,9 +10892,22 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
((nss == 1)? &supported_mcs_rate_nss1 :
&supported_mcs_rate_nss2);
+ maxHtIdx = MAX_HT_MCS_IDX;
+ if (rssidx != 0)
+ {
+ for (i=0; i < MAX_HT_MCS_IDX; i++)
+ {
+ if (sinfo->signal <= rssiMcsTbl[mode][i])
+ {
+ maxHtIdx = i + 1;
+ break;
+ }
+ }
+ }
+
for (i = 0; i < MCSLeng; i++)
{
- for (j = 0; j < MAX_HT_MCS_IDX; j++)
+ for (j = 0; j < maxHtIdx; j++)
{
if (supported_mcs_rate[j].beacon_rate_index == MCSRates[i])
{
@@ -11012,6 +10915,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
break;
}
}
+
if ((j < MAX_HT_MCS_IDX) && (currentRate > maxRate))
{
maxRate = currentRate;
@@ -11030,8 +10934,7 @@ static int __wlan_hdd_cfg80211_get_station(struct wiphy *wiphy,
}
// make sure we report a value at least as big as our current rate
- if (((maxRate < myRate) && (0 == rssidx)) ||
- (0 == maxRate))
+ if ((maxRate < myRate) || (0 == maxRate))
{
maxRate = myRate;
if (rate_flags & eHAL_TX_RATE_LEGACY)
@@ -11207,12 +11110,6 @@ static int __wlan_hdd_cfg80211_set_power_mgmt(struct wiphy *wiphy,
ENTER();
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Adapter is NULL", __func__);
- return -ENODEV;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_POWER_MGMT,
pAdapter->sessionId, timeout));
@@ -11329,12 +11226,6 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
ENTER();
- if ( NULL == pAdapter )
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Invalid Adapter" ,__func__);
- return -EINVAL;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_DEL_STA,
pAdapter->sessionId, pAdapter->device_mode));
@@ -11342,25 +11233,18 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
return status;
}
- if ( (WLAN_HDD_SOFTAP == pAdapter->device_mode)
- || (WLAN_HDD_P2P_GO == pAdapter->device_mode)
- )
- {
- if( NULL == mac )
- {
+ if ((WLAN_HDD_SOFTAP == pAdapter->device_mode) ||
+ (WLAN_HDD_P2P_GO == pAdapter->device_mode)) {
+ if (NULL == mac) {
v_U16_t i;
- for(i = 0; i < WLAN_MAX_STA_COUNT; i++)
- {
+ for (i = 0; i < WLAN_MAX_STA_COUNT; i++) {
if ((pAdapter->aStaInfo[i].isUsed) &&
- (!pAdapter->aStaInfo[i].isDeauthInProgress))
- {
+ (!pAdapter->aStaInfo[i].isDeauthInProgress)) {
u8 *macAddr = pAdapter->aStaInfo[i].macAddrSTA.bytes;
hddLog(VOS_TRACE_LEVEL_INFO,
"%s: Delete STA with MAC::"
@@ -11371,13 +11255,9 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
pAdapter->aStaInfo[i].isDeauthInProgress = TRUE;
}
}
- }
- else
- {
-
+ } else {
vos_status = hdd_softap_GetStaId(pAdapter,(v_MACADDR_t *)mac, &staId);
- if (!VOS_IS_STATUS_SUCCESS(vos_status))
- {
+ if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
hddLog(VOS_TRACE_LEVEL_INFO,
"%s: Skip this DEL STA as this is not used::"
MAC_ADDRESS_STR,
@@ -11385,8 +11265,7 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
return -ENOENT;
}
- if( pAdapter->aStaInfo[staId].isDeauthInProgress == TRUE)
- {
+ if (pAdapter->aStaInfo[staId].isDeauthInProgress == TRUE) {
hddLog(VOS_TRACE_LEVEL_INFO,
"%s: Skip this DEL STA as deauth is in progress::"
MAC_ADDRESS_STR,
@@ -11403,8 +11282,7 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
MAC_ADDR_ARRAY(mac));
vos_status = hdd_softap_sta_deauth(pAdapter, mac);
- if (!VOS_IS_STATUS_SUCCESS(vos_status))
- {
+ if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
pAdapter->aStaInfo[staId].isDeauthInProgress = FALSE;
hddLog(VOS_TRACE_LEVEL_INFO,
"%s: STA removal failed for ::"
@@ -11413,7 +11291,6 @@ static int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
MAC_ADDR_ARRAY(mac));
return -ENOENT;
}
-
}
}
@@ -11500,44 +11377,41 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device
tANI_U8 BSSIDMatched = 0;
hdd_context_t *pHddCtx;
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: set PMKSA for " MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(pmksa->bssid));
+ if (!pmksa) {
+ hddLog(LOGE, FL("pmksa is NULL"));
+ return -EINVAL;
+ }
- // Validate pAdapter
- if ( NULL == pAdapter )
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Invalid Adapter" ,__func__);
+ if (!pmksa->bssid || !pmksa->pmkid) {
+ hddLog(LOGE, FL("pmksa->bssid(%p) or pmksa->pmkid(%p) is NULL"),
+ pmksa->bssid, pmksa->pmkid);
return -EINVAL;
}
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("set PMKSA for "MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(pmksa->bssid));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
- // Retrieve halHandle
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- for (j = 0; j < pHddStaCtx->PMKIDCacheIndex; j++)
- {
+ for (j = 0; j < pHddStaCtx->PMKIDCacheIndex; j++) {
if (vos_mem_compare(pHddStaCtx->PMKIDCache[j].BSSID,
- pmksa->bssid, VOS_MAC_ADDR_SIZE))
- {
- /* BSSID matched previous entry. Overwrite it. */
+ pmksa->bssid, VOS_MAC_ADDR_SIZE)) {
+ /* BSSID matched previous entry. Overwrite it. */
BSSIDMatched = 1;
vos_mem_copy(pHddStaCtx->PMKIDCache[j].BSSID,
pmksa->bssid, VOS_MAC_ADDR_SIZE);
vos_mem_copy(pHddStaCtx->PMKIDCache[j].PMKID,
pmksa->pmkid,
CSR_RSN_PMKID_SIZE);
- hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Reusing cache entry %d.",
- __func__, j );
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Reusing cache entry %d"), j);
hddLog(VOS_TRACE_LEVEL_INFO, MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pmksa->bssid));
dump_pmkid(halHandle, pmksa->pmkid);
@@ -11546,35 +11420,34 @@ static int __wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device
}
/* Check we compared all entries,if then take the first slot now */
- if (j == MAX_PMKSAIDS_IN_CACHE) pHddStaCtx->PMKIDCacheIndex=0;
+ if (j == MAX_PMKSAIDS_IN_CACHE) pHddStaCtx->PMKIDCacheIndex = 0;
- if (!BSSIDMatched)
- {
- // Now, we DON'T have a BSSID match, so take a new entry in the cache.
+ if (!BSSIDMatched) {
+ /* Now, we DON'T have a BSSID match, so take a new entry in the cache */
vos_mem_copy(pHddStaCtx->PMKIDCache[pHddStaCtx->PMKIDCacheIndex].BSSID,
pmksa->bssid, ETHER_ADDR_LEN);
vos_mem_copy(pHddStaCtx->PMKIDCache[pHddStaCtx->PMKIDCacheIndex].PMKID,
pmksa->pmkid,
CSR_RSN_PMKID_SIZE);
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: Adding a new cache entry %d.",
- __func__, pHddStaCtx->PMKIDCacheIndex );
+ hddLog(VOS_TRACE_LEVEL_DEBUG,
+ FL("Adding a new cache entry %d"), pHddStaCtx->PMKIDCacheIndex);
hddLog(VOS_TRACE_LEVEL_INFO, MAC_ADDRESS_STR,
MAC_ADDR_ARRAY(pmksa->bssid));
dump_pmkid(halHandle, pmksa->pmkid);
- // Increment the HDD Local Cache index
- // The "i=0" doesn't work for the call to sme_RoamSetPMKIDCache() - LFR FIXME
- if (pHddStaCtx->PMKIDCacheIndex <= (MAX_PMKSAIDS_IN_CACHE-1))
+ /* Increment the HDD Local Cache index */
+ if (pHddStaCtx->PMKIDCacheIndex <= (MAX_PMKSAIDS_IN_CACHE - 1))
pHddStaCtx->PMKIDCacheIndex++;
else
pHddStaCtx->PMKIDCacheIndex = 0;
}
- // Calling csrRoamSetPMKIDCache to configure the PMKIDs into the cache
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: Calling csrRoamSetPMKIDCache with %d cache entries.",
- __func__, pHddStaCtx->PMKIDCacheIndex );
+ /* Calling csrRoamSetPMKIDCache to configure the PMKIDs into the cache */
+ hddLog(VOS_TRACE_LEVEL_DEBUG,
+ FL("Calling sme_RoamSetPMKIDCache with %d cache entries"),
+ pHddStaCtx->PMKIDCacheIndex);
- // Finally set the PMKSA ID Cache in CSR
+ /* Finally set the PMKSA ID Cache in CSR */
result = sme_RoamSetPMKIDCache(halHandle,pAdapter->sessionId,
pHddStaCtx->PMKIDCache,
pHddStaCtx->PMKIDCacheIndex);
@@ -11600,7 +11473,7 @@ static int wlan_hdd_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *d
static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_pmksa *pmksa)
{
- tANI_U32 j=0;
+ tANI_U32 j = 0;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_station_ctx_t *pHddStaCtx;
tHalHandle halHandle;
@@ -11608,52 +11481,48 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device
hdd_context_t *pHddCtx;
int status = 0;
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: deleting PMKSA for " MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(pmksa->bssid));
+ if (!pmksa) {
+ hddLog(LOGE, FL("pmksa is NULL"));
+ return -EINVAL;
+ }
- /* Validate pAdapter */
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Invalid Adapter" ,__func__);
- return -EINVAL;
+ if (!pmksa->bssid) {
+ hddLog(LOGE, FL("pmksa->bssid is NULL"));
+ return -EINVAL;
}
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Deleting PMKSA for "MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(pmksa->bssid));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return status;
}
- /*Retrieve halHandle*/
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- /*in case index is 0,no entry to delete*/
- if (0 == pHddStaCtx->PMKIDCacheIndex)
- {
- hddLog(VOS_TRACE_LEVEL_INFO, FL("No entries to flush"));
+ /* In case index is 0,no entry to delete */
+ if (0 == pHddStaCtx->PMKIDCacheIndex) {
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("No entries to delete"));
return 0;
}
- /*find the matching PMKSA entry from j=0 to (index-1),
+ /* Find the matching PMKSA entry from j=0 to (index-1),
* and delete the matched one
*/
- for (j = 0; j < pHddStaCtx->PMKIDCacheIndex; j++)
- {
+ for (j = 0; j < pHddStaCtx->PMKIDCacheIndex; j++) {
if (vos_mem_compare(pHddStaCtx->PMKIDCache[j].BSSID,
pmksa->bssid,
- VOS_MAC_ADDR_SIZE))
- {
+ VOS_MAC_ADDR_SIZE)) {
/* BSSID matched entry */
BSSIDMatched = 1;
- if (j < pHddStaCtx->PMKIDCacheIndex-1)
- {
- /*replace the matching entry with the last entry in HDD local cache*/
+ if (j < pHddStaCtx->PMKIDCacheIndex-1) {
+ /* Replace the matching entry with the last entry
+ in HDD local cache */
vos_mem_copy(pHddStaCtx->PMKIDCache[j].BSSID,
pHddStaCtx->PMKIDCache[pHddStaCtx->PMKIDCacheIndex-1].BSSID,
VOS_MAC_ADDR_SIZE);
@@ -11662,21 +11531,22 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device
CSR_RSN_PMKID_SIZE);
}
- /*clear the last entry in HDD cache ---[index-1]*/
+ /* Clear the last entry in HDD cache ---[index-1] */
vos_mem_zero(pHddStaCtx->PMKIDCache[pHddStaCtx->PMKIDCacheIndex-1].BSSID,
VOS_MAC_ADDR_SIZE);
vos_mem_zero(pHddStaCtx->PMKIDCache[pHddStaCtx->PMKIDCacheIndex-1].PMKID,
CSR_RSN_PMKID_SIZE);
- /*reduce the PMKID array index*/
+ /* Reduce the PMKID array index */
pHddStaCtx->PMKIDCacheIndex--;
- /*delete the last PMKID cache in CSR*/
+ /* Delete the last PMKID cache in CSR */
if (eHAL_STATUS_SUCCESS !=
- sme_RoamDelPMKIDfromCache(halHandle, pAdapter->sessionId, pmksa->bssid))
+ sme_RoamDelPMKIDfromCache(halHandle,
+ pAdapter->sessionId, pmksa->bssid))
{
- hddLog(VOS_TRACE_LEVEL_ERROR,"%s: cannot delete PMKSA %d CONTENT.",
- __func__, pHddStaCtx->PMKIDCacheIndex);
+ hddLog(LOGE, FL("Cannot delete PMKSA %d CONTENT"),
+ pHddStaCtx->PMKIDCacheIndex);
status = -EINVAL;
}
@@ -11688,14 +11558,11 @@ static int __wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device
}
}
- /* we compare all entries,but cannot find matching entry */
- if (j == MAX_PMKSAIDS_IN_CACHE && !BSSIDMatched)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: No such PMKSA entry existed " MAC_ADDRESS_STR,
- __func__, MAC_ADDR_ARRAY(pmksa->bssid));
- hddLog(VOS_TRACE_LEVEL_INFO, MAC_ADDRESS_STR,
- MAC_ADDR_ARRAY(pmksa->bssid));
+ /* We compare all entries, but cannot find matching entry */
+ if (j == MAX_PMKSAIDS_IN_CACHE && !BSSIDMatched) {
+ hddLog(VOS_TRACE_LEVEL_DEBUG,
+ FL("No such PMKSA entry exists "MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(pmksa->bssid));
dump_pmkid(halHandle, pmksa->pmkid);
return -EINVAL;
}
@@ -11718,7 +11585,7 @@ static int wlan_hdd_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *d
static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device *dev)
{
- tANI_U32 j=0;
+ tANI_U32 j = 0;
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_station_ctx_t *pHddStaCtx;
tHalHandle halHandle;
@@ -11726,52 +11593,39 @@ static int __wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_devic
tANI_U8 *pBSSId;
int status = 0;
- hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: flushing PMKSA ",__func__);
-
- /* Validate pAdapter */
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Invalid Adapter" ,__func__);
- return -EINVAL;
- }
+ hddLog(VOS_TRACE_LEVEL_DEBUG, FL("Flushing PMKSA"));
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
- if (0 != status)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != status) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
return status;
}
- /*Retrieve halHandle*/
+ /* Retrieve halHandle */
halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- /*in case index is 0,no entry to delete*/
+ /* In case index is 0,no entry to delete */
if (0 == pHddStaCtx->PMKIDCacheIndex)
{
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: No entries to flush" ,
- __func__);
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("No entries to flush"));
return 0;
}
- /*delete all the PMKSA one by one */
- for (j = 0; j < pHddStaCtx->PMKIDCacheIndex; j++)
- {
+ /* Delete all the PMKSA one by one */
+ for (j = 0; j < pHddStaCtx->PMKIDCacheIndex; j++) {
pBSSId =(tANI_U8 *)(pHddStaCtx->PMKIDCache[j].BSSID);
- /*delete the PMKID in CSR*/
+ /* Delete the PMKID in CSR */
if (eHAL_STATUS_SUCCESS !=
- sme_RoamDelPMKIDfromCache(halHandle, pAdapter->sessionId, pBSSId))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR ,"%s cannot flush PMKIDCache %d.",
- __func__,j);
+ sme_RoamDelPMKIDfromCache(halHandle,
+ pAdapter->sessionId, pBSSId)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("Cannot flush PMKIDCache %d"), j);
status = -EINVAL;
}
- /*clear the entry in HDD cache 0--index-1 */
+ /* Clear the entry in HDD cache 0--index-1 */
vos_mem_zero(pHddStaCtx->PMKIDCache[j].BSSID, VOS_MAC_ADDR_SIZE);
vos_mem_zero(pHddStaCtx->PMKIDCache[j].PMKID, CSR_RSN_PMKID_SIZE);
}
@@ -11801,15 +11655,7 @@ __wlan_hdd_cfg80211_update_ft_ies(struct wiphy *wiphy,
struct cfg80211_update_ft_ies_params *ftie)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_station_ctx_t *pHddStaCtx;
-
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Adapter is NULL", __func__);
- return -ENODEV;
- }
-
- pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
+ hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_UPDATE_FT_IES,
@@ -11980,13 +11826,6 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
int ret = 0;
hdd_scaninfo_t *pScanInfo = &pAdapter->scan_info;
- if (NULL == pAdapter)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
ret = wlan_hdd_validate_context(pHddCtx);
@@ -11994,7 +11833,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: HDD context is not valid", __func__);
- return -EINVAL;
+ return ret;
}
hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
@@ -12238,13 +12077,6 @@ static int __wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy,
ENTER();
- if (NULL == pAdapter)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
if (NULL == pHddCtx)
@@ -12581,11 +12413,11 @@ static int wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy, struct net_device *d
if (SIR_MAC_TDLS_SETUP_RSP == action_code)
{
- wlan_hdd_tdls_set_responder(pAdapter, peerMac, TRUE);
+ return wlan_hdd_tdls_set_responder(pAdapter, peerMac, TRUE);
}
else if (SIR_MAC_TDLS_SETUP_CNF == action_code)
{
- wlan_hdd_tdls_set_responder(pAdapter, peerMac, FALSE);
+ return wlan_hdd_tdls_set_responder(pAdapter, peerMac, FALSE);
}
return 0;
@@ -13072,33 +12904,21 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
ENTER();
-
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
TRACE_CODE_HDD_CFG80211_SET_REKEY_DATA,
pAdapter->sessionId, pAdapter->device_mode));
result = wlan_hdd_validate_context(pHddCtx);
- if (0 != result)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD context is not valid", __func__);
+ if (0 != result) {
+ hddLog(LOGE, FL("HDD context is not valid"));
return result;
}
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
- if (NULL == hHal)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: HAL context is Null!!!", __func__);
+ if (NULL == hHal){
+ hddLog(LOGE, FL("HAL context is Null!!!"));
return -EAGAIN;
}
@@ -13115,38 +12935,28 @@ int __wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
(tANI_U8 *)&pHddStaCtx->gtkOffloadReqParams.ullKeyReplayCounter;
int i;
- for (i = 0; i < 8; i++)
- {
+ for (i = 0; i < 8; i++) {
p[7-i] = data->replay_ctr[i];
}
}
- if (TRUE == pHddCtx->hdd_wlan_suspended)
- {
+ if (TRUE == pHddCtx->hdd_wlan_suspended) {
/* if wlan is suspended, enable GTK offload directly from here */
memcpy(&hddGtkOffloadReqParams, &pHddStaCtx->gtkOffloadReqParams,
sizeof (tSirGtkOffloadParams));
status = sme_SetGTKOffload(hHal, &hddGtkOffloadReqParams,
pAdapter->sessionId);
- if (eHAL_STATUS_SUCCESS != status)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: sme_SetGTKOffload failed, returned %d",
- __func__, status);
- return status;
+ if (eHAL_STATUS_SUCCESS != status) {
+ hddLog(LOGE, FL("sme_SetGTKOffload failed, status(%d)"), status);
+ return -EINVAL;
}
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: sme_SetGTKOffload successfull", __func__);
- }
- else
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: wlan not suspended GTKOffload request is stored",
- __func__);
+ hddLog(LOG1, FL("sme_SetGTKOffload successfull"));
+ } else {
+ hddLog(LOG1, FL("wlan not suspended GTKOffload request is stored"));
}
- return eHAL_STATUS_SUCCESS;
+ return result;
}
int wlan_hdd_cfg80211_set_rekey_data(struct wiphy *wiphy,
@@ -13180,13 +12990,6 @@ static int wlan_hdd_cfg80211_set_mac_acl(struct wiphy *wiphy,
ENTER();
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
if (NULL == params)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
@@ -13375,17 +13178,13 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
#endif /* FEATURE_WLAN_LPHB */
err = nla_parse(tb, WLAN_HDD_TM_ATTR_MAX, data, len, wlan_hdd_tm_policy);
- if (err)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s Testmode INV ATTR", __func__);
+ if (err) {
+ hddLog(LOGE, FL("Testmode INV ATTR"));
return err;
}
- if (!tb[WLAN_HDD_TM_ATTR_CMD])
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s Testmode INV CMD", __func__);
+ if (!tb[WLAN_HDD_TM_ATTR_CMD]) {
+ hddLog(LOGE, FL("Testmode INV CMD"));
return -EINVAL;
}
@@ -13400,10 +13199,8 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
tSirLPHBReq *hb_params = NULL;
tSirLPHBReq *hb_params_temp = NULL;
- if (!tb[WLAN_HDD_TM_ATTR_DATA])
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s Testmode INV DATA", __func__);
+ if (!tb[WLAN_HDD_TM_ATTR_DATA]) {
+ hddLog(LOGE, FL("Testmode INV DATA"));
return -EINVAL;
}
@@ -13416,21 +13213,17 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
return -EINVAL;
hb_params = (tSirLPHBReq *)vos_mem_malloc(sizeof(tSirLPHBReq));
- if (NULL == hb_params)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s Request Buffer Alloc Fail", __func__);
- return -EINVAL;
+ if (NULL == hb_params) {
+ hddLog(LOGE, FL("Request Buffer Alloc Fail"));
+ return -ENOMEM;
}
vos_mem_copy(hb_params, buf, buf_len);
smeStatus = sme_LPHBConfigReq((tHalHandle)(pHddCtx->hHal),
hb_params,
wlan_hdd_cfg80211_lphb_ind_handler);
- if (eHAL_STATUS_SUCCESS != smeStatus)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "LPHB Config Fail, disable");
+ if (eHAL_STATUS_SUCCESS != smeStatus) {
+ hddLog(LOGE, "LPHB Config Fail, disable");
vos_mem_free(hb_params);
}
return 0;
@@ -13445,9 +13238,8 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
void *buf;
VOS_STATUS status;
if (!tb[WLAN_HDD_TM_ATTR_DATA]) {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: WLAN_HDD_TM_ATTR_DATA attribute is invalid",
- __func__);
+ hddLog(LOGE,
+ FL("WLAN_HDD_TM_ATTR_DATA attribute is invalid"));
return -EINVAL;
}
@@ -13463,9 +13255,8 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
#endif
default:
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: command %d not supported",
- __func__, nla_get_u32(tb[WLAN_HDD_TM_ATTR_CMD]));
+ hddLog(LOGE, FL("command %d not supported"),
+ nla_get_u32(tb[WLAN_HDD_TM_ATTR_CMD]));
return -EOPNOTSUPP;
}
@@ -13555,14 +13346,6 @@ static int __wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
ENTER();
-
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
if (NULL == wiphy)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
@@ -13670,32 +13453,29 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
hdd_adapter_t *pAdapter;
hdd_adapter_list_node_t *pAdapterNode, *pNext;
VOS_STATUS status = VOS_STATUS_SUCCESS;
+ int result;
#ifdef QCA_WIFI_2_0
pVosSchedContext vosSchedContext = get_vos_sched_ctxt();
#endif
ENTER();
- if ( NULL == pHddCtx )
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HddCtx validation failed", __func__);
- return 0;
+ result = wlan_hdd_validate_context(pHddCtx);
+ if (0 != result) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return result;
}
- if (pHddCtx->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: LOGP in Progress. Ignore!!!", __func__);
+ if (pHddCtx->isLogpInProgress) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("LOGP in Progress. Ignore!!!"));
return -EAGAIN;
}
if ((pHddCtx->isLoadInProgress) ||
- (pHddCtx->isUnloadInProgress))
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: Unloading/Loading in Progress. Ignore!!!", __func__);
- return 0;
+ (pHddCtx->isUnloadInProgress)) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("Unloading/Loading in Progress. Ignore!!!"));
+ return -EAGAIN;
}
#ifdef CONFIG_CNSS
@@ -13722,44 +13502,37 @@ int __wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
spin_lock(&pHddCtx->schedScan_lock);
pHddCtx->isWiphySuspended = FALSE;
- if (TRUE != pHddCtx->isSchedScanUpdatePending)
- {
+ if (TRUE != pHddCtx->isSchedScanUpdatePending) {
spin_unlock(&pHddCtx->schedScan_lock);
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
"%s: Return resume is not due to PNO indication", __func__);
return 0;
}
- // Reset flag to avoid updatating cfg80211 data old results again
+ /* Reset flag to avoid updatating cfg80211 data old results again */
pHddCtx->isSchedScanUpdatePending = FALSE;
spin_unlock(&pHddCtx->schedScan_lock);
- status = hdd_get_front_adapter ( pHddCtx, &pAdapterNode );
+ status = hdd_get_front_adapter (pHddCtx, &pAdapterNode);
- while ( NULL != pAdapterNode && VOS_STATUS_SUCCESS == status )
- {
+ while (NULL != pAdapterNode && VOS_STATUS_SUCCESS == status) {
pAdapter = pAdapterNode->pAdapter;
- if ( (NULL != pAdapter) &&
- (WLAN_HDD_INFRA_STATION == pAdapter->device_mode) )
- {
+ if ((NULL != pAdapter) &&
+ (WLAN_HDD_INFRA_STATION == pAdapter->device_mode)) {
if (0 != wlan_hdd_cfg80211_update_bss(pHddCtx->wiphy, pAdapter))
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
- "%s: NO SCAN result", __func__);
+ hddLog(LOGW, FL("NO SCAN result"));
else
cfg80211_sched_scan_results(pHddCtx->wiphy);
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s : cfg80211 scan result database updated", __func__);
-
- return 0;
+ hddLog(LOG1, FL("cfg80211 scan result database updated"));
+ return result;
}
status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
pAdapterNode = pNext;
}
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: Failed to find Adapter", __func__);
- return 0;
+ hddLog(LOG1, FL("Failed to find Adapter"));
+ return result;
}
#ifdef QCA_WIFI_2_0
@@ -13799,15 +13572,14 @@ int __wlan_hdd_cfg80211_suspend_wlan(struct wiphy *wiphy,
hdd_adapter_t *pAdapter;
hdd_scaninfo_t *pScanInfo;
VOS_STATUS status;
- int rc;
#endif
+ int rc;
ENTER();
- if (NULL == pHddCtx)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HddCtx validation failed", __func__);
- return 0;
+ rc = wlan_hdd_validate_context(pHddCtx);
+ if (0 != rc) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return rc;
}
if (pHddCtx->isLogpInProgress)
@@ -13977,12 +13749,6 @@ int wlan_hdd_cfg80211_set_ap_channel_width(struct wiphy *wiphy,
int i;
bool cbModeChange;
- if (NULL == pAdapter) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
if (NULL == wiphy) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s: wiphy is Null", __func__);
diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c
index bdcb838278bc..eb9afff5adb3 100644
--- a/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/CORE/HDD/src/wlan_hdd_ftm.c
@@ -891,7 +891,8 @@ static VOS_STATUS wlan_ftm_vos_open( v_CONTEXT_t pVosContext, v_SIZE_t hddContex
goto err_mac_close;
}
- vStatus = sme_init_chan_list(gpVosContext->pMACContext, pHddCtx->reg.alpha2);
+ vStatus = sme_init_chan_list(gpVosContext->pMACContext,
+ pHddCtx->reg.alpha2, pHddCtx->reg.cc_src);
if (!VOS_IS_STATUS_SUCCESS(vStatus)) {
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
"%s: Failed to init sme channel list", __func__);
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index 7cf487bd8cea..2e461ba56cc4 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -370,17 +370,10 @@ static int hdd_hostapd_driver_ioctl(hdd_adapter_t *pAdapter, struct ifreq *ifr)
static int hdd_hostapd_ioctl(struct net_device *dev,
struct ifreq *ifr, int cmd)
{
- hdd_adapter_t *pAdapter;
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
int ret;
- pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- if (NULL == pAdapter) {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: pAdapter context is Null", __func__);
- ret = -ENODEV;
- goto exit;
- }
if (dev != pAdapter->dev) {
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: HDD adapter/dev inconsistency", __func__);
@@ -1654,13 +1647,6 @@ static iw_softap_get_ini_cfg(struct net_device *dev,
hdd_context_t *pHddCtx;
int ret = 0;
- if (pAdapter == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: pAdapter is NULL!", __func__);
- return -EINVAL;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
ret = wlan_hdd_validate_context(pHddCtx);
if (ret != 0)
@@ -2539,20 +2525,6 @@ static iw_softap_getparam(struct net_device *dev,
}
break;
- case QCSAP_PARAM_MODULE_DOWN_IND:
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: sending WLAN_MODULE_DOWN_IND", __func__);
- send_btc_nlink_msg(WLAN_MODULE_DOWN_IND, 0);
-#ifdef WLAN_BTAMP_FEATURE
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: Take down AMP PAL", __func__);
- BSL_Deinit(vos_get_global_context(VOS_MODULE_ID_HDD, NULL));
-#endif
- *value = 0;
- break;
- }
-
case QCSAP_PARAM_GET_WLAN_DBG:
{
vos_trace_display();
@@ -2886,13 +2858,6 @@ static int iw_softap_set_trafficmonitor(struct net_device *dev,
hdd_context_t *pHddCtx;
int status;
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_SAP, VOS_TRACE_LEVEL_ERROR,
- "%s: HDD adapter is Null", __func__);
- return -ENODEV;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
@@ -3086,44 +3051,6 @@ static iw_softap_ap_stats(struct net_device *dev,
return 0;
}
-static
-int iw_softap_setmlme(struct net_device *dev,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- struct sQcSapreq_mlme *pmlme;
- hdd_adapter_t *pHostapdAdapter = (hdd_adapter_t*)(netdev_priv(dev));
- v_MACADDR_t destAddress;
- pmlme = (struct sQcSapreq_mlme *)(wrqu->name);
- /* NOTE: this address is not valid incase of TKIP failure, since not filled */
- vos_mem_copy(&destAddress.bytes, pmlme->im_macaddr, sizeof(v_MACADDR_t));
- switch(pmlme->im_op)
- {
- case QCSAP_MLME_AUTHORIZE:
- hdd_softap_change_STA_state( pHostapdAdapter, &destAddress, WLANTL_STA_AUTHENTICATED);
- break;
- case QCSAP_MLME_ASSOC:
- //TODO:inform to TL after associating (not needed as we do in sapCallback)
- break;
- case QCSAP_MLME_UNAUTHORIZE:
- //TODO: send the disassoc to station
- //hdd_softap_change_STA_state( pHostapdAdapter, pmlme->im_macaddr, WLANTL_STA_AUTHENTICATED);
- break;
- case QCSAP_MLME_DISASSOC:
- hdd_softap_sta_disassoc(pHostapdAdapter,pmlme->im_macaddr);
- break;
- case QCSAP_MLME_DEAUTH:
- hdd_softap_sta_deauth(pHostapdAdapter,pmlme->im_macaddr);
- break;
- case QCSAP_MLME_MICFAILURE:
- hdd_softap_tkip_mic_fail_counter_measure(pHostapdAdapter,pmlme->im_reason);
- break;
- default:
- break;
- }
- return 0;
-}
-
static int iw_softap_set_channel_range(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
@@ -4679,8 +4606,6 @@ static const struct iw_priv_args hostapd_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getwlandbg" },
{ QCSAP_PARAM_AUTO_CHANNEL, 0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getAutoChannel" },
- { QCSAP_PARAM_MODULE_DOWN_IND, 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "moduleDownInd" },
{ QCSAP_GTX_BWMASK, 0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_gtxBWMask" },
{ QCSAP_GTX_MINTPC, 0,
@@ -4705,9 +4630,6 @@ static const struct iw_priv_args hostapd_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "getdfsnol" },
{ QCSAP_GET_ACL, 0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_acl_list" },
-
- { QCSAP_IOCTL_SETMLME,
- IW_PRIV_TYPE_BYTE | sizeof(struct sQcSapreq_mlme)| IW_PRIV_SIZE_FIXED, 0, "setmlme" },
{ QCSAP_IOCTL_GET_STAWPAIE,
IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, 0, "get_staWPAIE" },
{ QCSAP_IOCTL_SETWPAIE,
@@ -4818,7 +4740,6 @@ static const struct iw_priv_args hostapd_private_args[] = {
static const iw_handler hostapd_private[] = {
[QCSAP_IOCTL_SETPARAM - SIOCIWFIRSTPRIV] = iw_softap_setparam, //set priv ioctl
[QCSAP_IOCTL_GETPARAM - SIOCIWFIRSTPRIV] = iw_softap_getparam, //get priv ioctl
- [QCSAP_IOCTL_SETMLME - SIOCIWFIRSTPRIV] = iw_softap_setmlme,
[QCSAP_IOCTL_GET_STAWPAIE - SIOCIWFIRSTPRIV] = iw_get_genie, //get station genIE
[QCSAP_IOCTL_SETWPAIE - SIOCIWFIRSTPRIV] = iw_softap_setwpsie,
[QCSAP_IOCTL_STOPBSS - SIOCIWFIRSTPRIV] = iw_softap_stopbss, // stop bss
@@ -4885,6 +4806,7 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter )
v_CONTEXT_t pVosContext = (WLAN_HDD_GET_CTX(pAdapter))->pvosContext;
v_CONTEXT_t sapContext=NULL;
#endif
+ int ret;
ENTER();
@@ -4962,6 +4884,17 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter )
set_bit(WMM_INIT_DONE, &pAdapter->event_flags);
+ ret = process_wma_set_command((int)pAdapter->sessionId,
+ (int)WMI_PDEV_PARAM_BURST_ENABLE,
+ (int)pHddCtx->cfg_ini->enableSifsBurst,
+ PDEV_CMD);
+
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: WMI_PDEV_PARAM_BURST_ENABLE set failed %d",
+ __func__, ret);
+ }
+
wlan_hdd_set_monitor_tx_adapter( WLAN_HDD_GET_CTX(pAdapter), pAdapter );
return status;
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 0b792293ff03..53c375020a3b 100755
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -649,13 +649,6 @@ static int hdd_netdev_notifier_call(struct notifier_block * nb,
if (!dev->ieee80211_ptr)
return NOTIFY_DONE;
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,"%s: HDD Adapter Null Pointer", __func__);
- VOS_ASSERT(0);
- return NOTIFY_DONE;
- }
-
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
if (NULL == pHddCtx)
{
@@ -1081,101 +1074,104 @@ void hdd_checkandupdate_dfssetting( hdd_adapter_t *pAdapter, char *country_code)
--------------------------------------------------------------------------*/
VOS_STATUS hdd_setIbssPowerSaveParams(hdd_adapter_t *pAdapter)
{
- VOS_STATUS ret;
+ int ret;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
- if (pHddCtx == NULL)
- {
+ if (pHddCtx == NULL) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: HDD context is null", __func__);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
- (int)pHddCtx->cfg_ini->ibssATIMWinSize,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
+ pHddCtx->cfg_ini->ibssATIMWinSize,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
- (int)pHddCtx->cfg_ini->isIbssPowerSaveAllowed,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
+ pHddCtx->cfg_ini->isIbssPowerSaveAllowed,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
- (int)pHddCtx->cfg_ini->isIbssPowerCollapseAllowed,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
+ pHddCtx->cfg_ini->isIbssPowerCollapseAllowed,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
- (int)pHddCtx->cfg_ini->isIbssAwakeOnTxRx,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
+ pHddCtx->cfg_ini->isIbssAwakeOnTxRx,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
- (int)pHddCtx->cfg_ini->ibssInactivityCount,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
+ pHddCtx->cfg_ini->ibssInactivityCount,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_SET_INACTIVITY_TIME failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_SET_INACTIVITY_TIME failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
- (int)pHddCtx->cfg_ini->ibssTxSpEndInactivityTime,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
+ pHddCtx->cfg_ini->ibssTxSpEndInactivityTime,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- ret = process_wma_set_command((int)pAdapter->sessionId,
- (int)WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
- (int)pHddCtx->cfg_ini->ibssPsWarmupTime,
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
+ pHddCtx->cfg_ini->ibssPsWarmupTime,
VDEV_CMD);
- if (VOS_STATUS_SUCCESS != ret)
- {
+ if (0 != ret) {
hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS failed %d",
- __func__, ret);
+ FL("WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS failed %d"),
+ ret);
return VOS_STATUS_E_FAILURE;
}
- return ret;
+ ret = process_wma_set_command(pAdapter->sessionId,
+ WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
+ pHddCtx->cfg_ini->ibssPs1RxChainInAtimEnable,
+ VDEV_CMD);
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW failed %d"),
+ ret);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ return VOS_STATUS_SUCCESS;
}
#ifdef FEATURE_WLAN_BATCH_SCAN
@@ -5612,17 +5608,10 @@ static int hdd_driver_ioctl(hdd_adapter_t *pAdapter, struct ifreq *ifr)
int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
{
- hdd_adapter_t *pAdapter;
+ hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
hdd_context_t *pHddCtx;
long ret = 0;
- pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- if (NULL == pAdapter) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: pAdapter context is Null", __func__);
- ret = -ENODEV;
- goto exit;
- }
if (dev != pAdapter->dev) {
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s: HDD adapter/dev inconsistency", __func__);
@@ -7143,77 +7132,52 @@ v_BOOL_t hdd_is_valid_mac_address(const tANI_U8 *pMacAddr)
int hdd_open (struct net_device *dev)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_context_t *pHddCtx;
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
VOS_STATUS status;
+ int ret;
v_BOOL_t in_standby = TRUE;
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter context is Null", __func__);
- return -ENODEV;
- }
-
- 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;
+
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(LOGE, FL("HDD context is not valid"));
+ return ret;
}
- 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__);
+ 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(LOG1, FL("chip already out of standby"));
in_standby = FALSE;
break;
- }
- else
- {
+ } else {
status = hdd_get_next_adapter ( pHddCtx, pAdapterNode, &pNext );
pAdapterNode = pNext;
}
}
- if (TRUE == in_standby)
- {
- 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__);
+ if (TRUE == in_standby) {
+ if (VOS_STATUS_SUCCESS != wlan_hdd_exit_lowpower(pHddCtx, pAdapter)) {
+ hddLog(LOGE, FL("Failed to bring wlan out of power save"));
return -EINVAL;
}
}
set_bit(DEVICE_IFACE_OPENED, &pAdapter->event_flags);
- if (hdd_connIsConnected(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter)))
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,
- "%s: Enabling Tx Queues", __func__);
+ if (hdd_connIsConnected(WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))) {
+ hddLog(LOG1, FL("Enabling Tx Queues"));
/* Enable TX queues only when we are connected */
netif_tx_start_all_queues(dev);
}
- return 0;
+ return ret;
}
int hdd_mon_open (struct net_device *dev)
{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-
- if(pAdapter == NULL) {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD adapter context is Null", __func__);
- return -EINVAL;
- }
-
netif_start_queue(dev);
return 0;
@@ -7233,27 +7197,21 @@ int hdd_mon_open (struct net_device *dev)
int hdd_stop (struct net_device *dev)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_context_t *pHddCtx;
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
hdd_adapter_list_node_t *pAdapterNode = NULL, *pNext = NULL;
VOS_STATUS status;
v_BOOL_t enter_standby = TRUE;
+ int ret;
ENTER();
- if (NULL == pAdapter)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: pAdapter context is Null", __func__);
- return -ENODEV;
- }
MTRACE(vos_trace(VOS_MODULE_ID_HDD, TRACE_CODE_HDD_OPEN_REQUEST,
pAdapter->sessionId, pAdapter->device_mode));
- pHddCtx = (hdd_context_t*)pAdapter->pHddCtx;
- if (NULL == pHddCtx)
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s: HDD context is Null", __func__);
- return -ENODEV;
+
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(LOGE, FL("HDD context is not valid"));
+ return ret;
}
/* Nothing to be done if the interface is not opened */
@@ -7360,13 +7318,6 @@ static void hdd_uninit (struct net_device *dev)
do
{
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: NULL pAdapter", __func__);
- break;
- }
-
if (WLAN_HDD_ADAPTER_MAGIC != pAdapter->magic)
{
hddLog(VOS_TRACE_LEVEL_FATAL,
@@ -7923,6 +7874,7 @@ VOS_STATUS hdd_init_station_mode( hdd_adapter_t *pAdapter )
VOS_STATUS status = VOS_STATUS_E_FAILURE;
tANI_U32 type, subType;
long rc = 0;
+ int ret_val;
INIT_COMPLETION(pAdapter->session_open_comp_var);
sme_SetCurrDeviceMode(pHddCtx->hHal, pAdapter->device_mode);
@@ -8000,6 +7952,17 @@ VOS_STATUS hdd_init_station_mode( hdd_adapter_t *pAdapter )
set_bit(WMM_INIT_DONE, &pAdapter->event_flags);
+ ret_val = process_wma_set_command((int)pAdapter->sessionId,
+ (int)WMI_PDEV_PARAM_BURST_ENABLE,
+ (int)pHddCtx->cfg_ini->enableSifsBurst,
+ PDEV_CMD);
+
+ if (0 != ret_val) {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: WMI_PDEV_PARAM_BURST_ENABLE set failed %d",
+ __func__, ret_val);
+ }
+
#ifdef FEATURE_WLAN_TDLS
if(0 != wlan_hdd_tdls_init(pAdapter))
{
@@ -10007,13 +9970,6 @@ static void hdd_set_multicast_list(struct net_device *dev)
int i = 0;
struct netdev_hw_addr *ha;
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Adapter context is Null", __func__);
- return;
- }
-
if (dev->flags & IFF_ALLMULTI)
{
hddLog(VOS_TRACE_LEVEL_INFO,
@@ -10331,20 +10287,18 @@ void hdd_wlan_exit(hdd_context_t *pHddCtx)
// all scans will be cancelled.
hdd_abort_mac_scan_all_adapters(pHddCtx);
- //Stop the traffic monitor timer
- if ((pHddCtx->cfg_ini->dynSplitscan) && (VOS_TIMER_STATE_RUNNING ==
- vos_timer_getCurrentState(&pHddCtx->tx_rx_trafficTmr)))
- {
- vos_timer_stop(&pHddCtx->tx_rx_trafficTmr);
- }
+ /* Stop the traffic monitor timer */
+ if ((NULL != pHddCtx->cfg_ini) && (pHddCtx->cfg_ini->dynSplitscan)) {
+ if (VOS_TIMER_STATE_RUNNING ==
+ vos_timer_getCurrentState(&pHddCtx->tx_rx_trafficTmr)) {
+ vos_timer_stop(&pHddCtx->tx_rx_trafficTmr);
+ }
- // Destroy the traffic monitor timer
- if ((pHddCtx->cfg_ini->dynSplitscan) &&
- !VOS_IS_STATUS_SUCCESS(vos_timer_destroy(
- &pHddCtx->tx_rx_trafficTmr)))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR,
- "%s: Cannot deallocate Traffic monitor timer", __func__);
+ /* Destroy the traffic monitor timer */
+ if (!VOS_IS_STATUS_SUCCESS(vos_timer_destroy(
+ &pHddCtx->tx_rx_trafficTmr))) {
+ hddLog(LOGE, FL("Cannot de-allocate Traffic monitor timer"));
+ }
}
#ifdef MSM_PLATFORM
@@ -10964,7 +10918,8 @@ void hdd_exchange_version_and_caps(hdd_context_t *pHddCtx)
/* Initialize channel list in sme based on the country code */
VOS_STATUS hdd_set_sme_chan_list(hdd_context_t *hdd_ctx)
{
- return sme_init_chan_list(hdd_ctx->hHal, hdd_ctx->reg.alpha2);
+ return sme_init_chan_list(hdd_ctx->hHal, hdd_ctx->reg.alpha2,
+ hdd_ctx->reg.cc_src);
}
/**---------------------------------------------------------------------------
@@ -11568,12 +11523,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_vosclose;
}
#endif
- status = hdd_set_sme_chan_list(pHddCtx);
- if (status != VOS_STATUS_SUCCESS) {
- hddLog(VOS_TRACE_LEVEL_FATAL,
- "%s: Failed to init channel list", __func__);
- goto err_wiphy_unregister;
- }
if (0 == enable_dfs_chan_scan || 1 == enable_dfs_chan_scan)
{
@@ -11599,6 +11548,13 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_wiphy_unregister;
}
+ status = hdd_set_sme_chan_list(pHddCtx);
+ if (status != VOS_STATUS_SUCCESS) {
+ hddLog(VOS_TRACE_LEVEL_FATAL,
+ "%s: Failed to init channel list", __func__);
+ goto err_wiphy_unregister;
+ }
+
/* In the integrated architecture we update the configuration from
the INI file and from NV before vOSS has been started so that
the final contents are available to send down to the cCPU */
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 89bd130f7f7c..4b1cf2c43565 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -1670,14 +1670,14 @@ struct net_device* wlan_hdd_add_virtual_intf(
{
hdd_context_t *pHddCtx = (hdd_context_t*) wiphy_priv(wiphy);
hdd_adapter_t* pAdapter = NULL;
+ int ret;
ENTER();
- if (pHddCtx->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return ERR_PTR(-EINVAL);
+ ret = wlan_hdd_validate_context(pHddCtx);
+ if (0 != ret) {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD context is not valid"));
+ return ERR_PTR(ret);
}
MTRACE(vos_trace(VOS_MODULE_ID_HDD,
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index fcbe49cff640..fc37429d0767 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -1159,14 +1159,6 @@ void hdd_tx_timeout(struct net_device *dev)
struct netdev_queue *txq;
int i = 0;
- if ( NULL == pAdapter )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- FL("pAdapter is NULL"));
- VOS_ASSERT(0);
- return;
- }
-
VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
"%s: Transmission timeout occurred", __func__);
//Getting here implies we disabled the TX queues for too long. Queues are
@@ -1212,14 +1204,6 @@ struct net_device_stats* hdd_stats(struct net_device *dev)
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- if ( NULL == pAdapter )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD_DATA, VOS_TRACE_LEVEL_ERROR,
- FL("pAdapter is NULL"));
- VOS_ASSERT(0);
- return NULL;
- }
-
return &pAdapter->stats;
}
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index edff1b2a3762..5cd1e6bfd26a 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -252,7 +252,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WE_IBSS_STATUS 2
#define WE_PMC_STATE 3
#define WE_GET_WLAN_DBG 4
-#define WE_MODULE_DOWN_IND 5
#define WE_GET_MAX_ASSOC 6
#define WE_GET_WDI_DBG 7
#define WE_GET_SAP_AUTO_CHANNEL_SELECTION 8
@@ -409,17 +408,12 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
#define WLAN_PRIV_DEL_TSPEC (SIOCIWFIRSTPRIV + 11)
#define WLAN_PRIV_GET_TSPEC (SIOCIWFIRSTPRIV + 13)
-#ifdef FEATURE_WLAN_WAPI
-/* Private ioctls EVEN NO: SET, ODD NO:GET */
-#define WLAN_PRIV_SET_WAPI_MODE (SIOCIWFIRSTPRIV + 8)
-#define WLAN_PRIV_GET_WAPI_MODE (SIOCIWFIRSTPRIV + 16)
-#define WLAN_PRIV_SET_WAPI_ASSOC_INFO (SIOCIWFIRSTPRIV + 10)
-#define WLAN_PRIV_SET_WAPI_KEY (SIOCIWFIRSTPRIV + 12)
-#define WLAN_PRIV_SET_WAPI_BKID (SIOCIWFIRSTPRIV + 14)
-#define WLAN_PRIV_GET_WAPI_BKID (SIOCIWFIRSTPRIV + 15)
-#define WAPI_PSK_AKM_SUITE 0x02721400
-#define WAPI_CERT_AKM_SUITE 0x01721400
-#endif
+/* (SIOCIWFIRSTPRIV + 8) is currently unused */
+/* (SIOCIWFIRSTPRIV + 16) is currently unused */
+/* (SIOCIWFIRSTPRIV + 10) is currently unused */
+/* (SIOCIWFIRSTPRIV + 12) is currently unused */
+/* (SIOCIWFIRSTPRIV + 14) is currently unused */
+/* (SIOCIWFIRSTPRIV + 15) is currently unused */
#ifdef FEATURE_OEM_DATA_SUPPORT
/* Private ioctls for setting the measurement configuration */
@@ -1589,13 +1583,6 @@ static int iw_set_mode(struct net_device *dev,
ENTER();
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_WARN,
- "%s: Invalid context, pAdapter", __func__);
- return 0;
- }
-
if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s:LOGP in Progress. Ignore!!!", __func__);
@@ -1682,13 +1669,6 @@ static int iw_get_mode(struct net_device *dev,
hddLog(LOG1, "In %s", __func__);
- if (NULL == pAdapter)
- {
- hddLog(VOS_TRACE_LEVEL_WARN,
- "%s: Invalid context, pAdapter", __func__);
- return 0;
- }
-
if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s:LOGP in Progress. Ignore!!!", __func__);
@@ -6194,19 +6174,6 @@ static int iw_setnone_getint(struct net_device *dev, struct iw_request_info *inf
*value = 0;
break;
}
- case WE_MODULE_DOWN_IND:
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"%s: sending WLAN_MODULE_DOWN_IND", __func__);
- send_btc_nlink_msg(WLAN_MODULE_DOWN_IND, 0);
-#ifdef WLAN_BTAMP_FEATURE
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"%s: Take down AMP PAL", __func__);
- BSL_Deinit(vos_get_global_context(VOS_MODULE_ID_HDD, NULL));
-#endif
- //WLANBAP_Close(vos_get_global_context(VOS_MODULE_ID_HDD, NULL));
-
- *value = 0;
- break;
- }
case WE_GET_MAX_ASSOC:
{
if (ccmCfgGetInt(hHal, WNI_CFG_ASSOC_STA_LIMIT, (tANI_U32 *)value) != eHAL_STATUS_SUCCESS)
@@ -6765,12 +6732,6 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
hdd_wext_state_t *pWextState;
#endif
- if (pAdapter == NULL)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s: pAdapter is NULL!", __func__);
- return -EINVAL;
- }
#ifdef WLAN_FEATURE_11W
pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
#endif
@@ -7988,289 +7949,6 @@ static int iw_get_tspec(struct net_device *dev, struct iw_request_info *info,
return 0;
}
-
-#ifdef FEATURE_WLAN_WAPI
-static int iw_qcom_set_wapi_mode(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
- hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- tCsrRoamProfile *pRoamProfile = &pWextState->roamProfile;
-
- WAPI_FUNCTION_MODE *pWapiMode = (WAPI_FUNCTION_MODE *)extra;
-
- hddLog(LOG1, "The function iw_qcom_set_wapi_mode called");
- hddLog(LOG1, "%s: Received data %s", __func__, extra);
- hddLog(LOG1, "%s: Received length %d", __func__, wrqu->data.length);
- hddLog(LOG1, "%s: Input Data (wreq) WAPI Mode:%02d", __func__, pWapiMode->wapiMode);
-
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EBUSY;
- }
-
- if(WZC_ORIGINAL == pWapiMode->wapiMode) {
- hddLog(LOG1, "%s: WAPI Mode Set to OFF", __func__);
- /* Set Encryption mode to defualt , this allows next successfull non-WAPI Association */
- pRoamProfile->EncryptionType.numEntries = 1;
- pRoamProfile->EncryptionType.encryptionType[0] = eCSR_ENCRYPT_TYPE_NONE;
- pRoamProfile->mcEncryptionType.numEntries = 1;
- pRoamProfile->mcEncryptionType.encryptionType[0] = eCSR_ENCRYPT_TYPE_NONE;
-
- pRoamProfile->AuthType.numEntries = 1;
- pHddStaCtx->conn_info.authType = eCSR_AUTH_TYPE_OPEN_SYSTEM;
- pRoamProfile->AuthType.authType[0] = pHddStaCtx->conn_info.authType;
- }
- else if(WAPI_EXTENTION == pWapiMode->wapiMode) {
- hddLog(LOG1, "%s: WAPI Mode Set to ON", __func__);
- }
- else
- return -EINVAL;
-
- pAdapter->wapi_info.nWapiMode = pWapiMode->wapiMode;
-
- return 0;
-}
-
-static int iw_qcom_get_wapi_mode(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- WAPI_FUNCTION_MODE *pWapiMode = (WAPI_FUNCTION_MODE *)(extra);
-
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EBUSY;
- }
- hddLog(LOG1, "The function iw_qcom_get_wapi_mode called");
-
- pWapiMode->wapiMode = pAdapter->wapi_info.nWapiMode;
- hddLog(LOG1, "%s: GET WAPI Mode Value:%02d", __func__, pWapiMode->wapiMode);
- return 0;
-}
-
-static int iw_qcom_set_wapi_assoc_info(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-// WAPI_AssocInfo *pWapiAssocInfo = (WAPI_AssocInfo *)(wrqu->data.pointer);
- WAPI_AssocInfo *pWapiAssocInfo = (WAPI_AssocInfo *)(extra);
- int i = 0, j = 0;
- hddLog(LOG1, "The function iw_qcom_set_wapi_assoc_info called");
- hddLog(LOG1, "%s: Received length %d", __func__, wrqu->data.length);
- hddLog(LOG1, "%s: Received data %s", __func__, (char*)extra);
-
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EBUSY;
- }
-
- if (NULL == pWapiAssocInfo)
- {
- VOS_TRACE(VOS_MODULE_ID_SYS, VOS_TRACE_LEVEL_ERROR,
- "%s: WDA NULL context", __func__);
- VOS_ASSERT(0);
- return VOS_STATUS_E_FAILURE;
- }
- hddLog(LOG1, "%s: INPUT DATA:\nElement ID:0x%02x Length:0x%02x Version:0x%04x",__func__,pWapiAssocInfo->elementID,pWapiAssocInfo->length,pWapiAssocInfo->version);
- hddLog(LOG1,"%s: akm Suite Cnt:0x%04x",__func__,pWapiAssocInfo->akmSuiteCount);
- for(i =0 ; i < 16 ; i++)
- hddLog(LOG1,"akm suite[%02d]:0x%08x",i,pWapiAssocInfo->akmSuite[i]);
-
- hddLog(LOG1,"%s: Unicast Suite Cnt:0x%04x",__func__,pWapiAssocInfo->unicastSuiteCount);
- for(i =0 ; i < 16 ; i++)
- hddLog(LOG1, "Unicast suite[%02d]:0x%08x",i,pWapiAssocInfo->unicastSuite[i]);
-
- hddLog(LOG1,"%s: Multicast suite:0x%08x Wapi capa:0x%04x",__func__,pWapiAssocInfo->multicastSuite,pWapiAssocInfo->wapiCability);
- hddLog(LOG1, "%s: BKID Cnt:0x%04x",__func__,pWapiAssocInfo->bkidCount);
- for(i = 0 ; i < 16 ; i++) {
- hddLog(LOG1, "BKID List[%02d].bkid:0x",i);
- for(j = 0 ; j < 16 ; j++)
- hddLog(LOG1,"%02x",pWapiAssocInfo->bkidList[i].bkid[j]);
- }
-
- /* We are not using the entire IE as provided by the supplicant.
- * This is being calculated by SME. This is the same as in the
- * case of WPA. Only the auth mode information needs to be
- * extracted here*/
- if ( pWapiAssocInfo->akmSuite[0] == WAPI_PSK_AKM_SUITE ) {
- hddLog(LOG1, "%s: WAPI AUTH MODE SET TO PSK",__func__);
- pAdapter->wapi_info.wapiAuthMode = WAPI_AUTH_MODE_PSK;
- }
-
- if ( pWapiAssocInfo->akmSuite[0] == WAPI_CERT_AKM_SUITE) {
- hddLog(LOG1, "%s: WAPI AUTH MODE SET TO CERTIFICATE",__func__);
- pAdapter->wapi_info.wapiAuthMode = WAPI_AUTH_MODE_CERT;
- }
- return 0;
-}
-
-static int iw_qcom_set_wapi_key(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
- hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
- eHalStatus halStatus = eHAL_STATUS_SUCCESS;
- tANI_U32 roamId = 0xFF;
- tANI_U8 *pKeyPtr = NULL;
- v_BOOL_t isConnected = TRUE;
- tCsrRoamSetKey setKey;
- int i = 0;
- WLAN_WAPI_KEY *pWapiKey = (WLAN_WAPI_KEY *)(extra);
-
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EBUSY;
- }
-
- hddLog(LOG1, "The function iw_qcom_set_wapi_key called ");
- hddLog(LOG1, "%s: Received length %d", __func__, wrqu->data.length);
- hddLog(LOG1, "%s: Received data %s", __func__, (char*)extra);
-
- hddLog(LOG1,":%s: INPUT DATA:\nKey Type:0x%02x Key Direction:0x%02x KEY ID:0x%02x", __func__, pWapiKey->keyType, pWapiKey->keyDirection, pWapiKey->keyId);
- hddLog(LOG1,"Add Index:0x");
- for(i =0 ; i < 12 ; i++)
- hddLog(LOG1,"%02x",pWapiKey->addrIndex[i]);
-
- hddLog(LOG1,"%s: WAPI ENCRYPTION KEY LENGTH:0x%04x", __func__,pWapiKey->wpiekLen);
- hddLog(LOG1, "WAPI ENCRYPTION KEY:0x");
- for(i =0 ; i < 16 ; i++)
- hddLog(LOG1,"%02x",pWapiKey->wpiek[i]);
-
- hddLog(LOG1,"%s: WAPI INTEGRITY CHECK KEY LENGTH:0x%04x", __func__,pWapiKey->wpickLen);
- hddLog(LOG1,"WAPI INTEGRITY CHECK KEY:0x");
- for(i =0 ; i < 16 ; i++)
- hddLog(LOG1,"%02x",pWapiKey->wpick[i]);
-
- hddLog(LOG1,"WAPI PN NUMBER:0x");
- for(i = 0 ; i < 16 ; i++)
- hddLog(LOG1,"%02x",pWapiKey->pn[i]);
-
- // Clear the setkey memory
- vos_mem_zero(&setKey,sizeof(tCsrRoamSetKey));
- // Store Key ID
- setKey.keyId = (unsigned char)( pWapiKey->keyId );
- // SET WAPI Encryption
- setKey.encType = eCSR_ENCRYPT_TYPE_WPI;
- // Key Directionn both TX and RX
- setKey.keyDirection = eSIR_TX_RX; // Do WE NEED to update this based on Key Type as GRP/UNICAST??
- // the PAE role
- setKey.paeRole = 0 ;
-
- switch ( pWapiKey->keyType )
- {
- case PAIRWISE_KEY:
- {
- isConnected = hdd_connIsConnected(pHddStaCtx);
- vos_mem_copy(setKey.peerMac,&pHddStaCtx->conn_info.bssId, VOS_MAC_ADDR_SIZE);
- break;
- }
- case GROUP_KEY:
- {
- vos_set_macaddr_broadcast( (v_MACADDR_t *)setKey.peerMac );
- break;
- }
- default:
- {
- //Any other option is invalid.
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "[%4d] %s() failed to Set Key. Invalid key type %d", __LINE__,__func__ , -1 );
-
- hddLog(LOGE," %s: Error WAPI Key Add Type",__func__);
- halStatus = !eHAL_STATUS_SUCCESS; // NEED TO UPDATE THIS WITH CORRECT VALUE
- break; // NEED RETURN FROM HERE ????
- }
- }
-
- // Concatenating the Encryption Key (EK) and the MIC key (CK): EK followed by CK
- setKey.keyLength = (v_U16_t)((pWapiKey->wpiekLen)+(pWapiKey->wpickLen));
- pKeyPtr = setKey.Key;
- memcpy( pKeyPtr, pWapiKey->wpiek, pWapiKey->wpiekLen );
- pKeyPtr += pWapiKey->wpiekLen;
- memcpy( pKeyPtr, pWapiKey->wpick, pWapiKey->wpickLen );
-
- // Set the new key with SME.
- pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_SETTING_KEY;
-
- if ( isConnected ) {
- halStatus = sme_RoamSetKey( WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId, &setKey, &roamId );
- if ( halStatus != eHAL_STATUS_SUCCESS )
- {
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "[%4d] sme_RoamSetKey returned ERROR status= %d", __LINE__, halStatus );
-
- pHddStaCtx->roam_info.roamingState = HDD_ROAM_STATE_NONE;
- }
- }
-#if 0 /// NEED TO CHECK ON THIS
- else
- {
- // Store the keys in the adapter to be moved to the profile & passed to
- // SME in the ConnectRequest if we are not yet in connected state.
- memcpy( &pAdapter->setKey[ setKey.keyId ], &setKey, sizeof( setKey ) );
- pAdapter->fKeySet[ setKey.keyId ] = TRUE;
-
- VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_MED,
- " Saving key [idx= %d] to apply when moving to connected state ",
- setKey.keyId );
-
- }
-#endif
- return halStatus;
-}
-
-static int iw_qcom_set_wapi_bkid(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
-#ifdef WLAN_DEBUG
- int i = 0;
- WLAN_BKID_LIST *pBkid = ( WLAN_BKID_LIST *) extra;
-#endif
-
- hddLog(LOG1, "The function iw_qcom_set_wapi_bkid called");
- hddLog(LOG1, "%s: Received length %d", __func__, wrqu->data.length);
- hddLog(LOG1, "%s: Received data %s", __func__, (char*)extra);
-
- hddLog(LOG1,"%s: INPUT DATA:\n BKID Length:0x%08x", __func__,pBkid->length);
- hddLog(LOG1,"%s: BKID Cnt:0x%04x", __func__, pBkid->BKIDCount);
-
- hddLog(LOG1,"BKID KEY LIST[0]:0x");
-
- if ((WLAN_HDD_GET_CTX(pAdapter))->isLogpInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
- "%s:LOGP in Progress. Ignore!!!", __func__);
- return -EBUSY;
- }
-
-#ifdef WLAN_DEBUG
- for(i =0 ; i < 16 ; i++)
- hddLog(LOG1,"%02x",pBkid->BKID[0].bkid[i]);
-#endif
-
- return 0;
-}
-
-static int iw_qcom_get_wapi_bkid(struct net_device *dev, struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
-{
- /* Yet to implement this function, 19th April 2010 */
- hddLog(LOG1, "The function iw_qcom_get_wapi_bkid called ");
-
- return 0;
-}
-#endif /* FEATURE_WLAN_WAPI */
-
#ifdef WLAN_FEATURE_VOWIFI_11R
//
//
@@ -10046,14 +9724,6 @@ static const iw_handler we_private[] = {
[WLAN_PRIV_GET_OEM_DATA_RSP - SIOCIWFIRSTPRIV] = iw_get_oem_data_rsp, //oem data req Specifc
#endif
-#ifdef FEATURE_WLAN_WAPI
- [WLAN_PRIV_SET_WAPI_MODE - SIOCIWFIRSTPRIV] = iw_qcom_set_wapi_mode,
- [WLAN_PRIV_GET_WAPI_MODE - SIOCIWFIRSTPRIV] = iw_qcom_get_wapi_mode,
- [WLAN_PRIV_SET_WAPI_ASSOC_INFO - SIOCIWFIRSTPRIV] = iw_qcom_set_wapi_assoc_info,
- [WLAN_PRIV_SET_WAPI_KEY - SIOCIWFIRSTPRIV] = iw_qcom_set_wapi_key,
- [WLAN_PRIV_SET_WAPI_BKID - SIOCIWFIRSTPRIV] = iw_qcom_set_wapi_bkid,
- [WLAN_PRIV_GET_WAPI_BKID - SIOCIWFIRSTPRIV] = iw_qcom_get_wapi_bkid,
-#endif /* FEATURE_WLAN_WAPI */
#ifdef WLAN_FEATURE_VOWIFI_11R
[WLAN_PRIV_SET_FTIES - SIOCIWFIRSTPRIV] = iw_set_fties,
#endif
@@ -10530,11 +10200,6 @@ static const struct iw_priv_args we_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"getwlandbg" },
- { WE_MODULE_DOWN_IND,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "moduleDownInd" },
-
{ WE_GET_MAX_ASSOC,
0,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
@@ -11075,44 +10740,6 @@ static const struct iw_priv_args we_private_args[] = {
"get_oem_data_rsp" },
#endif
-#ifdef FEATURE_WLAN_WAPI
- /* handlers for main ioctl SET_WAPI_MODE */
- { WLAN_PRIV_SET_WAPI_MODE,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- 0,
- "SET_WAPI_MODE" },
-
- /* handlers for main ioctl GET_WAPI_MODE */
- { WLAN_PRIV_GET_WAPI_MODE,
- 0,
- IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
- "GET_WAPI_MODE" },
-
- /* handlers for main ioctl SET_ASSOC_INFO */
- { WLAN_PRIV_SET_WAPI_ASSOC_INFO,
- IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 400,
- 0,
- "SET_WAPI_ASSOC" },
-
- /* handlers for main ioctl SET_WAPI_KEY */
- { WLAN_PRIV_SET_WAPI_KEY,
- IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 71,
- 0,
- "SET_WAPI_KEY" },
-
- /* handlers for main ioctl SET_WAPI_BKID */
- { WLAN_PRIV_SET_WAPI_BKID,
- IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 24,
- 0,
- "SET_WAPI_BKID" },
-
- /* handlers for main ioctl GET_WAPI_BKID */
- { WLAN_PRIV_GET_WAPI_BKID,
- 0,
- IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 24,
- "GET_WAPI_BKID" },
-#endif /* FEATURE_WLAN_WAPI */
-
/* handlers for main ioctl - host offload */
{
WLAN_PRIV_SET_HOST_OFFLOAD,
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index a8e0c8042108..2bc25f321865 100644
--- a/CORE/MAC/inc/qwlan_version.h
+++ b/CORE/MAC/inc/qwlan_version.h
@@ -42,9 +42,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 0
#define QWLAN_VERSION_PATCH 0
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 146
+#define QWLAN_VERSION_BUILD 147
-#define QWLAN_VERSIONSTR "1.0.0.146"
+#define QWLAN_VERSIONSTR "1.0.0.147"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/SERVICES/COMMON/dbglog_id.h b/CORE/SERVICES/COMMON/dbglog_id.h
index fffb1626586f..8e02e6f0113f 100644
--- a/CORE/SERVICES/COMMON/dbglog_id.h
+++ b/CORE/SERVICES/COMMON/dbglog_id.h
@@ -885,12 +885,25 @@ extern "C" {
#define ROAM_RSN_IE_PARSE_ERROR 34
#define ROAM_WPA_IE_PARSE_ERROR 35
#define ROAM_SCAN_CMD_FROM_HOST 36
-#define ROAM_DBGID_DEFINITION_END 37
+#define ROAM_HO_SORT_CANDIDATE 37
+#define ROAM_HO_SAVE_CANDIDATE 38
+#define ROAM_HO_GET_CANDIDATE 39
+#define ROAM_HO_OFFLOAD_SET_PARAM 40
+#define ROAM_HO_SM 41
+#define ROAM_HO_HTT_SAVED 42
+#define ROAM_HO_SYNC_START 43
+#define ROAM_HO_START 44
+#define ROAM_HO_SYNC_COMPLETE 45
+#define ROAM_HO_STOP 46
+#define ROAM_HO_HTT_FORWARD 47
+#define ROAM_DBGID_DEFINITION_END 48
/* DATA_TXRX module DBGIDs*/
#define DATA_TXRX_DBGID_DEFINITION_START 0
#define DATA_TXRX_DBGID_RX_DATA_SEQ_LEN_INFO 1
-#define DATA_TXRX_DBGID_DEFINITION_END 2
+#define DATA_TXRX_DBGID_REPLAY_CHECK 2
+#define DATA_TXRX_DBGID_DUP_CHECK 3
+#define DATA_TXRX_DBGID_DEFINITION_END 4
/* TDLS module DBGIDs*/
#define TDLS_DBGID_DEFINITION_START 0
@@ -1040,6 +1053,29 @@ extern "C" {
#define RMC_SET_ACTION_PERIOD 15
#define RMC_DBGID_DEFINITION_END 16
+/* UNIT_TEST module DBGIDs */
+#define UNIT_TEST_GEN 0
+
+/* MLME module DBGIDs */
+#define MLME_DEBUG_CMN 0
+#define MLME_DEBUG_IF 1
+#define MLME_DEBUG_AUTH 2
+#define MLME_DEBUG_REASSOC 3
+#define MLME_DEBUG_DEAUTH 4
+#define MLME_DEBUG_DISASSOC 5
+#define MLME_DEBUG_ROAM 6
+#define MLME_DEBUG_RETRY 7
+#define MLME_DEBUG_TIMER 8
+#define MLME_DEBUG_FRAMEPARSE 9
+
+/* SUPPL module DBGIDs */
+#define SUPPL_DBGID_INIT 0
+#define SUPPL_DBGID_RECV_EAPOL 1
+#define SUPPL_DBGID_RECV_EAPOL_TIMEOUT 2
+#define SUPPL_DBGID_SEND_EAPOL 3
+#define SUPPL_DBGID_MIC_MISMATCH 4
+#define SUPPL_DBGID_FINISH 5
+
/* Stats Module DBGIDs */
#define WLAN_STATS_DBGID_DEFINITION_START 0
#define WLAN_STATS_DBGID_EST_LINKSPEED_VDEV_EN_DIS 1
@@ -1284,6 +1320,7 @@ extern "C" {
#define IBSS_PS_DBGID_PS_KICKOUT_PEER 24
#define IBSS_PS_DBGID_SET_PEER_PARAM 25
#define IBSS_PS_DBGID_BCN_ATIM_WIN_MISMATCH 26
+#define IBSS_PS_DBGID_RX_CHAINMASK_CHANGE 27
/* HIF UART Interface DBGIDs */
#define HIF_UART_DBGID_START 0
diff --git a/CORE/SERVICES/COMMON/targaddrs.h b/CORE/SERVICES/COMMON/targaddrs.h
index ffa3cfad56e8..48b628a6c67e 100644
--- a/CORE/SERVICES/COMMON/targaddrs.h
+++ b/CORE/SERVICES/COMMON/targaddrs.h
@@ -277,6 +277,12 @@ PREPACK64 struct host_interest_s {
/* remaining bytes of DRAM */
A_UINT32 hi_dynamic_mem_remaining; /* 0x110 */
+ /* memory track count, configured by host */
+ A_UINT32 hi_dynamic_mem_track_max; /* 0x114 */
+
+ /* minidump buffer */
+ A_UINT32 hi_minidump; /* 0x118 */
+
} POSTPACK64;
/* bitmap for hi_test_apps_related */
diff --git a/CORE/SERVICES/COMMON/wlan_module_ids.h b/CORE/SERVICES/COMMON/wlan_module_ids.h
index abec4d27978c..348085dc9b5c 100644
--- a/CORE/SERVICES/COMMON/wlan_module_ids.h
+++ b/CORE/SERVICES/COMMON/wlan_module_ids.h
@@ -83,6 +83,9 @@ typedef enum {
WLAN_MODULE_HIF_UART,
WLAN_MODULE_LPI,
WLAN_MODULE_EXTSCAN,
+ WLAN_MODULE_UNIT_TEST,
+ WLAN_MODULE_MLME,
+ WLAN_MODULE_SUPPL,
WLAN_MODULE_ID_MAX,
WLAN_MODULE_ID_INVALID = WLAN_MODULE_ID_MAX,
} WLAN_MODULE_ID;
diff --git a/CORE/SERVICES/COMMON/wma_api.h b/CORE/SERVICES/COMMON/wma_api.h
index 1688bfb61db9..78a886461053 100644
--- a/CORE/SERVICES/COMMON/wma_api.h
+++ b/CORE/SERVICES/COMMON/wma_api.h
@@ -133,6 +133,9 @@ int wma_disable_wow_in_fw(WMA_HANDLE handle);
int wma_is_wow_mode_selected(WMA_HANDLE handle);
int wma_enable_wow_in_fw(WMA_HANDLE handle);
bool wma_check_scan_in_progress(WMA_HANDLE handle);
+#ifdef FEATURE_WLAN_D0WOW
+int wma_get_client_count(WMA_HANDLE handle);
+#endif
#endif
int wma_set_peer_param(void *wma_ctx, u_int8_t *peer_addr, u_int32_t param_id,
u_int32_t param_value, u_int32_t vdev_id);
diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h
index b1edf4c8ea2f..26c9c7db9f34 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -45,7 +45,7 @@ extern "C" {
typedef enum {
WMI_SERVICE_BEACON_OFFLOAD=0, /* beacon offload */
WMI_SERVICE_SCAN_OFFLOAD, /* scan offload */
- WMI_SERVICE_ROAM_OFFLOAD, /* roam offload */
+ WMI_SERVICE_ROAM_SCAN_OFFLOAD, /* roam scan offload */
WMI_SERVICE_BCN_MISS_OFFLOAD, /* beacon miss offload */
WMI_SERVICE_STA_PWRSAVE, /* fake sleep + basic power save */
WMI_SERVICE_STA_ADVANCED_PWRSAVE, /* uapsd, pspoll, force sleep */
@@ -109,11 +109,13 @@ typedef enum {
WMI_SERVICE_EXTSCAN, /* Extended Scans */
WMI_SERVICE_D0WOW, /* D0-WOW Support */
WMI_SERVICE_HSOFFLOAD, /* Hotspot offload feature Support */
+ WMI_SERVICE_ROAM_HO_OFFLOAD, /* roam handover offload */
WMI_MAX_SERVICE=128 /* max service */
} WMI_SERVICE;
#define WMI_SERVICE_BM_SIZE ((WMI_MAX_SERVICE + sizeof(A_UINT32)- 1)/sizeof(A_UINT32))
+#define WMI_SERVICE_ROAM_OFFLOAD WMI_SERVICE_ROAM_SCAN_OFFLOAD /* depreciated the name WMI_SERVICE_ROAM_OFFLOAD, but here to help compiling with old host driver */
/*
* turn on the WMI service bit corresponding to the WMI service.
diff --git a/CORE/SERVICES/COMMON/wmi_tlv_defs.h b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
index f39215c716ac..c3873665cbca 100644
--- a/CORE/SERVICES/COMMON/wmi_tlv_defs.h
+++ b/CORE/SERVICES/COMMON/wmi_tlv_defs.h
@@ -488,6 +488,16 @@ typedef enum {
WMITLV_TAG_STRUC_wmi_extscan_hotlist_monitor_capabilities_event_fixed_param,
WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param,
WMITLV_TAG_STRUC_wmi_d0_wow_disable_ack_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_roam_offload_tlv_param,
+ WMITLV_TAG_STRUC_wmi_roam_11i_offload_tlv_param,
+ WMITLV_TAG_STRUC_wmi_roam_11r_offload_tlv_param,
+ WMITLV_TAG_STRUC_wmi_roam_ese_offload_tlv_param,
+ WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param,
+ WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param,
+ WMITLV_TAG_STRUC_wmi_extwow_enable_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_extwow_set_app_type1_params_cmd_fixed_param,
+ WMITLV_TAG_STRUC_wmi_extwow_set_app_type2_params_cmd_fixed_param,
} WMITLV_TAG_ID;
/*
@@ -666,7 +676,12 @@ typedef enum {
OP(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID) \
OP(WMI_EXTSCAN_SET_CAPABILITIES_CMDID) \
OP(WMI_EXTSCAN_GET_CAPABILITIES_CMDID) \
- OP(WMI_D0_WOW_ENABLE_DISABLE_CMDID)
+ OP(WMI_D0_WOW_ENABLE_DISABLE_CMDID) \
+ OP(WMI_UNIT_TEST_CMDID) \
+ OP(WMI_ROAM_SYNCH_COMPLETE) \
+ OP(WMI_EXTWOW_ENABLE_CMDID) \
+ OP(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID) \
+ OP(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID)
/*
@@ -750,7 +765,9 @@ typedef enum {
OP(WMI_EXTSCAN_WLAN_CHANGE_RESULTS_EVENTID) \
OP(WMI_EXTSCAN_HOTLIST_MATCH_EVENTID) \
OP(WMI_EXTSCAN_CAPABILITIES_EVENTID) \
- OP(WMI_D0_WOW_DISABLE_ACK_EVENTID)
+ OP(WMI_D0_WOW_DISABLE_ACK_EVENTID) \
+ OP(WMI_ROAM_SYNCH_EVENTID)
+
/* TLV definitions of WMI commands */
@@ -858,7 +875,11 @@ WMITLV_CREATE_PARAM_STRUC(WMI_RMV_BCN_FILTER_CMDID);
/* Roam scan mode Cmd */
#define WMITLV_TABLE_WMI_ROAM_SCAN_MODE(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_scan_mode_fixed_param, wmi_roam_scan_mode_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
- WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param, wmi_start_scan_cmd_fixed_param, scan_params, WMITLV_SIZE_FIX)
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_start_scan_cmd_fixed_param, wmi_start_scan_cmd_fixed_param, scan_params, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_offload_tlv_param, offload_param, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11i_offload_tlv_param, offload_11i_param, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_11r_offload_tlv_param, offload_11r_param, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_roam_ese_offload_tlv_param, offload_ese_param, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SCAN_MODE);
@@ -1254,6 +1275,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_STRUC, wmi_p2p_noa_descriptor, noa_descriptor, WMITLV_SIZE_VAR)
WMITLV_CREATE_PARAM_STRUC(WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
+/* Unit test FW */
+#define WMITLV_TABLE_WMI_UNIT_TEST_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param, wmi_unit_test_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_UINT32, A_UINT32, args, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_UNIT_TEST_CMDID);
+
/* Force Fw Hang Cmd */
#define WMITLV_TABLE_WMI_FORCE_FW_HANG_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_WMI_FORCE_FW_HANG_CMD_fixed_param, WMI_FORCE_FW_HANG_CMD_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -1394,6 +1421,12 @@ WMITLV_CREATE_PARAM_STRUC(WMI_PEER_MCAST_GROUP_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_AP_PROFILE);
+/* Roam sync complete Cmd */
+#define WMITLV_TABLE_WMI_ROAM_SYNCH_COMPLETE(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param, wmi_roam_synch_complete_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SYNCH_COMPLETE)
+
/* Scan scheduler priority Table Cmd */
#define WMITLV_TABLE_WMI_SCAN_SCH_PRIO_TBL_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_scan_sch_priority_table_cmd_fixed_param, wmi_scan_sch_priority_table_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
@@ -1464,6 +1497,24 @@ WMITLV_CREATE_PARAM_STRUC(WMI_WOW_ACER_IOAC_ADD_WAKE_PATTERN_CMDID);
WMITLV_CREATE_PARAM_STRUC(WMI_WOW_ACER_IOAC_DEL_WAKE_PATTERN_CMDID);
+/* extwow enable Cmd */
+#define WMITLV_TABLE_WMI_EXTWOW_ENABLE_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_extwow_enable_cmd_fixed_param, wmi_extwow_enable_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_EXTWOW_ENABLE_CMDID);
+
+/* extwow set wakeup params cmd for app type1 */
+#define WMITLV_TABLE_WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_extwow_set_app_type1_params_cmd_fixed_param, wmi_extwow_set_app_type1_params_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
+
+/* extwow set wakeup params cmd for app type2 */
+#define WMITLV_TABLE_WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_extwow_set_app_type2_params_cmd_fixed_param, wmi_extwow_set_app_type2_params_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
+
+WMITLV_CREATE_PARAM_STRUC(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
+
/* Stop scan Cmd */
#define WMITLV_TABLE_WMI_STOP_SCAN_CMDID(id,op,buf,len) \
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_stop_scan_cmd_fixed_param, wmi_stop_scan_cmd_fixed_param, fixed_param, WMITLV_SIZE_FIX)
@@ -1981,6 +2032,13 @@ WMITLV_CREATE_PARAM_STRUC(WMI_AGGR_STATE_TRIG_EVENTID);
WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_event_fixed_param, wmi_roam_event_fixed_param, fixed_param, WMITLV_SIZE_FIX)
WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_EVENTID);
+/* Roam Synch Event */
+#define WMITLV_TABLE_WMI_ROAM_SYNCH_EVENTID(id,op,buf,len) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param, wmi_roam_synch_event_fixed_param, fixed_param, WMITLV_SIZE_FIX) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, bcn_probe_rsp_frame, WMITLV_SIZE_VAR) \
+ WMITLV_ELEM(id,op,buf,len, WMITLV_TAG_ARRAY_BYTE, A_UINT8, reassoc_rsp_frame, WMITLV_SIZE_VAR)
+WMITLV_CREATE_PARAM_STRUC(WMI_ROAM_SYNCH_EVENTID);
+
/* WOW Wakeup Host Event */
/* NOTE: Make sure wow_bitmap_info can be zero or one elements only */
#define WMITLV_TABLE_WMI_WOW_WAKEUP_HOST_EVENTID(id,op,buf,len) \
diff --git a/CORE/SERVICES/COMMON/wmi_unified.h b/CORE/SERVICES/COMMON/wmi_unified.h
index 675bc6e32a82..64aa45e218f6 100644
--- a/CORE/SERVICES/COMMON/wmi_unified.h
+++ b/CORE/SERVICES/COMMON/wmi_unified.h
@@ -230,7 +230,7 @@ typedef enum {
WMI_PDEV_GET_TPC_CONFIG_CMDID,
/** set the base MAC address for the physical device before a VDEV is created.
- * For firmware that doesn’t support this feature and this command, the pdev
+ * For firmware that doesn`t support this feature and this command, the pdev
* MAC address will not be changed. */
WMI_PDEV_SET_BASE_MACADDR_CMDID,
@@ -364,6 +364,8 @@ typedef enum {
WMI_ROAM_CHAN_LIST,
/** Stop scan command */
WMI_ROAM_SCAN_CMD,
+ /** roaming sme offload sync complete */
+ WMI_ROAM_SYNCH_COMPLETE,
/** offload scan specific commands */
/** set offload scan AP profile */
@@ -444,6 +446,12 @@ typedef enum {
WMI_WOW_ACER_IOAC_DEL_WAKE_PATTERN_CMDID,
/* D0-WOW enable or disable cmd */
WMI_D0_WOW_ENABLE_DISABLE_CMDID,
+ /* enable extend WoW */
+ WMI_EXTWOW_ENABLE_CMDID,
+ /* Extend WoW command to configure app type1 parameter */
+ WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID,
+ /* Extend WoW command to configure app type2 parameter */
+ WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID,
/* RTT measurement related cmd */
/** reques to make an RTT measurement */
@@ -562,6 +570,8 @@ typedef enum {
WMI_FWTEST_VDEV_MCC_SET_TBTT_MODE_CMDID=WMI_CMD_GRP_START_ID(WMI_GRP_FWTEST),
/** set NoA descs **/
WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID,
+ /* UNIT Tests */
+ WMI_UNIT_TEST_CMDID,
/** TDLS Configuration */
/** enable/disable TDLS */
@@ -760,6 +770,8 @@ typedef enum {
/** matching AP found from list of profiles */
WMI_PROFILE_MATCH,
+ /** roam synch event */
+ WMI_ROAM_SYNCH_EVENTID,
/** P2P disc found */
WMI_P2P_DISC_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_P2P),
@@ -3523,6 +3535,9 @@ typedef enum {
* WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS seconds. */
WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
+ /* Enable/Disable 1 RX chain usage during the ATIM window */
+ WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
+
} WMI_VDEV_PARAM;
/* Length of ATIM Window in TU */
@@ -4149,6 +4164,12 @@ typedef struct {
WMI_PEER_TYPE_DEFAULT = 0, /* Generic/Non-BSS/Self Peer */
WMI_PEER_TYPE_BSS = 1, /* Peer is BSS Peer entry */
WMI_PEER_TYPE_TDLS = 2, /* Peer is a TDLS Peer */
+ WMI_PEER_TYPE_HOST_MAX = 127, /* Host <-> Target Peer type
+ * is assigned up to 127 */
+ /* Reserved from 128 - 255 for
+ * target internal use.*/
+ WMI_PEER_TYPE_ROAMOFFLOAD_TEMP = 128, /* Temporarily created
+ * during offload roam */
};
typedef struct {
@@ -4708,6 +4729,8 @@ typedef struct {
#define WMI_ROAM_SCAN_MODE_PERIODIC 0x1
#define WMI_ROAM_SCAN_MODE_RSSI_CHANGE 0x2
#define WMI_ROAM_SCAN_MODE_BOTH 0x3
+/* Note: WMI_ROAM_SCAN_MODE_ROAMOFFLOAD is one bit not conflict with LFR2.0 SCAN_MODE. */
+#define WMI_ROAM_SCAN_MODE_ROAMOFFLOAD 0x4
typedef struct {
A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_scan_cmd_fixed_param */
@@ -4917,7 +4940,7 @@ typedef struct {
* Following this structure is the TLV:
* wmi_ap_profile ap_profile; //AP profile info
*/
-} wmi_roam_ap_profile_fixed_param;;
+} wmi_roam_ap_profile_fixed_param;
/**
* WMI_OFL_SCAN_ADD_AP_PROFILE: add an AP profile.
@@ -4954,6 +4977,74 @@ typedef struct {
A_UINT32 ofl_scan_period;
} wmi_ofl_scan_period;
+/* Do not modify XXX_BYTES or XXX_LEN below as it is fixed by standard */
+#define ROAM_OFFLOAD_PMK_BYTES (32)
+#define ROAM_OFFLOAD_PSK_MSK_BYTES (32)
+#define ROAM_OFFLOAD_KRK_BYTES (16)
+#define ROAM_OFFLOAD_BTK_BYTES (32)
+#define ROAM_OFFLOAD_R0KH_ID_MAX_LEN (48)
+#define ROAM_OFFLOAD_NUM_MCS_SET (16)
+
+/* This TLV will be filled only in case roam offload
+ * for wpa2-psk/okc/ese/11r is enabled */
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_offload_fixed_param */
+ A_UINT32 rssi_cat_gap; /* gap for every category bucket */
+ A_UINT32 prefer_5g; /* prefer select 5G candidate */
+ A_UINT32 select_5g_margin;
+ A_UINT32 reassoc_failure_timeout; /* reassoc failure timeout */
+ A_UINT32 capability;
+ A_UINT32 ht_caps_info;
+ A_UINT32 ampdu_param;
+ A_UINT32 ht_ext_cap;
+ A_UINT32 ht_txbf;
+ A_UINT32 asel_cap;
+ A_UINT32 qos_enabled;
+ A_UINT32 qos_caps;
+ A_UINT32 wmm_caps;
+ A_UINT32 mcsset[ROAM_OFFLOAD_NUM_MCS_SET>>2]; /* since this 4 byte aligned,
+ * we don't declare it as
+ * tlv array */
+} wmi_roam_offload_tlv_param;
+
+/* flags for 11i offload */
+#define WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED 0 /* okc is enabled */
+/* from bit 1 to bit 31 are reserved */
+
+#define WMI_SET_ROAM_OFFLOAD_OKC_ENABLED(flag) do { \
+ (flag) |= (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
+ } while(0)
+
+#define WMI_SET_ROAM_OFFLOAD_OKC_DISABLED(flag) do { \
+ (flag) &= ~(1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED); \
+ } while(0)
+
+#define WMI_GET_ROAM_OFFLOAD_OKC_ENABLED(flag) \
+ ((flag) & (1 << WMI_ROAM_OFFLOAD_FLAG_OKC_ENABLED))
+
+/* This TLV will be filled only in case of wpa-psk/wpa2-psk */
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11i_offload_fixed_param */
+ A_UINT32 flags; /** flags. see WMI_ROAM_OFFLOAD_FLAG_ above */
+ A_UINT32 pmk[ROAM_OFFLOAD_PMK_BYTES>>2]; /* pmk offload. As this 4 byte aligned, we don't declare it as tlv array */
+} wmi_roam_11i_offload_tlv_param;
+
+/* This TLV will be filled only in case of 11R*/
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_11r_offload_fixed_param */
+ A_UINT32 mdie_present;
+ A_UINT32 mdid;
+ A_UINT32 r0kh_id;
+ A_UINT32 r0kh_id_len;
+ A_UINT32 psk_msk[ROAM_OFFLOAD_PSK_MSK_BYTES>>2]; /* psk/msk offload. As this 4 byte aligned, we don't declare it as tlv array */
+} wmi_roam_11r_offload_tlv_param;
+
+/* This TLV will be filled only in case of ESE */
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_ese_offload_fixed_param */
+ A_UINT32 krk[ROAM_OFFLOAD_KRK_BYTES>>2]; /* KRK offload. As this 4 byte aligned, we don't declare it as tlv array */
+ A_UINT32 btk[ROAM_OFFLOAD_BTK_BYTES>>2]; /* BTK offload. As this 4 byte aligned, we don't declare it as tlv array */
+} wmi_roam_ese_offload_tlv_param;
/** WMI_ROAM_EVENT: roam event triggering the host roam logic.
@@ -4980,6 +5071,7 @@ typedef struct {
SSID and Security profile in
WMI_ROAM_AP_PROFILE, found during scan
triggered upon FINAL_BMISS **/
+#define WMI_ROAM_REASON_HO_FAILED 0x5 /** LFR3.0 roaming failed, indicate the disconnection to host */
/** WMI_PROFILE_MATCH_EVENT: offload scan
* generated when ever atleast one of the matching profiles is found
@@ -5284,6 +5376,7 @@ typedef enum wake_reason_e {
WOW_REASON_ACER_IOAC_SHORT_EVENT,
WOW_REASON_ACER_IOAC_EXTEND_EVENT,
WOW_REASON_ACER_IOAC_TIMER_EVENT,
+ WOW_REASON_ROAM_HO,
WOW_REASON_DFS_PHYERR_RADADR_EVENT,
WOW_REASON_DEBUG_TEST = 0xFF,
}WOW_WAKE_REASON_TYPE;
@@ -5477,6 +5570,58 @@ typedef struct {
A_UINT32 enable; /* 1 = enable, 0 = disable */
} wmi_d0_wow_enable_disable_cmd_fixed_param;
+typedef enum extend_wow_type_e {
+ EXTWOW_TYPE_APP_TYPE1, /* extend wow type: only enable wakeup for app type1 */
+ EXTWOW_TYPE_APP_TYPE2, /* extend wow type: only enable wakeup for app type2 */
+ EXTWOW_TYPE_APP_TYPE1_2, /* extend wow type: enable wakeup for app type1&2 */
+} EXTWOW_TYPE;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_enable_cmd_fixed_param */
+ A_UINT32 vdev_id;
+ A_UINT32 type;
+ A_UINT32 wakeup_pin_num;
+} wmi_extwow_enable_cmd_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type1_params_cmd_fixed_param */
+ A_UINT32 vdev_id;
+ wmi_mac_addr wakee_mac;
+ A_UINT8 ident[8];
+ A_UINT8 passwd[16];
+ A_UINT32 ident_len;
+ A_UINT32 passwd_len;
+} wmi_extwow_set_app_type1_params_cmd_fixed_param;
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals wmi_extwow_set_app_type2_params_cmd_fixed_param */
+ A_UINT32 vdev_id;
+
+ A_UINT8 rc4_key[16];
+ A_UINT32 rc4_key_len;
+
+ /** ip header parameter */
+ A_UINT32 ip_id; /* NC id */
+ A_UINT32 ip_device_ip; /* NC IP address */
+ A_UINT32 ip_server_ip; /* Push server IP address */
+
+ /** tcp header parameter */
+ A_UINT16 tcp_src_port; /* NC TCP port */
+ A_UINT16 tcp_dst_port; /* Push server TCP port */
+ A_UINT32 tcp_seq;
+ A_UINT32 tcp_ack_seq;
+
+ A_UINT32 keepalive_init; /* Initial ping interval */
+ A_UINT32 keepalive_min; /* Minimum ping interval */
+ A_UINT32 keepalive_max; /* Maximum ping interval */
+ A_UINT32 keepalive_inc; /* Increment of ping interval */
+
+ wmi_mac_addr gateway_mac;
+ A_UINT32 tcp_tx_timeout_val;
+ A_UINT32 tcp_rx_timeout_val;
+} wmi_extwow_set_app_type2_params_cmd_fixed_param;
+
+
#define WMI_RXERR_CRC 0x01 /* CRC error on frame */
#define WMI_RXERR_DECRYPT 0x08 /* non-Michael decrypt error */
@@ -5823,6 +5968,7 @@ typedef struct wmi_nlo_config {
A_UINT32 slow_scan_period; /* specific to windows */
A_UINT32 no_of_ssids;
A_UINT32 num_of_channels;
+ A_UINT32 delay_start_time; /* NLO scan start delay time in milliseconds */
/* The TLVs will follow.
* nlo_configured_parameters nlo_list[];
* A_UINT32 channel_list[];
@@ -6075,6 +6221,32 @@ typedef struct {
*/
} wmi_p2p_set_noa_cmd_fixed_param;
+typedef struct {
+ /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_unit_test_cmd_fixed_param */
+ A_UINT32 tlv_header;
+ /* unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+ /* Identify the wlan module */
+ A_UINT32 module_id;
+ /* Num of test arguments passed */
+ A_UINT32 num_args;
+/**
+ * TLV (tag length value ) parameters follow the wmi_roam_chan_list
+ * structure. The TLV's are:
+ * A_UINT32 args[];
+ **/
+} wmi_unit_test_cmd_fixed_param;
+
+/** Roaming offload SYNCH_COMPLETE from host when host finished sync logic
+ * after it received WMI_ROAM_SYNCH_EVENTID.
+ */
+typedef struct {
+ A_UINT32 tlv_header; /** TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_complete_fixed_param */
+ /** unique id identifying the VDEV, generated by the caller */
+ A_UINT32 vdev_id;
+} wmi_roam_synch_complete_fixed_param;
+
+
typedef enum {
RECOVERY_SIM_ASSERT = 0x01,
RECOVERY_SIM_NO_DETECT = 0x02,
@@ -6082,6 +6254,7 @@ typedef enum {
RECOVERY_SIM_EMPTY_POINT = 0x04,
RECOVERY_SIM_STACK_OV = 0x05,
RECOVERY_SIM_INFINITE_LOOP = 0x06,
+ RECOVERY_SIM_PCIE_LINKDOWN = 0x07,
} RECOVERY_SIM_TYPE;
/* WMI_FORCE_FW_HANG_CMDID */
@@ -7373,6 +7546,45 @@ enum {
WMI_MODEM_STATE_ON
};
+#define WMI_ROAM_AUTH_STATUS_CONNECTED 0x1 /** connected, but not authenticated */
+#define WMI_ROAM_AUTH_STATUS_AUTHENTICATED 0x2 /** connected and authenticated */
+
+/** WMI_ROAM_SYNCH_EVENT: roam synch event triggering the host propagation logic
+ generated whenever firmware roamed to new AP silently and
+ (a) If the host is awake, FW sends the event to the host immediately .
+ (b) If host is in sleep then either
+ (1) FW waits until host sends WMI_PDEV_RESUME_CMDID or WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID
+ command to FW (part of host wake up sequence from low power mode) before sending the event host.
+ (2) data/mgmt frame is received from roamed AP, which needs to return to host
+*/
+
+typedef struct {
+ A_UINT32 tlv_header; /* TLV tag and len; tag equals WMITLV_TAG_STRUC_wmi_roam_synch_event_fixed_param */
+ /** Unique id identifying the VDEV on which roaming is done by firmware */
+ A_UINT32 vdev_id;
+ /** auth_status: connected or authorized */
+ A_UINT32 auth_status;
+ /** roam_reason: the reason of roam. see the WMI_ROAM_REASON_ XXX */
+ A_UINT32 roam_reason;
+ /** associated AP's rssi calculated by FW when reason code is WMI_ROAM_REASON_LOW_RSSI. not valid if roam_reason is BMISS */
+ A_UINT32 rssi;
+ /** MAC address of roamed AP */
+ wmi_mac_addr bssid; /* BSSID */
+ /** whether the frame is beacon or probe rsp */
+ A_UINT32 is_beacon;
+ /** the length of beacon/probe rsp */
+ A_UINT32 bcn_probe_rsp_len;
+ /** the length of reassoc rsp */
+ A_UINT32 reassoc_rsp_len;
+ /**
+ * TLV (tag length value ) parameters follows roam_synch_event
+ * The TLV's are:
+ * A_UINT8 bcn_probe_rsp_frame[]; length identified by bcn_probe_rsp_len
+ * A_UINT8 reassoc_rsp_frame[]; length identified by reassoc_rsp_len
+ *
+ **/
+} wmi_roam_synch_event_fixed_param;
+
#define WMI_PEER_ESTIMATED_LINKSPEED_INVALID 0xFFFFFFFF
typedef struct {
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index 2e6ab07e643d..45b7470e5def 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/wmi_version.h
@@ -37,7 +37,7 @@
/** WMI revision number has to be incremented when there is a
* change that may or may not break compatibility. */
-#define __WMI_REVISION_ 55
+#define __WMI_REVISION_ 57
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index 0a918664b970..f0e7c0005037 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -1804,6 +1804,20 @@ hif_pci_suspend(struct pci_dev *pdev, pm_message_t state)
msleep(10);
}
+#ifdef FEATURE_WLAN_D0WOW
+ if (wma_get_client_count(temp_module)) {
+ if (enable_irq_wake(pdev->irq)) {
+ pr_err("%s: Fail to enable wake IRQ!\n", __func__);
+ ret = -1;
+ goto out;
+ }
+
+ pr_info("%s: Suspend completes (D0WOW)\n", __func__);
+ ret = 0;
+ goto out;
+ }
+#endif
+
adf_os_spin_lock_irqsave(&hif_state->suspend_lock);
/*Disable PCIe interrupts*/
@@ -1938,6 +1952,16 @@ hif_pci_resume(struct pci_dev *pdev)
else
err = wma_disable_wow_in_fw(temp_module);
+#ifdef FEATURE_WLAN_D0WOW
+ if (wma_get_client_count(temp_module)) {
+ if (disable_irq_wake(pdev->irq)) {
+ pr_err("%s: Fail to disable wake IRQ!\n", __func__);
+ err = -1;
+ goto out;
+ }
+ }
+#endif
+
out:
printk("%s: Resume completes %d\n", __func__, err);
diff --git a/CORE/SERVICES/HIF/USB/if_usb.c b/CORE/SERVICES/HIF/USB/if_usb.c
index 9f13721efa3b..081b29cd6e0f 100644
--- a/CORE/SERVICES/HIF/USB/if_usb.c
+++ b/CORE/SERVICES/HIF/USB/if_usb.c
@@ -254,12 +254,13 @@ static void hif_usb_remove(struct usb_interface *interface)
usb_put_dev(interface_to_usbdev(interface));
scn = sc->ol_sc;
-#ifndef REMOVE_PKT_LOG
- if (vos_get_conparam() != VOS_FTM_MODE)
- pktlogmod_exit(scn);
-#endif
+
if (usb_sc->hdd_removed == 0) {
usb_sc->hdd_removed_processing = 1;
+#ifndef REMOVE_PKT_LOG
+ if (vos_get_conparam() != VOS_FTM_MODE)
+ pktlogmod_exit(scn);
+#endif
__hdd_wlan_exit();
usb_sc->hdd_removed_processing = 0;
usb_sc->hdd_removed = 1;
@@ -436,6 +437,10 @@ void hif_unregister_driver(void)
if (usb_sc->hdd_removed == 0) {
usb_sc->hdd_removed_processing = 1;
+#ifndef REMOVE_PKT_LOG
+ if (vos_get_conparam() != VOS_FTM_MODE)
+ pktlogmod_exit(usb_sc->ol_sc);
+#endif
__hdd_wlan_exit();
usb_sc->hdd_removed_processing = 0;
usb_sc->hdd_removed = 1;
diff --git a/CORE/SERVICES/HIF/USB/usbdrv.c b/CORE/SERVICES/HIF/USB/usbdrv.c
index 4de4ff6a7319..79e9a7eb6d0d 100644
--- a/CORE/SERVICES/HIF/USB/usbdrv.c
+++ b/CORE/SERVICES/HIF/USB/usbdrv.c
@@ -427,12 +427,15 @@ static void usb_hif_flush_pending_transfers(HIF_USB_PIPE *pipe)
void usb_hif_flush_all(HIF_DEVICE_USB *device)
{
int i;
-
+ HIF_USB_PIPE *pipe;
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("+%s\n", __func__));
for (i = 0; i < HIF_USB_PIPE_MAX; i++) {
- if (device->pipes[i].device != NULL)
+ if (device->pipes[i].device != NULL) {
usb_hif_flush_pending_transfers(&device->pipes[i]);
+ pipe = &device->pipes[i];
+ flush_work(&pipe->io_complete_work);
+ }
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRC, ("-%s\n", __func__));
diff --git a/CORE/SERVICES/WMA/regdomain.h b/CORE/SERVICES/WMA/regdomain.h
index 2841b587e26b..d9f671d21c02 100644
--- a/CORE/SERVICES/WMA/regdomain.h
+++ b/CORE/SERVICES/WMA/regdomain.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011, 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -92,9 +92,6 @@ enum {
#define SUPER_DOMAIN_MASK 0x0fff
#define COUNTRY_CODE_MASK 0x3fff
#define CF_INTERFERENCE (CHANNEL_CW_INT | CHANNEL_RADAR_INT)
-#define CHANNEL_14 (2484) /* 802.11g operation is not permitted on channel 14 */
-#define IS_11G_CH14(_ch,_cf) \
- (((_ch) == CHANNEL_14) && ((_cf) == CHANNEL_G))
/*
* The following describe the bit masks for different passive scan
@@ -309,6 +306,21 @@ typedef struct {
u_int8_t pwrlvl;
} COMMON_MODE_POWER;
+typedef enum
+{
+ COUNTRY_CODE_SET_BY_CORE,
+ COUNTRY_CODE_SET_BY_DRIVER,
+ COUNTRY_CODE_SET_BY_USER
+} COUNTRY_CODE_SOURCE;
+
+struct regulatory {
+ u_int32_t reg_domain;
+ u_int32_t eeprom_rd_ext;
+ u_int16_t country_code;
+ u_int8_t alpha2[3];
+ const void *regpair;
+ COUNTRY_CODE_SOURCE cc_src;
+};
/* Multi-Device RegDomain Support */
typedef struct ath_hal_reg_dmn_tables {
/* regDomainPairs: Map of 8-bit regdomain values to unitary reg domain */
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 31f086c1b50e..212f3abb31b7 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -167,6 +167,11 @@
#define WMI_MAX_HOST_CREDITS 2
#define WMI_WOW_REQUIRED_CREDITS 1
+#ifdef FEATURE_WLAN_D0WOW
+#define DISABLE_PCIE_POWER_COLLAPSE 1
+#define ENABLE_PCIE_POWER_COLLAPSE 0
+#endif
+
static void wma_send_msg(tp_wma_handle wma_handle, u_int16_t msg_type,
void *body_ptr, u_int32_t body_val);
@@ -9908,6 +9913,15 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
wma_handle->wma_ibss_power_save_params.ibssPsWarmupTime);
}
break;
+ case WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW:
+ {
+ wma_handle->wma_ibss_power_save_params.ibssPs1RxChainInAtimEnable =
+ privcmd->param_value;
+ WMA_LOGD("%s: IBSS Power Save single RX Chain Enable In ATIM = %d",
+ __func__,
+ wma_handle->wma_ibss_power_save_params.ibssPs1RxChainInAtimEnable);
+ }
+ break;
default:
WMA_LOGE("Invalid wma config command id:%d",
@@ -11184,6 +11198,15 @@ wma_set_ibss_pwrsave_params(tp_wma_handle wma, u_int8_t vdev_id)
return VOS_STATUS_E_FAILURE;
}
+ ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
+ WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
+ wma->wma_ibss_power_save_params.ibssPs1RxChainInAtimEnable);
+ if (ret < 0) {
+ WMA_LOGE("Failed to set IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE ret=%d",
+ ret);
+ return VOS_STATUS_E_FAILURE;
+ }
+
return VOS_STATUS_SUCCESS;
}
@@ -12416,6 +12439,25 @@ out:
wma_send_msg(wma, WDA_ADD_STA_RSP, (void *)params, 0);
}
+#ifdef FEATURE_WLAN_D0WOW
+static void wma_add_pm_vote(tp_wma_handle wma)
+{
+ if (++wma->ap_client_cnt == 1)
+ vos_pm_control(DISABLE_PCIE_POWER_COLLAPSE);
+}
+
+static void wma_del_pm_vote(tp_wma_handle wma)
+{
+ if (--wma->ap_client_cnt == 0)
+ vos_pm_control(ENABLE_PCIE_POWER_COLLAPSE);
+}
+
+int wma_get_client_count(WMA_HANDLE handle)
+{
+ tp_wma_handle wma = (tp_wma_handle)handle;
+ return wma->ap_client_cnt;
+}
+#else
static void wma_prevent_suspend_check(tp_wma_handle wma)
{
wma->ap_client_cnt++;
@@ -12437,6 +12479,7 @@ static void wma_allow_suspend_check(tp_wma_handle wma)
__func__, wma->ap_client_cnt);
}
}
+#endif /* FEATURE_WLAN_D0WOW */
static void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
{
@@ -12448,7 +12491,11 @@ static void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
add_sta->bssId[3], add_sta->bssId[4], add_sta->bssId[5]);
if (wma_is_vdev_in_ap_mode(wma, add_sta->smesessionId)) {
+#ifdef FEATURE_WLAN_D0WOW
+ wma_add_pm_vote(wma);
+#else
wma_prevent_suspend_check(wma);
+#endif
oper_mode = BSS_OPERATIONAL_MODE_AP;
}
#ifdef QCA_IBSS_SUPPORT
@@ -13099,7 +13146,11 @@ static void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
tANI_U8 oper_mode = BSS_OPERATIONAL_MODE_STA;
if (wma_is_vdev_in_ap_mode(wma, del_sta->smesessionId)) {
+#ifdef FEATURE_WLAN_D0WOW
+ wma_del_pm_vote(wma);
+#else
wma_allow_suspend_check(wma);
+#endif
oper_mode = BSS_OPERATIONAL_MODE_AP;
}
#ifdef QCA_IBSS_SUPPORT
@@ -15319,6 +15370,30 @@ static int wma_lphb_handler(tp_wma_handle wma, u_int8_t *event)
}
#endif /* FEATURE_WLAN_LPHB */
+#ifdef FEATURE_WLAN_D0WOW
+/*
+ * Handler to catch D0-WOW disable ACK event.
+ */
+static int wma_d0_wow_disable_ack_event(void *handle, u_int8_t *event,
+ u_int32_t len)
+{
+ tp_wma_handle wma = (tp_wma_handle) handle;
+ WMI_D0_WOW_DISABLE_ACK_EVENTID_param_tlvs *param_buf;
+ wmi_d0_wow_disable_ack_event_fixed_param *resp_data;
+
+ param_buf = (WMI_D0_WOW_DISABLE_ACK_EVENTID_param_tlvs *)event;
+ if (!param_buf) {
+ WMA_LOGE("Invalid D0-WOW disable ACK event buffer!");
+ return -EINVAL;
+ }
+
+ resp_data = param_buf->fixed_param;
+ vos_event_set(&wma->wma_resume_event);
+ WMA_LOGD("Received D0-WOW disable ACK");
+ return 0;
+}
+#endif
+
/*
* Handler to catch wow wakeup host event. This event will have
* reason why the firmware has woken the host.
@@ -15645,6 +15720,78 @@ static VOS_STATUS wma_del_wow_pattern_in_fw(tp_wma_handle wma,
return VOS_STATUS_SUCCESS;
}
+#ifdef FEATURE_WLAN_D0WOW
+/* Enable D0-WOW in firmware. */
+VOS_STATUS wma_enable_d0wow_in_fw(tp_wma_handle wma)
+{
+ wmi_d0_wow_enable_disable_cmd_fixed_param *cmd;
+ wmi_buf_t buf;
+ int32_t len;
+ int host_credits;
+ int wmi_pending_cmds;
+ int ret = 0;
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+
+ len = sizeof(wmi_d0_wow_enable_disable_cmd_fixed_param);
+ buf = wmi_buf_alloc(wma->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s: Failed to allocate WMI buffer!", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ cmd = (wmi_d0_wow_enable_disable_cmd_fixed_param *)wmi_buf_data(buf);
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_d0_wow_enable_disable_cmd_fixed_param));
+ cmd->enable = 1;
+
+ vos_event_reset(&wma->target_suspend);
+
+ host_credits = wmi_get_host_credits(wma->wmi_handle);
+ wmi_pending_cmds = wmi_get_pending_cmds(wma->wmi_handle);
+ if (host_credits < WMI_WOW_REQUIRED_CREDITS) {
+ WMA_LOGE("%s: Doesn't have enough credits to Post "
+ "WMI_D0_WOW_ENABLE_DISABLE_CMDID! "
+ "Credits: %d, pending_cmds: %d\n", __func__,
+ host_credits, wmi_pending_cmds);
+ goto error;
+ }
+
+ ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
+ WMI_D0_WOW_ENABLE_DISABLE_CMDID);
+ if (ret) {
+ WMA_LOGE("Failed to enable D0-WOW in FW!");
+ goto error;
+ }
+
+ vos_status = vos_wait_single_event(&wma->target_suspend,
+ WMA_TGT_SUSPEND_COMPLETE_TIMEOUT);
+ if (VOS_STATUS_SUCCESS != vos_status) {
+ WMA_LOGE("Failed to receive D0-WoW enable ACK from FW!");
+ return VOS_STATUS_E_FAILURE;
+ }
+
+ host_credits = wmi_get_host_credits(wma->wmi_handle);
+ wmi_pending_cmds = wmi_get_pending_cmds(wma->wmi_handle);
+ if (host_credits < WMI_WOW_REQUIRED_CREDITS) {
+ WMA_LOGE("%s: No credits after HTC ACK: %d, pending_cmds: %d, "
+ "cannot resume back!", __func__, host_credits,
+ wmi_pending_cmds);
+ HTC_dump_counter_info(wma->htc_handle);
+ VOS_BUG(0);
+ }
+
+ wma->wow.wow_enable_cmd_sent = TRUE;
+ WMA_LOGD("D0-WOW is enabled successfully in FW.");
+ return vos_status;
+
+error:
+ wmi_buf_free(buf);
+ return VOS_STATUS_E_FAILURE;
+}
+#endif /* FEATURE_WLAN_D0WOW */
+
/* Enables WOW in firmware. */
int wma_enable_wow_in_fw(WMA_HANDLE handle)
{
@@ -15657,6 +15804,14 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
int host_credits;
int wmi_pending_cmds;
+#ifdef FEATURE_WLAN_D0WOW
+ if (wma->ap_client_cnt > 0) {
+ WMA_LOGD("Entering D0-WOW since client count is %d.",
+ wma->ap_client_cnt);
+ return wma_enable_d0wow_in_fw(wma);
+}
+#endif
+
len = sizeof(wmi_wow_enable_cmd_fixed_param);
buf = wmi_buf_alloc(wma->wmi_handle, len);
@@ -16640,8 +16795,74 @@ static VOS_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
return vos_status;
}
-/* Disable wow in PCIe resume context.*/
+#ifdef FEATURE_WLAN_D0WOW
+/* Disable D0-WOW in firmware. */
+VOS_STATUS wma_disable_d0wow_in_fw(tp_wma_handle wma)
+{
+ wmi_d0_wow_enable_disable_cmd_fixed_param *cmd;
+ wmi_buf_t buf;
+ int32_t len;
+ int host_credits;
+ int wmi_pending_cmds;
+ int ret = 0;
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
+
+ len = sizeof(wmi_d0_wow_enable_disable_cmd_fixed_param);
+ buf = wmi_buf_alloc(wma->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("%s: Failed to allocate WMI buffer!", __func__);
+ return VOS_STATUS_E_NOMEM;
+ }
+
+ cmd = (wmi_d0_wow_enable_disable_cmd_fixed_param *)wmi_buf_data(buf);
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_d0_wow_enable_disable_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(
+ wmi_d0_wow_enable_disable_cmd_fixed_param));
+ cmd->enable = 0;
+
+ host_credits = wmi_get_host_credits(wma->wmi_handle);
+ wmi_pending_cmds = wmi_get_pending_cmds(wma->wmi_handle);
+ if (host_credits < WMI_WOW_REQUIRED_CREDITS) {
+ WMA_LOGE("%s: No Credits when resume: %d, pending_cmds: %d, "
+ "cannot resume back", __func__, host_credits,
+ wmi_pending_cmds);
+ HTC_dump_counter_info(wma->htc_handle);
+ VOS_BUG(0);
+ }
+
+ vos_event_reset(&wma->wma_resume_event);
+
+ ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
+ WMI_D0_WOW_ENABLE_DISABLE_CMDID);
+ if (ret) {
+ WMA_LOGE("Failed to disable D0-WOW in FW!");
+ goto error;
+ }
+
+ vos_status = vos_wait_single_event(&(wma->wma_resume_event),
+ WMA_RESUME_TIMEOUT);
+ if (VOS_STATUS_SUCCESS != vos_status) {
+ WMA_LOGP("%s: Timeout waiting for resume event from FW!",
+ __func__);
+ WMA_LOGP("%s: Pending commands: %d credits: %d", __func__,
+ wmi_get_pending_cmds(wma->wmi_handle),
+ wmi_get_host_credits(wma->wmi_handle));
+ VOS_BUG(0);
+ }
+
+ wma->wow.wow_enable = FALSE;
+ wma->wow.wow_enable_cmd_sent = FALSE;
+ WMA_LOGD("D0-WOW is disabled successfully in FW.");
+ return vos_status;
+
+error:
+ wmi_buf_free(buf);
+ return VOS_STATUS_E_FAILURE;
+}
+#endif /* FEATURE_WLAN_D0WOW */
+/* Disable wow in PCIe resume context. */
int wma_disable_wow_in_fw(WMA_HANDLE handle)
{
tp_wma_handle wma = handle;
@@ -16653,6 +16874,14 @@ int wma_disable_wow_in_fw(WMA_HANDLE handle)
WMA_LOGD("WoW Resume in PCIe Context\n");
+#ifdef FEATURE_WLAN_D0WOW
+ if (wma->ap_client_cnt > 0) {
+ WMA_LOGD("Exiting D0-WOW since client count is %d.",
+ wma->ap_client_cnt);
+ return wma_disable_d0wow_in_fw(wma);
+ }
+#endif
+
ret = wma_send_host_wakeup_ind_to_fw(wma);
if (ret != VOS_STATUS_SUCCESS)
@@ -21726,6 +21955,18 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
goto end;
}
+#ifdef FEATURE_WLAN_D0WOW
+ status = wmi_unified_register_event_handler(wma_handle->wmi_handle,
+ WMI_D0_WOW_DISABLE_ACK_EVENTID,
+ wma_d0_wow_disable_ack_event);
+ if (status) {
+ WMA_LOGE("%s: Failed to register D0-WOW disable event handler!",
+ __func__);
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto end;
+ }
+#endif
+
#ifdef FEATURE_WLAN_SCAN_PNO
if (WMI_SERVICE_IS_ENABLED(wma_handle->wmi_service_bitmap,
WMI_SERVICE_NLO)) {
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index b30f399e85c7..4f431a0d81f8 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -539,6 +539,7 @@ typedef struct {
u_int32_t inactivityCount;
u_int32_t txSPEndInactivityTime;
u_int32_t ibssPsWarmupTime;
+ u_int32_t ibssPs1RxChainInAtimEnable;
}ibss_power_save_params;
typedef struct {
@@ -1332,6 +1333,7 @@ enum wma_cfg_cmd_id {
WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
+ WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
/* dfs control interface */
WMA_VDEV_DFS_CONTROL_CMDID,
diff --git a/CORE/SERVICES/WMI/wmi_tlv_helper.c b/CORE/SERVICES/WMI/wmi_tlv_helper.c
index e61d51a13b57..d93754a1fe64 100644
--- a/CORE/SERVICES/WMI/wmi_tlv_helper.c
+++ b/CORE/SERVICES/WMI/wmi_tlv_helper.c
@@ -170,12 +170,7 @@ wmitlv_check_tlv_params(
{
wmi_tlv_print_error("%s: ERROR: Couldn't get expected number of TLVs for Cmd=%d\n",
__func__, wmi_cmd_event_id);
-#if 1
- // TODO: Just keep the #else part code instead of returning 1 once all events/commands converted to TLV format
- return 1;
-#else
goto Error_wmitlv_check_tlv_params;
-#endif
}
/* NOTE: the returned number of TLVs is in "attr_struct_ptr.cmd_num_tlv" */
@@ -326,9 +321,8 @@ wmitlv_check_tlv_params(
if (tlv_index!=expected_num_tlvs)
{
- wmi_tlv_print_error("%s: ERROR: Invalid num of TLV for Cmd=0x%x Given %d Expected %d\n",
+ wmi_tlv_print_verbose("%s: INFO: Less number of TLVs filled for Cmd=0x%x Filled %d Expected=%d\n",
__func__, wmi_cmd_event_id, tlv_index, expected_num_tlvs);
- goto Error_wmitlv_check_tlv_params;
}
return(0);
@@ -367,7 +361,6 @@ wmitlv_check_command_tlv_params(
* Helper Function to vaidate the TLV's coming for an event/command and also pads data to TLV's if necessary
* Return 0 if success.
<0 if failure.
- 1 if TLVs are not defined for the specific event/command (TODO: remove returning 1 once all events/commands converted to TLV format)
*/
static int
wmitlv_check_and_pad_tlvs(
@@ -388,8 +381,7 @@ wmitlv_check_and_pad_tlvs(
{
wmi_tlv_print_error("%s: ERROR: Couldn't get expected number of TLVs for Cmd=%d\n",
__func__, wmi_cmd_event_id);
- // TODO: return -1 instead of 1 once all events/commands converted to TLV format
- return 1;
+ return -1;
}
/* NOTE: the returned number of TLVs is in "attr_struct_ptr.cmd_num_tlv" */
@@ -735,7 +727,6 @@ Error_wmitlv_check_and_pad_tlvs:
* Helper Function to validate and pad(if necessary) for incoming WMI Event TLVs
* Return 0 if success.
<0 if failure.
- 1 if TLVs are not defined for the specific event/command (TODO: remove returning 1 once all events/commands converted to TLV format)
*/
int
wmitlv_check_and_pad_event_tlvs(
@@ -749,7 +740,6 @@ wmitlv_check_and_pad_event_tlvs(
* Helper Function to validate and pad(if necessary) for incoming WMI Command TLVs
* Return 0 if success.
<0 if failure.
- 1 if TLVs are not defined for the specific event/command (TODO: remove returning 1 once all events/commands converted to TLV format)
*/
int
wmitlv_check_and_pad_command_tlvs(
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index d2a08d00000a..041b6022aa61 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -561,10 +561,12 @@ static u_int8_t* get_wmi_cmd_string(WMI_CMD_ID wmi_command)
CASE_RETURN_STRING(WMI_EXTSCAN_GET_WLAN_CHANGE_RESULTS_CMDID);
CASE_RETURN_STRING(WMI_EXTSCAN_SET_CAPABILITIES_CMDID);
CASE_RETURN_STRING(WMI_EXTSCAN_GET_CAPABILITIES_CMDID);
-#ifdef WLAN_FEATURE_ROAM_OFFLOAD
CASE_RETURN_STRING(WMI_ROAM_SYNCH_COMPLETE);
-#endif
CASE_RETURN_STRING(WMI_D0_WOW_ENABLE_DISABLE_CMDID);
+ CASE_RETURN_STRING(WMI_EXTWOW_ENABLE_CMDID);
+ CASE_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE1_PARAMS_CMDID);
+ CASE_RETURN_STRING(WMI_EXTWOW_SET_APP_TYPE2_PARAMS_CMDID);
+ CASE_RETURN_STRING(WMI_UNIT_TEST_CMDID);
}
return "Invalid WMI cmd";
}
@@ -586,15 +588,11 @@ int wmi_unified_cmd_send(wmi_unified_t wmi_handle, wmi_buf_t buf, int len,
return -EBUSY;
}
- /* Do sanity check on the TLV parameter structure. Can be #ifdef DEBUG if desired */
+ /* Do sanity check on the TLV parameter structure */
{
void *buf_ptr = (void *) adf_nbuf_data(buf);
-#if 0
+
if (wmitlv_check_command_tlv_params(NULL, buf_ptr, len, cmd_id) != 0)
-#else
- /* TODO: Once all the TLV's are converted use #if 0 condition checking not equal to zero */
- if (wmitlv_check_command_tlv_params(NULL, buf_ptr, len, cmd_id) < 0)
-#endif
{
adf_os_print("\nERROR: %s: Invalid WMI Parameter Buffer for Cmd:%d\n",
__func__, cmd_id);
@@ -800,17 +798,10 @@ void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf)
data, len, id,
&wmi_cmd_struct_ptr);
if (tlv_ok_status != 0) {
- if (tlv_ok_status == 1) {
- pr_err("%s No TLV definition for command %d\n",
- __func__, id);
- wmi_cmd_struct_ptr = data;
- } else {
pr_err("%s: Error: id=0x%d, wmitlv_check_and_pad_tlvs ret=%d\n",
__func__, id, tlv_ok_status);
goto end;
- }
}
-
if (id >= WMI_EVT_GRP_START_ID(WMI_GRP_START)) {
u_int32_t idx = 0;
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index f2320897dd62..88a6a1749bba 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -55,6 +55,7 @@
#include "vos_nvitem.h"
#include "p2p_Api.h"
#include "smeInternal.h"
+#include "regdomain.h"
#ifdef FEATURE_OEM_DATA_SUPPORT
#include "oemDataApi.h"
@@ -220,6 +221,7 @@ typedef struct {
u_int8_t smeThermalMgmtEnabled;
u_int32_t smeThrottlePeriod;
} tSmeThermalParams;
+
/*-------------------------------------------------------------------------
Function declarations and documenation
------------------------------------------------------------------------*/
@@ -257,13 +259,16 @@ eHalStatus sme_Open(tHalHandle hHal);
\param alpha2 - Country code passed by the hdd context.
+ \param cc_src - Country code source passed by the hdd context.
+
\return eHAL_STATUS_SUCCESS - SME is successfully initialized.
Other status means SME is failed to be initialized
\sa
---------------------------------------------------------------------------*/
-eHalStatus sme_init_chan_list(tHalHandle hal, v_U8_t *alpha2);
+eHalStatus sme_init_chan_list(tHalHandle hal, v_U8_t *alpha2,
+ COUNTRY_CODE_SOURCE cc_src);
/*--------------------------------------------------------------------------
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 24e00930bdee..61804249355c 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -1337,10 +1337,18 @@ eHalStatus sme_Open(tHalHandle hHal)
/*
* sme_init_chan_list, triggers channel setup based on country code.
*/
-eHalStatus sme_init_chan_list(tHalHandle hal, v_U8_t *alpha2)
+eHalStatus sme_init_chan_list(tHalHandle hal, v_U8_t *alpha2,
+ COUNTRY_CODE_SOURCE cc_src)
{
- tpAniSirGlobal mac = PMAC_STRUCT(hal);
- return csr_init_chan_list(mac, alpha2);
+ tpAniSirGlobal pmac = PMAC_STRUCT(hal);
+
+ if ((cc_src == COUNTRY_CODE_SET_BY_USER) &&
+ (pmac->roam.configParam.fSupplicantCountryCodeHasPriority))
+ {
+ pmac->roam.configParam.Is11dSupportEnabled = eANI_BOOLEAN_FALSE;
+ }
+
+ return csr_init_chan_list(pmac, alpha2);
}
/*--------------------------------------------------------------------------
diff --git a/CORE/SVC/inc/wlan_logging_sock_svc.h b/CORE/SVC/inc/wlan_logging_sock_svc.h
index b8202fc9affb..71b2386d3374 100644
--- a/CORE/SVC/inc/wlan_logging_sock_svc.h
+++ b/CORE/SVC/inc/wlan_logging_sock_svc.h
@@ -1,8 +1,28 @@
/*
- * Copyright (c) 2014 Qualcomm Atheros, Inc.
- * All Rights Reserved.
- * Qualcomm Atheros Confidential and Proprietary.
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
*
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
*/
/******************************************************************************
diff --git a/CORE/SVC/src/logging/wlan_logging_sock_svc.c b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
index 73031c8192a9..5c95fedc46c3 100644
--- a/CORE/SVC/src/logging/wlan_logging_sock_svc.c
+++ b/CORE/SVC/src/logging/wlan_logging_sock_svc.c
@@ -1,14 +1,35 @@
/*
- * Copyright (c) 2014 Qualcomm Atheros, Inc.
- * All Rights Reserved.
- * Qualcomm Atheros Confidential and Proprietary.
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
*
+ * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
+ *
+ *
+ * Permission to use, copy, modify, and/or distribute this software for
+ * any purpose with or without fee is hereby granted, provided that the
+ * above copyright notice and this permission notice appear in all
+ * copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+/*
+ * This file was originally distributed by Qualcomm Atheros, Inc.
+ * under proprietary terms before Copyright ownership was assigned
+ * to the Linux Foundation.
*/
/******************************************************************************
* wlan_logging_sock_svc.c
*
******************************************************************************/
+
#ifdef WLAN_LOGGING_SOCK_SVC_ENABLE
#include <vmalloc.h>
#include <wlan_nlink_srv.h>
diff --git a/CORE/UTILS/FWLOG/dbglog_host.c b/CORE/UTILS/FWLOG/dbglog_host.c
index 2defdc7b10d9..5a13ba3ed53d 100644
--- a/CORE/UTILS/FWLOG/dbglog_host.c
+++ b/CORE/UTILS/FWLOG/dbglog_host.c
@@ -1154,6 +1154,7 @@ char * DBG_MSG_ARR[WLAN_MODULE_ID_MAX][MAX_DBG_MSGS] =
"IBSS_PS_DBGID_PS_KICKOUT_PEER",
"IBSS_PS_DBGID_SET_PEER_PARAM",
"IBSS_PS_DBGID_BCN_ATIM_WIN_MISMATCH",
+ "IBSS_PS_DBGID_RX_CHAINMASK_CHANGE",
},
};
@@ -2257,7 +2258,7 @@ dbglog_ibss_powersave_print_handler(
case IBSS_PS_DBGID_BC_ATIM_SEND:
if (numargs == 2) {
dbglog_printf(timestamp, vap_id,
- "IBSS PS: MC Data, num_of_peers:%d mc_atim_sent:%d",
+ "IBSS PS: MC Data, num_of_peers:%d bc_atim_sent:%d",
args[1], args[0]);
}
break;
@@ -2281,6 +2282,8 @@ dbglog_ibss_powersave_print_handler(
} else if(numargs == 1) {
dbglog_printf(timestamp, vap_id, "IBSS PS: power collapse not allowed since peer id:%d is not PS capable",
args[0]);
+ } else if(numargs == 2) {
+ dbglog_printf(timestamp, vap_id, "IBSS PS: power collapse not allowed - no peers in NW");
} else if (numargs == 3) {
if (args[0] == 2) {
dbglog_printf(timestamp, vap_id,
@@ -2364,6 +2367,16 @@ dbglog_ibss_powersave_print_handler(
}
break;
+ case IBSS_PS_DBGID_RX_CHAINMASK_CHANGE:
+ if(numargs == 2) {
+ if(args[1] == 0x1) {
+ dbglog_printf(timestamp, vap_id, "IBSS PS: Voting for low power chainmask from :%d", args[0]);
+ } else {
+ dbglog_printf(timestamp, vap_id, "IBSS PS: Voting for high power chainmask from :%d", args[0]);
+ }
+ }
+ break;
+
default:
return FALSE;
}
diff --git a/CORE/VOSS/inc/vos_api.h b/CORE/VOSS/inc/vos_api.h
index 4206daa8330e..b7ebbd1f9e12 100644
--- a/CORE/VOSS/inc/vos_api.h
+++ b/CORE/VOSS/inc/vos_api.h
@@ -331,4 +331,8 @@ v_VOID_t vos_flush_delayed_work(v_VOID_t *dwork);
v_BOOL_t vos_is_packet_log_enabled(void);
v_U64_t vos_get_monotonic_boottime(void);
+
+#ifdef FEATURE_WLAN_D0WOW
+v_VOID_t vos_pm_control(v_BOOL_t vote);
+#endif
#endif // if !defined __VOS_API_H
diff --git a/CORE/VOSS/src/vos_api.c b/CORE/VOSS/src/vos_api.c
index e66ad493435e..8965fd5838a7 100644
--- a/CORE/VOSS/src/vos_api.c
+++ b/CORE/VOSS/src/vos_api.c
@@ -2655,3 +2655,12 @@ v_U64_t vos_get_monotonic_boottime(void)
return adf_os_ticks_to_msecs(adf_os_ticks());
#endif
}
+
+#ifdef FEATURE_WLAN_D0WOW
+v_VOID_t vos_pm_control(v_BOOL_t vote)
+{
+#ifdef CONFIG_CNSS
+ cnss_wlan_pm_control(vote);
+#endif
+}
+#endif
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index 89c5503ed6af..045331a7ede9 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -1091,6 +1091,8 @@ static int reg_init_from_eeprom(hdd_context_t *pHddCtx, struct regulatory *reg,
return ret_val;
}
+ reg->cc_src = COUNTRY_CODE_SET_BY_DRIVER;
+
/* update default country code */
pnvEFSTable->halnv.tables.defaultCountryTable.countryCode[0] =
reg->alpha2[0];
@@ -3493,6 +3495,13 @@ int wlan_hdd_linux_reg_notifier(struct wiphy *wiphy,
pHddCtx->reg.alpha2[0] = request->alpha2[0];
pHddCtx->reg.alpha2[1] = request->alpha2[1];
+
+ if (NL80211_REGDOM_SET_BY_CORE == request->initiator)
+ pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_CORE;
+ else if (NL80211_REGDOM_SET_BY_DRIVER == request->initiator)
+ pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_DRIVER;
+ else pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_USER;
+
vos_update_reg_info(pHddCtx);
vos_reg_apply_world_flags(wiphy, request->initiator, &pHddCtx->reg);
@@ -3666,6 +3675,7 @@ VOS_STATUS vos_init_wiphy_from_nv_bin(void)
pnvEFSTable->halnv.tables.defaultCountryTable.countryCode[0];
pHddCtx->reg.alpha2[1] =
pnvEFSTable->halnv.tables.defaultCountryTable.countryCode[1];
+ pHddCtx->reg.cc_src = COUNTRY_CODE_SET_BY_DRIVER;
vos_update_reg_info(pHddCtx);
diff --git a/Kbuild b/Kbuild
index 0238e1d5dca6..c665cca98635 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1351,6 +1351,11 @@ ifeq ($(CONFIG_ATH_PCIE_ACCESS_DEBUG), 1)
CDEFINES += -DCONFIG_ATH_PCIE_ACCESS_DEBUG
endif
+#Flag to enable/disable WLAN D0-WOW
+ifeq ($(CONFIG_PCI_MSM), y)
+CDEFINES += -DFEATURE_WLAN_D0WOW
+endif
+
# Some kernel include files are being moved. Check to see if
# the old version of the files are present
diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini
index e96a5af61a13..67dd1cd7e4c7 100755
--- a/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/firmware_bin/WCNSS_qcom_cfg.ini
@@ -578,6 +578,8 @@ gEnableGreenAp=1
# Radar PRI multiplier
gDFSradarMappingPriMultiplier=4
+gPNOScanSupport=1
+
END
# Note: Configuration parser would not read anything past the END marker