summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPitani Venkata Rajesh Kumar <vpitan@codeaurora.org>2014-02-18 18:41:48 +0530
committerPitani Venkata Rajesh Kumar <vpitan@codeaurora.org>2014-02-18 21:34:44 +0530
commitb1dec0659b1aaa2af1001df60d263191d2d7e200 (patch)
treebe467555d6502424fe8d55926b2ca7ec1de44b39
parent9f109d1776335ad3e1f23d29828587e6c4855909 (diff)
parent58c7e5973e75a042b8fa69a88dea578475cbbbd0 (diff)
Merge remote-tracking branch 'origin/caf/caf-wlan/master'
Release 1.0.0.38 QCACLD WLAN Driver * origin/caf/caf-wlan/master: (40 commits) Cafstaging Release 1.0.0.38 qcacld: Revert changes for gerrit 608055 qcacld: Reducing log level from LOGP to LOGE in limHandleDeleteBssRsp qcacld: Fix of double free panic in wma_vdev_start_resp_handler qcacld: Fix memory leak in wlan_hdd_cfg80211_inform_bss_frame() qcacld: Fix for ping stall due to ADD_BSS timeout qcacld: Fix of double free panic caused by vdev detach event qcacld: Unregister notifier before shut down TLshim Rx thread in SSR qcacld: Update mac address using /persist/wlan_mac.bin Fix for Host does not send out TDLS discovery req qcacld: Update host-side debug headers from FW update qcacld: Fix of memory leak in limSendBeaconParams qcacld: Fix link monitor and keep alive period qcacld: Fix of kernel panic in vos_cpu_hotplug_notify qcacld: provide timing measurement info in p2p peer status indication wlan: qcacld: Fix ambiguous ioctl error logging Cafstagin Release 1.0.0.37 qcacld: fix build issue in version 36 qcacld: Post WMI_WOW_ENABLE_CMDID when host has credits qcacld: Start scan completion timer only for WDA scan requests ...
-rw-r--r--CORE/HDD/inc/qc_sap_ioctl.h4
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h14
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h4
-rw-r--r--CORE/HDD/inc/wlan_hdd_p2p.h4
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c26
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c17
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c31
-rw-r--r--CORE/HDD/src/wlan_hdd_early_suspend.c35
-rw-r--r--CORE/HDD/src/wlan_hdd_ftm.c2
-rw-r--r--CORE/HDD/src/wlan_hdd_hostapd.c245
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c46
-rw-r--r--CORE/HDD/src/wlan_hdd_oemdata.c2
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c52
-rw-r--r--CORE/HDD/src/wlan_hdd_softap_tx_rx.c3
-rw-r--r--CORE/HDD/src/wlan_hdd_wext.c38
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/inc/sirApi.h14
-rw-r--r--CORE/MAC/src/dph/dphHashTable.c46
-rw-r--r--CORE/MAC/src/include/dphGlobal.h4
-rw-r--r--CORE/MAC/src/include/parserApi.h2
-rw-r--r--CORE/MAC/src/include/sirParams.h2
-rw-r--r--CORE/MAC/src/pe/lim/limApi.c69
-rw-r--r--CORE/MAC/src/pe/lim/limP2P.c1
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c13
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c14
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c5
-rw-r--r--CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c11
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c4
-rw-r--r--CORE/MAC/src/pe/lim/limSendMessages.c1
-rw-r--r--CORE/MAC/src/pe/lim/limSendSmeRspMessages.c6
-rw-r--r--CORE/SAP/inc/sapApi.h3
-rw-r--r--CORE/SAP/src/sapFsm.c1
-rw-r--r--CORE/SERVICES/BMI/fw_one_bin.h13
-rw-r--r--CORE/SERVICES/BMI/ol_fw.c26
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_net_types.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_dma.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_mem.c2
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_mem.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_stdtypes.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_types.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/adf_os_util.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_os_atomic_pvt.h2
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_os_defer_pvt.c2
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_os_lock_pvt.c2
-rw-r--r--CORE/SERVICES/COMMON/adf/linux/adf_os_postpack_pvt.h2
-rw-r--r--CORE/SERVICES/COMMON/bmi_msg.h7
-rw-r--r--CORE/SERVICES/COMMON/dbglog_host.h2
-rw-r--r--CORE/SERVICES/COMMON/dbglog_id.h9
-rw-r--r--CORE/SERVICES/COMMON/htc_api.h4
-rw-r--r--CORE/SERVICES/COMMON/wmi_services.h2
-rw-r--r--CORE/SERVICES/COMMON/wmi_unified_api.h26
-rw-r--r--CORE/SERVICES/COMMON/wmi_version.h2
-rw-r--r--CORE/SERVICES/COMMON/wmi_version_whitelist.c2
-rw-r--r--CORE/SERVICES/HIF/PCIe/ar6320def.h2
-rw-r--r--CORE/SERVICES/HIF/PCIe/ar9888def.h2
-rw-r--r--CORE/SERVICES/HIF/PCIe/copy_engine.c2
-rw-r--r--CORE/SERVICES/HIF/PCIe/hif_pci.c35
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.c87
-rw-r--r--CORE/SERVICES/HIF/PCIe/if_pci.h2
-rw-r--r--CORE/SERVICES/HTC/htc_internal.h3
-rw-r--r--CORE/SERVICES/HTC/htc_recv.c6
-rw-r--r--CORE/SERVICES/HTC/htc_send.c18
-rw-r--r--CORE/SERVICES/HTC/htc_services.c2
-rw-r--r--CORE/SERVICES/WMA/regdomain.c2
-rw-r--r--CORE/SERVICES/WMA/wma.c1034
-rw-r--r--CORE/SERVICES/WMA/wma.h5
-rw-r--r--CORE/SERVICES/WMI/wmi_unified.c47
-rw-r--r--CORE/SERVICES/WMI/wmi_unified_priv.h2
-rw-r--r--CORE/SME/inc/csrApi.h2
-rw-r--r--CORE/SME/inc/csrLinkList.h3
-rw-r--r--CORE/SME/inc/csrNeighborRoam.h3
-rw-r--r--CORE/SME/inc/csrSupport.h3
-rw-r--r--CORE/SME/inc/oemDataApi.h3
-rw-r--r--CORE/SME/inc/oemDataInternal.h3
-rw-r--r--CORE/SME/inc/smeInternal.h2
-rw-r--r--CORE/SME/inc/sme_Api.h27
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c41
-rw-r--r--CORE/SME/src/csr/csrApiScan.c3
-rw-r--r--CORE/SME/src/csr/csrCmdProcess.c3
-rw-r--r--CORE/SME/src/csr/csrInsideApi.h3
-rw-r--r--CORE/SME/src/csr/csrLinkList.c3
-rw-r--r--CORE/SME/src/csr/csrNeighborRoam.c3
-rw-r--r--CORE/SME/src/csr/csrTdlsProcess.c3
-rw-r--r--CORE/SME/src/csr/csrUtil.c3
-rw-r--r--CORE/SME/src/oemData/oemDataApi.c3
-rw-r--r--CORE/SME/src/sme_common/sme_Api.c114
-rw-r--r--CORE/SYS/legacy/src/utils/src/parserApi.c21
-rw-r--r--CORE/UTILS/FWLOG/dbglog_host.c12
-rw-r--r--CORE/VOSS/src/vos_memory.c30
-rw-r--r--CORE/VOSS/src/vos_nvitem.c6
-rw-r--r--CORE/VOSS/src/vos_sched.c12
-rw-r--r--CORE/VOSS/src/vos_sched.h2
-rw-r--r--CORE/WDA/inc/legacy/halMsgApi.h4
-rw-r--r--CORE/WDA/inc/wlan_qct_wda.h3
-rwxr-xr-xfirmware_bin/WCNSS_qcom_cfg.ini4
-rw-r--r--tools/pktlog/pktlogconf.c2
96 files changed, 1674 insertions, 734 deletions
diff --git a/CORE/HDD/inc/qc_sap_ioctl.h b/CORE/HDD/inc/qc_sap_ioctl.h
index 5c2ea9372a20..56222c1edbfa 100644
--- a/CORE/HDD/inc/qc_sap_ioctl.h
+++ b/CORE/HDD/inc/qc_sap_ioctl.h
@@ -276,6 +276,10 @@ typedef struct
#define QCASAP_SET_VHT_RATE 45
#define QCASAP_SET_SHORT_GI 46
#define QCASAP_GET_SHORT_GI 47
+#define QCSAP_SET_11N_RATE 48
+#define QCSAP_SET_VHT_RATE 49
+#define QCSAP_SET_AMPDU 50
+#define QCSAP_SET_AMSDU 51
#endif /* QCA_WIFI_2_0 */
enum {
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index b030c4bc3eb8..88e3b16966b4 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -2211,6 +2211,18 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_ENABLE_RX_THREAD_MAX (1)
#define CFG_ENABLE_RX_THREAD_DEFAULT (1)
+/* SAR Thermal limit values for 2g and 5g */
+
+#define CFG_SET_TXPOWER_LIMIT2G_NAME "TxPower2g"
+#define CFG_SET_TXPOWER_LIMIT2G_MIN ( 0 )
+#define CFG_SET_TXPOWER_LIMIT2G_MAX ( 30 )
+#define CFG_SET_TXPOWER_LIMIT2G_DEFAULT ( 15 )
+
+#define CFG_SET_TXPOWER_LIMIT5G_NAME "TxPower5g"
+#define CFG_SET_TXPOWER_LIMIT5G_MIN ( 0 )
+#define CFG_SET_TXPOWER_LIMIT5G_MAX ( 30 )
+#define CFG_SET_TXPOWER_LIMIT5G_DEFAULT ( 15 )
+
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@@ -2667,6 +2679,8 @@ typedef struct
v_U16_t thermalTempMaxLevel2;
v_U16_t thermalTempMinLevel3;
v_U16_t thermalTempMaxLevel3;
+ v_U32_t TxPower2g;
+ v_U32_t TxPower5g;
#endif
v_U32_t gEnableDebugLog;
v_U8_t enableRxThread;
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index 0f741496f550..9dd34731fdfc 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -1143,7 +1143,9 @@ struct hdd_context_s
volatile v_BOOL_t isLogpInProgress;
- v_BOOL_t isLoadUnloadInProgress;
+ v_BOOL_t isLoadInProgress;
+
+ v_BOOL_t isUnloadInProgress;
/**Track whether driver has been suspended.*/
hdd_ps_state_t hdd_ps_state;
diff --git a/CORE/HDD/inc/wlan_hdd_p2p.h b/CORE/HDD/inc/wlan_hdd_p2p.h
index bf555da4d4b4..3f2710e0c3ee 100644
--- a/CORE/HDD/inc/wlan_hdd_p2p.h
+++ b/CORE/HDD/inc/wlan_hdd_p2p.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -39,7 +39,7 @@
#define WAIT_REM_CHAN_READY 1000
#define WAIT_CHANGE_CHANNEL_FOR_OFFCHANNEL_TX 3000
#define READY_EVENT_PROPOGATE_TIME 2
-#define ESTIMATED_ROC_DUR_REQD_FOR_ACTION_TX 50
+#define ESTIMATED_ROC_DUR_REQD_FOR_ACTION_TX 20
#define ACTION_FRAME_DEFAULT_WAIT 200
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index acc91cd0a868..e9f9757b17e6 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -620,6 +620,14 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
if(eConnectionState_Associated == pHddStaCtx->conn_info.connState)/* Associated */
{
+ if (!pCsrRoamInfo)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: STA in associated state but pCsrRoamInfo is null",
+ __func__);
+ return;
+ }
+
memcpy(wrqu.ap_addr.sa_data, pCsrRoamInfo->pBssDesc->bssId, sizeof(pCsrRoamInfo->pBssDesc->bssId));
type = WLAN_STA_ASSOC_DONE_IND;
@@ -669,7 +677,8 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
/* send peer status indication to oem app */
hdd_SendPeerStatusIndToOemApp(&peerMacAddr, ePeerConnected,
- 0, pAdapter->sessionId,
+ pCsrRoamInfo->timingMeasCap,
+ pAdapter->sessionId,
pHddStaCtx->conn_info.operationChannel);
}
#endif
@@ -704,7 +713,8 @@ static void hdd_SendAssociationEvent(struct net_device *dev,tCsrRoamInfo *pCsrRo
msg = NULL;
/*During the WLAN uninitialization,supplicant is stopped before the
driver so not sending the status of the connection to supplicant*/
- if(pHddCtx->isLoadUnloadInProgress != TRUE)
+ if ((pHddCtx->isLoadInProgress != TRUE) &&
+ (pHddCtx->isUnloadInProgress != TRUE))
{
wireless_send_event(dev, we_event, &wrqu, msg);
#ifdef FEATURE_WLAN_CCX
@@ -827,7 +837,8 @@ static eHalStatus hdd_DisConnectHandler( hdd_adapter_t *pAdapter, tCsrRoamInfo *
{
/*During the WLAN uninitialization,supplicant is stopped before the
driver so not sending the status of the connection to supplicant*/
- if(pHddCtx->isLoadUnloadInProgress != TRUE)
+ if ((pHddCtx->isLoadInProgress != TRUE) &&
+ (pHddCtx->isUnloadInProgress != TRUE))
{
hddLog(VOS_TRACE_LEVEL_INFO_HIGH,
"%s: sent disconnected event to nl80211",
@@ -2712,9 +2723,12 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
if (pHddCtx->hdd_mcastbcast_filter_set == TRUE)
{
hdd_conf_mcastbcast_filter(pHddCtx, FALSE);
- pHddCtx->configuredMcastBcastFilter =
- pHddCtx->sus_res_mcastbcast_filter;
- pHddCtx->sus_res_mcastbcast_filter_valid = VOS_FALSE;
+
+ if (VOS_TRUE == pHddCtx->sus_res_mcastbcast_filter_valid) {
+ pHddCtx->configuredMcastBcastFilter =
+ pHddCtx->sus_res_mcastbcast_filter;
+ pHddCtx->sus_res_mcastbcast_filter_valid = VOS_FALSE;
+ }
hddLog(VOS_TRACE_LEVEL_INFO,
"offload: disassociation happening, restoring configuredMcastBcastFilter");
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index ee4ec3e5d0bf..819deb123dc0 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -3078,6 +3078,20 @@ REG_VARIABLE( CFG_SAP_MAX_NO_PEERS, WLAN_PARAM_Integer,
CFG_THERMAL_TEMP_MAX_LEVEL3_DEFAULT,
CFG_THERMAL_TEMP_MAX_LEVEL3_MIN,
CFG_THERMAL_TEMP_MAX_LEVEL3_MAX ),
+
+ REG_VARIABLE( CFG_SET_TXPOWER_LIMIT2G_NAME , WLAN_PARAM_Integer,
+ hdd_config_t, TxPower2g,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_TXPOWER_LIMIT2G_DEFAULT,
+ CFG_SET_TXPOWER_LIMIT2G_MIN,
+ CFG_SET_TXPOWER_LIMIT2G_MAX ),
+
+ REG_VARIABLE( CFG_SET_TXPOWER_LIMIT5G_NAME , WLAN_PARAM_Integer,
+ hdd_config_t, TxPower5g,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_SET_TXPOWER_LIMIT5G_DEFAULT,
+ CFG_SET_TXPOWER_LIMIT5G_MIN,
+ CFG_SET_TXPOWER_LIMIT5G_MAX ),
#endif /*#ifndef QCA_WIFI_ISOC*/
REG_VARIABLE( CFG_ENABLE_DEBUG_CONNECT_ISSUE, WLAN_PARAM_Integer,
hdd_config_t, gEnableDebugLog,
@@ -5154,6 +5168,9 @@ VOS_STATUS hdd_set_sme_config( hdd_context_t *pHddCtx )
smeConfig.pnoOffload = pHddCtx->cfg_ini->PnoOffload;
#endif
+ /* Update maximum interfaces information */
+ smeConfig.max_intf_count = pHddCtx->max_intf_count;
+
smeConfig.fEnableDebugLog = pHddCtx->cfg_ini->gEnableDebugLog;
halStatus = sme_UpdateConfig( pHddCtx->hHal, &smeConfig);
if ( !HAL_STATUS_SUCCESS( halStatus ) )
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 8da0c0bc3df9..761d1fb23942 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -4397,8 +4397,7 @@ wlan_hdd_cfg80211_inform_bss_frame( hdd_adapter_t *pAdapter,
((ie_length != 0) ? (const char *)&bss_desc->ieFields: NULL);
unsigned int freq;
struct ieee80211_channel *chan;
- struct ieee80211_mgmt *mgmt =
- kzalloc((sizeof (struct ieee80211_mgmt) + ie_length), GFP_KERNEL);
+ struct ieee80211_mgmt *mgmt;
struct cfg80211_bss *bss_status = NULL;
size_t frame_len = sizeof (struct ieee80211_mgmt) + ie_length;
int rssi = 0;
@@ -4412,16 +4411,6 @@ wlan_hdd_cfg80211_inform_bss_frame( hdd_adapter_t *pAdapter,
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
status = wlan_hdd_validate_context(pHddCtx);
-
- /*bss_update is not allowed during wlan driver loading or unloading*/
- if (pHddCtx->isLoadUnloadInProgress)
- {
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
- "%s:Loading_unloading in Progress. Ignore!!!",__func__);
- return NULL;
- }
-
-
if (0 != status)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
@@ -4429,7 +4418,16 @@ wlan_hdd_cfg80211_inform_bss_frame( hdd_adapter_t *pAdapter,
return NULL;
}
+ /*bss_update is not allowed during wlan driver loading or unloading*/
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s:Loading_unloading in Progress. Ignore!!!",__func__);
+ return NULL;
+ }
+ mgmt = kzalloc((sizeof (struct ieee80211_mgmt) + ie_length), GFP_KERNEL);
if (!mgmt)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
@@ -4609,7 +4607,8 @@ static int wlan_hdd_cfg80211_update_bss( struct wiphy *wiphy,
/*bss_update is not allowed during wlan driver loading or unloading*/
- if (pHddCtx->isLoadUnloadInProgress)
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s:Loading_unloading in Progress. Ignore!!!",__func__);
@@ -8647,7 +8646,8 @@ static int wlan_hdd_cfg80211_sched_scan_stop(struct wiphy *wiphy,
return ret;
}
- if (pHddCtx->isLoadUnloadInProgress)
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Unloading/Loading in Progress. Ignore!!!", __func__);
@@ -9806,7 +9806,8 @@ int wlan_hdd_cfg80211_resume_wlan(struct wiphy *wiphy)
return 0;
}
- if (pHddCtx->isLoadUnloadInProgress)
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Unloading/Loading in Progress. Ignore!!!", __func__);
diff --git a/CORE/HDD/src/wlan_hdd_early_suspend.c b/CORE/HDD/src/wlan_hdd_early_suspend.c
index 294c975e47ce..a85eb1129b8c 100644
--- a/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -966,9 +966,11 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter)
hdd_conf_hostoffload(pAdapter, FALSE);
pHddCtx->hdd_mcastbcast_filter_set = FALSE;
- pHddCtx->configuredMcastBcastFilter =
- pHddCtx->sus_res_mcastbcast_filter;
- pHddCtx->sus_res_mcastbcast_filter_valid = VOS_FALSE;
+ if (VOS_TRUE == pHddCtx->sus_res_mcastbcast_filter_valid) {
+ pHddCtx->configuredMcastBcastFilter =
+ pHddCtx->sus_res_mcastbcast_filter;
+ pHddCtx->sus_res_mcastbcast_filter_valid = VOS_FALSE;
+ }
hddLog(VOS_TRACE_LEVEL_INFO,
"offload: in hdd_conf_resume_ind, restoring configuredMcastBcastFilter");
@@ -1529,7 +1531,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
complete(&vosSchedContext->ResumeMcEvent);
pHddCtx->isMcThreadSuspended= FALSE;
}
-#ifdef QCA_WIFI_ISOC
if(TRUE == pHddCtx->isTxThreadSuspended){
complete(&vosSchedContext->ResumeTxEvent);
pHddCtx->isTxThreadSuspended= FALSE;
@@ -1538,7 +1539,6 @@ VOS_STATUS hdd_wlan_shutdown(void)
complete(&vosSchedContext->ResumeRxEvent);
pHddCtx->isRxThreadSuspended= FALSE;
}
-#endif
/* Reset the Suspend Variable */
pHddCtx->isWlanSuspended = FALSE;
@@ -1553,7 +1553,7 @@ VOS_STATUS hdd_wlan_shutdown(void)
set_bit(MC_POST_EVENT_MASK, &vosSchedContext->mcEventFlag);
wake_up_interruptible(&vosSchedContext->mcWaitQueue);
wait_for_completion(&vosSchedContext->McShutdown);
-#ifdef QCA_WIFI_ISOC
+
/* Wait for TX to exit */
hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Shutting down TX thread",__func__);
set_bit(TX_SHUTDOWN_EVENT_MASK, &vosSchedContext->txEventFlag);
@@ -1567,14 +1567,19 @@ VOS_STATUS hdd_wlan_shutdown(void)
set_bit(RX_POST_EVENT_MASK, &vosSchedContext->rxEventFlag);
wake_up_interruptible(&vosSchedContext->rxWaitQueue);
wait_for_completion(&vosSchedContext->RxShutdown);
-#endif
#ifdef QCA_CONFIG_SMP
+ /* Wait for TLshim RX to exit */
+ hddLog(VOS_TRACE_LEVEL_FATAL, "%s: Shutting down TLshim RX thread",
+ __func__);
+ unregister_hotcpu_notifier(vosSchedContext->cpuHotPlugNotifier);
set_bit(RX_SHUTDOWN_EVENT_MASK, &vosSchedContext->tlshimRxEvtFlg);
set_bit(RX_POST_EVENT_MASK, &vosSchedContext->tlshimRxEvtFlg);
wake_up_interruptible(&vosSchedContext->tlshimRxWaitQueue);
- wait_for_completion_interruptible(&vosSchedContext->TlshimRxShutdown);
+ wait_for_completion(&vosSchedContext->TlshimRxShutdown);
+ vosSchedContext->TlshimRxThread = NULL;
vos_drop_rxpkt_by_staid(vosSchedContext, WLAN_MAX_STA_COUNT);
+ vos_free_tlshim_pkt_freeq(vosSchedContext);
#endif
#ifdef WLAN_BTAMP_FEATURE
@@ -1623,23 +1628,17 @@ VOS_STATUS hdd_wlan_shutdown(void)
#endif
hdd_unregister_mcast_bcast_filter(pHddCtx);
+
hddLog(VOS_TRACE_LEVEL_INFO, "%s: Flush Queues",__func__);
- /* Clean up message queues of TX and MC thread */
+ /* Clean up message queues of TX, RX and MC thread */
vos_sched_flush_mc_mqs(vosSchedContext);
-#ifdef QCA_WIFI_ISOC
vos_sched_flush_tx_mqs(vosSchedContext);
vos_sched_flush_rx_mqs(vosSchedContext);
-#endif
- /* Deinit all the TX and MC queues */
+ /* Deinit all the TX, RX and MC queues */
vos_sched_deinit_mqs(vosSchedContext);
-#ifdef QCA_CONFIG_SMP
- vosSchedContext->TlshimRxThread = NULL;
- vos_free_tlshim_pkt_freeq(vosSchedContext);
- unregister_hotcpu_notifier(&vosSchedContext->cpuHotPlugNotifier);
-#endif
- hddLog(VOS_TRACE_LEVEL_INFO, "%s: Doing VOS Shutdown",__func__);
+ hddLog(VOS_TRACE_LEVEL_INFO, "%s: Doing VOS Shutdown",__func__);
/* shutdown VOSS */
vos_shutdown(pVosContext);
diff --git a/CORE/HDD/src/wlan_hdd_ftm.c b/CORE/HDD/src/wlan_hdd_ftm.c
index f4025f3e3f37..7b4a9135f91f 100644
--- a/CORE/HDD/src/wlan_hdd_ftm.c
+++ b/CORE/HDD/src/wlan_hdd_ftm.c
@@ -4825,7 +4825,7 @@ static int iw_ftm_get_char_setnone(struct net_device *dev, struct iw_request_inf
}
default:
{
- hddLog(LOGE, "Invalid IOCTL command %d \n", sub_cmd );
+ hddLog(LOGE, "%s: Invalid IOCTL command %d", __func__, sub_cmd );
break;
}
}
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
index 2f03453046f4..7718849b8be0 100644
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
@@ -100,6 +100,11 @@ extern int process_wma_set_command(int sessid, int paramid,
*/
#define WE_SAP_MAX_STA_INFO 0x7FF
+#define RC_2_RATE_IDX(_rc) ((_rc) & 0x7)
+#define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1)
+#define RC_2_RATE_IDX_11AC(_rc) ((_rc) & 0xf)
+#define HT_RC_2_STREAMS_11AC(_rc) ((((_rc) & 0x30) >> 4) + 1)
+
#define SAP_24GHZ_CH_COUNT (14)
/*---------------------------------------------------------------------------
@@ -471,6 +476,13 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
struct iw_michaelmicfailure msg;
dev = (struct net_device *)usrDataForCallback;
+ if (!dev)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: usrDataForCallback is null", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
+
pHostapdAdapter = netdev_priv(dev);
if ((NULL == pHostapdAdapter) ||
@@ -483,6 +495,14 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
pHostapdState = WLAN_HDD_GET_HOSTAP_STATE_PTR(pHostapdAdapter);
pHddApCtx = WLAN_HDD_GET_AP_CTX_PTR(pHostapdAdapter);
+
+ if (!pSapEvent)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: pSapEvent is null", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
+
sapEvent = pSapEvent->sapHddEventCode;
memset(&wrqu, '\0', sizeof(wrqu));
pHddCtx = (hdd_context_t*)(pHostapdAdapter->pHddCtx);
@@ -728,7 +748,8 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
/* send peer status indication to oem app */
hdd_SendPeerStatusIndToOemApp(
&pSapEvent->sapevt.sapStationAssocReassocCompleteEvent.staMac,
- ePeerConnected, 0,
+ ePeerConnected,
+ pSapEvent->sapevt.sapStationAssocReassocCompleteEvent.timingMeasCap,
pHostapdAdapter->sessionId, pHddApCtx->operatingChannel);
}
#endif
@@ -1292,98 +1313,6 @@ static iw_softap_setparam(struct net_device *dev,
break;
}
#endif
- case QCASAP_SET_TXRX_FWSTATS:
- {
- hddLog(LOG1, "WE_SET_TXRX_FWSTATS val %d", set_value);
- ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
- (int)WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID,
- set_value, VDEV_CMD);
- break;
- }
- case QCASAP_TXRX_FWSTATS_RESET:
- {
- hddLog(LOG1, "WE_TXRX_FWSTATS_RESET val %d", set_value);
- ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
- (int)WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
- set_value, VDEV_CMD);
- break;
- }
- case QCSAP_PARAM_SETRTSCTS:
- {
- ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
- (int)WMI_VDEV_PARAM_ENABLE_RTSCTS,
- set_value, VDEV_CMD);
- if (!ret) {
- if (ccmCfgSetInt(hHal, WNI_CFG_RTS_THRESHOLD, (tANI_U32)value,
- ccmCfgSetCallback, eANI_BOOLEAN_TRUE) !=
- eHAL_STATUS_SUCCESS) {
-
- hddLog(LOGE, "FAILED TO SET RTSCTS at SAP");
- ret = -EIO;
- break;
- }
- }
- break;
- }
- case QCASAP_SET_11N_RATE:
- {
- u_int8_t preamble, nss, rix;
- hddLog(LOG1, "WMI_VDEV_PARAM_FIXED_RATE val %d", set_value);
-
- rix = RC_2_RATE_IDX(set_value);
- if (set_value & 0x80) {
- preamble = WMI_RATE_PREAMBLE_HT;
- nss = HT_RC_2_STREAMS(set_value) -1;
- } else {
- nss = 0;
- rix = RC_2_RATE_IDX(set_value);
- if (set_value & 0x10) {
- preamble = WMI_RATE_PREAMBLE_CCK;
- rix |= 0x4; /* Enable Short preamble always for CCK */
- } else
- preamble = WMI_RATE_PREAMBLE_OFDM;
- }
-
- hddLog(LOG1, "WMI_VDEV_PARAM_FIXED_RATE val %d rix %d preamble %x\
- nss %d", set_value, rix, preamble, nss);
-
- set_value = (preamble << 6) | (nss << 4) | rix;
- ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
- (int)WMI_VDEV_PARAM_FIXED_RATE,
- set_value, VDEV_CMD);
- break;
- }
-
- case QCASAP_SET_VHT_RATE:
- {
- u_int8_t preamble, nss, rix;
-
- rix = RC_2_RATE_IDX_11AC(set_value);
- preamble = WMI_RATE_PREAMBLE_VHT;
- nss = HT_RC_2_STREAMS_11AC(set_value) -1;
-
- hddLog(LOG1, "WMI_VDEV_PARAM_FIXED_RATE val %d rix %d preamble %x\
- nss %d", set_value, rix, preamble, nss);
-
- set_value = (preamble << 6) | (nss << 4) | rix;
- ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
- (int)WMI_VDEV_PARAM_FIXED_RATE,
- set_value, VDEV_CMD);
- break;
- }
-
- case QCASAP_SET_SHORT_GI:
- {
- hddLog(LOG1, "QCASAP_SET_SHORT_GI val %d", set_value);
-
- ret = sme_UpdateHTConfig(hHal, pHostapdAdapter->sessionId,
- WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ, /* same as 40MHZ */
- set_value);
- if (ret)
- hddLog(LOGE, "Failed to set ShortGI value ret(%d)", ret);
- break;
- }
-
case QCSAP_PARAM_SET_MCC_CHANNEL_LATENCY:
{
tVOS_CONCURRENCY_MODE concurrent_state = 0;
@@ -1557,6 +1486,119 @@ static iw_softap_setparam(struct net_device *dev,
break;
}
+ case QCASAP_SET_TXRX_FWSTATS:
+ {
+ hddLog(LOG1, "WE_SET_TXRX_FWSTATS val %d", set_value);
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)WMA_VDEV_TXRX_FWSTATS_ENABLE_CMDID,
+ set_value, VDEV_CMD);
+ break;
+ }
+ case QCASAP_TXRX_FWSTATS_RESET:
+ {
+ hddLog(LOG1, "WE_TXRX_FWSTATS_RESET val %d", set_value);
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
+ set_value, VDEV_CMD);
+ break;
+ }
+
+ case QCSAP_PARAM_SETRTSCTS:
+ {
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)WMI_VDEV_PARAM_ENABLE_RTSCTS,
+ set_value, VDEV_CMD);
+ if (!ret) {
+ if (ccmCfgSetInt(hHal, WNI_CFG_RTS_THRESHOLD, (tANI_U32)value,
+ ccmCfgSetCallback, eANI_BOOLEAN_TRUE) !=
+ eHAL_STATUS_SUCCESS) {
+
+ hddLog(LOGE, "FAILED TO SET RTSCTS at SAP");
+ ret = -EIO;
+ break;
+ }
+ }
+ break;
+ }
+ case QCASAP_SET_11N_RATE:
+ {
+ u_int8_t preamble, nss, rix;
+ hddLog(LOG1, "SAP WE_SET_11N_RATE val %d", set_value);
+
+ rix = RC_2_RATE_IDX(set_value);
+ if (set_value & 0x80) {
+ preamble = WMI_RATE_PREAMBLE_HT;
+ nss = HT_RC_2_STREAMS(set_value) -1;
+ } else {
+ nss = 0;
+ rix = RC_2_RATE_IDX(set_value);
+ if (set_value & 0x10) {
+ preamble = WMI_RATE_PREAMBLE_CCK;
+ if (rix != 0x3)
+ /* Enable Short preamble always for CCK except 1mbps*/
+ rix |= 0x4;
+ } else
+ preamble = WMI_RATE_PREAMBLE_OFDM;
+ }
+
+ hddLog(LOG1, "SAP WMI_VDEV_PARAM_FIXED_RATE val %d rix %d "
+ "preamble %x nss %d", set_value, rix, preamble, nss);
+
+ set_value = (preamble << 6) | (nss << 4) | rix;
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)WMI_VDEV_PARAM_FIXED_RATE,
+ set_value, VDEV_CMD);
+ break;
+ }
+ case QCASAP_SET_VHT_RATE:
+ {
+ u_int8_t preamble, nss, rix;
+ hddLog(LOG1, "SAP WE_SET_11AC_RATE val %d", set_value);
+
+ rix = RC_2_RATE_IDX_11AC(set_value);
+ preamble = WMI_RATE_PREAMBLE_VHT;
+ nss = HT_RC_2_STREAMS_11AC(set_value) -1;
+
+ hddLog(LOG1, "SAP WMI_VDEV_PARAM_FIXED_RATE val %d rix %d "
+ "preamble %x nss %d", set_value, rix, preamble, nss);
+
+ set_value = (preamble << 6) | (nss << 4) | rix;
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)WMI_VDEV_PARAM_FIXED_RATE,
+ set_value, VDEV_CMD);
+ break;
+ }
+
+ case QCASAP_SET_SHORT_GI:
+ {
+ hddLog(LOG1, "QCASAP_SET_SHORT_GI val %d", set_value);
+
+ ret = sme_UpdateHTConfig(hHal, pHostapdAdapter->sessionId,
+ WNI_CFG_HT_CAP_INFO_SHORT_GI_20MHZ, /* same as 40MHZ */
+ set_value);
+ if (ret)
+ hddLog(LOGE, "Failed to set ShortGI value ret(%d)", ret);
+ break;
+ }
+
+ case QCSAP_SET_AMPDU:
+ {
+ hddLog(LOG1, "QCSAP_SET_AMPDU val %d", set_value);
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)GEN_VDEV_PARAM_AMPDU,
+ set_value, GEN_CMD);
+ break;
+ }
+
+ case QCSAP_SET_AMSDU:
+ {
+ hddLog(LOG1, "QCSAP_SET_AMSDU val %d", set_value);
+ ret = process_wma_set_command((int)pHostapdAdapter->sessionId,
+ (int)GEN_VDEV_PARAM_AMSDU,
+ set_value, GEN_CMD);
+ break;
+ }
+
#endif /* QCA_WIFI_2_0 */
default:
hddLog(LOGE, FL("Invalid setparam command %d value %d"),
@@ -1782,6 +1824,7 @@ static iw_softap_set_tx_power(struct net_device *dev,
int *value = (int *)extra;
int set_value;
ptSapContext pSapCtx = NULL;
+ tSirMacAddr bssid;
if (NULL == value)
return -ENOMEM;
@@ -1793,9 +1836,13 @@ static iw_softap_set_tx_power(struct net_device *dev,
"%s: Invalid SAP pointer from pvosGCtx", __func__);
return VOS_STATUS_E_FAULT;
}
+ vos_mem_copy(bssid, pHostapdAdapter->macAddressCurrent.bytes,
+ VOS_MAC_ADDR_SIZE);
set_value = value[0];
- if (eHAL_STATUS_SUCCESS != sme_SetTxPower(hHal, pSapCtx->sessionId, set_value))
+ if (eHAL_STATUS_SUCCESS != sme_SetTxPower(hHal, pSapCtx->sessionId, bssid,
+ pHostapdAdapter->device_mode,
+ set_value))
{
hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Setting tx power failed",
__func__);
@@ -3582,6 +3629,16 @@ static const struct iw_priv_args hostapd_private_args[] = {
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
"get_short_gi" },
+ { QCSAP_SET_AMPDU,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "ampdu" },
+
+ { QCSAP_SET_AMSDU,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "amsdu" },
+
#endif /* QCA_WIFI_2_0 */
{ QCSAP_IOCTL_GETPARAM,
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index a95f46f63069..5b31fcf92864 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -492,7 +492,8 @@ int wlan_hdd_validate_context(hdd_context_t *pHddCtx)
return -EAGAIN;
}
- if (pHddCtx->isLoadUnloadInProgress)
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s: Unloading/Loading in Progress. Ignore!!!", __func__);
@@ -8631,7 +8632,8 @@ void __hdd_wlan_exit(void)
msleep(1000);
}
- pHddCtx->isLoadUnloadInProgress = TRUE;
+ pHddCtx->isUnloadInProgress = TRUE;
+
vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE);
//Do all the cleanup before deregistering the driver
@@ -9013,6 +9015,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
#endif
#ifndef QCA_WIFI_ISOC
tSmeThermalParams thermalParam;
+ tSirTxPowerLimit *hddtxlimit;
#endif
ENTER();
@@ -9034,7 +9037,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
pHddCtx->wiphy = wiphy;
hdd_prevent_suspend();
- pHddCtx->isLoadUnloadInProgress = TRUE;
+ pHddCtx->isLoadInProgress = TRUE;
vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE);
@@ -9119,13 +9122,6 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
goto err_config;
}
- if ( VOS_STATUS_SUCCESS != hdd_update_mac_config( pHddCtx ) )
- {
- hddLog(VOS_TRACE_LEVEL_WARN,
- "%s: can't update mac config, using MAC from ini file",
- __func__);
- }
-
pHddCtx->current_intf_count=0;
pHddCtx->max_intf_count = WLAN_MAX_INTERFACES;
@@ -9403,6 +9399,14 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
}
#endif //WLAN_AUTOGEN_MACADDR_FEATURE && QCA_WIFI_ISOC
}
+
+ if ( VOS_STATUS_SUCCESS != hdd_update_mac_config( pHddCtx ) )
+ {
+ hddLog(VOS_TRACE_LEVEL_WARN,
+ "%s: can't update mac config, using MAC from ini file",
+ __func__);
+ }
+
{
eHalStatus halStatus;
// Set the MAC Address
@@ -9735,7 +9739,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
mutex_init(&pHddCtx->sap_lock);
- pHddCtx->isLoadUnloadInProgress = FALSE;
+ pHddCtx->isLoadInProgress = FALSE;
#ifdef WLAN_FEATURE_HOLD_RX_WAKELOCK
/* Initialize the wake lcok */
@@ -9804,6 +9808,24 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
hddLog(VOS_TRACE_LEVEL_ERROR,
"%s: Error while initializing thermal information", __func__);
}
+
+ /* SAR power limit */
+ hddtxlimit = vos_mem_malloc(sizeof(tSirTxPowerLimit));
+ if (!hddtxlimit)
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: Memory allocation for TxPowerLimit "
+ "failed!", __func__);
+ goto err_nl_srv;
+ }
+ hddtxlimit->txPower2g = pHddCtx->cfg_ini->TxPower2g;
+ hddtxlimit->txPower5g = pHddCtx->cfg_ini->TxPower5g;
+
+ if (eHAL_STATUS_SUCCESS != sme_TxpowerLimit(pHddCtx->hHal,hddtxlimit))
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: Error setting txlimit in sme", __func__);
+ }
#endif /*#ifndef QCA_WIFI_ISOC*/
#if defined(QCA_WIFI_2_0) && !defined(QCA_WIFI_ISOC)
complete(&wlan_start_comp);
@@ -10170,7 +10192,7 @@ static void hdd_driver_exit(void)
}
}
- pHddCtx->isLoadUnloadInProgress = TRUE;
+ pHddCtx->isUnloadInProgress = TRUE;
vos_set_load_unload_in_progress(VOS_MODULE_ID_VOSS, TRUE);
}
diff --git a/CORE/HDD/src/wlan_hdd_oemdata.c b/CORE/HDD/src/wlan_hdd_oemdata.c
index 7db99f205a92..089307978239 100644
--- a/CORE/HDD/src/wlan_hdd_oemdata.c
+++ b/CORE/HDD/src/wlan_hdd_oemdata.c
@@ -780,7 +780,7 @@ void hdd_SendPeerStatusIndToOemApp(v_MACADDR_t *peerMac,
/* check if oem app has registered and pid is valid */
if ((!pHddCtx->oem_app_registered) || (pHddCtx->oem_pid == 0))
{
- VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO_HIGH,
"%s: OEM app is not registered(%d) or pid is invalid(%d)",
__func__, pHddCtx->oem_app_registered, pHddCtx->oem_pid);
return;
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index 06c57d071324..d664c00cbf45 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -322,7 +322,8 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
* wlan driver is keep on receiving the remain on channel command
* and which is resulting in crash. So not allowing any remain on
* channel requets when Load/Unload is in progress*/
- if (((hdd_context_t*)pAdapter->pHddCtx)->isLoadUnloadInProgress)
+ if (((hdd_context_t*)pAdapter->pHddCtx)->isLoadInProgress ||
+ ((hdd_context_t*)pAdapter->pHddCtx)->isUnloadInProgress)
{
hddLog( LOGE,
"%s: Wlan Load/Unload is in progress", __func__);
@@ -351,6 +352,7 @@ static int wlan_hdd_request_remain_on_channel( struct wiphy *wiphy,
pRemainChanCtx->chan_type = channel_type;
#endif
pRemainChanCtx->duration = duration;
+ pRemainChanCtx->p2pRemOnChanTimeStamp = vos_timer_get_system_time();
pRemainChanCtx->dev = dev;
*cookie = (uintptr_t) pRemainChanCtx;
pRemainChanCtx->cookie = *cookie;
@@ -616,6 +618,7 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
hdd_adapter_t *goAdapter;
#endif
+ u64 old_cookie = 0;
status = wlan_hdd_validate_context(pHddCtx);
@@ -743,7 +746,6 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev,
if( offchan && wait)
{
int status;
- tANI_U32 current_time = vos_timer_get_system_time();
// In case of P2P Client mode if we are already
// on the same channel then send the frame directly
@@ -760,27 +762,39 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev,
cfgState->remain_on_chan_ctx &&
cfgState->current_freq == chan->center_freq ) {
+ tANI_U32 current_time = vos_timer_get_system_time();
+
// In case of P2P Client mode if we are already
// on the same channel then send the frame directly only if
// there is enough remain on channel time left.
- // If remain on channel time is about to expire in next 50ms then
- // dont send frame without a fresh remain on channel as this may
- // cause a race condition with lim remain_on_channel_timer which
- // might expire by the time the action frame reaches lim layer.
-
- // Check remaining time of RoC only in case of GO NEG CNF.
-
+ // If remain on channel time is about to expire in next 20ms
+ // then dont send frame without a fresh remain on channel as this
+ // may cause a race condition with lim remain_on_channel_timer
+ // which might expire by the time the action frame reaches lim
+ // layer.
+ // For Rome check remaining time of RoC only in case of GO NEG CNF.
+ // For other RSPs always extend
actionFrmType = buf[WLAN_HDD_PUBLIC_ACTION_FRAME_TYPE_OFFSET];
- if ((actionFrmType != WLAN_HDD_GO_NEG_CNF) ||
- ((current_time - cfgState->remain_on_chan_ctx->p2pRemOnChanTimeStamp) >
- (cfgState->remain_on_chan_ctx->duration
- - ESTIMATED_ROC_DUR_REQD_FOR_ACTION_TX )))
+ if (
+#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
+ (actionFrmType != WLAN_HDD_GO_NEG_CNF) ||
+#endif
+ ((int)(cfgState->remain_on_chan_ctx->duration -
+ (current_time -
+ cfgState->remain_on_chan_ctx->p2pRemOnChanTimeStamp)) <
+ ESTIMATED_ROC_DUR_REQD_FOR_ACTION_TX))
{
- hddLog(LOG1,"action frame: Extending the RoC\n");
+ hddLog(LOG1,"action frame: Extending the RoC");
+ old_cookie = cfgState->remain_on_chan_ctx->cookie;
+ pAdapter->internalCancelRemainOnChReq = VOS_TRUE;
status = wlan_hdd_check_remain_on_channel(pAdapter);
- if ( !status )
- pAdapter->internalCancelRemainOnChReq = VOS_TRUE;
+ pAdapter->internalCancelRemainOnChReq = VOS_FALSE;
+ if ( status )
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Failed to cancel the existing RoC");
+ }
}
}
@@ -788,7 +802,7 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev,
(cfgState->current_freq == chan->center_freq)
)
{
- hddLog(LOG1,"action frame: extending the wait time\n");
+ hddLog(LOG1,"action frame: extending the wait time");
extendedWait = (tANI_U16)wait;
goto send_frame;
}
@@ -803,6 +817,10 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev,
wait, cookie,
OFF_CHANNEL_ACTION_TX);
+ // Assign the preserved cookie value here to appear as
+ // same RoC to supplicant
+ if (old_cookie)
+ cfgState->remain_on_chan_ctx->cookie = old_cookie;
if(0 != status)
{
if( (-EBUSY == status) &&
diff --git a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
index 5b2952b80d3e..e43da5bebedf 100644
--- a/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_softap_tx_rx.c
@@ -1911,7 +1911,8 @@ VOS_STATUS hdd_softap_stop_bss( hdd_adapter_t *pAdapter)
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
/*bss deregister is not allowed during wlan driver loading or unloading*/
- if (pHddCtx->isLoadUnloadInProgress)
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
{
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"%s:Loading_unloading in Progress. Ignore!!!",__func__);
diff --git a/CORE/HDD/src/wlan_hdd_wext.c b/CORE/HDD/src/wlan_hdd_wext.c
index d8b63fb506a9..477695fca630 100644
--- a/CORE/HDD/src/wlan_hdd_wext.c
+++ b/CORE/HDD/src/wlan_hdd_wext.c
@@ -223,6 +223,10 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { {2412, 1}, {2417, 2},
/* Private IOCTL for debug connection issues */
#define WE_SET_DEBUG_LOG 72
#define WE_SET_SCAN_BAND_PREFERENCE 73
+#ifdef WE_SET_TX_POWER
+#undef WE_SET_TX_POWER
+#endif
+#define WE_SET_TX_POWER 74
/* Private ioctls and their sub-ioctls */
#define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1)
@@ -4383,6 +4387,7 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
+ hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
hdd_wext_state_t *pWextState = WLAN_HDD_GET_WEXT_STATE_PTR(pAdapter);
tSmeConfigParams smeConfig;
int *value = (int *)extra;
@@ -4647,6 +4652,21 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
}
break;
}
+ case WE_SET_TX_POWER:
+ {
+ tSirMacAddr bssid;
+
+ vos_mem_copy(bssid, pHddStaCtx->conn_info.bssId, VOS_MAC_ADDR_SIZE);
+ if ( sme_SetTxPower(hHal, pAdapter->sessionId, bssid,
+ pAdapter->device_mode, set_value) !=
+ eHAL_STATUS_SUCCESS )
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: Setting tx power failed",
+ __func__);
+ return -EIO;
+ }
+ break;
+ }
case WE_SET_MAX_TX_POWER:
{
tSirMacAddr bssid;
@@ -4654,9 +4674,9 @@ static int iw_setint_getnone(struct net_device *dev, struct iw_request_info *inf
hddLog(VOS_TRACE_LEVEL_INFO, "%s: Setting maximum tx power %d dBm",
__func__, set_value);
- vos_mem_copy(bssid, pAdapter->macAddressCurrent.bytes,
+ vos_mem_copy(bssid, pHddStaCtx->conn_info.bssId,
VOS_MAC_ADDR_SIZE);
- vos_mem_copy(selfMac, pAdapter->macAddressCurrent.bytes,
+ vos_mem_copy(selfMac, pHddStaCtx->conn_info.bssId,
VOS_MAC_ADDR_SIZE);
if( sme_SetMaxTxPower(hHal, bssid, selfMac, set_value) !=
@@ -6378,7 +6398,7 @@ int iw_set_three_ints_getnone(struct net_device *dev, struct iw_request_info *in
default:
{
- hddLog(LOGE, "Invalid IOCTL command %d", sub_cmd);
+ hddLog(LOGE, "%s: Invalid IOCTL command %d", __func__, sub_cmd );
break;
}
}
@@ -6886,7 +6906,7 @@ static int iw_get_char_setnone(struct net_device *dev, struct iw_request_info *i
#endif
default:
{
- hddLog(LOGE, "Invalid IOCTL command %d", sub_cmd);
+ hddLog(LOGE, "%s: Invalid IOCTL command %d", __func__, sub_cmd );
break;
}
}
@@ -7271,7 +7291,8 @@ int iw_set_var_ints_getnone(struct net_device *dev, struct iw_request_info *info
#endif
default:
{
- hddLog(LOGE, "Invalid IOCTL command %d", sub_cmd );
+ hddLog(LOGE, "%s: Invalid IOCTL command %d",
+ __func__, sub_cmd );
}
break;
}
@@ -9417,7 +9438,7 @@ int iw_set_two_ints_getnone(struct net_device *dev, struct iw_request_info *info
default:
{
- hddLog(LOGE, "Invalid IOCTL command %d", sub_cmd);
+ hddLog(LOGE, "%s: Invalid IOCTL command %d", __func__, sub_cmd );
break;
}
}
@@ -9585,6 +9606,11 @@ static const struct iw_priv_args we_private_args[] = {
0,
"setMaxTxPower" },
+ { WE_SET_TX_POWER,
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
+ 0,
+ "setTxPower" },
+
{ WE_SET_MAX_TX_POWER_2_4,
IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,
0,
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index b95b30d6172e..e3eb58a3cd44 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 35
+#define QWLAN_VERSION_BUILD 38
-#define QWLAN_VERSIONSTR "1.0.0.35"
+#define QWLAN_VERSIONSTR "1.0.0.38"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 19a7a98205c6..006cb3438ecc 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -1132,6 +1132,9 @@ typedef struct sSirSmeJoinRsp
/*Broadcast DPU signature*/
tANI_U8 bcastSig;
+ /*Timing measurement capability*/
+ tANI_U8 timingMeasCap;
+
tANI_U8 frames[ 1 ];
} tSirSmeJoinRsp, *tpSirSmeJoinRsp;
@@ -1186,6 +1189,9 @@ typedef struct sSirSmeAssocInd
tANI_U8* beaconPtr;
tANI_U32 assocReqLength;
tANI_U8* assocReqPtr;
+
+ /* Timing measurement capability */
+ tANI_U8 timingMeasCap;
} tSirSmeAssocInd, *tpSirSmeAssocInd;
@@ -4849,4 +4855,12 @@ typedef struct{
u_int8_t thermalMgmtEnabled;
u_int32_t throttlePeriod;
} t_thermal_mgmt, *tp_thermal_mgmt;
+
+typedef struct sSirTxPowerLimit
+{
+ /* Thermal limits for 2g and 5g */
+ u_int32_t txPower2g;
+ u_int32_t txPower5g;
+} tSirTxPowerLimit;
+
#endif /* __SIR_API_H */
diff --git a/CORE/MAC/src/dph/dphHashTable.c b/CORE/MAC/src/dph/dphHashTable.c
index 8cfddfa9fd01..53d91c3ab3a6 100644
--- a/CORE/MAC/src/dph/dphHashTable.c
+++ b/CORE/MAC/src/dph/dphHashTable.c
@@ -67,12 +67,20 @@ void dphHashTableClassInit(tpAniSirGlobal pMac, dphHashTableClass* pDphHashTable
{
tANI_U16 i;
- for (i=0; i<pDphHashTable->size; i++)
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ for (i=0; i <= pDphHashTable->size; i++)
+#else
+ for (i=0; i < pDphHashTable->size; i++)
+#endif
{
pDphHashTable->pHashTable[i] = 0;
}
- for (i=0; i<pDphHashTable->size; i++)
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ for (i=0; i <= pDphHashTable->size; i++)
+#else
+ for (i=0; i < pDphHashTable->size; i++)
+#endif
{
pDphHashTable->pDphNodeArray[i].valid = 0;
pDphHashTable->pDphNodeArray[i].added = 0;
@@ -165,7 +173,11 @@ tpDphHashNode dphLookupHashEntry(tpAniSirGlobal pMac, tANI_U8 staAddr[], tANI_U1
tpDphHashNode dphGetHashEntry(tpAniSirGlobal pMac, tANI_U16 peerIdx, dphHashTableClass* pDphHashTable)
{
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ if (peerIdx <= pDphHashTable->size)
+#else
if (peerIdx < pDphHashTable->size)
+#endif
{
if (pDphHashTable->pDphNodeArray[peerIdx].added)
return &pDphHashTable->pDphNodeArray[peerIdx];
@@ -207,7 +219,11 @@ tpDphHashNode dphLookupAssocId(tpAniSirGlobal pMac, tANI_U16 staIdx, tANI_U16*
{
tANI_U8 i;
- for(i=0; i<pDphHashTable->size; i++)
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ for (i=0; i <= pDphHashTable->size; i++)
+#else
+ for (i=0; i < pDphHashTable->size; i++)
+#endif
{
if( (pDphHashTable->pDphNodeArray[i].added) &&
(pDphHashTable->pDphNodeArray[i].staIndex == staIdx))
@@ -217,7 +233,11 @@ tpDphHashNode dphLookupAssocId(tpAniSirGlobal pMac, tANI_U16 staIdx, tANI_U16*
}
}
- if(i==pDphHashTable->size)
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ if (i == pDphHashTable->size+1)
+#else
+ if (i == pDphHashTable->size)
+#endif
return NULL;
return &pDphHashTable->pDphNodeArray[i];
@@ -246,7 +266,11 @@ tpDphHashNode dphInitStaState(tpAniSirGlobal pMac, tSirMacAddr staAddr,
tpDphHashNode pStaDs;
tANI_U16 staIdx = HAL_STA_INVALID_IDX;
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ if (assocId > pDphHashTable->size)
+#else
if (assocId >= pDphHashTable->size)
+#endif
{
PELOGE(limLog(pMac, LOGE, FL("Invalid Assoc Id %d"), assocId);)
return NULL;
@@ -316,7 +340,17 @@ tpDphHashNode dphAddHashEntry(tpAniSirGlobal pMac, tSirMacAddr staAddr, tANI_U16
assocId, index);
dphPrintMacAddr(pMac, staAddr, LOG1);)
+ /* In station role, DPH_STA_HASH_INDEX_PEER (index 1) is reserved for peer
+ * station index corresponding to AP.Avoid choosing that index and get
+ * index starting from (DPH_STA_HASH_INDEX_PEER + 1) (index 2) for TDLS
+ * stations; as a result the peer index or associd can be equal to
+ * pDphHashTable->size so for TDLS+CLD modifying the condition
+ */
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ if (assocId > pDphHashTable->size)
+#else
if (assocId >= pDphHashTable->size)
+#endif
{
PELOGE(limLog(pMac, LOGE, FL("invalid STA id %d"), assocId);)
return NULL;
@@ -393,7 +427,11 @@ tSirRetStatus dphDeleteHashEntry(tpAniSirGlobal pMac, tSirMacAddr staAddr, tANI_
assocId, index);
dphPrintMacAddr(pMac, staAddr, LOG1);)
+#if defined(FEATURE_WLAN_TDLS) && defined(QCA_WIFI_2_0)
+ if (assocId > pDphHashTable->size)
+#else
if (assocId >= pDphHashTable->size)
+#endif
{
PELOGE(limLog(pMac, LOGE, FL("invalid STA id %d"), assocId);)
return eSIR_FAILURE;
diff --git a/CORE/MAC/src/include/dphGlobal.h b/CORE/MAC/src/include/dphGlobal.h
index 01ca272b27f9..1363cd0789c6 100644
--- a/CORE/MAC/src/include/dphGlobal.h
+++ b/CORE/MAC/src/include/dphGlobal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 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.
*
@@ -611,6 +611,8 @@ typedef struct sDphHashNode
tANI_U32 vht_caps;
#endif
+ tANI_U8 timingMeasCap;
+
/* When a station with already an existing dph entry tries to
* associate again, the old dph entry will be zeroed out except
diff --git a/CORE/MAC/src/include/parserApi.h b/CORE/MAC/src/include/parserApi.h
index 3116198ad413..ddaa1e62fd60 100644
--- a/CORE/MAC/src/include/parserApi.h
+++ b/CORE/MAC/src/include/parserApi.h
@@ -212,6 +212,7 @@ typedef struct sSirAssocReq
tDot11fIEVHTCaps VHTCaps;
tDot11fIEOperatingMode operMode;
#endif
+ tDot11fIEExtCap ExtCap;
} tSirAssocReq, *tpSirAssocReq;
@@ -263,6 +264,7 @@ typedef struct sSirAssocRsp
tDot11fIEVHTCaps VHTCaps;
tDot11fIEVHTOperation VHTOperation;
#endif
+ tDot11fIEExtCap ExtCap;
} tSirAssocRsp, *tpSirAssocRsp;
#if defined(FEATURE_WLAN_CCX_UPLOAD)
diff --git a/CORE/MAC/src/include/sirParams.h b/CORE/MAC/src/include/sirParams.h
index c641ccb02395..41a8a34de5b1 100644
--- a/CORE/MAC/src/include/sirParams.h
+++ b/CORE/MAC/src/include/sirParams.h
@@ -648,6 +648,8 @@ typedef struct sSirMbMsgP2p
#define SIR_HAL_SET_PLM_REQ (SIR_HAL_ITC_MSG_TYPES_BEGIN + 250)
#endif
+#define SIR_HAL_SET_TX_POWER_LIMIT (SIR_HAL_ITC_MSG_TYPES_BEGIN + 251)
+
#define SIR_HAL_MSG_TYPES_END (SIR_HAL_MSG_TYPES_BEGIN + 0x1FF)
// CFG message types
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index a619fe08663c..785fe1c61bef 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 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.
*
@@ -20,7 +20,7 @@
*/
/*
- * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
+ * Copyright (c) 2011-2014 Qualcomm Atheros, Inc.
* All Rights Reserved.
* Qualcomm Atheros Confidential and Proprietary.
*
@@ -1651,6 +1651,52 @@ limUpdateOverlapStaParam(tpAniSirGlobal pMac, tSirMacAddr bssId, tpLimProtStaPar
/**
+ * limIbssEncTypeMatched
+ *
+ *FUNCTION:
+ * This function compares the encryption type of the peer with self
+ * while operating in IBSS mode and detects mismatch.
+ *
+ *LOGIC:
+ *
+ *ASSUMPTIONS:
+ *
+ *NOTE:
+ *
+ * @param pBeacon - Parsed Beacon Frame structure
+ * @param pSession - Pointer to the PE session
+ *
+ * @return eSIR_TRUE if encryption type is matched; eSIR_FALSE otherwise
+ */
+static tAniBool limIbssEncTypeMatched(tpSchBeaconStruct pBeacon,
+ tpPESession pSession)
+{
+ if (!pBeacon || !pSession)
+ return eSIR_FALSE;
+
+ /* Open case */
+ if (pBeacon->capabilityInfo.privacy == 0
+ && pSession->encryptType == eSIR_ED_NONE)
+ return eSIR_TRUE;
+
+ /* WEP case */
+ if (pBeacon->capabilityInfo.privacy == 1 && pBeacon->wpaPresent == 0
+ && pBeacon->rsnPresent == 0
+ && (pSession->encryptType == eSIR_ED_WEP40
+ || pSession->encryptType == eSIR_ED_WEP104))
+ return eSIR_TRUE;
+
+ /* WPA-None case */
+ if (pBeacon->capabilityInfo.privacy == 1 && pBeacon->wpaPresent == 1
+ && pBeacon->rsnPresent == 0
+ && pSession->encryptType == eSIR_ED_CCMP)
+ return eSIR_TRUE;
+
+ return eSIR_FALSE;
+}
+
+
+/**
* limHandleIBSScoalescing()
*
*FUNCTION:
@@ -1680,11 +1726,27 @@ limHandleIBSScoalescing(
tSirRetStatus retCode;
pHdr = WDA_GET_RX_MAC_HEADER(pRxPacketInfo);
+
+ /* Ignore the beacon when any of the conditions below is met:
+ 1. The beacon claims no IBSS network
+ 2. SSID in the beacon does not match SSID of self station
+ 3. Operational channel in the beacon does not match self station
+ 4. Encyption type in the beacon does not match with self station
+ */
if ( (!pBeacon->capabilityInfo.ibss) ||
(limCmpSSid(pMac, &pBeacon->ssId,psessionEntry) != true) ||
(psessionEntry->currentOperChannel != pBeacon->channelNumber) )
- /* Received SSID does not match => Ignore received Beacon frame. */
retCode = eSIR_LIM_IGNORE_BEACON;
+ else if (limIbssEncTypeMatched(pBeacon, psessionEntry) != eSIR_TRUE)
+ {
+ PELOG3(limLog(pMac, LOG3,
+ FL("peer privacy %d peer wpa %d peer rsn %d self encType %d"),
+ pBeacon->capabilityInfo.privacy,
+ pBeacon->wpaPresent,
+ pBeacon->rsnPresent,
+ psessionEntry->encryptType);)
+ retCode = eSIR_LIM_IGNORE_BEACON;
+ }
else
{
tANI_U32 ieLen;
@@ -1700,7 +1762,6 @@ limHandleIBSScoalescing(
} /*** end limHandleIBSScoalescing() ***/
-
/**
* limDetectChangeInApCapabilities()
*
diff --git a/CORE/MAC/src/pe/lim/limP2P.c b/CORE/MAC/src/pe/lim/limP2P.c
index f2ff5be0b223..36b1e1fa1eaa 100644
--- a/CORE/MAC/src/pe/lim/limP2P.c
+++ b/CORE/MAC/src/pe/lim/limP2P.c
@@ -1221,6 +1221,7 @@ tSirRetStatus __limProcessSmeNoAUpdate(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
pMsgNoA->count = pNoA->count;
pMsgNoA->single_noa_duration = pNoA->single_noa_duration;
pMsgNoA->psSelection = pNoA->psSelection;
+ pMsgNoA->sessionId = pNoA->sessionid;
msg.type = WDA_SET_P2P_GO_NOA_REQ;
msg.reserved = 0;
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
index 0ab79eb60e03..708a648ae4ba 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocReqFrame.c
@@ -1228,6 +1228,19 @@ if (limPopulateMatchingRateSet(pMac,
pStaDs->rmfEnabled = (pmfConnection) ? 1 : 0;
#endif
+ if (pAssocReq->ExtCap.present)
+ {
+ pStaDs->timingMeasCap = pAssocReq->ExtCap.timingMeas;
+ PELOG1(limLog(pMac, LOG1,
+ FL("ExtCap present, timingMeas: %d"),
+ pAssocReq->ExtCap.timingMeas);)
+ }
+ else
+ {
+ pStaDs->timingMeasCap = 0;
+ PELOG1(limLog(pMac, LOG1, FL("ExtCap not present"));)
+ }
+
// BTAMP: Storing the parsed assoc request in the psessionEntry array
psessionEntry->parsedAssocReq[pStaDs->assocId] = pAssocReq;
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index 930de96fafd5..8b15570b38ab 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 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.
*
@@ -841,6 +841,18 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub
limDiagEventReport(pMac, WLAN_PE_DIAG_CONNECTED, psessionEntry, 0, 0);
#endif
+ if (pAssocRsp->ExtCap.present)
+ {
+ pStaDs->timingMeasCap = pAssocRsp->ExtCap.timingMeas;
+ PELOG1(limLog(pMac, LOG1,
+ FL("ExtCap present, timingMeas: %d"),
+ pAssocRsp->ExtCap.timingMeas);)
+ }
+ else
+ {
+ pStaDs->timingMeasCap = 0;
+ PELOG1(limLog(pMac, LOG1, FL("ExtCap not present"));)
+ }
//Update the BSS Entry, this entry was added during preassoc.
if( eSIR_SUCCESS == limStaSendAddBss( pMac, pAssocRsp, pBeaconStruct,
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
index dda44b5bb513..dbaff4401a64 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmReqMessages.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 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.
*
@@ -3462,6 +3462,9 @@ tpPESession psessionEntry;
// Fall thru' & 'Plumb' keys below
break;
case eLIM_STA_IN_IBSS_ROLE:
+ // update the IBSS PE session encrption type based on the key type
+ psessionEntry->encryptType = pMlmSetKeysReq->edType;
+ break;
default: // others
// Fall thru...
break;
diff --git a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
index 4cff521738f2..518a33c53632 100644
--- a/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessMlmRspMessages.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -1205,7 +1205,8 @@ limProcessMlmAssocInd(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
return;
}
pSirSmeAssocInd->staId = pStaDs->staIndex;
- pSirSmeAssocInd->reassocReq = pStaDs->mlmStaContext.subType;
+ pSirSmeAssocInd->reassocReq = pStaDs->mlmStaContext.subType;
+ pSirSmeAssocInd->timingMeasCap = pStaDs->timingMeasCap;
MTRACE(macTraceMsgTx(pMac, psessionEntry->peSessionId, msgQ.type));
#ifdef FEATURE_WLAN_DIAG_SUPPORT_LIM //FEATURE_WLAN_DIAG_SUPPORT
limDiagEventReport(pMac, WLAN_PE_DIAG_ASSOC_IND_EVENT, psessionEntry, 0, 0);
@@ -2959,7 +2960,11 @@ limProcessStaMlmAddBssRsp( tpAniSirGlobal pMac, tpSirMsgQ limMsgQ,tpPESession ps
limProcessStaMlmAddBssRspPreAssoc(pMac, limMsgQ, psessionEntry);
goto end;
}
- if( eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE == psessionEntry->limMlmState )
+ if (eLIM_MLM_WT_ADD_BSS_RSP_REASSOC_STATE == psessionEntry->limMlmState
+#if defined(WLAN_FEATURE_VOWIFI_11R) || defined(FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
+ || (eLIM_MLM_WT_ADD_BSS_RSP_FT_REASSOC_STATE == psessionEntry->limMlmState)
+#endif
+ )
{
mesgType = LIM_MLM_REASSOC_CNF;
subType = LIM_REASSOC;
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 05054620396d..1e452624360e 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -689,6 +689,10 @@ __limHandleSmeStartBssRequest(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
psessionEntry->shortSlotTimeSupported =
limGetShortSlotFromPhyMode(pMac, psessionEntry,
psessionEntry->gLimPhyMode);
+
+ // initialize to "OPEN". will be updated upon key installation
+ psessionEntry->encryptType = eSIR_ED_NONE;
+
break;
case eSIR_BTAMP_AP_MODE:
diff --git a/CORE/MAC/src/pe/lim/limSendMessages.c b/CORE/MAC/src/pe/lim/limSendMessages.c
index 25b22136528e..b7e086a9738f 100644
--- a/CORE/MAC/src/pe/lim/limSendMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendMessages.c
@@ -175,6 +175,7 @@ tSirRetStatus limSendBeaconParams(tpAniSirGlobal pMac,
pUpdatedBcnParams->paramChangeBitmap);)
if(NULL == psessionEntry)
{
+ vos_mem_free(pBcnParams);
MTRACE(macTraceMsgTx(pMac, NO_SESSION, msgQ.type));
return eSIR_FAILURE;
}
diff --git a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
index 6737ac995632..acbf1b4419c3 100644
--- a/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
+++ b/CORE/MAC/src/pe/lim/limSendSmeRspMessages.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -304,6 +304,7 @@ limSendSmeJoinReassocRsp(tpAniSirGlobal pMac, tANI_U16 msgType,
pSirSmeJoinRsp->staId = pStaDs->staIndex;
pSirSmeJoinRsp->ucastSig = pStaDs->ucUcastSig;
pSirSmeJoinRsp->bcastSig = pStaDs->ucBcastSig;
+ pSirSmeJoinRsp->timingMeasCap = pStaDs->timingMeasCap;
}
}
@@ -2781,7 +2782,8 @@ void limHandleDeleteBssRsp(tpAniSirGlobal pMac,tpSirMsgQ MsgQ)
if((psessionEntry = peFindSessionBySessionId(pMac,pDelBss->sessionId))==NULL)
{
vos_mem_free(pDelBss);
- limLog(pMac, LOGP,FL("Session Does not exist for given sessionID"));
+ limLog(pMac, LOGE,FL("Session Does not exist for given sessionID %d"),
+ pDelBss->sessionId);
return;
}
if (psessionEntry->limSystemRole == eLIM_STA_IN_IBSS_ROLE)
diff --git a/CORE/SAP/inc/sapApi.h b/CORE/SAP/inc/sapApi.h
index 27891666dc60..f8dcb3e98821 100644
--- a/CORE/SAP/inc/sapApi.h
+++ b/CORE/SAP/inc/sapApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -277,6 +277,7 @@ typedef struct sap_StationAssocReassocCompleteEvent_s {
tANI_U8* assocReqPtr;
tANI_U32 assocRespLength;
tANI_U8* assocRespPtr;
+ tANI_U8 timingMeasCap;
} tSap_StationAssocReassocCompleteEvent;
typedef struct sap_StationDisassocCompleteEvent_s {
diff --git a/CORE/SAP/src/sapFsm.c b/CORE/SAP/src/sapFsm.c
index d00bfb83becc..df880b1fb56d 100644
--- a/CORE/SAP/src/sapFsm.c
+++ b/CORE/SAP/src/sapFsm.c
@@ -720,6 +720,7 @@ sapSignalHDDevent
sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.wmmEnabled = pCsrRoamInfo->wmmEnabledSta;
sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.status = (eSapStatus )context;
+ sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.timingMeasCap = pCsrRoamInfo->timingMeasCap;
//TODO: Need to fill sapAuthType
//sapApAppEvent.sapevt.sapStationAssocReassocCompleteEvent.SapAuthType = pCsrRoamInfo->pProfile->negotiatedAuthType;
break;
diff --git a/CORE/SERVICES/BMI/fw_one_bin.h b/CORE/SERVICES/BMI/fw_one_bin.h
index 14c4cc3c88d6..4f7c40cb2242 100644
--- a/CORE/SERVICES/BMI/fw_one_bin.h
+++ b/CORE/SERVICES/BMI/fw_one_bin.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -41,8 +41,10 @@
#define ONE_BIN_FORMAT_VER (ONE_BIN_FORMAT_MAJOR << 16 | ONE_BIN_FORMAT_MINOR)
/* CHIP ID */
-#define AR6320_1_0_CHIP_ID 0x50000000
-#define AR6320_1_1_CHIP_ID 0x50000001
+#define AR6320_1_0_CHIP_ID 0x5000000
+#define AR6320_1_1_CHIP_ID 0x5000001
+#define AR6320_1_3_CHIP_ID 0x5000003
+#define AR6320_2_0_CHIP_ID 0x5010000
/* WLAN BINARY_ID */
#define WLAN_SETUP_BIN_ID 0x01
@@ -59,8 +61,9 @@
#define UTF_GROUP_ID 0x40000000
/* ACTION */
-#define ACTION_DOWNLOAD 0x1 /* download only */
-#define ACTION_DOWNLOAD_EXEC 0x3 /* download binary and send BMI to execute */
+#define ACTION_PARSE_SIG 0x80000000 /* parse signature */
+#define ACTION_DOWNLOAD 0x1 /* download only */
+#define ACTION_DOWNLOAD_EXEC 0x3 /* download binary and execute */
/* Binary Meta Header */
typedef struct {
diff --git a/CORE/SERVICES/BMI/ol_fw.c b/CORE/SERVICES/BMI/ol_fw.c
index 26e2ed4f154c..74508100550b 100644
--- a/CORE/SERVICES/BMI/ol_fw.c
+++ b/CORE/SERVICES/BMI/ol_fw.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -173,18 +173,10 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,
binary_len = one_bin_header->binary_len;
next_tag_offset = one_bin_header->next_tag_off;
- switch (one_bin_header->chip_id)
- {
- default:
- fw_sign = FALSE;
- break;
- case AR6320_1_0_CHIP_ID:
- fw_sign = FALSE;
- break;
- case AR6320_1_1_CHIP_ID:
+ if (one_bin_header->action & ACTION_PARSE_SIG)
fw_sign = TRUE;
- break;
- }
+ else
+ fw_sign = FALSE;
if (fw_sign)
{
@@ -198,8 +190,8 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,
status = A_ERROR;
goto exit;
}
- sign_header = (SIGN_HEADER_T *)(u_int8_t *)fw_entry_data
- + binary_offset;
+ sign_header = (SIGN_HEADER_T *)((u_int8_t *)fw_entry_data
+ + binary_offset);
status = BMISignStreamStart(scn->hif_hdl, address,
(u_int8_t *)fw_entry_data
@@ -251,7 +243,8 @@ static int ol_transfer_single_bin_file(struct ol_softc *scn,
}
}
- if (one_bin_header->action == ACTION_DOWNLOAD_EXEC)
+ if ((one_bin_header->action & ACTION_DOWNLOAD_EXEC) \
+ == ACTION_DOWNLOAD_EXEC)
{
param = 0;
BMIExecute(scn->hif_hdl, address, &param, scn);
@@ -541,17 +534,20 @@ int ol_copy_ramdump(struct ol_softc *scn)
printk("No RAM dump will be collected since failed to get "
"memory address or size!\n");
ret = -EACCES;
+ goto out;
}
ramdump_base = ioremap(address, size);
if (!ramdump_base) {
printk("No RAM dump will be collected since ramdump_base is NULL!\n");
ret = -EACCES;
+ goto out;
}
ret = ol_target_coredump(scn, ramdump_base, TOTAL_DUMP_SIZE);
iounmap(ramdump_base);
+out:
return ret;
}
diff --git a/CORE/SERVICES/COMMON/adf/adf_net_types.h b/CORE/SERVICES/COMMON/adf/adf_net_types.h
index a667049efe56..544e266cc3d6 100644
--- a/CORE/SERVICES/COMMON/adf/adf_net_types.h
+++ b/CORE/SERVICES/COMMON/adf/adf_net_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_dma.h b/CORE/SERVICES/COMMON/adf/adf_os_dma.h
index 387f15f4126b..4f961ac6e39f 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_dma.h
+++ b/CORE/SERVICES/COMMON/adf/adf_os_dma.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_mem.c b/CORE/SERVICES/COMMON/adf/adf_os_mem.c
index e0305bf02c81..e28d099db847 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_mem.c
+++ b/CORE/SERVICES/COMMON/adf/adf_os_mem.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_mem.h b/CORE/SERVICES/COMMON/adf/adf_os_mem.h
index e40e5ba76f6a..215e1b6e5de0 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_mem.h
+++ b/CORE/SERVICES/COMMON/adf/adf_os_mem.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_stdtypes.h b/CORE/SERVICES/COMMON/adf/adf_os_stdtypes.h
index 1958a5a76138..237a5f22458e 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_stdtypes.h
+++ b/CORE/SERVICES/COMMON/adf/adf_os_stdtypes.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_types.h b/CORE/SERVICES/COMMON/adf/adf_os_types.h
index 7a1404d0101f..bcdfe1a1dbde 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_types.h
+++ b/CORE/SERVICES/COMMON/adf/adf_os_types.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/adf_os_util.h b/CORE/SERVICES/COMMON/adf/adf_os_util.h
index 2f338da3e4b0..97b63ab6a6f8 100644
--- a/CORE/SERVICES/COMMON/adf/adf_os_util.h
+++ b/CORE/SERVICES/COMMON/adf/adf_os_util.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_os_atomic_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_os_atomic_pvt.h
index 81a54267c010..4b4c8ff544e2 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_os_atomic_pvt.h
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_os_atomic_pvt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_os_defer_pvt.c b/CORE/SERVICES/COMMON/adf/linux/adf_os_defer_pvt.c
index 33ab80054307..64ae8e3fc456 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_os_defer_pvt.c
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_os_defer_pvt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_os_lock_pvt.c b/CORE/SERVICES/COMMON/adf/linux/adf_os_lock_pvt.c
index 76c0d0de64ec..c24684f1c196 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_os_lock_pvt.c
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_os_lock_pvt.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/adf/linux/adf_os_postpack_pvt.h b/CORE/SERVICES/COMMON/adf/linux/adf_os_postpack_pvt.h
index 34925e8affc2..a3be6354aca2 100644
--- a/CORE/SERVICES/COMMON/adf/linux/adf_os_postpack_pvt.h
+++ b/CORE/SERVICES/COMMON/adf/linux/adf_os_postpack_pvt.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/bmi_msg.h b/CORE/SERVICES/COMMON/bmi_msg.h
index f675af1d37bd..4ea4ae49e33a 100644
--- a/CORE/SERVICES/COMMON/bmi_msg.h
+++ b/CORE/SERVICES/COMMON/bmi_msg.h
@@ -257,9 +257,14 @@ PREPACK struct bmi_target_info {
#define TARGET_TYPE_AR9888 7
#define TARGET_TYPE_AR6320 8
#define TARGET_TYPE_AR900B 9
-#define TARGET_TYPE_AR6320V2 10
/* For attach Peregrine 2.0 board target_reg_tbl only */
#define TARGET_TYPE_AR9888V2 10
+/* For attach Rome1.0 target_reg_tbl only*/
+#define TARGET_TYPE_AR6320V1 11
+/* For Rome2.0/2.1 target_reg_tbl ID*/
+#define TARGET_TYPE_AR6320V2 12
+/* For Rome3.0 target_reg_tbl ID*/
+#define TARGET_TYPE_AR6320V3 13
#define BMI_ROMPATCH_INSTALL 9
/*
diff --git a/CORE/SERVICES/COMMON/dbglog_host.h b/CORE/SERVICES/COMMON/dbglog_host.h
index ba51e878a629..719bd1bf2325 100644
--- a/CORE/SERVICES/COMMON/dbglog_host.h
+++ b/CORE/SERVICES/COMMON/dbglog_host.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/COMMON/dbglog_id.h b/CORE/SERVICES/COMMON/dbglog_id.h
index 28f2effbf6cb..73a9dd5e989d 100644
--- a/CORE/SERVICES/COMMON/dbglog_id.h
+++ b/CORE/SERVICES/COMMON/dbglog_id.h
@@ -664,7 +664,8 @@ extern "C" {
#define WAL_DBGID_BRSSI_CONFIG 56
#define WAL_DBGID_CURRENT_BRSSI_AVE 57
#define WAL_DBGID_BCN_TX_COMP 58
-#define WAL_DBGID_DEFINITION_END 59
+#define WAL_DBGID_RX_REENTRY 59
+#define WAL_DBGID_DEFINITION_END 60
#define ANI_DBGID_POLL 0
#define ANI_DBGID_CONTROL 1
@@ -941,8 +942,10 @@ extern "C" {
#define WLAN_HB_DBGID_DEFINITION_END 15
/* Thermal Manager DBGIDs*/
-#define THERMAL_MGR_NEW_THRESH 0
-#define THERMAL_MGR_THRESH_CROSSED 1
+#define THERMAL_MGR_DBGID_DEFINITION_START 0
+#define THERMAL_MGR_NEW_THRESH 1
+#define THERMAL_MGR_THRESH_CROSSED 2
+#define THERMAL_MGR_DBGID_DEFINITION_END 3
/* WLAN PHYERR DFS(parse/filter) DBGIDs */
#define WLAN_PHYERR_DFS_DBGID_DEFINITION_START 0
diff --git a/CORE/SERVICES/COMMON/htc_api.h b/CORE/SERVICES/COMMON/htc_api.h
index c102dcb74524..c7e22096b5f6 100644
--- a/CORE/SERVICES/COMMON/htc_api.h
+++ b/CORE/SERVICES/COMMON/htc_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -683,7 +683,7 @@ struct s_htc_msg{
void *pContext;
};
#endif
-
+void HTCGetHostCredits(HTC_HANDLE HTCHandle, int *credit);
void *htc_get_targetdef(HTC_HANDLE htc_handle);
void HTCSetTargetToSleep(void *context);
void HTCCancelDeferredTargetSleep(void *context);
diff --git a/CORE/SERVICES/COMMON/wmi_services.h b/CORE/SERVICES/COMMON/wmi_services.h
index 2ccd47ed033a..ffa6b38eede9 100644
--- a/CORE/SERVICES/COMMON/wmi_services.h
+++ b/CORE/SERVICES/COMMON/wmi_services.h
@@ -99,7 +99,7 @@ typedef enum {
WMI_SERVICE_BCN_TXRATE_OVERRIDE, /* Will support the bcn/prb rsp rate override */
WMI_SERVICE_NAN, /* Neighbor Awareness Network */
WMI_SERVICE_L1SS_STAT, /* L1SS statistics counter report */
- WMI_MAX_SERVICE=64 /* max service */
+ WMI_MAX_SERVICE=128 /* max service */
} WMI_SERVICE;
#define WMI_SERVICE_BM_SIZE ((WMI_MAX_SERVICE + sizeof(A_UINT32)- 1)/sizeof(A_UINT32))
diff --git a/CORE/SERVICES/COMMON/wmi_unified_api.h b/CORE/SERVICES/COMMON/wmi_unified_api.h
index 809273323b95..5f5599d48315 100644
--- a/CORE/SERVICES/COMMON/wmi_unified_api.h
+++ b/CORE/SERVICES/COMMON/wmi_unified_api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -110,4 +110,28 @@ wmi_unified_unregister_event_handler(wmi_unified_t wmi_handle, WMI_EVT_ID event_
*/
int
wmi_unified_connect_htc_service(struct wmi_unified * wmi_handle, void *htc_handle);
+
+/*
+ * WMI API to verify the host has enough credits to suspend
+*/
+
+int
+wmi_is_suspend_ready(wmi_unified_t wmi_handle);
+
+/**
+ WMI API to get updated host_credits
+*/
+
+int
+wmi_get_host_credits(wmi_unified_t wmi_handle);
+
+/**
+ WMI API to get WMI Pending Commands in the HTC queue
+*/
+
+int
+wmi_get_pending_cmds(wmi_unified_t wmi_handle);
+
+
+
#endif /* _WMI_UNIFIED_API_H_ */
diff --git a/CORE/SERVICES/COMMON/wmi_version.h b/CORE/SERVICES/COMMON/wmi_version.h
index 55446bd96c06..82da71e89ca9 100644
--- a/CORE/SERVICES/COMMON/wmi_version.h
+++ b/CORE/SERVICES/COMMON/wmi_version.h
@@ -36,7 +36,7 @@
#define __WMI_VER_MINOR_ 0
/** WMI revision number has to be incremented when there is a
* change that may or may not break compatibility. */
-#define __WMI_REVISION_ 34
+#define __WMI_REVISION_ 35
/** The Version Namespace should not be normally changed. Only
* host and firmware of the same WMI namespace will work
diff --git a/CORE/SERVICES/COMMON/wmi_version_whitelist.c b/CORE/SERVICES/COMMON/wmi_version_whitelist.c
index fd07f68debbf..00fa8e23ea5e 100644
--- a/CORE/SERVICES/COMMON/wmi_version_whitelist.c
+++ b/CORE/SERVICES/COMMON/wmi_version_whitelist.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/HIF/PCIe/ar6320def.h b/CORE/SERVICES/HIF/PCIe/ar6320def.h
index e644920448bc..06a4bfaa0c37 100644
--- a/CORE/SERVICES/HIF/PCIe/ar6320def.h
+++ b/CORE/SERVICES/HIF/PCIe/ar6320def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . 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.
*
diff --git a/CORE/SERVICES/HIF/PCIe/ar9888def.h b/CORE/SERVICES/HIF/PCIe/ar9888def.h
index 72a22d26732d..b26b1b74f528 100644
--- a/CORE/SERVICES/HIF/PCIe/ar9888def.h
+++ b/CORE/SERVICES/HIF/PCIe/ar9888def.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/HIF/PCIe/copy_engine.c b/CORE/SERVICES/HIF/PCIe/copy_engine.c
index 55071bd40679..39d95f6f08c0 100644
--- a/CORE/SERVICES/HIF/PCIe/copy_engine.c
+++ b/CORE/SERVICES/HIF/PCIe/copy_engine.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/HIF/PCIe/hif_pci.c b/CORE/SERVICES/HIF/PCIe/hif_pci.c
index 8551790af7d8..bc0a20c1e58d 100644
--- a/CORE/SERVICES/HIF/PCIe/hif_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/hif_pci.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -2377,7 +2377,7 @@ HIFTargetSleepStateAdjust(A_target_id_t targid,
adf_os_spin_unlock_irqrestore(&hif_state->keep_awake_lock);
if (wait_for_it && !hif_state->verified_awake) {
-#define PCIE_WAKE_TIMEOUT 5000 /* 5Ms */
+#define PCIE_WAKE_TIMEOUT 8000 /* 8Ms */
int tot_delay = 0;
int curr_delay = 5;
@@ -2392,9 +2392,34 @@ HIFTargetSleepStateAdjust(A_target_id_t targid,
//ASSERT(tot_delay <= PCIE_WAKE_TIMEOUT);
if (tot_delay > PCIE_WAKE_TIMEOUT)
{
- printk("%s: keep_awake_count %d PCIE_SOC_WAKE_ADDRESS = %x\n",__func__,
- hif_state->keep_awake_count,
- A_PCI_READ32(pci_addr + PCIE_LOCAL_BASE_ADDRESS + PCIE_SOC_WAKE_ADDRESS));
+ u_int16_t val;
+ u_int32_t bar;
+
+ printk("%s: keep_awake_count = %d\n", __func__,
+ hif_state->keep_awake_count);
+
+ pci_read_config_word(sc->pdev, PCI_VENDOR_ID, &val);
+ printk("%s: PCI Vendor ID = 0x%04x\n", __func__, val);
+
+ pci_read_config_word(sc->pdev, PCI_DEVICE_ID, &val);
+ printk("%s: PCI Device ID = 0x%04x\n", __func__, val);
+
+ pci_read_config_word(sc->pdev, PCI_COMMAND, &val);
+ printk("%s: PCI Command = 0x%04x\n", __func__, val);
+
+ pci_read_config_word(sc->pdev, PCI_STATUS, &val);
+ printk("%s: PCI Status = 0x%04x\n", __func__, val);
+
+ pci_read_config_dword(sc->pdev, PCI_BASE_ADDRESS_0, &bar);
+ printk("%s: PCI BAR 0 = 0x%08x\n", __func__, bar);
+
+ printk("%s: PCIE_SOC_WAKE_ADDRESS = 0x%08x," \
+ " RTC_STATE_ADDRESS = 0x%08x\n", __func__,
+ A_PCI_READ32(pci_addr + PCIE_LOCAL_BASE_ADDRESS
+ + PCIE_SOC_WAKE_ADDRESS),
+ A_PCI_READ32(pci_addr + PCIE_LOCAL_BASE_ADDRESS
+ + RTC_STATE_ADDRESS));
+
VOS_BUG(0);
}
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.c b/CORE/SERVICES/HIF/PCIe/if_pci.c
index bbe206bd6c09..41bd55c655fa 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.c
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -613,27 +613,32 @@ again:
ret = -EIO;
goto err_region;
}
-
+#ifdef CONFIG_ARM_LPAE
+ /* if CONFIG_ARM_LPAE is enabled, we have to set 64 bits mask
+ * for 32 bits device also. */
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
- if (!ret) {
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
-
- if (ret) {
- printk(KERN_ERR "ath: Cannot enable 64-bit consistent DMA\n");
- goto err_dma;
- }
- } else {
- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
-
- if (!ret) {
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
- if (ret) {
- printk(KERN_ERR "ath: Cannot enable 32-bit consistent DMA\n");
- goto err_dma;
- }
- }
+ if (ret) {
+ printk(KERN_ERR "ath: Cannot enable 64-bit pci DMA\n");
+ goto err_dma;
}
-
+ ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+ if (ret) {
+ printk(KERN_ERR "ath: Cannot enable 64-bit consistent DMA\n");
+ goto err_dma;
+ }
+#else
+ ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+ if (ret) {
+ printk(KERN_ERR "ath: Cannot enable 32-bit pci DMA\n");
+ goto err_dma;
+ }
+ ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
+ if (ret) {
+ printk(KERN_ERR "%s: Cannot enable 32-bit consistent DMA!\n",
+ __func__);
+ goto err_dma;
+ }
+#endif
/* Set bus master bit in PCI_COMMAND to enable DMA */
pci_set_master(pdev);
@@ -913,26 +918,32 @@ again:
goto err_region;
}
+#ifdef CONFIG_ARM_LPAE
+ /* if CONFIG_ARM_LPAE is enabled, we have to set 64 bits mask
+ * for 32 bits device also. */
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
- if (!ret) {
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
-
- if (ret) {
- printk(KERN_ERR "%s: Cannot enable 64-bit consistent DMA!\n",
- __func__);
- goto err_dma;
- }
- } else {
- ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
- if (!ret) {
- ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
- if (ret) {
- printk(KERN_ERR "%s: Cannot enable 32-bit consistent DMA!\n",
- __func__);
- goto err_dma;
- }
- }
+ if (ret) {
+ printk(KERN_ERR "ath: Cannot enable 64-bit pci DMA\n");
+ goto err_dma;
}
+ ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
+ if (ret) {
+ printk(KERN_ERR "ath: Cannot enable 64-bit consistent DMA\n");
+ goto err_dma;
+ }
+#else
+ ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+ if (ret) {
+ printk(KERN_ERR "ath: Cannot enable 32-bit pci DMA\n");
+ goto err_dma;
+ }
+ ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
+ if (ret) {
+ printk(KERN_ERR "%s: Cannot enable 32-bit consistent DMA!\n",
+ __func__);
+ goto err_dma;
+ }
+#endif
/* Set bus master bit in PCI_COMMAND to enable DMA */
pci_set_master(pdev);
diff --git a/CORE/SERVICES/HIF/PCIe/if_pci.h b/CORE/SERVICES/HIF/PCIe/if_pci.h
index 38ee30e9569c..f4d34f4c14f1 100644
--- a/CORE/SERVICES/HIF/PCIe/if_pci.h
+++ b/CORE/SERVICES/HIF/PCIe/if_pci.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/HTC/htc_internal.h b/CORE/SERVICES/HTC/htc_internal.h
index 7d6b6d04e876..54649a6adb7d 100644
--- a/CORE/SERVICES/HTC/htc_internal.h
+++ b/CORE/SERVICES/HTC/htc_internal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -161,6 +161,7 @@ typedef struct _HTC_TARGET {
#endif
HTC_SERVICE_TX_CREDIT_ALLOCATION ServiceTxAllocTable[HTC_MAX_SERVICE_ALLOC_ENTRIES];
int TargetCreditSize;
+ int TotalHostCredits;
#ifdef RX_SG_SUPPORT
adf_nbuf_queue_t RxSgQueue;
A_BOOL IsRxSgInprogress;
diff --git a/CORE/SERVICES/HTC/htc_recv.c b/CORE/SERVICES/HTC/htc_recv.c
index 4488635244de..f33e776c2908 100644
--- a/CORE/SERVICES/HTC/htc_recv.c
+++ b/CORE/SERVICES/HTC/htc_recv.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -281,7 +281,6 @@ A_STATUS HTCRxCompletionHandler(
do {
htc_ep_id = HTC_GET_FIELD(HtcHdr, HTC_FRAME_HDR, ENDPOINTID);
- pEndpoint = &target->EndPoint[htc_ep_id];
if (htc_ep_id >= ENDPOINT_MAX) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("HTC Rx: invalid EndpointID=%d\n",htc_ep_id));
@@ -291,6 +290,8 @@ A_STATUS HTCRxCompletionHandler(
break;
}
+ pEndpoint = &target->EndPoint[htc_ep_id];
+
/*
* If this endpoint that received a message from the target has
* a to-target HIF pipe whose send completions are polled rather
@@ -319,6 +320,7 @@ A_STATUS HTCRxCompletionHandler(
netlen, payloadLen + HTC_HDR_LENGTH));
DebugDumpBytes((A_UINT8 *)HtcHdr,sizeof(HTC_FRAME_HDR),"BAD RX packet length");
status = A_ERROR;
+ VOS_BUG(0);
break;
#endif
}
diff --git a/CORE/SERVICES/HTC/htc_send.c b/CORE/SERVICES/HTC/htc_send.c
index 7db9864ef8b8..32ab4e443b61 100644
--- a/CORE/SERVICES/HTC/htc_send.c
+++ b/CORE/SERVICES/HTC/htc_send.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -58,6 +58,20 @@ static unsigned ep_debug_mask = (1 << ENDPOINT_0) | (1 << ENDPOINT_1) | (1 << EN
#define ENABLE_BUNDLE_TX 0
#endif
+
+void HTCGetHostCredits(HTC_HANDLE HTCHandle,int *credits)
+{
+ HTC_TARGET *target = GET_HTC_TARGET_FROM_HANDLE(HTCHandle);
+
+ if (!target) {
+ AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Target Pointer is NULL!"));
+ AR_DEBUG_ASSERT(FALSE);
+ *credits = 0;
+ }
+
+ *credits = target->TotalHostCredits;
+}
+
static INLINE void RestoreTxPacket(HTC_TARGET *target, HTC_PACKET *pPacket)
{
if (pPacket->PktInfo.AsTx.Flags & HTC_TX_PACKET_FLAG_FIXUP_NETBUF) {
@@ -1517,6 +1531,8 @@ void HTCProcessCreditRpt(HTC_TARGET *target, HTC_CREDIT_REPORT *pRpt, int NumEnt
totalCredits += rpt_credits;
}
+ target->TotalHostCredits = totalCredits;
+
AR_DEBUG_PRINTF(ATH_DEBUG_SEND, (" Report indicated %d credits to distribute \n", totalCredits));
UNLOCK_HTC_TX(target);
diff --git a/CORE/SERVICES/HTC/htc_services.c b/CORE/SERVICES/HTC/htc_services.c
index bb46aa4e8c9b..9642764c4819 100644
--- a/CORE/SERVICES/HTC/htc_services.c
+++ b/CORE/SERVICES/HTC/htc_services.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/WMA/regdomain.c b/CORE/SERVICES/WMA/regdomain.c
index 50879f3326e5..897a5ac11bb3 100644
--- a/CORE/SERVICES/WMA/regdomain.c
+++ b/CORE/SERVICES/WMA/regdomain.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 2013 2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011,2013-2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 1914d256f63b..53c699254f94 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -114,7 +114,6 @@
#define WMA_DEFAULT_SCAN_REQUESTER_ID 1
/* default value */
#define DEFAULT_INFRA_STA_KEEP_ALIVE_PERIOD 20
-#define DEFAULT_MAX_IDLETIME 20
/* pdev vdev and peer stats*/
#define FW_PDEV_STATS_SET 0x1
#define FW_VDEV_STATS_SET 0x2
@@ -124,21 +123,13 @@
* similar to the mentioned the TLSHIM
*/
#define WMA_TGT_NOISE_FLOOR_DBM (-96)
-/*There is no standard way of caluclating minimum inactive
- *timer and max unresposive timer from max inactive timer
- *the below expression are taken from qca_main code
- */
-/*REFEFERENCE_TIME refers to the time that we need to wait for ack
- *after sending an keepalive frame.
- */
-#define REFERENCE_TIME 5
-/*The minimum amount of time AP begins to consider STA inactive*/
-#define MIN_IDLE_INACTIVE_TIME_SECS(val) ((val - REFERENCE_TIME)/2)
-/* Once a STA exceeds the maximum unresponsive time, the AP will send a
- * WMI_STA_KICKOUT event to the host so the STA can be deleted.
+/*
+ * Make sure that link monitor and keep alive
+ * default values should be in sync with CFG.
*/
-#define MAX_UNRESPONSIVE_TIME_SECS(val) (val + REFERENCE_TIME)
+#define WMA_LINK_MONITOR_DEFAULT_TIME_SECS 10
+#define WMA_KEEP_ALIVE_DEFAULT_TIME_SECS 5
#define AGC_DUMP 1
#define CHAN_DUMP 2
@@ -166,6 +157,9 @@
/* default latency in us */
#define WMA_PM_QOS_DEFAULT_LATENCY 20000
+#define WMI_MAX_HOST_CREDITS 2
+#define WMI_WOW_REQUIRED_CREDITS 1
+
static void wma_send_msg(tp_wma_handle wma_handle, u_int16_t msg_type,
void *body_ptr, u_int32_t body_val);
@@ -183,6 +177,9 @@ static struct wma_target_req *
wma_fill_vdev_req(tp_wma_handle wma, u_int8_t vdev_id,
u_int32_t msg_type, u_int8_t type, void *params,
u_int32_t timeout);
+static int32_t wmi_unified_vdev_stop_send(wmi_unified_t wmi, u_int8_t vdev_id);
+static void wma_remove_vdev_req(tp_wma_handle wma, u_int8_t vdev_id,
+ u_int8_t type);
static tANI_U32 gFwWlanFeatCaps;
@@ -436,7 +433,7 @@ static struct wma_target_req *wma_find_vdev_req(tp_wma_handle wma,
}
adf_os_spin_unlock_bh(&wma->vdev_respq_lock);
if (!found) {
- WMA_LOGP("%s: target request not found for vdev_id %d type %d\n",
+ WMA_LOGP("%s: target request not found for vdev_id %d type %d",
__func__, vdev_id, type);
return NULL;
}
@@ -500,7 +497,7 @@ static void wma_vdev_start_rsp(tp_wma_handle wma,
bcn->buf = adf_nbuf_alloc(NULL, WMA_BCN_BUF_MAX_SIZE, 0,
sizeof(u_int32_t), 0);
if (!bcn->buf) {
- WMA_LOGE("%s: No memory allocated for beacon buffer\n",
+ WMA_LOGE("%s: No memory allocated for beacon buffer",
__func__);
vos_mem_free(bcn);
add_bss->status = VOS_STATUS_E_FAILURE;
@@ -514,7 +511,7 @@ static void wma_vdev_start_rsp(tp_wma_handle wma,
wma->interfaces[resp_event->vdev_id].type,
wma->interfaces[resp_event->vdev_id].sub_type);
- WMA_LOGD("%s: Allocated beacon struct %p, template memory %p\n",
+ WMA_LOGD("%s: Allocated beacon struct %p, template memory %p",
__func__, bcn, bcn->buf);
}
#endif
@@ -537,7 +534,7 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
wmi_vdev_start_response_event_fixed_param *resp_event;
struct wma_txrx_node *iface;
- WMA_LOGD("%s: Enter", __func__);
+ WMA_LOGI("%s: Enter", __func__);
param_buf = (WMI_VDEV_START_RESP_EVENTID_param_tlvs *) cmd_param_info;
if (!param_buf) {
WMA_LOGE("Invalid start response event buffer");
@@ -548,7 +545,7 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
req_msg = wma_find_vdev_req(wma, resp_event->vdev_id,
WMA_TARGET_REQ_TYPE_VDEV_START);
if (!req_msg) {
- WMA_LOGP("%s: Failed to lookup request message for vdev %d\n",
+ WMA_LOGP("%s: Failed to lookup request message for vdev %d",
__func__, resp_event->vdev_id);
return -EINVAL;
}
@@ -557,7 +554,7 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
if (req_msg->msg_type == WDA_CHNL_SWITCH_REQ) {
tpSwitchChannelParams params =
(tpSwitchChannelParams) req_msg->user_data;
- WMA_LOGD("%s: Send channel switch resp vdev %d status %d\n",
+ WMA_LOGD("%s: Send channel switch resp vdev %d status %d",
__func__, resp_event->vdev_id, resp_event->status);
params->chainMask = resp_event->chain_mask;
params->smpsMode = host_map_smps_mode(resp_event->smps_mode);
@@ -584,7 +581,7 @@ static int wma_vdev_start_resp_handler(void *handle, u_int8_t *cmd_param_info,
wma_vdev_start_rsp(wma, bssParams, resp_event);
}
vos_timer_destroy(&req_msg->event_timeout);
- vos_mem_free(req_msg);
+ adf_os_mem_free(req_msg);
return 0;
}
@@ -739,7 +736,7 @@ static int32_t wmi_unified_peer_delete_send(wmi_unified_t wmi,
buf = wmi_buf_alloc(wmi, len);
if (!buf) {
- WMA_LOGP("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_peer_delete_cmd_fixed_param *) wmi_buf_data(buf);
@@ -751,7 +748,7 @@ static int32_t wmi_unified_peer_delete_send(wmi_unified_t wmi,
cmd->vdev_id = vdev_id;
if (wmi_unified_cmd_send(wmi, buf, len, WMI_PEER_DELETE_CMDID)) {
- WMA_LOGP("Failed to send peer delete command\n");
+ WMA_LOGP("%s: Failed to send peer delete command", __func__);
adf_nbuf_free(buf);
return -EIO;
}
@@ -771,7 +768,7 @@ static int32_t wmi_unified_peer_flush_tids_send(wmi_unified_t wmi,
buf = wmi_buf_alloc(wmi, len);
if (!buf) {
- WMA_LOGP("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_peer_flush_tids_cmd_fixed_param *) wmi_buf_data(buf);
@@ -784,7 +781,7 @@ static int32_t wmi_unified_peer_flush_tids_send(wmi_unified_t wmi,
cmd->vdev_id = vdev_id;
if (wmi_unified_cmd_send(wmi, buf, len, WMI_PEER_FLUSH_TIDS_CMDID)) {
- WMA_LOGP("Failed to send flush tid command\n");
+ WMA_LOGP("%s: Failed to send flush tid command", __func__);
adf_nbuf_free(buf);
return -EIO;
}
@@ -844,7 +841,7 @@ static int wma_peer_sta_kickout_event_handler(void *handle, u8 *event, u32 len)
return -EINVAL;
}
- WMA_LOGA("PEER:[%pM]\n BSSID:[%pM]\nINTERFACE:%d\npeer_ID:%d\n",
+ WMA_LOGA("PEER:[%pM]\n BSSID:[%pM]\nINTERFACE:%d\npeer_ID:%d",
macaddr, wma->interfaces[vdev_id].addr, vdev_id,
peer_id);
@@ -890,7 +887,7 @@ static int wmi_unified_vdev_down_send(wmi_unified_t wmi, u_int8_t vdev_id)
buf = wmi_buf_alloc(wmi, len);
if (!buf) {
- WMA_LOGP("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s : wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_vdev_down_cmd_fixed_param *) wmi_buf_data(buf);
@@ -899,7 +896,7 @@ static int wmi_unified_vdev_down_send(wmi_unified_t wmi, u_int8_t vdev_id)
WMITLV_GET_STRUCT_TLVLEN(wmi_vdev_down_cmd_fixed_param));
cmd->vdev_id = vdev_id;
if (wmi_unified_cmd_send(wmi, buf, len, WMI_VDEV_DOWN_CMDID)) {
- WMA_LOGP("Failed to send vdev down\n");
+ WMA_LOGP("%s: Failed to send vdev down", __func__);
adf_nbuf_free(buf);
return -EIO;
}
@@ -922,7 +919,7 @@ static int wma_vdev_stop_resp_handler(void *handle, u_int8_t *cmd_param_info,
#endif
struct wma_txrx_node *iface;
- WMA_LOGD("%s: Enter", __func__);
+ WMA_LOGI("%s: Enter", __func__);
param_buf = (WMI_VDEV_STOPPED_EVENTID_param_tlvs *) cmd_param_info;
if (!param_buf) {
WMA_LOGE("Invalid event buffer");
@@ -933,7 +930,7 @@ static int wma_vdev_stop_resp_handler(void *handle, u_int8_t *cmd_param_info,
req_msg = wma_find_vdev_req(wma, resp_event->vdev_id,
WMA_TARGET_REQ_TYPE_VDEV_STOP);
if (!req_msg) {
- WMA_LOGP("%s: Failed to lookup vdev request for vdev id %d\n",
+ WMA_LOGP("%s: Failed to lookup vdev request for vdev id %d",
__func__, resp_event->vdev_id);
return -EINVAL;
}
@@ -952,7 +949,7 @@ static int wma_vdev_stop_resp_handler(void *handle, u_int8_t *cmd_param_info,
#endif
peer = ol_txrx_find_peer_by_addr(pdev, params->bssid, &peer_id);
if (!peer)
- WMA_LOGD("%s Failed to find peer %pM\n",
+ WMA_LOGD("%s Failed to find peer %pM",
__func__, params->bssid);
wma_remove_peer(wma, params->bssid, resp_event->vdev_id, peer);
@@ -973,7 +970,7 @@ static int wma_vdev_stop_resp_handler(void *handle, u_int8_t *cmd_param_info,
if (bcn) {
WMA_LOGD("%s: Freeing beacon struct %p, "
- "template memory %p\n", __func__,
+ "template memory %p", __func__,
bcn, bcn->buf);
if (bcn->dma_mapped)
adf_nbuf_unmap_single(pdev->osdev, bcn->buf,
@@ -1176,7 +1173,7 @@ static int wma_stats_event_handler(void *handle, u_int8_t *cmd_param_info,
WMI_UPDATE_STATS_EVENTID_param_tlvs *param_buf;
u_int8_t i, *temp;
- WMA_LOGD("%s: Enter", __func__);
+ WMA_LOGI("%s: Enter", __func__);
param_buf = (WMI_UPDATE_STATS_EVENTID_param_tlvs *)cmd_param_info;
if (!param_buf)
return -1;
@@ -1207,7 +1204,7 @@ static int wma_stats_event_handler(void *handle, u_int8_t *cmd_param_info,
}
}
- WMA_LOGD("%s: Exit", __func__);
+ WMA_LOGI("%s: Exit", __func__);
return 0;
}
@@ -1262,7 +1259,7 @@ static void wma_update_beacon_noa_ie(
vos_mem_zero(bcn->noa_ie,
(bcn->noa_sub_ie_len + sizeof(struct p2p_ie)));
} else { /* NoA is not present in previous beacon */
- WMA_LOGD("%s: NoA not present in previous beacon, add it. "
+ WMA_LOGD("%s: NoA not present in previous beacon, add it"
"bcn->len %u", __func__, bcn->len);
buf = adf_nbuf_data(bcn->buf);
bcn->noa_ie = buf + bcn->len;
@@ -1415,13 +1412,13 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
bcn = wma->interfaces[vdev_id].beacon;
if (!bcn->buf) {
- WMA_LOGE("%s: Invalid beacon buffer\n", __func__);
+ WMA_LOGE("%s: Invalid beacon buffer", __func__);
return;
}
wmi_buf = wmi_buf_alloc(wma->wmi_handle, sizeof(*cmd));
if (!wmi_buf) {
- WMA_LOGE("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
return;
}
@@ -1520,7 +1517,7 @@ static void wma_send_bcn_buf_ll(tp_wma_handle wma,
ADF_OS_DMA_TO_DEVICE);
if (ret != A_STATUS_OK) {
adf_nbuf_free(wmi_buf);
- WMA_LOGE("%s: failed map beacon buf to DMA region\n",
+ WMA_LOGE("%s: failed map beacon buf to DMA region",
__func__);
adf_os_spin_unlock_bh(&bcn->lock);
return;
@@ -1698,8 +1695,8 @@ static int wma_gtk_offload_status_event(void *handle, u_int8_t *event,
}
WMA_LOGD("GTK: got target status with replay counter "
- "%02x%02x%02x%02x%02x%02x%02x%02x. vdev %d. "
- "Refresh GTK %d times exchanges since last set operation.",
+ "%02x%02x%02x%02x%02x%02x%02x%02x. vdev %d "
+ "Refresh GTK %d times exchanges since last set operation",
status->replay_counter[0],
status->replay_counter[1],
status->replay_counter[2],
@@ -2201,7 +2198,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
htc_handle = vos_get_context(VOS_MODULE_ID_HTC, vos_context);
if (!htc_handle) {
- WMA_LOGP("\n Invalid HTC handle");
+ WMA_LOGP("%s: Invalid HTC handle", __func__);
return VOS_STATUS_E_INVAL;
}
@@ -2211,7 +2208,8 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
sizeof (t_wma_handle));
if (vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("Memory allocation failed for wma_handle");
+ WMA_LOGP("%s: Memory allocation failed for wma_handle",
+ __func__);
return vos_status;
}
@@ -2227,7 +2225,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
/* attach the wmi */
wmi_handle = wmi_unified_attach(wma_handle);
if (!wmi_handle) {
- WMA_LOGP("failed to attach WMI");
+ WMA_LOGP("%s: failed to attach WMI", __func__);
vos_status = VOS_STATUS_E_NOMEM;
goto err_wmi_attach;
}
@@ -2247,7 +2245,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
((pVosContextType) vos_context)->cfg_ctx =
ol_pdev_cfg_attach(((pVosContextType) vos_context)->adf_ctx);
if (!(((pVosContextType) vos_context)->cfg_ctx)) {
- WMA_LOGP("failed to init cfg handle");
+ WMA_LOGP("%s: failed to init cfg handle", __func__);
vos_status = VOS_STATUS_E_NOMEM;
goto err_wmi_attach;
}
@@ -2255,7 +2253,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
/* Allocate dfs_ic and initialize DFS */
wma_handle->dfs_ic = wma_dfs_attach(wma_handle->dfs_ic);
if(wma_handle->dfs_ic == NULL) {
- WMA_LOGP("Memory allocation failed for dfs_ic");
+ WMA_LOGP("%s: Memory allocation failed for dfs_ic", __func__);
}
vos_wake_lock_init(&wma_handle->pm_qos_lock, "pm_qos_wakelock");
@@ -2293,7 +2291,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
wma_handle->interfaces = vos_mem_malloc(sizeof(struct wma_txrx_node) *
wma_handle->max_bssid);
if (!wma_handle->interfaces) {
- WMA_LOGP("failed to allocate interface table");
+ WMA_LOGP("%s: failed to allocate interface table", __func__);
vos_status = VOS_STATUS_E_NOMEM;
goto err_wmi_attach;
}
@@ -2310,31 +2308,35 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
#ifdef QCA_WIFI_ISOC
vos_status = vos_event_init(&wma_handle->cfg_nv_tx_complete);
if (vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("cfg_nv_tx_complete initialization failed");
+ WMA_LOGP("%s: cfg_nv_tx_complete initialization failed",
+ __func__);
goto err_event_init;
}
vos_status = vos_event_init(&(wma_handle->cfg_nv_rx_complete));
if (VOS_STATUS_SUCCESS != vos_status) {
- WMA_LOGP("cfg_nv_tx_complete initialization failed");
+ WMA_LOGP("%s: cfg_nv_tx_complete initialization failed",
+ __func__);
return VOS_STATUS_E_FAILURE;
}
#endif
vos_status = vos_event_init(&wma_handle->wma_ready_event);
if (vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("wma_ready_event initialization failed");
+ WMA_LOGP("%s: wma_ready_event initialization failed", __func__);
goto err_event_init;
}
vos_status = vos_event_init(&wma_handle->target_suspend);
if (vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("target suspend event initialization failed");
+ WMA_LOGP("%s: target suspend event initialization failed",
+ __func__);
goto err_event_init;
}
/* Init Tx Frame Complete event */
vos_status = vos_event_init(&wma_handle->tx_frm_download_comp_event);
if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
- WMA_LOGP("failed to init tx_frm_download_comp_event");
+ WMA_LOGP("%s: failed to init tx_frm_download_comp_event",
+ __func__);
goto err_event_init;
}
INIT_LIST_HEAD(&wma_handle->vdev_resp_queue);
@@ -2390,7 +2392,7 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
/* Firmware debug log */
vos_status = dbglog_init(wma_handle->wmi_handle);
if (vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("Firmware Dbglog initialization failed");
+ WMA_LOGP("%s: Firmware Dbglog initialization failed", __func__);
goto err_event_init;
}
@@ -2464,7 +2466,7 @@ VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
/* Validate the wma_handle */
if (NULL == wma_handle) {
- WMA_LOGP("invalid argument");
+ WMA_LOGP("%s: invalid argument", __func__);
vos_status = VOS_STATUS_E_INVAL;
goto end;
}
@@ -2473,7 +2475,7 @@ VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
wma_handle->wmi_handle,
wma_handle->htc_handle);
if (A_OK != status) {
- WMA_LOGP("wmi_unified_connect_htc_service");
+ WMA_LOGP("%s: wmi_unified_connect_htc_service", __func__);
vos_status = VOS_STATUS_E_FAULT;
goto end;
}
@@ -2484,7 +2486,7 @@ VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
/* Open endpoint for cfg and nv download path - WMA <--> HTC */
status = wma_htc_cfg_nv_connect_service(wma_handle);
if (A_OK != status) {
- WMA_LOGP("\n htc_connect_service failed");
+ WMA_LOGP("%s: htc_connect_service failed", __func__);
vos_status = VOS_STATUS_E_FAULT;
goto end;
}
@@ -2496,7 +2498,7 @@ VOS_STATUS wma_pre_start(v_VOID_t *vos_ctx)
vos_status = vos_mq_post_message( VOS_MQ_ID_WDA, &wma_msg );
if (VOS_STATUS_SUCCESS !=vos_status) {
- WMA_LOGP("Failed to post WNI_CFG_DNLD_REQ msg");
+ WMA_LOGP("%s: Failed to post WNI_CFG_DNLD_REQ msg", __func__);
VOS_ASSERT(0);
vos_status = VOS_STATUS_E_FAILURE;
}
@@ -2574,7 +2576,7 @@ int wma_unified_vdev_create_send(wmi_unified_t wmi_handle, u_int8_t if_id,
buf = wmi_buf_alloc(wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s:wmi_buf_alloc failed\n", __FUNCTION__);
+ WMA_LOGP("%s:wmi_buf_alloc failed", __FUNCTION__);
return ENOMEM;
}
cmd = (wmi_vdev_create_cmd_fixed_param *) wmi_buf_data(buf);
@@ -2586,7 +2588,7 @@ int wma_unified_vdev_create_send(wmi_unified_t wmi_handle, u_int8_t if_id,
cmd->vdev_type = type;
cmd->vdev_subtype = subtype;
WMI_CHAR_ARRAY_TO_MAC_ADDR(macaddr, &cmd->vdev_macaddr);
- WMA_LOGA("%s: ID = %d VAP Addr = %02x:%02x:%02x:%02x:%02x:%02x:\n",
+ WMA_LOGA("%s: ID = %d VAP Addr = %02x:%02x:%02x:%02x:%02x:%02x",
__func__, if_id,
macaddr[0], macaddr[1], macaddr[2],
macaddr[3], macaddr[4], macaddr[5]);
@@ -2611,7 +2613,7 @@ static int wma_unified_vdev_delete_send(wmi_unified_t wmi_handle, u_int8_t if_id
buf = wmi_buf_alloc(wmi_handle, sizeof(*cmd));
if (!buf) {
- WMA_LOGP("%s:wmi_buf_alloc failed\n", __FUNCTION__);
+ WMA_LOGP("%s:wmi_buf_alloc failed", __FUNCTION__);
return ENOMEM;
}
@@ -2652,7 +2654,7 @@ void wma_vdev_detach_callback(void *ctx)
req_msg = wma_find_vdev_req(wma, param->sessionId,
WMA_TARGET_REQ_TYPE_VDEV_DEL);
if (req_msg) {
- WMA_LOGD("%s: Found vdev request for vdev id %d\n",
+ WMA_LOGD("%s: Found vdev request for vdev id %d",
__func__, param->sessionId);
vos_timer_stop(&req_msg->event_timeout);
vos_timer_destroy(&req_msg->event_timeout);
@@ -2713,7 +2715,7 @@ static VOS_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
pdel_sta_self_req_param->selfMacAddr,
&peer_id);
if (!peer) {
- WMA_LOGE("%s Failed to find peer %pM\n", __func__,
+ WMA_LOGE("%s Failed to find peer %pM", __func__,
pdel_sta_self_req_param->selfMacAddr);
}
wma_remove_peer(wma_handle,
@@ -2737,14 +2739,14 @@ static VOS_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
/* remove the interface from ath_dev */
if (wma_unified_vdev_delete_send(wma_handle->wmi_handle, vdev_id)) {
- WMA_LOGE("Unable to remove an interface for ath_dev.\n");
+ WMA_LOGE("Unable to remove an interface for ath_dev.");
status = VOS_STATUS_E_FAILURE;
adf_os_spin_unlock_bh(&wma_handle->vdev_detach_lock);
goto out;
}
- WMA_LOGA("vdev_id:%hu vdev_hdl:%p\n", vdev_id, iface->handle);
+ WMA_LOGA("vdev_id:%hu vdev_hdl:%p", vdev_id, iface->handle);
if (!generateRsp) {
WMA_LOGE("Call txrx detach w/o callback for vdev %d", vdev_id);
ol_txrx_vdev_detach(iface->handle, NULL, NULL);
@@ -2756,7 +2758,7 @@ static VOS_STATUS wma_vdev_detach(tp_wma_handle wma_handle,
msg = wma_fill_vdev_req(wma_handle, vdev_id, WDA_DEL_STA_SELF_REQ,
WMA_TARGET_REQ_TYPE_VDEV_DEL, iface, 2000);
if (!msg) {
- WMA_LOGE("%s: Failed to fill vdev request for vdev_id %d\n",
+ WMA_LOGE("%s: Failed to fill vdev request for vdev_id %d",
__func__, vdev_id);
status = VOS_STATUS_E_NOMEM;
adf_os_spin_unlock_bh(&wma_handle->vdev_detach_lock);
@@ -2788,7 +2790,7 @@ static int wmi_unified_peer_create_send(wmi_unified_t wmi,
buf = wmi_buf_alloc(wmi, len);
if (!buf) {
- WMA_LOGP("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_peer_create_cmd_fixed_param *) wmi_buf_data(buf);
@@ -2801,7 +2803,7 @@ static int wmi_unified_peer_create_send(wmi_unified_t wmi,
cmd->vdev_id = vdev_id;
if (wmi_unified_cmd_send(wmi, buf, len, WMI_PEER_CREATE_CMDID)) {
- WMA_LOGP("failed to send WMI_PEER_CREATE_CMDID\n");
+ WMA_LOGP("%s: failed to send WMI_PEER_CREATE_CMDID", __func__);
adf_nbuf_free(buf);
return -EIO;
}
@@ -2817,7 +2819,7 @@ static VOS_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev,
WMA_LOGD("%s: peer_addr %pM vdev_id %d", __func__, peer_addr, vdev_id);
if (++wma->peer_count > wma->wlan_resource_config.num_peers) {
- WMA_LOGP("%s, the peer count exceeds the limit %d\n",
+ WMA_LOGP("%s, the peer count exceeds the limit %d",
__func__, wma->peer_count - 1);
goto err;
}
@@ -2827,7 +2829,7 @@ static VOS_STATUS wma_create_peer(tp_wma_handle wma, ol_txrx_pdev_handle pdev,
if (wmi_unified_peer_create_send(wma->wmi_handle, peer_addr,
peer_type, vdev_id) < 0) {
- WMA_LOGP("%s : Unable to create peer in Target\n", __func__);
+ WMA_LOGP("%s : Unable to create peer in Target", __func__);
ol_txrx_peer_detach(peer);
goto err;
}
@@ -2893,32 +2895,40 @@ static void wma_set_sta_keep_alive(tp_wma_handle wma, u_int8_t vdev_id,
return;
}
-static inline tANI_U32 wma_get_maxidle_time(struct sAniSirGlobal *mac,
- tANI_U32 sub_type)
+static inline void wma_get_link_probe_timeout(struct sAniSirGlobal *mac,
+ tANI_U32 sub_type,
+ tANI_U32 *max_inactive_time,
+ tANI_U32 *max_unresponsive_time)
{
- tANI_U16 cfg_id;
- tANI_U32 max_idletime;
+ tANI_U32 keep_alive;
+ tANI_U16 lm_id, ka_id;
switch (sub_type) {
case WMI_UNIFIED_VDEV_SUBTYPE_P2P_GO:
- cfg_id = WNI_CFG_GO_KEEP_ALIVE_TIMEOUT;
+ lm_id = WNI_CFG_GO_LINK_MONITOR_TIMEOUT;
+ ka_id = WNI_CFG_GO_KEEP_ALIVE_TIMEOUT;
break;
default:
/*For softAp the subtype value will be zero*/
- cfg_id = WNI_CFG_AP_KEEP_ALIVE_TIMEOUT;
+ lm_id = WNI_CFG_AP_LINK_MONITOR_TIMEOUT;
+ ka_id = WNI_CFG_AP_KEEP_ALIVE_TIMEOUT;
}
- if(wlan_cfgGetInt(mac, cfg_id, &max_idletime) != eSIR_SUCCESS) {
- WMA_LOGE("Failed to get value for cfg id:%d", cfg_id);
- max_idletime = DEFAULT_MAX_IDLETIME;
+ if(wlan_cfgGetInt(mac, lm_id, max_inactive_time) != eSIR_SUCCESS) {
+ WMA_LOGE("Failed to read link monitor for subtype %d", sub_type);
+ *max_inactive_time = WMA_LINK_MONITOR_DEFAULT_TIME_SECS;
}
- return max_idletime;
+ if(wlan_cfgGetInt(mac, ka_id, &keep_alive) != eSIR_SUCCESS) {
+ WMA_LOGE("Failed to read keep alive for subtype %d", sub_type);
+ keep_alive = WMA_KEEP_ALIVE_DEFAULT_TIME_SECS;
+ }
+ *max_unresponsive_time = *max_inactive_time + keep_alive;
}
static void wma_set_sap_keepalive(tp_wma_handle wma, u_int8_t vdev_id)
{
- tANI_U32 cfg_data_val, min_inactive_time, max_unresponsive_time;
+ tANI_U32 min_inactive_time, max_inactive_time, max_unresponsive_time;
struct sAniSirGlobal *mac =
(struct sAniSirGlobal*)vos_get_context(VOS_MODULE_ID_PE,
wma->vos_context);
@@ -2928,25 +2938,21 @@ static void wma_set_sap_keepalive(tp_wma_handle wma, u_int8_t vdev_id)
return;
}
- cfg_data_val = wma_get_maxidle_time(mac,
- wma->interfaces[vdev_id].sub_type);
- if (!cfg_data_val) /*0 -> Disabled*/
- return;
+ wma_get_link_probe_timeout(mac, wma->interfaces[vdev_id].sub_type,
+ &max_inactive_time, &max_unresponsive_time);
- min_inactive_time = MIN_IDLE_INACTIVE_TIME_SECS(cfg_data_val);
- max_unresponsive_time =
- MAX_UNRESPONSIVE_TIME_SECS(cfg_data_val);
+ min_inactive_time = max_inactive_time / 2;
if (wmi_unified_vdev_set_param_send(wma->wmi_handle,
vdev_id,
WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
- (min_inactive_time < 0)? 0 : min_inactive_time))
+ min_inactive_time))
WMA_LOGE("Failed to Set AP MIN IDLE INACTIVE TIME");
if (wmi_unified_vdev_set_param_send(wma->wmi_handle,
vdev_id,
WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
- cfg_data_val))
+ max_inactive_time))
WMA_LOGE("Failed to Set AP MAX IDLE INACTIVE TIME");
if (wmi_unified_vdev_set_param_send(wma->wmi_handle,
@@ -2955,10 +2961,9 @@ static void wma_set_sap_keepalive(tp_wma_handle wma, u_int8_t vdev_id)
max_unresponsive_time))
WMA_LOGE("Failed to Set MAX UNRESPONSIVE TIME");
- WMA_LOGD("%s:vdev_id:%d min_inactive_time:%d max_inactive_time:%d"
- " max_unresponsive_time:%d", __func__, vdev_id,
- (min_inactive_time > 0)? min_inactive_time : 0, cfg_data_val,
- max_unresponsive_time);
+ WMA_LOGD("%s:vdev_id:%d min_inactive_time: %u max_inactive_time: %u"
+ " max_unresponsive_time: %u", __func__, vdev_id,
+ min_inactive_time, max_inactive_time, max_unresponsive_time);
}
static VOS_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(tANI_U32 mcc_adaptive_scheduler)
@@ -2994,7 +2999,8 @@ static VOS_STATUS wma_set_enable_disable_mcc_adaptive_scheduler(tANI_U32 mcc_ada
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_RESMGR_ADAPTIVE_OCS_ENABLE_DISABLE_CMDID);
if (ret) {
- WMA_LOGP("Failed to send enable/disable MCC adaptive scheduler command");
+ WMA_LOGP("%s: Failed to send enable/disable MCC"
+ " adaptive scheduler command", __func__);
adf_nbuf_free(buf);
}
return VOS_STATUS_SUCCESS;
@@ -3027,7 +3033,7 @@ static VOS_STATUS wma_set_mcc_channel_time_latency
u_int32_t latency_chan1 = mcc_channel_time_latency;
if (!wma) {
- WMA_LOGE("%s:NULL wma ptr. Exiting.\n", __func__);
+ WMA_LOGE("%s:NULL wma ptr. Exiting", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -3035,14 +3041,14 @@ static VOS_STATUS wma_set_mcc_channel_time_latency
(struct sAniSirGlobal*)vos_get_context(VOS_MODULE_ID_PE,
wma->vos_context);
if (!pMac) {
- WMA_LOGE("%s:NULL pMac ptr. Exiting.\n", __func__);
+ WMA_LOGE("%s:NULL pMac ptr. Exiting", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
/* First step is to confirm if MCC is active */
if (!limIsInMCC(pMac)) {
- WMA_LOGE("%s: MCC is not active. Exiting.\n", __func__);
+ WMA_LOGE("%s: MCC is not active. Exiting", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -3051,12 +3057,12 @@ static VOS_STATUS wma_set_mcc_channel_time_latency
&cfg_val) == eSIR_SUCCESS) {
if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) {
WMA_LOGD("%s: Can't set channel latency while MCC "
- "ADAPTIVE SCHED is enabled. Exit\n", __func__);
+ "ADAPTIVE SCHED is enabled. Exit", __func__);
return VOS_STATUS_SUCCESS;
}
} else {
WMA_LOGE("%s: Failed to get value for MCC_ADAPTIVE_SCHED, "
- "Exit w/o setting latency.\n", __func__);
+ "Exit w/o setting latency", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -3065,9 +3071,9 @@ static VOS_STATUS wma_set_mcc_channel_time_latency
*/
if ((latency_chan1 > 0) &&
(latency_chan1 < WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY)) {
- WMA_LOGE("%s: Invalid time latency for Channel #1 = %dms. "
+ WMA_LOGE("%s: Invalid time latency for Channel #1 = %dms "
"Minimum is 30ms (or 0 to use default value by "
- "firmware)\n", __func__, latency_chan1);
+ "firmware)", __func__, latency_chan1);
return VOS_STATUS_E_INVAL;
}
@@ -3143,12 +3149,12 @@ static VOS_STATUS wma_set_mcc_channel_time_quota
u_int32_t chan2_freq = vos_chan_to_freq(adapter_2_chan_number);
WMA_LOGD("%s: Channel1:%d, freq1:%dMHz, Quota1:%dms, "
- "Channel2:%d, freq2:%dMHz, Quota2:%dms\n", __func__,
+ "Channel2:%d, freq2:%dMHz, Quota2:%dms", __func__,
channel1, chan1_freq, quota_chan1, channel2, chan2_freq,
quota_chan2);
if (!wma) {
- WMA_LOGE("%s:NULL wma ptr. Exiting.\n", __func__);
+ WMA_LOGE("%s:NULL wma ptr. Exiting", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -3156,14 +3162,14 @@ static VOS_STATUS wma_set_mcc_channel_time_quota
(struct sAniSirGlobal*)vos_get_context(VOS_MODULE_ID_PE,
wma->vos_context);
if (!pMac) {
- WMA_LOGE("%s:NULL pMac ptr. Exiting.\n", __func__);
+ WMA_LOGE("%s:NULL pMac ptr. Exiting", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
/* First step is to confirm if MCC is active */
if (!limIsInMCC(pMac)) {
- WMA_LOGD("%s: MCC is not active. Exiting.\n", __func__);
+ WMA_LOGD("%s: MCC is not active. Exiting", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -3173,13 +3179,13 @@ static VOS_STATUS wma_set_mcc_channel_time_quota
&cfg_val) == eSIR_SUCCESS) {
if (cfg_val == WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED_STAMAX) {
WMA_LOGD("%s: Can't set channel quota while "
- "MCC_ADAPTIVE_SCHED is enabled. Exit\n",
+ "MCC_ADAPTIVE_SCHED is enabled. Exit",
__func__);
return VOS_STATUS_SUCCESS;
}
} else {
WMA_LOGE("%s: Failed to retrieve "
- "WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED. Exit\n",
+ "WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED. Exit",
__func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
@@ -3191,7 +3197,7 @@ static VOS_STATUS wma_set_mcc_channel_time_quota
if (quota_chan1 < WMI_MCC_MIN_CHANNEL_QUOTA ||
quota_chan1 > WMI_MCC_MAX_CHANNEL_QUOTA) {
WMA_LOGE("%s: Invalid time quota for Channel #1=%dms. Minimum "
- "is 20ms & maximum is 80ms\n", __func__, quota_chan1);
+ "is 20ms & maximum is 80ms", __func__, quota_chan1);
return VOS_STATUS_E_INVAL;
}
/* Set WMI CMD for channel time quota here */
@@ -3270,7 +3276,7 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
self_sta_req->subType,
self_sta_req->selfMacAddr))
{
- WMA_LOGP("Unable to add an interface for ath_dev.\n");
+ WMA_LOGP("%s: Unable to add an interface for ath_dev", __func__);
status = VOS_STATUS_E_RESOURCES;
goto end;
}
@@ -3297,7 +3303,7 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
txrx_vdev_handle);
if (NULL == txrx_vdev_handle) {
- WMA_LOGP("ol_txrx_vdev_attach failed");
+ WMA_LOGP("%s: ol_txrx_vdev_attach failed", __func__);
status = VOS_STATUS_E_FAILURE;
wma_unified_vdev_delete_send(wma_handle->wmi_handle,
self_sta_req->sessionId);
@@ -3366,7 +3372,7 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
WMI_PEER_TYPE_DEFAULT,
self_sta_req->sessionId);
if (status != VOS_STATUS_SUCCESS) {
- WMA_LOGE("%s: Failed to create peer\n", __func__);
+ WMA_LOGE("%s: Failed to create peer", __func__);
status = VOS_STATUS_E_FAILURE;
wma_unified_vdev_delete_send(wma_handle->wmi_handle,
self_sta_req->sessionId);
@@ -3407,7 +3413,7 @@ static ol_txrx_vdev_handle wma_vdev_attach(tp_wma_handle wma_handle,
if (wlan_cfgGetInt(mac, WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED,
&cfg_val) == eSIR_SUCCESS) {
- WMA_LOGD("\n%s: setting ini value for WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED: %d\n",
+ WMA_LOGD("%s: setting ini value for WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED: %d",
__func__, cfg_val);
ret = wma_set_enable_disable_mcc_adaptive_scheduler(cfg_val);
if (ret != VOS_STATUS_SUCCESS) {
@@ -3442,7 +3448,7 @@ static VOS_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle)
WMA_LOGD("%s: Enter", __func__);
if (NULL == mac) {
- WMA_LOGP("Invalid context");
+ WMA_LOGP("%s: Invalid context", __func__);
VOS_ASSERT(0);
return VOS_STATUS_E_FAILURE;
}
@@ -3451,15 +3457,15 @@ static VOS_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle)
vos_status = vos_get_binary_blob(VOS_BINARY_ID_CONFIG, NULL,
&file_img_sz);
if (VOS_STATUS_E_NOMEM != vos_status) {
- WMA_LOGP("Error in obtaining the binary size");
+ WMA_LOGP("%s: Error in obtaining the binary size", __func__);
goto fail;
}
/* malloc a buffer to read in the Configuration binary file. */
file_img = vos_mem_malloc(file_img_sz);
if (NULL == file_img) {
- WMA_LOGP("Unable to allocate memory for the CFG binary"
- "[size= %d bytes]", file_img_sz);
+ WMA_LOGP("%s: Unable to allocate memory for the CFG binary "
+ "[size= %d bytes]", __func__, file_img_sz);
vos_status = VOS_STATUS_E_NOMEM;
goto fail;
}
@@ -3468,8 +3474,8 @@ static VOS_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle)
vos_status = vos_get_binary_blob(VOS_BINARY_ID_CONFIG, file_img,
&file_img_sz);
if (VOS_STATUS_SUCCESS != vos_status) {
- WMA_LOGP("Error: Cannot retrieve CFG file image from vOSS."
- "[size= %d bytes]", file_img_sz);
+ WMA_LOGP("%s: Cannot retrieve CFG file image from vOSS "
+ "[size= %d bytes]", __func__, file_img_sz);
goto fail;
}
@@ -3481,7 +3487,8 @@ static VOS_STATUS wma_wni_cfg_dnld(tp_wma_handle wma_handle)
&cfg_bin, &cfg_bin_sz );
if ( VOS_FALSE == status )
{
- WMA_LOGP("Error: Cannot find STA CFG in binary image file.");
+ WMA_LOGP("%s: Cannot find STA CFG in binary image file",
+ __func__);
vos_status = VOS_STATUS_E_FAILURE;
goto fail;
}
@@ -3573,7 +3580,8 @@ VOS_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
/* Allocate the memory */
*buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!*buf) {
- WMA_LOGP("failed to allocate memory for start scan cmd");
+ WMA_LOGP("%s: failed to allocate memory for start scan cmd",
+ __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -3726,7 +3734,8 @@ VOS_STATUS wma_get_buf_stop_scan_cmd(tp_wma_handle wma_handle,
/* Allocate the memory */
*buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!*buf) {
- WMA_LOGP("failed to allocate memory for stop scan cmd");
+ WMA_LOGP("%s: failed to allocate memory for stop scan cmd",
+ __func__);
vos_status = VOS_STATUS_E_FAILURE;
goto error;
}
@@ -3819,16 +3828,16 @@ VOS_STATUS wma_start_scan(tp_wma_handle wma_handle,
WMA_LOGA("vdev id [%d] is not active", scan_req->sessionId);
goto error1;
}
-
- /* Start the timer for scan completion */
- vos_status = vos_timer_start(&wma_handle->wma_scan_comp_timer,
- WMA_HW_DEF_SCAN_MAX_DURATION);
- if (vos_status != VOS_STATUS_SUCCESS ) {
- WMA_LOGE("Failed to start the scan completion timer");
- vos_status = VOS_STATUS_E_FAILURE;
- goto error1;
- }
-
+ if (msg_type == WDA_START_SCAN_OFFLOAD_REQ) {
+ /* Start the timer for scan completion */
+ vos_status = vos_timer_start(&wma_handle->wma_scan_comp_timer,
+ WMA_HW_DEF_SCAN_MAX_DURATION);
+ if (vos_status != VOS_STATUS_SUCCESS ) {
+ WMA_LOGE("Failed to start the scan completion timer");
+ vos_status = VOS_STATUS_E_FAILURE;
+ goto error1;
+ }
+ }
/* Fill individual elements of wmi_start_scan_req and
* TLV for channel list, bssid, ssid etc ... */
vos_status = wma_get_buf_start_scan_cmd(wma_handle, scan_req,
@@ -3887,7 +3896,8 @@ error1:
scan_event =
(tSirScanOffloadEvent *) vos_mem_malloc(sizeof(tSirScanOffloadEvent));
if (!scan_event) {
- WMA_LOGP("Failed to allocate memory for scan rsp");
+ WMA_LOGP("%s: Failed to allocate memory for scan rsp",
+ __func__);
return VOS_STATUS_E_NOMEM;
}
scan_event->event = WMI_SCAN_EVENT_COMPLETED;
@@ -4052,7 +4062,7 @@ VOS_STATUS wma_roam_scan_offload_mode(tp_wma_handle wma_handle,
len = sizeof(wmi_roam_scan_mode_fixed_param) + sizeof(wmi_start_scan_cmd_fixed_param);
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGD("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGD("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4108,7 +4118,7 @@ VOS_STATUS wma_roam_scan_offload_rssi_thresh(tp_wma_handle wma_handle,
len = sizeof(wmi_roam_scan_rssi_threshold_fixed_param);
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4160,7 +4170,7 @@ VOS_STATUS wma_roam_scan_offload_scan_period(tp_wma_handle wma_handle,
len = sizeof(wmi_roam_scan_period_fixed_param);
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4211,7 +4221,7 @@ VOS_STATUS wma_roam_scan_offload_rssi_change(tp_wma_handle wma_handle,
len = sizeof(wmi_roam_scan_rssi_change_threshold_fixed_param);
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4263,7 +4273,7 @@ VOS_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
if (chan_count == 0)
{
- WMA_LOGD("%s : invalid number of channels %d\n", __func__, chan_count);
+ WMA_LOGD("%s : invalid number of channels %d", __func__, chan_count);
return VOS_STATUS_E_INVAL;
}
/* Channel list is a table of 2 TLV's */
@@ -4271,7 +4281,7 @@ VOS_STATUS wma_roam_scan_offload_chan_list(tp_wma_handle wma_handle,
len = sizeof(wmi_roam_chan_list_fixed_param) + list_tlv_len;
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4563,7 +4573,7 @@ VOS_STATUS wma_roam_scan_offload_ap_profile(tp_wma_handle wma_handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4675,7 +4685,7 @@ VOS_STATUS wma_process_roam_scan_req(tp_wma_handle wma_handle,
wma_handle->vos_context);
u_int32_t mode = 0;
- WMA_LOGI("%s: command 0x%x\n", __func__, roam_req->Command);
+ WMA_LOGI("%s: command 0x%x", __func__, roam_req->Command);
if (!wma_handle->roam_offload_enabled) {
/* roam scan offload is not enabled in firmware.
* Cannot initialize it in the middle of connection.
@@ -4856,7 +4866,7 @@ VOS_STATUS wma_lphb_conf_hbenable(tp_wma_handle wma_handle,
if (lphb_conf_req == NULL)
{
- WMA_LOGE("%s : LPHB configuration is NULL\n", __func__);
+ WMA_LOGE("%s : LPHB configuration is NULL", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -4869,7 +4879,7 @@ VOS_STATUS wma_lphb_conf_hbenable(tp_wma_handle wma_handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4918,7 +4928,7 @@ VOS_STATUS wma_lphb_conf_tcp_params(tp_wma_handle wma_handle,
if (lphb_conf_req == NULL)
{
- WMA_LOGE("%s : LPHB configuration is NULL\n", __func__);
+ WMA_LOGE("%s : LPHB configuration is NULL", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -4940,7 +4950,7 @@ VOS_STATUS wma_lphb_conf_tcp_params(tp_wma_handle wma_handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -4995,7 +5005,7 @@ VOS_STATUS wma_lphb_conf_tcp_pkt_filter(tp_wma_handle wma_handle,
if (lphb_conf_req == NULL)
{
- WMA_LOGE("%s : LPHB configuration is NULL\n", __func__);
+ WMA_LOGE("%s : LPHB configuration is NULL", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -5015,7 +5025,7 @@ VOS_STATUS wma_lphb_conf_tcp_pkt_filter(tp_wma_handle wma_handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -5066,7 +5076,7 @@ VOS_STATUS wma_lphb_conf_udp_params(tp_wma_handle wma_handle,
if (lphb_conf_req == NULL)
{
- WMA_LOGE("%s : LPHB configuration is NULL\n", __func__);
+ WMA_LOGE("%s : LPHB configuration is NULL", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -5087,7 +5097,7 @@ VOS_STATUS wma_lphb_conf_udp_params(tp_wma_handle wma_handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -5141,7 +5151,7 @@ VOS_STATUS wma_lphb_conf_udp_pkt_filter(tp_wma_handle wma_handle,
if (lphb_conf_req == NULL)
{
- WMA_LOGE("%s : LPHB configuration is NULL\n", __func__);
+ WMA_LOGE("%s : LPHB configuration is NULL", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -5161,7 +5171,7 @@ VOS_STATUS wma_lphb_conf_udp_pkt_filter(tp_wma_handle wma_handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -5206,7 +5216,7 @@ VOS_STATUS wma_process_lphb_conf_req(tp_wma_handle wma_handle,
if (lphb_conf_req == NULL)
{
- WMA_LOGE("%s : LPHB configuration is NULL\n", __func__);
+ WMA_LOGE("%s : LPHB configuration is NULL", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -5371,7 +5381,7 @@ static WLAN_PHY_MODE wma_chan_to_mode(u8 chan, ePhyChanBondState chan_offset,
break;
}
}
- WMA_LOGD("%s: phymode %d channel %d offset %d vht_capable %d\n", __func__,
+ WMA_LOGD("%s: phymode %d channel %d offset %d vht_capable %d", __func__,
phymode, chan, chan_offset, vht_capable);
return phymode;
@@ -5411,7 +5421,7 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
WMI_TLV_HDR_SIZE;
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s : wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
buf_ptr = (u_int8_t *) wmi_buf_data(buf);
@@ -5515,8 +5525,8 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
cmd->num_noa_descriptors *
sizeof(wmi_p2p_noa_descriptor));
- WMA_LOGD("%s: vdev_id %d freq %d channel %d chanmode %d is_dfs %d\
- beacon interval %d dtim %d center_chan %d \n", __func__, req->vdev_id,
+ WMA_LOGD("%s: vdev_id %d freq %d channel %d chanmode %d is_dfs %d "
+ "beacon interval %d dtim %d center_chan %d", __func__, req->vdev_id,
chan->mhz, req->chan, chanmode, req->is_dfs,
req->beacon_intval, cmd->dtim_period, chan->band_center_freq1);
@@ -5527,7 +5537,7 @@ static VOS_STATUS wma_vdev_start(tp_wma_handle wma,
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_VDEV_START_REQUEST_CMDID);
if (ret < 0) {
- WMA_LOGP("Failed to send vdev start command\n");
+ WMA_LOGP("%s: Failed to send vdev start command", __func__);
adf_nbuf_free(buf);
return VOS_STATUS_E_FAILURE;
}
@@ -5543,6 +5553,7 @@ void wma_vdev_resp_timer(void *data)
ol_txrx_peer_handle peer;
ol_txrx_pdev_handle pdev;
u_int8_t peer_id;
+ struct wma_target_req *msg;
#ifdef QCA_IBSS_SUPPORT
tDelStaSelfParams del_sta_param;
#endif
@@ -5619,6 +5630,33 @@ void wma_vdev_resp_timer(void *data)
params->status = VOS_STATUS_E_TIMEOUT;
WMA_LOGA("%s: WDA_ADD_BSS_REQ timedout", __func__);
+ peer = ol_txrx_find_peer_by_addr(pdev, params->bssId,
+ &peer_id);
+ if (!peer) {
+ WMA_LOGP("%s: Failed to find peer %pM", __func__,
+ params->bssId);
+ }
+ msg = wma_fill_vdev_req(wma, params->sessionId, WDA_DELETE_BSS_REQ,
+ WMA_TARGET_REQ_TYPE_VDEV_STOP, params, 1000);
+ if (!msg) {
+ WMA_LOGP("%s: Failed to fill vdev request for vdev_id %d",
+ __func__, params->sessionId);
+ goto error0;
+ }
+ if (wmi_unified_vdev_stop_send(wma->wmi_handle, params->sessionId)) {
+ WMA_LOGP("%s: %d Failed to send vdev stop",
+ __func__, __LINE__);
+ wma_remove_vdev_req(wma, params->sessionId,
+ WMA_TARGET_REQ_TYPE_VDEV_STOP);
+ goto error0;
+ }
+ WMA_LOGI("%s: bssid %pM vdev_id %d",
+ __func__, params->bssId, params->sessionId);
+
+error0:
+ if (peer)
+ wma_remove_peer(wma, params->bssId,
+ params->sessionId, peer);
wma_send_msg(wma, WDA_ADD_BSS_RSP, (void *)params, 0);
}
vos_timer_destroy(&tgt_req->event_timeout);
@@ -5633,8 +5671,8 @@ static struct wma_target_req *wma_fill_vdev_req(tp_wma_handle wma, u_int8_t vdev
req = adf_os_mem_alloc(NULL, sizeof(*req));
if (!req) {
- WMA_LOGP("Failed to allocate memory for msg %d vdev %d\n",
- msg_type, vdev_id);
+ WMA_LOGP("%s: Failed to allocate memory for msg %d vdev %d",
+ __func__, msg_type, vdev_id);
return NULL;
}
@@ -5831,8 +5869,8 @@ static void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
msg = wma_fill_vdev_req(wma, req.vdev_id, WDA_CHNL_SWITCH_REQ,
WMA_TARGET_REQ_TYPE_VDEV_START, params, 1000);
if (!msg) {
- WMA_LOGP("Failed to fill channel switch request for vdev %d\n",
- req.vdev_id);
+ WMA_LOGP("%s: Failed to fill channel switch request for vdev %d",
+ __func__, req.vdev_id);
status = VOS_STATUS_E_NOMEM;
goto send_resp;
}
@@ -5859,14 +5897,14 @@ static void wma_set_channel(tp_wma_handle wma, tpSwitchChannelParams params)
wma->interfaces[req.vdev_id].is_channel_switch);
if (status != VOS_STATUS_SUCCESS) {
wma_remove_vdev_req(wma, req.vdev_id, WMA_TARGET_REQ_TYPE_VDEV_START);
- WMA_LOGP("vdev start failed status = %d\n", status);
+ WMA_LOGP("%s: vdev start failed status = %d", __func__, status);
goto send_resp;
}
wma->interfaces[req.vdev_id].is_channel_switch = VOS_FALSE;
return;
send_resp:
- WMA_LOGD("%s: channel %d offset %d txpower %d status %d\n", __func__,
+ WMA_LOGD("%s: channel %d offset %d txpower %d status %d", __func__,
params->channelNumber, params->secondaryChannelOffset,
#ifdef WLAN_FEATURE_VOWIFI
params->maxTxPower,
@@ -5920,11 +5958,11 @@ static WLAN_PHY_MODE wma_peer_phymode(tSirNwType nw_type, u_int8_t is_ht,
phymode = MODE_11A;
break;
default:
- WMA_LOGP("Invalid nw type %d\n", nw_type);
+ WMA_LOGP("%s: Invalid nw type %d", __func__, nw_type);
break;
}
WMA_LOGD("%s: nw_type %d is_ht %d is_cw40 %d is_vht %d is_cw_vht %d\
- phymode %d\n", __func__, nw_type, is_ht, is_cw40,
+ phymode %d", __func__, nw_type, is_ht, is_cw40,
is_vht, is_cw_vht, phymode);
return phymode;
@@ -5946,7 +5984,7 @@ static int32_t wmi_unified_send_txbf(tp_wma_handle wma,
if (txbf_en.mutxbfee)
txbf_en.sutxbfee = txbf_en.mutxbfee;
- WMA_LOGD("txbf_en.sutxbfee %d txbf_en.mutxbfee %d\n",
+ WMA_LOGD("txbf_en.sutxbfee %d txbf_en.mutxbfee %d",
txbf_en.sutxbfee, txbf_en.mutxbfee);
return(wmi_unified_vdev_set_param_send(wma->wmi_handle,
@@ -6044,7 +6082,7 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
@@ -6207,7 +6245,7 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
cmd->peer_nss = MAX((peer_ht_rates.num_rates + 7) / 8, 1);
- WMA_LOGD("peer_nss %d peer_ht_rates.num_rates %d \n", cmd->peer_nss,
+ WMA_LOGD("peer_nss %d peer_ht_rates.num_rates %d ", cmd->peer_nss,
peer_ht_rates.num_rates);
mcs = (wmi_vht_rate_set *)buf_ptr;
@@ -6228,9 +6266,9 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
params->vhtCapable,
params->vhtTxChannelWidthSet);
- WMA_LOGD("%s: vdev_id %d associd %d peer_flags %x rate_caps %x\
- peer_caps %x listen_intval %d ht_caps %x max_mpdu %d\
- nss %d phymode %d peer_mpdu_density %d\n", __func__,
+ WMA_LOGD("%s: vdev_id %d associd %d peer_flags %x rate_caps %x "
+ "peer_caps %x listen_intval %d ht_caps %x max_mpdu %d "
+ "nss %d phymode %d peer_mpdu_density %d", __func__,
cmd->vdev_id, cmd->peer_associd, cmd->peer_flags,
cmd->peer_rate_caps, cmd->peer_caps,
cmd->peer_listen_intval, cmd->peer_ht_caps,
@@ -6240,7 +6278,8 @@ static int32_t wmi_unified_send_peer_assoc(tp_wma_handle wma,
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_PEER_ASSOC_CMDID);
if (ret != EOK) {
- WMA_LOGP("Failed to send peer assoc command ret = %d\n", ret);
+ WMA_LOGP("%s: Failed to send peer assoc command ret = %d",
+ __func__, ret);
adf_nbuf_free(buf);
}
return ret;
@@ -6358,7 +6397,7 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
tANI_U8 mcc_channel_latency =
(privcmd->param_value & 0x0000FF00) >> 8;
int ret = -1;
- WMA_LOGD("%s: Parsed input: Channel #1:%d, latency:%dms\n",
+ WMA_LOGD("%s: Parsed input: Channel #1:%d, latency:%dms",
__func__, mcc_channel, mcc_channel_latency);
ret = wma_set_mcc_channel_time_latency
(
@@ -6383,7 +6422,7 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
int ret = -1;
WMA_LOGD("%s: Parsed input: Channel #1:%d, Channel #2:%d,"
- "quota 1:%dms\n", __func__, adapter_1_chan_number,
+ "quota 1:%dms", __func__, adapter_1_chan_number,
adapter_2_chan_number, adapter_1_quota);
ret = wma_set_mcc_channel_time_quota
(
@@ -6444,7 +6483,7 @@ static int32_t wmi_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
buf = wmi_buf_alloc(wmi_handle, len);
if (!buf) {
- WMA_LOGP("Set Sta Ps param Mem Alloc Failed");
+ WMA_LOGP("%s: Set Sta Ps param Mem Alloc Failed", __func__);
return -ENOMEM;
}
@@ -6476,7 +6515,7 @@ wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle, u_int32_t if_id,
int len = sizeof(wmi_vdev_set_gtx_params_cmd_fixed_param);
buf = wmi_buf_alloc(wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s:wmi_buf_alloc failed\n", __FUNCTION__);
+ WMA_LOGE("%s:wmi_buf_alloc failed", __FUNCTION__);
return -1;
}
cmd = (wmi_vdev_set_gtx_params_cmd_fixed_param *)wmi_buf_data(buf);
@@ -6496,7 +6535,7 @@ wmi_unified_vdev_set_gtx_cfg_send(wmi_unified_t wmi_handle, u_int32_t if_id,
WMA_LOGD("Setting vdev%d GTX values:htmcs 0x%x, vhtmcs 0x%x, usermask 0x%x, \
gtxPERThreshold %d, gtxPERMargin %d, gtxTPCstep %d, gtxTPCMin %d, \
- gtxBWMask 0x%x.\n", if_id, cmd->gtxRTMask[0], cmd->gtxRTMask[1],
+ gtxBWMask 0x%x.", if_id, cmd->gtxRTMask[0], cmd->gtxRTMask[1],
cmd->userGtxMask, cmd->gtxPERThreshold, cmd->gtxPERMargin,
cmd->gtxTPCstep, cmd->gtxTPCMin, cmd->gtxBWMask);
return wmi_unified_cmd_send(wmi_handle, buf, len, WMI_VDEV_SET_GTX_PARAMS_CMDID);
@@ -7330,29 +7369,29 @@ wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id,
beaconInterval);
if (ret)
- WMA_LOGE("failed to set WMI_VDEV_PARAM_BEACON_INTERVAL\n");
+ WMA_LOGE("failed to set WMI_VDEV_PARAM_BEACON_INTERVAL");
ret = wmi_unified_vdev_set_gtx_cfg_send(wma->wmi_handle, vdev_id,
&intr[vdev_id].config.gtx_info);
if (ret)
- WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD\n");
+ WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD");
ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
WMI_VDEV_PARAM_DTIM_PERIOD,
dtimPeriod);
if (ret)
- WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD\n");
+ WMA_LOGE("failed to set WMI_VDEV_PARAM_DTIM_PERIOD");
if (!maxTxPower)
{
- WMA_LOGE("Setting Tx power limit to 0\n");
+ WMA_LOGE("Setting Tx power limit to 0");
}
ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
WMI_VDEV_PARAM_TX_PWRLIMIT,
maxTxPower);
if (ret)
- WMA_LOGE("failed to set WMI_VDEV_PARAM_TX_PWRLIMIT\n");
+ WMA_LOGE("failed to set WMI_VDEV_PARAM_TX_PWRLIMIT");
/* Slot time */
if (shortSlotTimeSupported)
@@ -7364,7 +7403,7 @@ wma_vdev_set_bss_params(tp_wma_handle wma, int vdev_id,
WMI_VDEV_PARAM_SLOT_TIME,
slot_time);
if (ret)
- WMA_LOGE("failed to set WMI_VDEV_PARAM_SLOT_TIME\n");
+ WMA_LOGE("failed to set WMI_VDEV_PARAM_SLOT_TIME");
/* Initialize protection mode in case of coexistence */
wma_update_protection_mode(wma, vdev_id, llbCoexist);
@@ -7390,27 +7429,27 @@ static void wma_add_bss_ap_mode(tp_wma_handle wma, tpAddBssParams add_bss)
vdev = wma_find_vdev_by_addr(wma, add_bss->bssId, &vdev_id);
if (!vdev) {
- WMA_LOGE("%s: Failed to get vdev handle\n", __func__);
+ WMA_LOGE("%s: Failed to get vdev handle", __func__);
goto send_fail_resp;
}
wma_set_bss_rate_flags(&wma->interfaces[vdev_id], add_bss);
status = wma_create_peer(wma, pdev, vdev, add_bss->bssId,
WMI_PEER_TYPE_DEFAULT, vdev_id);
if (status != VOS_STATUS_SUCCESS) {
- WMA_LOGE("%s: Failed to create peer\n", __func__);
+ WMA_LOGE("%s: Failed to create peer", __func__);
goto send_fail_resp;
}
peer = ol_txrx_find_peer_by_addr(pdev, add_bss->bssId, &peer_id);
if (!peer) {
- WMA_LOGE("%s Failed to find peer %pM\n", __func__,
+ WMA_LOGE("%s Failed to find peer %pM", __func__,
add_bss->bssId);
goto send_fail_resp;
}
msg = wma_fill_vdev_req(wma, vdev_id, WDA_ADD_BSS_REQ,
WMA_TARGET_REQ_TYPE_VDEV_START, add_bss, 1000);
if (!msg) {
- WMA_LOGP("%s Failed to allocate vdev request vdev_id %d\n",
+ WMA_LOGP("%s Failed to allocate vdev request vdev_id %d",
__func__, vdev_id);
goto peer_cleanup;
}
@@ -7473,7 +7512,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
tDelStaSelfParams del_sta_param;
tAddStaSelfParams add_sta_self_param;
- WMA_LOGD("%s: add_bss->sessionId = %d\n", __func__, add_bss->sessionId);
+ WMA_LOGD("%s: add_bss->sessionId = %d", __func__, add_bss->sessionId);
vdev_id = add_bss->sessionId;
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
@@ -7484,11 +7523,11 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
wma_set_bss_rate_flags(&wma->interfaces[vdev_id], add_bss);
vdev = wma_find_vdev_by_id(wma, vdev_id);
if (vdev) {
- WMA_LOGD("%s: vdev found for vdev id %d. deleting the vdev\n",
+ WMA_LOGD("%s: vdev found for vdev id %d. deleting the vdev",
__func__, vdev_id);
TAILQ_FOREACH(peer, &vdev->peer_list, peer_list_elem) {
- WMA_LOGE("%s: peer found for vdev id %d. deleting the peer\n",
+ WMA_LOGE("%s: peer found for vdev id %d. deleting the peer",
__func__, vdev_id);
wma_remove_peer(wma, (u_int8_t *)&vdev->mac_addr,
vdev_id, peer);
@@ -7504,7 +7543,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
}
else {
- WMA_LOGD("%s: vdev with session id %d not found \n", __func__, vdev_id);
+ WMA_LOGD("%s: vdev with session id %d not found ", __func__, vdev_id);
}
/* create new vdev for ibss */
@@ -7517,25 +7556,25 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
vdev = wma_vdev_attach(wma, &add_sta_self_param, 0);
if (!vdev) {
- WMA_LOGE("%s: Failed to create vdev\n", __func__);
+ WMA_LOGE("%s: Failed to create vdev", __func__);
goto send_fail_resp;
}
WLANTL_RegisterVdev(wma->vos_context, vdev);
/* Register with TxRx Module for Data Ack Complete Cb */
wdi_in_data_tx_cb_set(vdev, wma_data_tx_ack_comp_hdlr, wma);
- WMA_LOGE("%s: new vdev created for IBSS\n", __func__);
+ WMA_LOGE("%s: new vdev created for IBSS", __func__);
/* create self peer */
status = wma_create_peer(wma, pdev, vdev, add_bss->selfMacAddr,
WMI_PEER_TYPE_DEFAULT, vdev_id);
if (status != VOS_STATUS_SUCCESS) {
- WMA_LOGE("%s: Failed to create peer\n", __func__);
+ WMA_LOGE("%s: Failed to create peer", __func__);
goto send_fail_resp;
}
peer = ol_txrx_find_peer_by_addr(pdev, add_bss->selfMacAddr, &peer_id);
if (!peer) {
- WMA_LOGE("%s Failed to find peer %pM\n", __func__,
+ WMA_LOGE("%s Failed to find peer %pM", __func__,
add_bss->selfMacAddr);
goto send_fail_resp;
}
@@ -7546,11 +7585,11 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
msg = wma_fill_vdev_req(wma, vdev_id, WDA_ADD_BSS_REQ,
WMA_TARGET_REQ_TYPE_VDEV_START, add_bss, 1000);
if (!msg) {
- WMA_LOGP("%s Failed to allocate vdev request vdev_id %d\n",
+ WMA_LOGP("%s Failed to allocate vdev request vdev_id %d",
__func__, vdev_id);
goto peer_cleanup;
}
- WMA_LOGD("%s: vdev start request for IBSS enqueued\n", __func__);
+ WMA_LOGD("%s: vdev start request for IBSS enqueued", __func__);
add_bss->staContext.staIdx = ol_txrx_local_peer_id(peer);
@@ -7574,8 +7613,8 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
vos_mem_copy(req.ssid.ssId, add_bss->ssId.ssId,
add_bss->ssId.length);
- WMA_LOGD("%s: chan %d chan_offset %d\n", __func__, req.chan, req.chan_offset);
- WMA_LOGD("%s: ssid = %s\n", __func__, req.ssid.ssId);
+ WMA_LOGD("%s: chan %d chan_offset %d", __func__, req.chan, req.chan_offset);
+ WMA_LOGD("%s: ssid = %s", __func__, req.ssid.ssId);
status = wma_vdev_start(wma, &req, VOS_FALSE);
if (status != VOS_STATUS_SUCCESS) {
@@ -7583,7 +7622,7 @@ static void wma_add_bss_ibss_mode(tp_wma_handle wma, tpAddBssParams add_bss)
WMA_TARGET_REQ_TYPE_VDEV_START);
goto peer_cleanup;
}
- WMA_LOGD("%s: vdev start request for IBSS sent to target\n", __func__);
+ WMA_LOGD("%s: vdev start request for IBSS sent to target", __func__);
/* Initialize protection mode to no protection */
if (wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
@@ -7679,15 +7718,15 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
// Called in preassoc state. BSSID peer is already added by set_linkstate
peer = ol_txrx_find_peer_by_addr(pdev, add_bss->bssId, &peer_id);
if (!peer) {
- WMA_LOGE("%s Failed to find peer %pM\n", __func__,
+ WMA_LOGE("%s Failed to find peer %pM", __func__,
add_bss->bssId);
goto send_fail_resp;
}
msg = wma_fill_vdev_req(wma, vdev_id, WDA_ADD_BSS_REQ,
WMA_TARGET_REQ_TYPE_VDEV_START,
- add_bss, 1000);
+ add_bss, 2000);
if (!msg) {
- WMA_LOGP("%s Failed to allocate vdev request vdev_id %d\n",
+ WMA_LOGP("%s Failed to allocate vdev request vdev_id %d",
__func__, vdev_id);
goto peer_cleanup;
}
@@ -7731,12 +7770,12 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
}
/* Update peer state */
if (add_bss->staContext.encryptType == eSIR_ED_NONE) {
- WMA_LOGD("%s: Update peer(%pM) state into auth\n",
+ WMA_LOGD("%s: Update peer(%pM) state into auth",
__func__, add_bss->bssId);
ol_txrx_peer_state_update(pdev, add_bss->bssId,
ol_txrx_peer_state_auth);
} else {
- WMA_LOGD("%s: Update peer(%pM) state into conn\n",
+ WMA_LOGD("%s: Update peer(%pM) state into conn",
__func__, add_bss->bssId);
ol_txrx_peer_state_update(pdev, add_bss->bssId,
ol_txrx_peer_state_conn);
@@ -7763,7 +7802,7 @@ static void wma_add_bss_sta_mode(tp_wma_handle wma, tpAddBssParams add_bss)
#endif /* WLAN_FEATURE_11W */
if (add_bss->staContext.encryptType == eSIR_ED_NONE) {
- WMA_LOGD("%s: send peer authorize wmi cmd for %pM\n",
+ WMA_LOGD("%s: send peer authorize wmi cmd for %pM",
__func__, add_bss->bssId);
wma_set_peer_param(wma, add_bss->bssId,
WMI_PEER_AUTHORIZE, 1,
@@ -7789,7 +7828,7 @@ send_bss_resp:
vos_mem_copy(add_bss->staContext.staMac, add_bss->bssId,
sizeof(add_bss->staContext.staMac));
WMA_LOGD("%s: opermode %d update_bss %d nw_type %d bssid %pM"
- " staIdx %d status %d\n", __func__, add_bss->operMode,
+ " staIdx %d status %d", __func__, add_bss->operMode,
add_bss->updateBss, add_bss->nwType, add_bss->bssId,
add_bss->staContext.staIdx, add_bss->status);
wma_send_msg(wma, WDA_ADD_BSS_RSP, (void *)add_bss, 0);
@@ -7804,7 +7843,7 @@ send_fail_resp:
static void wma_add_bss(tp_wma_handle wma, tpAddBssParams params)
{
- WMA_LOGD("%s: add_bss_param.halPersona = %d\n",
+ WMA_LOGD("%s: add_bss_param.halPersona = %d",
__func__, params->halPersona);
switch(params->halPersona) {
@@ -7834,12 +7873,12 @@ static int wmi_unified_vdev_up_send(wmi_unified_t wmi,
wmi_buf_t buf;
int32_t len = sizeof(*cmd);
- WMA_LOGD("%s: VDEV_UP\n", __func__);
- WMA_LOGD("%s: vdev_id %d aid %d bssid %pM\n", __func__,
+ WMA_LOGD("%s: VDEV_UP", __func__);
+ WMA_LOGD("%s: vdev_id %d aid %d bssid %pM", __func__,
vdev_id, aid, bssid);
buf = wmi_buf_alloc(wmi, len);
if (!buf) {
- WMA_LOGP("%s:wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_vdev_up_cmd_fixed_param *) wmi_buf_data(buf);
@@ -7850,7 +7889,7 @@ static int wmi_unified_vdev_up_send(wmi_unified_t wmi,
cmd->vdev_assoc_id = aid;
WMI_CHAR_ARRAY_TO_MAC_ADDR(bssid, &cmd->vdev_bssid);
if (wmi_unified_cmd_send(wmi, buf, len, WMI_VDEV_UP_CMDID)) {
- WMA_LOGP("Failed to send vdev up command\n");
+ WMA_LOGP("%s: Failed to send vdev up command", __func__);
adf_nbuf_free(buf);
return -EIO;
}
@@ -7972,7 +8011,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
pdev = vos_get_context(VOS_MODULE_ID_TXRX, wma->vos_context);
if (NULL == pdev) {
- WMA_LOGE("%s: Failed to find pdev\n", __func__);
+ WMA_LOGE("%s: Failed to find pdev", __func__);
add_sta->status = VOS_STATUS_E_FAILURE;
goto send_rsp;
}
@@ -7991,7 +8030,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
vdev = wma_find_vdev_by_id(wma, add_sta->smesessionId);
if (!vdev) {
- WMA_LOGE("%s: Failed to find vdev\n", __func__);
+ WMA_LOGE("%s: Failed to find vdev", __func__);
add_sta->status = VOS_STATUS_E_FAILURE;
goto send_rsp;
}
@@ -7999,7 +8038,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
status = wma_create_peer(wma, pdev, vdev, add_sta->staMac,
WMI_PEER_TYPE_DEFAULT, add_sta->smesessionId);
if (status != VOS_STATUS_SUCCESS) {
- WMA_LOGE("%s: Failed to create peer for %pM\n",
+ WMA_LOGE("%s: Failed to create peer for %pM",
__func__, add_sta->staMac);
add_sta->status = status;
goto send_rsp;
@@ -8008,7 +8047,7 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
peer = ol_txrx_find_peer_by_addr(pdev, add_sta->staMac,
&peer_id);
if (!peer) {
- WMA_LOGE("%s: Failed to find peer handle using peer mac %pM\n",
+ WMA_LOGE("%s: Failed to find peer handle using peer mac %pM",
__func__, add_sta->staMac);
add_sta->status = VOS_STATUS_E_FAILURE;
wma_remove_peer(wma, add_sta->staMac, add_sta->smesessionId, peer);
@@ -8051,14 +8090,14 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
}
}
- WMA_LOGD("%s: Moving peer %pM to state %d\n",
+ WMA_LOGD("%s: Moving peer %pM to state %d",
__func__, add_sta->staMac, state);
ol_txrx_peer_state_update(pdev, add_sta->staMac, state);
add_sta->staIdx = ol_txrx_local_peer_id(peer);
add_sta->status = VOS_STATUS_SUCCESS;
send_rsp:
- WMA_LOGD("%s: Sending add sta rsp to umac (mac:%pM, status:%d)\n",
+ WMA_LOGD("%s: Sending add sta rsp to umac (mac:%pM, status:%d)",
__func__, add_sta->staMac, add_sta->status);
wma_send_msg(wma, WDA_ADD_STA_RSP, (void *)add_sta, 0);
}
@@ -8073,7 +8112,7 @@ static int wmi_unified_nat_keepalive_enable(tp_wma_handle wma,
WMA_LOGD("%s: vdev_id %d", __func__, vdev_id);
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s:wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMD_fixed_param *) wmi_buf_data(buf);
@@ -8084,7 +8123,8 @@ static int wmi_unified_nat_keepalive_enable(tp_wma_handle wma,
cmd->action = IPSEC_NATKEEPALIVE_FILTER_ENABLE;
if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_VDEV_IPSEC_NATKEEPALIVE_FILTER_CMDID)) {
- WMA_LOGP("Failed to send NAT keepalive enable command");
+ WMA_LOGP("%s: Failed to send NAT keepalive enable command",
+ __func__);
wmi_buf_free(buf);
return -EIO;
}
@@ -8101,7 +8141,7 @@ static int wmi_unified_csa_offload_enable(tp_wma_handle wma,
WMA_LOGD("%s: vdev_id %d", __func__, vdev_id);
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s:wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_csa_offload_enable_cmd_fixed_param *) wmi_buf_data(buf);
@@ -8112,7 +8152,8 @@ static int wmi_unified_csa_offload_enable(tp_wma_handle wma,
cmd->csa_offload_enable = WMI_CSA_OFFLOAD_ENABLE;
if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_CSA_OFFLOAD_ENABLE_CMDID)) {
- WMA_LOGP("Failed to send CSA offload enable command");
+ WMA_LOGP("%s: Failed to send CSA offload enable command",
+ __func__);
wmi_buf_free(buf);
return -EIO;
}
@@ -8234,7 +8275,7 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
vdev = wma_find_vdev_by_id(wma, add_sta->smesessionId);
if (!vdev) {
- WMA_LOGE("%s: Failed to find vdev\n", __func__);
+ WMA_LOGE("%s: Failed to find vdev", __func__);
add_sta->status = VOS_STATUS_E_FAILURE;
goto send_rsp;
}
@@ -8247,7 +8288,7 @@ static void wma_add_tdls_sta(tp_wma_handle wma, tpAddStaParams add_sta)
status = wma_create_peer(wma, pdev, vdev, add_sta->staMac,
WMI_PEER_TYPE_TDLS, add_sta->smesessionId);
if (status != VOS_STATUS_SUCCESS) {
- WMA_LOGE("%s: Failed to create peer for %pM\n",
+ WMA_LOGE("%s: Failed to create peer for %pM",
__func__, add_sta->staMac);
add_sta->status = status;
goto send_rsp;
@@ -8340,7 +8381,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
iface = &wma->interfaces[params->smesessionId];
if (params->staType != STA_ENTRY_SELF) {
- WMA_LOGP("%s: unsupported station type %d\n",
+ WMA_LOGP("%s: unsupported station type %d",
__func__, params->staType);
goto out;
}
@@ -8354,19 +8395,19 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
/* Update peer state */
if (params->encryptType == eSIR_ED_NONE) {
- WMA_LOGD("%s: Update peer(%pM) state into auth\n",
+ WMA_LOGD("%s: Update peer(%pM) state into auth",
__func__, params->bssId);
ol_txrx_peer_state_update(pdev, params->bssId,
ol_txrx_peer_state_auth);
} else {
- WMA_LOGD("%s: Update peer(%pM) state into conn\n",
+ WMA_LOGD("%s: Update peer(%pM) state into conn",
__func__, params->bssId);
ol_txrx_peer_state_update(pdev, params->bssId,
ol_txrx_peer_state_conn);
}
if (params->encryptType == eSIR_ED_NONE) {
- WMA_LOGD("%s: send peer authorize wmi cmd for %pM\n",
+ WMA_LOGD("%s: send peer authorize wmi cmd for %pM",
__func__, params->bssId);
wma_set_peer_param(wma, params->bssId,
WMI_PEER_AUTHORIZE, 1,
@@ -8421,8 +8462,8 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
if (wmi_unified_vdev_up_send(wma->wmi_handle, params->smesessionId,
params->assocId, params->bssId) < 0) {
- WMA_LOGP("Failed to send vdev up cmd: vdev %d bssid %pM\n",
- params->smesessionId, params->bssId);
+ WMA_LOGP("%s: Failed to send vdev up cmd: vdev %d bssid %pM",
+ __func__, params->smesessionId, params->bssId);
status = VOS_STATUS_E_FAILURE;
}
else {
@@ -8458,7 +8499,7 @@ static void wma_add_sta_req_sta_mode(tp_wma_handle wma, tpAddStaParams params)
iface->aid = params->assocId;
out:
params->status = status;
- WMA_LOGD("%s: statype %d vdev_id %d aid %d bssid %pM staIdx %d status %d\n",
+ WMA_LOGD("%s: statype %d vdev_id %d aid %d bssid %pM staIdx %d status %d",
__func__, params->staType, params->smesessionId, params->assocId,
params->bssId, params->staIdx, status);
wma_send_msg(wma, WDA_ADD_STA_RSP, (void *)params, 0);
@@ -8486,8 +8527,8 @@ static void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
{
tANI_U8 oper_mode = BSS_OPERATIONAL_MODE_STA;
- WMA_LOGD("%s: add_sta->sessionId = %d.\n", __func__, add_sta->smesessionId);
- WMA_LOGD("%s: add_sta->bssId = %x:%x:%x:%x:%x:%x\n", __func__,
+ WMA_LOGD("%s: add_sta->sessionId = %d.", __func__, add_sta->smesessionId);
+ WMA_LOGD("%s: add_sta->bssId = %x:%x:%x:%x:%x:%x", __func__,
add_sta->bssId[0], add_sta->bssId[1], add_sta->bssId[2],
add_sta->bssId[3], add_sta->bssId[4], add_sta->bssId[5]);
@@ -9002,7 +9043,7 @@ static void wma_delete_sta_req_ap_mode(tp_wma_handle wma,
peer = ol_txrx_peer_find_by_local_id(pdev, del_sta->staIdx);
if (!peer) {
- WMA_LOGE("%s: Failed to get peer handle using peer id %d\n",
+ WMA_LOGE("%s: Failed to get peer handle using peer id %d",
__func__, del_sta->staIdx);
del_sta->status = VOS_STATUS_E_FAILURE;
goto send_del_rsp;
@@ -9013,7 +9054,7 @@ static void wma_delete_sta_req_ap_mode(tp_wma_handle wma,
send_del_rsp:
if (del_sta->respReqd) {
- WMA_LOGD("%s: Sending del rsp to umac (status: %d)\n",
+ WMA_LOGD("%s: Sending del rsp to umac (status: %d)",
__func__, del_sta->status);
wma_send_msg(wma, WDA_DELETE_STA_RSP, (void *)del_sta, 0);
}
@@ -9117,7 +9158,7 @@ static void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
#ifdef QCA_IBSS_SUPPORT
if (wma_is_vdev_in_ibss_mode(wma, del_sta->smesessionId)) {
oper_mode = BSS_OPERATIONAL_MODE_IBSS;
- WMA_LOGD("%s: to delete sta for IBSS mode\n", __func__);
+ WMA_LOGD("%s: to delete sta for IBSS mode", __func__);
}
#endif
@@ -9152,7 +9193,7 @@ static int32_t wmi_unified_vdev_stop_send(wmi_unified_t wmi, u_int8_t vdev_id)
buf = wmi_buf_alloc(wmi, len);
if (!buf) {
- WMA_LOGP("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s : wmi_buf_alloc failed", __func__);
return -ENOMEM;
}
cmd = (wmi_vdev_stop_cmd_fixed_param *) wmi_buf_data(buf);
@@ -9161,7 +9202,7 @@ static int32_t wmi_unified_vdev_stop_send(wmi_unified_t wmi, u_int8_t vdev_id)
WMITLV_GET_STRUCT_TLVLEN(wmi_vdev_stop_cmd_fixed_param));
cmd->vdev_id = vdev_id;
if (wmi_unified_cmd_send(wmi, buf, len, WMI_VDEV_STOP_CMDID)) {
- WMA_LOGP("Failed to send vdev stop command\n");
+ WMA_LOGP("%s: Failed to send vdev stop command", __func__);
adf_nbuf_free(buf);
return -EIO;
}
@@ -9187,7 +9228,7 @@ static void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
peer = ol_txrx_find_peer_by_addr(pdev, params->bssid,
&peer_id);
if (!peer) {
- WMA_LOGP("%s: Failed to find peer %pM\n", __func__,
+ WMA_LOGP("%s: Failed to find peer %pM", __func__,
params->bssid);
status = VOS_STATUS_E_FAILURE;
goto out;
@@ -9215,13 +9256,13 @@ static void wma_delete_bss(tp_wma_handle wma, tpDeleteBssParams params)
msg = wma_fill_vdev_req(wma, params->smesessionId, WDA_DELETE_BSS_REQ,
WMA_TARGET_REQ_TYPE_VDEV_STOP, params, 1000);
if (!msg) {
- WMA_LOGP("%s: Failed to fill vdev request for vdev_id %d\n",
+ WMA_LOGP("%s: Failed to fill vdev request for vdev_id %d",
__func__, params->smesessionId);
status = VOS_STATUS_E_NOMEM;
goto detach_peer;
}
if (wmi_unified_vdev_stop_send(wma->wmi_handle, params->smesessionId)) {
- WMA_LOGP("%s: %d Failed to send vdev stop\n",
+ WMA_LOGP("%s: %d Failed to send vdev stop",
__func__, __LINE__);
wma_remove_vdev_req(wma, params->smesessionId,
WMA_TARGET_REQ_TYPE_VDEV_STOP);
@@ -9249,7 +9290,7 @@ static void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params)
params->state, params->selfMacAddr);
if ((params->state != eSIR_LINK_PREASSOC_STATE) &&
(params->state != eSIR_LINK_DOWN_STATE)) {
- WMA_LOGD("%s: unsupported link state %d\n",
+ WMA_LOGD("%s: unsupported link state %d",
__func__, params->state);
goto out;
}
@@ -9263,13 +9304,13 @@ static void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params)
vdev = wma_find_vdev_by_addr(wma, params->selfMacAddr, &vdev_id);
if (!vdev) {
- WMA_LOGP("%s: vdev not found for addr: %pM\n",
+ WMA_LOGP("%s: vdev not found for addr: %pM",
__func__, params->selfMacAddr);
goto out;
}
if (wma_is_vdev_in_ap_mode(wma, vdev_id)) {
- WMA_LOGD("%s: Ignoring set link req in ap mode\n", __func__);
+ WMA_LOGD("%s: Ignoring set link req in ap mode", __func__);
goto out;
}
@@ -9279,12 +9320,12 @@ static void wma_set_linkstate(tp_wma_handle wma, tpLinkStateParams params)
}
else {
if (wmi_unified_vdev_stop_send(wma->wmi_handle, vdev_id)) {
- WMA_LOGP("%s: %d Failed to send vdev stop\n",
+ WMA_LOGP("%s: %d Failed to send vdev stop",
__func__, __LINE__);
}
peer = ol_txrx_find_peer_by_addr(pdev, params->bssid, &peer_id);
if (peer) {
- WMA_LOGP("%s: Deleting peer %pM vdev id %d\n",
+ WMA_LOGP("%s: Deleting peer %pM vdev id %d",
__func__, params->bssid, vdev_id);
wma_remove_peer(wma, params->bssid, vdev_id, peer);
}
@@ -9309,7 +9350,7 @@ static void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param,
/* TODO: No ack is not present in EdcaParamRecord */
wmm_param->no_ack = 0;
- WMA_LOGD("WMM PARAMS AC[%d]: AIFS %d Min %d Max %d TXOP %d ACM %d NOACK %d\n",
+ WMA_LOGI("WMM PARAMS AC[%d]: AIFS %d Min %d Max %d TXOP %d ACM %d NOACK %d",
ac,
wmm_param->aifs,
wmm_param->cwmin,
@@ -9322,28 +9363,117 @@ static void wma_update_edca_params_for_ac(tSirMacEdcaParamRecord *edca_param,
/*
* Set TX power limit through vdev param
*/
+static void wma_set_tx_power(WMA_HANDLE handle,
+ tMaxTxPowerParams *tx_pwr_params)
+{
+ tp_wma_handle wma_handle = (tp_wma_handle)handle;
+ u_int8_t vdev_id;
+ int ret = -1;
+ void *pdev;
+
+ if (tx_pwr_params->dev_mode == VOS_STA_SAP_MODE ||
+ tx_pwr_params->dev_mode == VOS_P2P_GO_MODE) {
+ pdev = wma_find_vdev_by_addr(wma_handle,
+ tx_pwr_params->bssId, &vdev_id);
+ } else {
+ pdev = wma_find_vdev_by_bssid(wma_handle,
+ tx_pwr_params->bssId, &vdev_id);
+ }
+ if (!pdev) {
+ WMA_LOGE("vdev handle is invalid for %pM", tx_pwr_params->bssId);
+ vos_mem_free(tx_pwr_params);
+ return;
+ }
+ if (tx_pwr_params->power == 0) {
+ /* set to default. Since the app does not care the tx power
+ * we keep the previous setting */
+ wma_handle->interfaces[vdev_id].tx_power = 0;
+ ret = 0;
+ goto end;
+ }
+ if (wma_handle->interfaces[vdev_id].max_tx_power != 0) {
+ /* make sure tx_power less than max_tx_power */
+ if (tx_pwr_params->power >
+ wma_handle->interfaces[vdev_id].max_tx_power) {
+ tx_pwr_params->power =
+ wma_handle->interfaces[vdev_id].max_tx_power;
+ }
+ }
+ if (wma_handle->interfaces[vdev_id].tx_power != tx_pwr_params->power) {
+
+ /* tx_power changed, Push the tx_power to FW */
+ WMA_LOGW("%s: Set TX power limit [WMI_VDEV_PARAM_TX_PWRLIMIT] to %d",
+ __func__, tx_pwr_params->power);
+ ret = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, vdev_id,
+ WMI_VDEV_PARAM_TX_PWRLIMIT, tx_pwr_params->power);
+ if (ret == 0)
+ wma_handle->interfaces[vdev_id].tx_power = tx_pwr_params->power;
+ } else {
+ /* no tx_power change */
+ ret = 0;
+ }
+end:
+ vos_mem_free(tx_pwr_params);
+ if (ret)
+ WMA_LOGE("Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT");
+}
+
+/*
+ * Set TX power limit through vdev param
+ */
static void wma_set_max_tx_power(WMA_HANDLE handle,
- tMaxTxPowerParams *tx_pwr_params)
+ tMaxTxPowerParams *tx_pwr_params)
{
tp_wma_handle wma_handle = (tp_wma_handle)handle;
u_int8_t vdev_id;
int ret = -1;
+ void *pdev;
+ tPowerdBm prev_max_power;
+
+ pdev = wma_find_vdev_by_addr(wma_handle, tx_pwr_params->bssId, &vdev_id);
+ if (pdev == NULL) {
+ /* not in SAP array. Try the station/p2p array */
+ pdev = wma_find_vdev_by_bssid(wma_handle,
+ tx_pwr_params->bssId, &vdev_id);
+ }
+ if (!pdev) {
+ WMA_LOGE("vdev handle is invalid for %pM", tx_pwr_params->bssId);
+ vos_mem_free(tx_pwr_params);
+ return;
+ }
- if (wma_find_vdev_by_addr(wma_handle,
- tx_pwr_params->selfStaMacAddr,
- &vdev_id) != NULL) {
- WMA_LOGD("Set TX power limit [WMI_VDEV_PARAM_TX_PWRLIMIT] to %d",
- tx_pwr_params->power);
+ if (wma_handle->interfaces[vdev_id].max_tx_power == tx_pwr_params->power) {
+ ret = 0;
+ goto end;
+ }
+ prev_max_power = wma_handle->interfaces[vdev_id].max_tx_power;
+ wma_handle->interfaces[vdev_id].max_tx_power = tx_pwr_params->power;
+ if (wma_handle->interfaces[vdev_id].max_tx_power == 0) {
+ ret = 0;
+ goto end;
+ }
+ if (wma_handle->interfaces[vdev_id].tx_power == 0) {
+ ret = 0;
+ goto end;
+ } else if (wma_handle->interfaces[vdev_id].max_tx_power <
+ wma_handle->interfaces[vdev_id].tx_power) {
+ WMA_LOGW("Set MAX TX power limit [WMI_VDEV_PARAM_TX_PWRLIMIT] to %d",
+ wma_handle->interfaces[vdev_id].max_tx_power);
ret = wmi_unified_vdev_set_param_send(wma_handle->wmi_handle, vdev_id,
WMI_VDEV_PARAM_TX_PWRLIMIT,
- tx_pwr_params->power);
- if (ret)
- WMA_LOGE("Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT");
+ wma_handle->interfaces[vdev_id].max_tx_power);
+ if (ret == 0)
+ wma_handle->interfaces[vdev_id].tx_power =
+ wma_handle->interfaces[vdev_id].max_tx_power;
+ else
+ wma_handle->interfaces[vdev_id].max_tx_power = prev_max_power;
+ } else {
+ ret = 0;
}
- else
- WMA_LOGE("Failed to find vdev to set WMI_VDEV_PARAM_TX_PWRLIMIT");
-
- wma_send_msg(wma_handle, WDA_SET_MAX_TX_POWER_RSP, tx_pwr_params, 0);
+end:
+ vos_mem_free(tx_pwr_params);
+ if (ret)
+ WMA_LOGE("%s: Failed to set vdev param WMI_VDEV_PARAM_TX_PWRLIMIT", __func__);
}
/*
@@ -9364,7 +9494,7 @@ static VOS_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle,
buf = wmi_buf_alloc(wma_handle->wmi_handle, len);
if (!buf) {
- WMA_LOGE("%s: wmi_buf_alloc failed\n", __func__);
+ WMA_LOGE("%s: wmi_buf_alloc failed", __func__);
return VOS_STATUS_E_NOMEM;
}
@@ -9411,7 +9541,7 @@ static VOS_STATUS wma_process_update_edca_param_req(WMA_HANDLE handle,
fail:
wmi_buf_free(buf);
- WMA_LOGE("%s: Failed to set WMM Paremeters\n", __func__);
+ WMA_LOGE("%s: Failed to set WMM Paremeters", __func__);
return VOS_STATUS_E_FAILURE;
}
@@ -9502,7 +9632,7 @@ static int wmi_unified_bcn_tmpl_send(tp_wma_handle wma,
wmi_buf, wmi_buf_len,
WMI_BCN_TMPL_CMDID);
if (ret) {
- WMA_LOGE("Failed to send bcn tmpl: %d", ret);
+ WMA_LOGE("%s: Failed to send bcn tmpl: %d", __func__, ret);
wmi_buf_free(wmi_buf);
}
@@ -9608,7 +9738,7 @@ static int wma_tbttoffset_update_event_handler(void *handle, u_int8_t *event,
bcn = intf[if_id].beacon;
if (!bcn->buf) {
- WMA_LOGE("%s: Invalid beacon buffer\n", __func__);
+ WMA_LOGE("%s: Invalid beacon buffer", __func__);
return -EINVAL;
}
/* Save the adjusted TSF */
@@ -9665,7 +9795,7 @@ static int wma_p2p_go_set_beacon_ie(t_wma_handle *wma_handle,
buf_ptr += WMI_TLV_HDR_SIZE;
vos_mem_copy(buf_ptr, p2pIe, ie_len);
- WMA_LOGI("\n%s: Sending WMI_P2P_GO_SET_BEACON_IE", __func__);
+ WMA_LOGI("%s: Sending WMI_P2P_GO_SET_BEACON_IE", __func__);
ret = wmi_unified_cmd_send(wma_handle->wmi_handle,
wmi_buf, wmi_buf_len,
@@ -9676,7 +9806,7 @@ static int wma_p2p_go_set_beacon_ie(t_wma_handle *wma_handle,
wmi_buf_free(wmi_buf);
}
- WMA_LOGI("\n%s: Successfully sent WMI_P2P_GO_SET_BEACON_IE", __func__);
+ WMA_LOGI("%s: Successfully sent WMI_P2P_GO_SET_BEACON_IE", __func__);
return ret;
}
@@ -9693,7 +9823,7 @@ static void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
beacon = (tpAniBeaconStruct)(bcn_info->beacon);
vdev = wma_find_vdev_by_addr(wma, beacon->macHdr.sa, &vdev_id);
if (!vdev) {
- WMA_LOGE("%s : failed to get vdev handle\n", __func__);
+ WMA_LOGE("%s : failed to get vdev handle", __func__);
return;
}
@@ -9708,7 +9838,7 @@ static void wma_send_beacon(tp_wma_handle wma, tpSendbeaconParams bcn_info)
if (bcn_info->p2pIeOffset) {
p2p_ie = bcn_info->beacon + bcn_info->p2pIeOffset;
- WMA_LOGI("\n %s: p2pIe is present - vdev_id %hu, p2p_ie = %p, p2p ie len = %hu",
+ WMA_LOGI(" %s: p2pIe is present - vdev_id %hu, p2p_ie = %p, p2p ie len = %hu",
__func__, vdev_id, p2p_ie, p2p_ie[1]);
if (wma_p2p_go_set_beacon_ie(wma, vdev_id, p2p_ie) < 0) {
WMA_LOGE("%s : wmi_unified_bcn_tmpl_send Failed ", __func__);
@@ -9823,7 +9953,7 @@ static int32_t wmi_unified_set_sta_ps(wmi_unified_t wmi_handle,
buf = wmi_buf_alloc(wmi_handle, len);
if (!buf) {
- WMA_LOGP("Set Sta Mode Ps Mem Alloc Failed");
+ WMA_LOGP("%s: Set Sta Mode Ps Mem Alloc Failed", __func__);
return -ENOMEM;
}
cmd = (wmi_sta_powersave_mode_cmd_fixed_param *) wmi_buf_data(buf);
@@ -11391,12 +11521,17 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
cmd->enable = TRUE;
vos_event_reset(&wma->target_suspend);
+
+ if (wmi_get_host_credits(wma->wmi_handle) < WMI_WOW_REQUIRED_CREDITS) {
+ WMA_LOGE("Cannot Post WMI_WOW_ENABLE_CMDID !. No Credits\n");
+ goto error;
+ }
+
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_WOW_ENABLE_CMDID);
if (ret) {
WMA_LOGE("Failed to enable wow in fw");
- wmi_buf_free(buf);
- return VOS_STATUS_E_FAILURE;
+ goto error;
}
if (vos_wait_single_event(&wma->target_suspend,
@@ -11406,6 +11541,15 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
return VOS_STATUS_E_FAILURE;
}
+ if ((wmi_get_host_credits(wma->wmi_handle) != WMI_MAX_HOST_CREDITS) ||
+ wmi_get_pending_cmds(wma->wmi_handle))
+ {
+ WMA_LOGE("Host Doesn't have enough credits!. FW didn't give enough credits");
+ VOS_BUG(0);
+ return VOS_STATUS_E_FAILURE;
+ }
+
+
WMA_LOGD("WOW enabled successfully in fw");
scn = vos_get_context(VOS_MODULE_ID_HIF, wma->vos_context);
@@ -11419,6 +11563,10 @@ int wma_enable_wow_in_fw(WMA_HANDLE handle)
wma->wow.wow_enable_cmd_sent = TRUE;
return VOS_STATUS_SUCCESS;
+
+error:
+ wmi_buf_free(buf);
+ return VOS_STATUS_E_FAILURE;
}
/* Sends user configured WOW patterns to the firmware. */
@@ -12042,6 +12190,14 @@ enable_wow:
}
vos_mem_free(info);
+ ret = wmi_is_suspend_ready(wma->wmi_handle);
+ if (ret) {
+ WMA_LOGE("WMI Commands are pending in the queue for long time"
+ "FW is not responding with credits");
+ VOS_BUG(0);
+ return VOS_STATUS_E_FAILURE;
+ }
+
send_ready_to_suspend:
wma_send_ready_to_suspend_ind(wma);
@@ -12471,7 +12627,7 @@ static void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg)
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
goto err;
}
cmd = (wmi_vdev_wmm_delts_cmd_fixed_param *) wmi_buf_data(buf);
@@ -12481,11 +12637,11 @@ static void wma_del_ts_req(tp_wma_handle wma, tDelTsParams *msg)
cmd->vdev_id = msg->sessionId;
cmd->ac = TID_TO_WME_AC(msg->userPrio);
- WMA_LOGD("Delts vdev:%d, ac:%d, %s:%d\n",
+ WMA_LOGD("Delts vdev:%d, ac:%d, %s:%d",
cmd->vdev_id, cmd->ac, __FUNCTION__, __LINE__);
if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_VDEV_WMM_DELTS_CMDID)) {
- WMA_LOGP("Failed to send vdev DELTS command\n");
+ WMA_LOGP("%s: Failed to send vdev DELTS command", __func__);
adf_nbuf_free(buf);
}
@@ -12522,7 +12678,7 @@ static void wma_aggr_qos_req(tp_wma_handle wma, tAggrAddTsParams *pAggrQosRspMsg
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
goto aggr_qos_exit;
}
cmd = (wmi_vdev_wmm_addts_cmd_fixed_param *) wmi_buf_data(buf);
@@ -12533,11 +12689,11 @@ static void wma_aggr_qos_req(tp_wma_handle wma, tAggrAddTsParams *pAggrQosRspMsg
cmd->ac = TID_TO_WME_AC(pAggrQosRspMsg->tspec[i].tsinfo.traffic.userPrio);
cmd->medium_time_us = pAggrQosRspMsg->tspec[i].mediumTime * 32;
cmd->downgrade_type = WMM_AC_DOWNGRADE_DEPRIO;
- WMA_LOGD("%s:%d: Addts vdev:%d, ac:%d, mediumTime:%d\n",
+ WMA_LOGD("%s:%d: Addts vdev:%d, ac:%d, mediumTime:%d",
__func__, __LINE__, cmd->vdev_id, cmd->ac, cmd->medium_time_us);
if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_VDEV_WMM_ADDTS_CMDID)) {
- WMA_LOGP("Failed to send vdev ADDTS command\n");
+ WMA_LOGP("%s: Failed to send vdev ADDTS command", __func__);
pAggrQosRspMsg->status[i] = eHAL_STATUS_FAILURE;
adf_nbuf_free(buf);
}
@@ -12577,7 +12733,7 @@ static void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s : wmi_buf_alloc failed\n", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
goto err;
}
cmd = (wmi_vdev_wmm_addts_cmd_fixed_param *) wmi_buf_data(buf);
@@ -12588,11 +12744,11 @@ static void wma_add_ts_req(tp_wma_handle wma, tAddTsParams *msg)
cmd->ac = TID_TO_WME_AC(msg->tspec.tsinfo.traffic.userPrio);
cmd->medium_time_us = msg->tspec.mediumTime * 32;
cmd->downgrade_type = WMM_AC_DOWNGRADE_DEPRIO;
- WMA_LOGD("Addts vdev:%d, ac:%d, mediumTime:%d, %s:%d\n",
+ WMA_LOGD("Addts vdev:%d, ac:%d, mediumTime:%d, %s:%d",
cmd->vdev_id, cmd->ac, cmd->medium_time_us, __func__, __LINE__);
if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_VDEV_WMM_ADDTS_CMDID)) {
- WMA_LOGP("Failed to send vdev ADDTS command\n");
+ WMA_LOGP("%s: Failed to send vdev ADDTS command", __func__);
msg->status = eHAL_STATUS_FAILURE;
adf_nbuf_free(buf);
}
@@ -12837,7 +12993,7 @@ static VOS_STATUS wma_process_mcbc_set_filter_req(tp_wma_handle wma_handle,
}
if (!wma_find_vdev_by_addr(wma_handle, mcbc_param->selfMacAddr, &vdev_id)) {
- WMA_LOGE("%s: Failed to find vdev id for %pM\n",
+ WMA_LOGE("%s: Failed to find vdev id for %pM",
__func__, mcbc_param->bssId);
return VOS_STATUS_E_FAILURE;
}
@@ -13698,7 +13854,7 @@ VOS_STATUS wma_process_rate_update_indicate(tp_wma_handle wma,
static void wma_process_update_membership(tp_wma_handle wma_handle,
tUpdateMembership *membership)
{
- WMA_LOGD("%s: membership = %x \n", __func__,
+ WMA_LOGD("%s: membership = %x ", __func__,
membership->membership);
wma_set_peer_param(wma_handle, membership->peer_mac,
@@ -13709,7 +13865,7 @@ static void wma_process_update_membership(tp_wma_handle wma_handle,
static void wma_process_update_userpos(tp_wma_handle wma_handle,
tUpdateUserPos *userpos)
{
- WMA_LOGD("%s: userPos = %x \n", __func__, userpos->userPos);
+ WMA_LOGD("%s: userPos = %x ", __func__, userpos->userPos);
wma_set_peer_param(wma_handle, userpos->peer_mac,
WMI_PEER_USERPOS, userpos->userPos,
@@ -14022,6 +14178,59 @@ VOS_STATUS wma_process_set_thermal_level(tp_wma_handle wma,
return VOS_STATUS_SUCCESS;
}
+/* function : wma_ProcessTxPowerLimits
+ * Description : This function sends the power limits for 2g/5g to firmware
+ * Args :
+ handle : Pointer to WMA handle
+ * ptxlim : Pointer to power limit values
+ * Returns : VOS_STATUS based on values sent to firmware
+ *
+ */
+VOS_STATUS wma_ProcessTxPowerLimits(WMA_HANDLE handle,
+ tSirTxPowerLimit *ptxlim)
+{
+ tp_wma_handle wma = (tp_wma_handle)handle;
+ int32_t ret = 0;
+ u_int32_t txpower_params2g = 0;
+ u_int32_t txpower_params5g = 0;
+
+ if (!wma || !wma->wmi_handle) {
+ WMA_LOGE("%s: WMA is closed, can not issue tx power limit",
+ __func__);
+ return VOS_STATUS_E_INVAL;
+ }
+ /* Set value and reason code for 2g and 5g power limit */
+
+ SET_PDEV_PARAM_TXPOWER_REASON(txpower_params2g,
+ WMI_PDEV_PARAM_TXPOWER_REASON_SAR);
+ SET_PDEV_PARAM_TXPOWER_VALUE(txpower_params2g,
+ ptxlim->txPower2g);
+
+ SET_PDEV_PARAM_TXPOWER_REASON(txpower_params5g,
+ WMI_PDEV_PARAM_TXPOWER_REASON_SAR);
+ SET_PDEV_PARAM_TXPOWER_VALUE(txpower_params5g,
+ ptxlim->txPower5g);
+
+ WMA_LOGD("%s: txpower2g: %x txpower5g: %x",
+ __func__, txpower_params2g, txpower_params5g);
+
+ ret = wmi_unified_pdev_set_param(wma->wmi_handle,
+ WMI_PDEV_PARAM_TXPOWER_LIMIT2G, txpower_params2g);
+ if (ret) {
+ WMA_LOGE("%s: Failed to set txpower 2g (%d)",
+ __func__, ret);
+ return VOS_STATUS_E_FAILURE;
+ }
+ ret = wmi_unified_pdev_set_param(wma->wmi_handle,
+ WMI_PDEV_PARAM_TXPOWER_LIMIT5G, txpower_params5g);
+ if (ret) {
+ WMA_LOGE("%s: Failed to set txpower 5g (%d)",
+ __func__, ret);
+ return VOS_STATUS_E_FAILURE;
+ }
+ return VOS_STATUS_SUCCESS;
+}
+
/*
* FUNCTION: wma_ProcessAddPeriodicTxPtrnInd
* WMI command sent to firmware to add patterns
@@ -14146,6 +14355,112 @@ VOS_STATUS wma_ProcessDelPeriodicTxPtrnInd(WMA_HANDLE handle,
return VOS_STATUS_SUCCESS;
}
+static void wma_set_p2pgo_noa_Req(tp_wma_handle wma,
+ tP2pPsParams *noa)
+{
+ wmi_p2p_set_noa_cmd_fixed_param *cmd;
+ wmi_p2p_noa_descriptor *noa_discriptor;
+ wmi_buf_t buf;
+ u_int8_t *buf_ptr;
+ u_int16_t len;
+ int32_t status;
+ u_int32_t duration;
+
+ WMA_LOGD("%s: Enter", __func__);
+ len = sizeof(*cmd) + WMI_TLV_HDR_SIZE + sizeof(*noa_discriptor);
+ buf = wmi_buf_alloc(wma->wmi_handle, len);
+ if (!buf) {
+ WMA_LOGE("Failed to allocate memory");
+ goto end;
+ }
+
+ buf_ptr = (u_int8_t *) wmi_buf_data(buf);
+ cmd = (wmi_p2p_set_noa_cmd_fixed_param *) buf_ptr;
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_p2p_set_noa_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_p2p_set_noa_cmd_fixed_param));
+ duration = (noa->count == 1)? noa->single_noa_duration : noa->duration;
+ cmd->vdev_id = noa->sessionId;
+ cmd->enable = (duration)? true : false;
+ cmd->num_noa = 1;
+
+ WMITLV_SET_HDR((buf_ptr + sizeof(wmi_p2p_set_noa_cmd_fixed_param)),
+ WMITLV_TAG_ARRAY_STRUC,
+ sizeof(wmi_p2p_noa_descriptor));
+ noa_discriptor = (wmi_p2p_noa_descriptor *) (buf_ptr +
+ sizeof(wmi_p2p_set_noa_cmd_fixed_param) +
+ WMI_TLV_HDR_SIZE);
+ WMITLV_SET_HDR(&noa_discriptor->tlv_header,
+ WMITLV_TAG_STRUC_wmi_p2p_noa_descriptor,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_p2p_noa_descriptor));
+ noa_discriptor->type_count = noa->count;
+ noa_discriptor->duration = duration;
+ noa_discriptor->interval = noa->interval;
+ noa_discriptor->start_time = 0;
+
+ WMA_LOGI("SET P2P GO NOA:vdev_id:%d count:%d duration:%d interval:%d",
+ cmd->vdev_id, noa->count, noa_discriptor->duration,
+ noa->interval);
+ status = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
+ WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID);
+ if (status != EOK) {
+ WMA_LOGE("Failed to send WMI_FWTEST_P2P_SET_NOA_PARAM_CMDID");
+ wmi_buf_free(buf);
+ }
+
+end:
+ WMA_LOGD("%s: Exit", __func__);
+}
+
+static void wma_set_p2pgo_oppps_req(tp_wma_handle wma,
+ tP2pPsParams *oppps)
+{
+ wmi_p2p_set_oppps_cmd_fixed_param *cmd;
+ wmi_buf_t buf;
+ int32_t status;
+
+ WMA_LOGD("%s: Enter", __func__);
+ buf = wmi_buf_alloc(wma->wmi_handle, sizeof(*cmd));
+ if (!buf) {
+ WMA_LOGE("Failed to allocate memory");
+ goto end;
+ }
+
+ cmd = (wmi_p2p_set_oppps_cmd_fixed_param *) wmi_buf_data(buf);
+ WMITLV_SET_HDR(&cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_p2p_set_oppps_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_p2p_set_oppps_cmd_fixed_param));
+ cmd->vdev_id = oppps->sessionId;
+ if (oppps->ctWindow)
+ WMI_UNIFIED_OPPPS_ATTR_ENABLED_SET(cmd);
+
+ WMI_UNIFIED_OPPPS_ATTR_CTWIN_SET(cmd, oppps->ctWindow);
+ WMA_LOGI("SET P2P GO OPPPS:vdev_id:%d ctwindow:%d",
+ cmd->vdev_id, oppps->ctWindow);
+ status = wmi_unified_cmd_send(wma->wmi_handle, buf, sizeof(*cmd),
+ WMI_P2P_SET_OPPPS_PARAM_CMDID);
+ if (status != EOK) {
+ WMA_LOGE("Failed to send WMI_P2P_SET_OPPPS_PARAM_CMDID");
+ wmi_buf_free(buf);
+ }
+
+end:
+ WMA_LOGD("%s: Exit", __func__);
+}
+
+static void wma_process_set_p2pgo_noa_Req(tp_wma_handle wma,
+ tP2pPsParams *ps_params)
+{
+ WMA_LOGD("%s: Enter", __func__);
+ if (ps_params->count == 0 && ps_params->interval == 0) {
+ wma_set_p2pgo_oppps_req(wma, ps_params);
+ } else {
+ wma_set_p2pgo_noa_Req(wma, ps_params);
+ }
+
+ WMA_LOGD("%s: Exit", __func__);
+}
+
/*
* function : wma_mc_process_msg
* Descriptin :
@@ -14159,7 +14474,7 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
ol_txrx_vdev_handle txrx_vdev_handle = NULL;
extern tANI_U8* macTraceGetWdaMsgString( tANI_U16 wdaMsg );
- WMA_LOGD("%s: Enter", __func__);
+ WMA_LOGI("%s: Enter", __func__);
if(NULL == msg) {
WMA_LOGE("msg is NULL");
VOS_ASSERT(0);
@@ -14173,7 +14488,7 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
vos_context);
if (NULL == wma_handle) {
- WMA_LOGP("wma_handle is NULL");
+ WMA_LOGP("%s: wma_handle is NULL", __func__);
VOS_ASSERT(0);
vos_mem_free(msg->bodyptr);
vos_status = VOS_STATUS_E_INVAL;
@@ -14300,6 +14615,10 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
wma_disable_uapsd_mode(wma_handle,
(tpDisableUapsdParams)msg->bodyptr);
break;
+ case WDA_SET_TX_POWER_REQ:
+ wma_set_tx_power(wma_handle,
+ (tpMaxTxPowerParams)msg->bodyptr);
+ break;
case WDA_SET_MAX_TX_POWER_REQ:
wma_set_max_tx_power(wma_handle,
(tpMaxTxPowerParams)msg->bodyptr);
@@ -14491,7 +14810,11 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
(tSirDelPeriodicTxPtrn *)msg->bodyptr);
vos_mem_free(msg->bodyptr);
break;
-
+ case WDA_TX_POWER_LIMIT:
+ wma_ProcessTxPowerLimits(wma_handle,
+ (tSirTxPowerLimit *)msg->bodyptr);
+ vos_mem_free(msg->bodyptr);
+ break;
#ifdef FEATURE_WLAN_LPHB
case WDA_LPHB_CONF_REQ:
wma_process_lphb_conf_req(wma_handle, (tSirLPHBReq *)msg->bodyptr);
@@ -14513,6 +14836,12 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
wma_process_set_thermal_level(wma_handle, (u_int8_t *) msg->bodyptr);
break;
+ case WDA_SET_P2P_GO_NOA_REQ:
+ wma_process_set_p2pgo_noa_Req(wma_handle,
+ (tP2pPsParams *)msg->bodyptr);
+ vos_mem_free(msg->bodyptr);
+ break;
+
default:
WMA_LOGD("unknow msg type %x", msg->type);
/* Do Nothing? MSG Body should be freed at here */
@@ -14521,7 +14850,7 @@ VOS_STATUS wma_mc_process_msg(v_VOID_t *vos_context, vos_msg_t *msg)
}
}
end:
- WMA_LOGD("%s: Exit", __func__);
+ WMA_LOGI("%s: Exit", __func__);
return vos_status ;
}
@@ -14590,7 +14919,7 @@ static int wma_scan_event_callback(WMA_HANDLE handle, u_int8_t *data,
break;
}
case WMI_SCAN_EVENT_RESTARTED:
- WMA_LOGP("Unexpected Scan Event %u", wmi_event->event);
+ WMA_LOGP("%s: Unexpected Scan Event %u", __func__, wmi_event->event);
break;
}
@@ -14703,7 +15032,7 @@ wma_mgmt_tx_dload_comp_hldr(void *wma_context, adf_nbuf_t netbuf,
vos_status = vos_event_set(
&wma_handle->tx_frm_download_comp_event);
if (!VOS_IS_STATUS_SUCCESS(vos_status))
- WMA_LOGP("Event Set failed - tx_frm_comp_event");
+ WMA_LOGP("%s: Event Set failed - tx_frm_comp_event", __func__);
}
/**
@@ -14891,7 +15220,7 @@ static int wma_nlo_scan_cmp_evt_handler(void *handle, u_int8_t *event,
/* FW need explict stop to really stop PNO operation */
status = wma_pno_stop(wma, nlo_event->vdev_id);
if (status)
- WMA_LOGE("Failed to stop PNO scan\n");
+ WMA_LOGE("Failed to stop PNO scan");
scan_event = (tSirScanOffloadEvent *) vos_mem_malloc(
sizeof(tSirScanOffloadEvent));
@@ -14944,13 +15273,13 @@ static int wma_mcc_vdev_tx_pause_evt_handler(void *handle, u_int8_t *event,
}
else
{
- WMA_LOGD("Found vdev %d\n", vdev_id);
+ WMA_LOGI("Found vdev %d", vdev_id);
break;
}
}
- WMA_LOGD("vdev_id %d, vdev_map 0x%x, tid_map 0x%x,"
- " pause_type 0x%x, action 0x%x, peer_id 0x%x\n",
+ WMA_LOGI("vdev_id %d, vdev_map 0x%x, tid_map 0x%x,"
+ " pause_type 0x%x, action 0x%x, peer_id 0x%x",
vdev_id, wmi_event->vdev_map, wmi_event->tid_map,
wmi_event->pause_type, wmi_event->action, wmi_event->peer_id);
@@ -15162,7 +15491,7 @@ wma_batch_scan_result_event_handler
network_info = param_tlvs->network_list;
scan_num = fix_param->numScanLists;
- WMA_LOGE("%s: scan_num %d isLast %d\n", __func__, scan_num,
+ WMA_LOGE("%s: scan_num %d isLast %d", __func__, scan_num,
fix_param->isLastResult);
if (NULL == pMac)
@@ -15186,17 +15515,17 @@ wma_batch_scan_result_event_handler
scan_list->numNetworksInScanList);
netinfo_num = scan_list->numNetworksInScanList;
WMA_LOGD("scanId %d numNetworksInScanList %d "
- "netWorkStartIndex %d\n", scan_list->scanId,
+ "netWorkStartIndex %d", scan_list->scanId,
scan_list->numNetworksInScanList, scan_list->netWorkStartIndex);
scan_list++;
}
total_size += (sizeof(tSirBatchScanResultIndParam) +
sizeof(tSirBatchScanList) * scan_num);
- WMA_LOGE("%s: Batch scan response length %d\n", __func__, total_size);
+ WMA_LOGE("%s: Batch scan response length %d", __func__, total_size);
pHddResult = (tSirBatchScanResultIndParam *)vos_mem_malloc(total_size);
if (NULL == pHddResult)
{
- WMA_LOGE("%s:Could not allocate memory for len %d\n", __func__,
+ WMA_LOGE("%s:Could not allocate memory for len %d", __func__,
total_size);
goto done;
}
@@ -15261,7 +15590,7 @@ wma_batch_scan_result_event_handler
}
else
{
- WMA_LOGE("invalid ssid_len %d received from target\n",
+ WMA_LOGE("invalid ssid_len %d received from target",
network_info->ssid.ssid_len);
pHddApMetaInfo->ssid[0] = '\0';
}
@@ -15336,7 +15665,7 @@ wma_batch_scan_enable_event_handler
param_tlvs = (WMI_BATCH_SCAN_ENABLED_EVENTID_param_tlvs *)data;
fix_param = param_tlvs->fixed_param;
- WMA_LOGD("%s: support number of scan %d\n",__func__,
+ WMA_LOGD("%s: support number of scan %d",__func__,
fix_param->supportedMscan);
/*Call HDD callback*/
@@ -15494,7 +15823,7 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
/* validate the wma_handle */
if (NULL == wma_handle) {
- WMA_LOGP("Invalid handle");
+ WMA_LOGP("%s: Invalid handle", __func__);
vos_status = VOS_STATUS_E_INVAL;
goto end;
}
@@ -15505,7 +15834,7 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
/* start cfg download to soc */
vos_status = wma_cfg_download_isoc(wma_handle->vos_context, wma_handle);
if (vos_status != 0) {
- WMA_LOGP("failed to download the cfg to FW");
+ WMA_LOGP("%s: failed to download the cfg to FW", __func__);
vos_status = VOS_STATUS_E_FAILURE;
goto end;
}
@@ -15520,7 +15849,7 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
WMI_SCAN_EVENTID,
wma_scan_event_callback);
if (0 != status) {
- WMA_LOGP("Failed to register scan callback");
+ WMA_LOGP("%s: Failed to register scan callback", __func__);
vos_status = VOS_STATUS_E_FAILURE;
goto end;
}
@@ -15529,7 +15858,7 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
WMI_ROAM_EVENTID,
wma_roam_event_callback);
if (0 != status) {
- WMA_LOGP("Failed to register Roam callback");
+ WMA_LOGP("%s: Failed to register Roam callback", __func__);
vos_status = VOS_STATUS_E_FAILURE;
goto end;
}
@@ -15538,7 +15867,8 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
WMI_WOW_WAKEUP_HOST_EVENTID,
wma_wow_wakeup_host_event);
if (status) {
- WMA_LOGP("Failed to register wow wakeup host event handler");
+ WMA_LOGP("%s: Failed to register wow wakeup host event handler",
+ __func__);
vos_status = VOS_STATUS_E_FAILURE;
goto end;
}
@@ -15649,7 +15979,7 @@ VOS_STATUS wma_start(v_VOID_t *vos_ctx)
vos_status = wma_tx_attach(wma_handle);
if(vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("Failed to register tx management");
+ WMA_LOGP("%s: Failed to register tx management", __func__);
goto end;
}
@@ -15684,7 +16014,7 @@ VOS_STATUS wma_stop(v_VOID_t *vos_ctx, tANI_U8 reason)
/* validate the wma_handle */
if (NULL == wma_handle) {
- WMA_LOGP("Invalid handle");
+ WMA_LOGP("%s: Invalid handle", __func__);
vos_status = VOS_STATUS_E_INVAL;
goto end;
}
@@ -15718,12 +16048,12 @@ VOS_STATUS wma_stop(v_VOID_t *vos_ctx, tANI_U8 reason)
#else
/* Suspend the target and disable interrupt */
if (wma_suspend_target(wma_handle, 1))
- WMA_LOGE("Failed to suspend target\n");
+ WMA_LOGE("Failed to suspend target");
#endif
vos_status = wma_tx_detach(wma_handle);
if(vos_status != VOS_STATUS_SUCCESS) {
- WMA_LOGP("Failed to deregister tx management");
+ WMA_LOGP("%s: Failed to deregister tx management", __func__);
goto end;
}
@@ -15828,7 +16158,7 @@ VOS_STATUS wma_close(v_VOID_t *vos_ctx)
/* unregister Firmware debug log */
vos_status = dbglog_deinit(wma_handle->wmi_handle);
if(vos_status != VOS_STATUS_SUCCESS)
- WMA_LOGP("dbglog_deinit failed");
+ WMA_LOGP("%s: dbglog_deinit failed", __func__);
vos_wake_lock_destroy(&wma_handle->pm_qos_lock);
@@ -15929,7 +16259,7 @@ static void wma_alloc_host_mem(tp_wma_handle wma_handle, u_int32_t req_id,
unit_len);
if (allocated_units == 0) {
WMA_LOGE("FAILED TO ALLOCATED memory unit len %d"
- " units requested %d units allocated %d \n",
+ " units requested %d units allocated %d ",
unit_len, num_units,
(num_units - remaining_units));
wma_handle->num_mem_chunks = idx;
@@ -15940,7 +16270,7 @@ static void wma_alloc_host_mem(tp_wma_handle wma_handle, u_int32_t req_id,
if (idx == MAX_MEM_CHUNKS ) {
WMA_LOGE("RWACHED MAX CHUNK LIMIT for memory units %d"
" unit len %d requested by FW,"
- " only allocated %d \n",
+ " only allocated %d ",
num_units,unit_len,
(num_units - remaining_units));
wma_handle->num_mem_chunks = idx;
@@ -16018,9 +16348,9 @@ static inline void wma_update_target_ht_cap(tp_wma_handle wh,
/* RF chains */
cfg->num_rf_chains = wh->num_rf_chains;
- WMA_LOGD("\n%s: ht_cap_info - %x ht_rx_stbc - %d, ht_tx_stbc - %d\n\
+ WMA_LOGD("%s: ht_cap_info - %x ht_rx_stbc - %d, ht_tx_stbc - %d\n\
mpdu_density - %d ht_rx_ldpc - %d ht_sgi_20 - %d\n\
- ht_sgi_40 - %d num_rf_chains - %d \n", __func__,
+ ht_sgi_40 - %d num_rf_chains - %d ", __func__,
wh->ht_cap_info, cfg->ht_rx_stbc, cfg->ht_tx_stbc,
cfg->mpdu_density, cfg->ht_rx_ldpc, cfg->ht_sgi_20,
cfg->ht_sgi_40, cfg->num_rf_chains);
@@ -16092,9 +16422,9 @@ static inline void wma_update_target_vht_cap(tp_wma_handle wh,
/* VHT TXOP PS cap */
cfg->vht_txop_ps = wh->vht_cap_info & IEEE80211_VHTCAP_TXOP_PS;
- WMA_LOGD("\n %s: max_mpdu %d supp_chan_width %x rx_ldpc %x\n \
+ WMA_LOGD(" %s: max_mpdu %d supp_chan_width %x rx_ldpc %x\n \
short_gi_80 %x tx_stbc %x rx_stbc %x txop_ps %x\n \
- su_bformee %x mu_bformee %x max_ampdu_len_exp %d\n",
+ su_bformee %x mu_bformee %x max_ampdu_len_exp %d",
__func__, cfg->vht_max_mpdu, cfg->supp_chan_width,
cfg->vht_rx_ldpc, cfg->vht_short_gi_80, cfg->vht_tx_stbc,
cfg->vht_rx_stbc, cfg->vht_txop_ps, cfg->vht_su_bformee,
@@ -16169,7 +16499,7 @@ static wmi_buf_t wma_setup_wmi_init_msg(tp_wma_handle wma_handle,
#endif
buf = wmi_buf_alloc(wma_handle->wmi_handle, *len + mem_chunk_len);
if (!buf) {
- WMA_LOGP("wmi_buf_alloc failed");
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return NULL;
}
@@ -16209,7 +16539,7 @@ static wmi_buf_t wma_setup_wmi_init_msg(tp_wma_handle wma_handle,
*/
num_units = resource_cfg->num_peers + 1;
}
- WMA_LOGD("idx %d req %d num_units %d num_unit_info %d unit size %d actual units %d \n",
+ WMA_LOGD("idx %d req %d num_units %d num_unit_info %d unit size %d actual units %d ",
idx, ev_mem_reqs[idx].req_id,
ev_mem_reqs[idx].num_units,
ev_mem_reqs[idx].num_unit_info,
@@ -16226,7 +16556,7 @@ static wmi_buf_t wma_setup_wmi_init_msg(tp_wma_handle wma_handle,
host_mem_chunks[idx].size = wma_handle->mem_chunks[idx].len;
host_mem_chunks[idx].req_id =
wma_handle->mem_chunks[idx].req_id;
- WMA_LOGD("chunk %d len %d requested ,ptr 0x%x \n",
+ WMA_LOGD("chunk %d len %d requested ,ptr 0x%x ",
idx, host_mem_chunks[idx].size,
host_mem_chunks[idx].ptr) ;
}
@@ -16281,13 +16611,13 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info)
param_buf = (WMI_SERVICE_READY_EVENTID_param_tlvs *) cmd_param_info;
if (!(handle && param_buf)) {
- WMA_LOGP("Invalid arguments");
+ WMA_LOGP("%s: Invalid arguments", __func__);
return;
}
ev = param_buf->fixed_param;
if (!ev) {
- WMA_LOGP("Invalid buffer");
+ WMA_LOGP("%s: Invalid buffer", __func__);
return;
}
@@ -16306,7 +16636,7 @@ v_VOID_t wma_rx_service_ready_event(WMA_HANDLE handle, void *cmd_param_info)
wma_handle->target_fw_version = ev->fw_build_vers;
- WMA_LOGD("%s: Firmware build version : %08x\n", __func__, ev->fw_build_vers);
+ WMA_LOGD("%s: Firmware build version : %08x", __func__, ev->fw_build_vers);
/* TODO: Recheck below line to dump service ready event */
/* dbg_print_wmi_service_11ac(ev); */
@@ -16444,7 +16774,7 @@ v_VOID_t wma_rx_ready_event(WMA_HANDLE handle, void *cmd_param_info)
param_buf = (WMI_READY_EVENTID_param_tlvs *) cmd_param_info;
if (!(wma_handle && param_buf)) {
- WMA_LOGP("Invalid arguments");
+ WMA_LOGP("%s: Invalid arguments", __func__);
VOS_ASSERT(0);
return;
}
@@ -16719,8 +17049,8 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
( void** ) &pPacket );
if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
- WMA_LOGP("Failed to allocate %d bytes for RMF"
- " status code (%x)", newFrmLen, vos_status);
+ WMA_LOGP("%s: Failed to allocate %d bytes for RMF status "
+ "code (%x)", __func__, newFrmLen, vos_status);
/* Free the original packet memory */
palPktFree( pMac->hHdd, HAL_TXRX_FRM_802_11_MGMT,
( void* ) pData, ( void* ) tx_frame );
@@ -16869,7 +17199,8 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
&wma_handle->tx_frm_download_comp_event);
if (!VOS_IS_STATUS_SUCCESS(vos_status)) {
- WMA_LOGP("Event Reset failed tx comp event %x",vos_status);
+ WMA_LOGP("%s: Event Reset failed tx comp event %x",
+ __func__, vos_status);
goto error;
}
}
@@ -16900,7 +17231,7 @@ VOS_STATUS WDA_TxPacket(void *wma_context, void *tx_frame, u_int16_t frmLen,
* Return Failure so that umac can freeup the buf
*/
if (status) {
- WMA_LOGP("Failed to send Mgmt Frame");
+ WMA_LOGP("%s: Failed to send Mgmt Frame", __func__);
goto error;
}
@@ -16963,7 +17294,7 @@ v_VOID_t wma_setneedshutdown(v_VOID_t *vos_ctx)
wma_handle = vos_get_context(VOS_MODULE_ID_WDA, vos_ctx);
if (NULL == wma_handle) {
- WMA_LOGP("Invalid arguments");
+ WMA_LOGP("%s: Invalid arguments", __func__);
VOS_ASSERT(0);
return;
}
@@ -16986,7 +17317,7 @@ v_VOID_t wma_setneedshutdown(v_VOID_t *vos_ctx)
wma_handle = vos_get_context(VOS_MODULE_ID_WDA, vos_ctx);
if (NULL == wma_handle) {
- WMA_LOGP("Invalid arguments");
+ WMA_LOGP("%s: Invalid arguments", __func__);
VOS_ASSERT(0);
return 0;
}
@@ -17005,7 +17336,7 @@ VOS_STATUS wma_wait_for_ready_event(WMA_HANDLE handle)
WMA_READY_EVENTID_TIMEOUT );
if (VOS_STATUS_SUCCESS != vos_status) {
- WMA_LOGP("Timeout waiting for ready event from FW");
+ WMA_LOGP("%s: Timeout waiting for ready event from FW", __func__);
vos_status = VOS_STATUS_E_FAILURE;
}
return vos_status;
@@ -17021,7 +17352,7 @@ int wma_suspend_target(WMA_HANDLE handle, int disable_target_intr)
struct ol_softc *scn;
if (!wma_handle || !wma_handle->wmi_handle) {
- WMA_LOGE("WMA is closed. can not issue suspend cmd\n");
+ WMA_LOGE("WMA is closed. can not issue suspend cmd");
return -EINVAL;
}
/*
@@ -17349,7 +17680,7 @@ void wma_utf_attach(tp_wma_handle wma_handle)
wma_process_utf_event);
if (ret)
- WMA_LOGP("Failed to register UTF event callback");
+ WMA_LOGP("%s: Failed to register UTF event callback", __func__);
}
static int
@@ -17552,13 +17883,13 @@ void wma_send_regdomain_info(u_int32_t reg_dmn, u_int16_t regdmn2G,
tp_wma_handle wma = vos_get_context(VOS_MODULE_ID_WDA, vos_context);
if (NULL == wma) {
- WMA_LOGE("%s : wma context is NULL", __func__);
+ WMA_LOGE("%s: wma context is NULL", __func__);
return;
}
buf = wmi_buf_alloc(wma->wmi_handle, len);
if (!buf) {
- WMA_LOGP("%s : wmi_buf_alloc failed", __func__);
+ WMA_LOGP("%s: wmi_buf_alloc failed", __func__);
return;
}
cmd = (wmi_pdev_set_regdomain_cmd_fixed_param *) wmi_buf_data(buf);
@@ -17574,7 +17905,8 @@ void wma_send_regdomain_info(u_int32_t reg_dmn, u_int16_t regdmn2G,
if (wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_PDEV_SET_REGDOMAIN_CMDID)) {
- WMA_LOGP("Failed to send pdev set regdomain command");
+ WMA_LOGP("%s: Failed to send pdev set regdomain command",
+ __func__);
adf_nbuf_free(buf);
}
return;
@@ -17717,7 +18049,7 @@ static eHalStatus wma_set_ppsconfig(tANI_U8 vdev_id, tANI_U16 pps_param, int val
goto pkt_pwr_save_config;
#endif
pkt_pwr_save_config:
- WMA_LOGD("vdev_id:%d val:0x%x pps_val:0x%x\n", vdev_id,
+ WMA_LOGD("vdev_id:%d val:0x%x pps_val:0x%x", vdev_id,
val, pps_val);
ret = wmi_unified_vdev_set_param_send(wma->wmi_handle, vdev_id,
WMI_VDEV_PARAM_PACKET_POWERSAVE, pps_val);
@@ -17927,7 +18259,7 @@ wma_dfs_configure(struct ieee80211com *ic)
int dfsdomain;
if(ic == NULL)
{
- WMA_LOGE("%s: DFS ic is Invalid\n",__func__);
+ WMA_LOGE("%s: DFS ic is Invalid",__func__);
return;
}
@@ -17944,7 +18276,7 @@ wma_dfs_configure(struct ieee80211com *ic)
switch (dfsdomain)
{
case DFS_FCC_DOMAIN:
- WMA_LOGI("%s: DFS-FCC domain\n",__func__);
+ WMA_LOGI("%s: DFS-FCC domain",__func__);
rinfo.dfsdomain = DFS_FCC_DOMAIN;
rinfo.dfs_radars = dfs_fcc_radars;
rinfo.numradars = ARRAY_LENGTH(dfs_fcc_radars);
@@ -17952,7 +18284,7 @@ wma_dfs_configure(struct ieee80211com *ic)
rinfo.numb5radars = ARRAY_LENGTH(dfs_fcc_bin5pulses);
break;
case DFS_ETSI_DOMAIN:
- WMA_LOGI("%s: DFS-ETSI domain\n",__func__);
+ WMA_LOGI("%s: DFS-ETSI domain",__func__);
rinfo.dfsdomain = DFS_ETSI_DOMAIN;
rinfo.dfs_radars = dfs_etsi_radars;
rinfo.numradars = ARRAY_LENGTH(dfs_etsi_radars);
@@ -17960,7 +18292,7 @@ wma_dfs_configure(struct ieee80211com *ic)
rinfo.numb5radars = 0;
break;
case DFS_MKK4_DOMAIN:
- WMA_LOGI("%s: DFS-MKK4 domain\n",__func__);
+ WMA_LOGI("%s: DFS-MKK4 domain",__func__);
rinfo.dfsdomain = DFS_MKK4_DOMAIN;
rinfo.dfs_radars = dfs_mkk4_radars;
rinfo.numradars = ARRAY_LENGTH(dfs_mkk4_radars);
@@ -17968,7 +18300,7 @@ wma_dfs_configure(struct ieee80211com *ic)
rinfo.numb5radars = ARRAY_LENGTH(dfs_jpn_bin5pulses);
break;
default:
- WMA_LOGI("%s: DFS-UNINT domain\n",__func__);
+ WMA_LOGI("%s: DFS-UNINT domain",__func__);
rinfo.dfsdomain = DFS_UNINIT_DOMAIN;
rinfo.dfs_radars = NULL;
rinfo.numradars = 0;
@@ -17998,7 +18330,7 @@ wma_dfs_configure_channel(struct ieee80211com *dfs_ic,
{
if(dfs_ic == NULL)
{
- WMA_LOGE("%s: DFS ic is Invalid\n",__func__);
+ WMA_LOGE("%s: DFS ic is Invalid",__func__);
return NULL;
}
dfs_ic->ic_curchan = (struct ieee80211_channel *) OS_MALLOC(NULL,
@@ -18056,7 +18388,7 @@ wma_dfs_configure_channel(struct ieee80211com *dfs_ic,
* Configuring the DFS with current channel and the radar filters
*/
wma_dfs_configure(dfs_ic);
- WMA_LOGI("%s: DFS- CHANNEL CONFIGURED\n",__func__);
+ WMA_LOGI("%s: DFS- CHANNEL CONFIGURED",__func__);
return dfs_ic->ic_curchan;
}
/*
@@ -18071,7 +18403,7 @@ wma_set_dfs_regdomain(tp_wma_handle wma)
if (regdmn < 0)
{
- WMA_LOGE("%s:DFS-Invalid regdomain\n",__func__);
+ WMA_LOGE("%s:DFS-Invalid regdomain",__func__);
}
regdmn5G = get_regdmn_5g(regdmn);
@@ -18079,24 +18411,24 @@ wma_set_dfs_regdomain(tp_wma_handle wma)
if (!ctl)
{
- WMA_LOGI("%s:DFS-Invalid CTL\n",__func__);
+ WMA_LOGI("%s:DFS-Invalid CTL",__func__);
}
if (ctl == FCC)
{
- WMA_LOGI("%s:DFS- CTL = FCC\n",__func__);
+ WMA_LOGI("%s:DFS- CTL = FCC",__func__);
wma->dfs_ic->current_dfs_regdomain = DFS_FCC_DOMAIN;
}
else if (ctl == ETSI)
{
- WMA_LOGI("%s:DFS- CTL = ETSI\n",__func__);
+ WMA_LOGI("%s:DFS- CTL = ETSI",__func__);
wma->dfs_ic->current_dfs_regdomain = DFS_ETSI_DOMAIN;
}
else if (ctl == MKK)
{
- WMA_LOGI("%s:DFS- CTL = MKK\n",__func__);
+ WMA_LOGI("%s:DFS- CTL = MKK",__func__);
wma->dfs_ic->current_dfs_regdomain = DFS_MKK4_DOMAIN;
}
- WMA_LOGI("%s: ****** Current Reg Domain: %d *******\n", __func__,
+ WMA_LOGI("%s: ****** Current Reg Domain: %d *******", __func__,
wma->dfs_ic->current_dfs_regdomain);
}
@@ -18124,7 +18456,7 @@ wma_dfs_indicate_radar(struct ieee80211com *ic,
hdd_ctx = vos_get_context(VOS_MODULE_ID_HDD,wma->vos_context);
if (wma->dfs_ic != ic)
{
- WMA_LOGE("%s:DFS- Invalid WMA handle\n",__func__);
+ WMA_LOGE("%s:DFS- Invalid WMA handle",__func__);
return (0);
}
radar_event = (struct wma_dfs_radar_indication *)
@@ -18133,7 +18465,7 @@ wma_dfs_indicate_radar(struct ieee80211com *ic,
GFP_ATOMIC);
if (radar_event == NULL)
{
- WMA_LOGE("%s:DFS- Invalid radar_event\n",__func__);
+ WMA_LOGE("%s:DFS- Invalid radar_event",__func__);
return (0);
}
@@ -18148,7 +18480,7 @@ wma_dfs_indicate_radar(struct ieee80211com *ic,
hdd_radar_event.chan_freq = ichan->ic_freq;
hdd_radar_event.dfs_radar_status = WMA_DFS_RADAR_FOUND;
wma->dfs_radar_indication_cb(hdd_ctx,&hdd_radar_event);
- WMA_LOGE("%s:DFS- RADAR INDICATED TO HDD\n",__func__);
+ WMA_LOGE("%s:DFS- RADAR INDICATED TO HDD",__func__);
/*
* Indicate to the radar event to SAP to
@@ -18160,7 +18492,7 @@ wma_dfs_indicate_radar(struct ieee80211com *ic,
radar_event->dfs_radar_status = WMA_DFS_RADAR_FOUND;
radar_event->use_nol = ic->ic_dfs_usenol(ic);
wma_send_msg(wma, WDA_DFS_RADAR_IND, (void *)radar_event, 0);
- WMA_LOGE("%s:DFS- WDA_DFS_RADAR_IND Message Posted\n",__func__);
+ WMA_LOGE("%s:DFS- WDA_DFS_RADAR_IND Message Posted",__func__);
}
return 1;
}
@@ -18187,7 +18519,7 @@ static eHalStatus wma_set_smps_params(tp_wma_handle wma, tANI_U8 vdev_id, int va
cmd->value = value & WMA_SMPS_MASK_LOWER_16BITS;
cmd->param = (value >> WMA_SMPS_PARAM_VALUE_S) & WMA_SMPS_MASK_UPPER_3BITS;
- WMA_LOGD("Setting vdev %d value = %x param %x \n", vdev_id, cmd->value, cmd->param);
+ WMA_LOGD("Setting vdev %d value = %x param %x", vdev_id, cmd->value, cmd->param);
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_STA_SMPS_PARAM_CMDID);
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index a3fbf3c8b7b4..6b5ff4722f9c 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -77,7 +77,7 @@
/** Private **/
#define WMA_CFG_NV_DNLD_TIMEOUT 500
#define WMA_READY_EVENTID_TIMEOUT 2000
-#define WMA_TGT_SUSPEND_COMPLETE_TIMEOUT 2000
+#define WMA_TGT_SUSPEND_COMPLETE_TIMEOUT 1000
#define MAX_MEM_CHUNKS 32
/*
In prima 12 HW stations are supported including BCAST STA(staId 0)
@@ -431,6 +431,9 @@ struct wma_txrx_node {
tANI_U8 rate_flags;
tANI_U8 nss;
v_BOOL_t is_channel_switch;
+ u_int16_t pause_bitmap;
+ tPowerdBm tx_power; /* TX power in dBm */
+ tPowerdBm max_tx_power; /* max Tx power in dBm */
};
#if defined(QCA_WIFI_FTM) && !defined(QCA_WIFI_ISOC)
diff --git a/CORE/SERVICES/WMI/wmi_unified.c b/CORE/SERVICES/WMI/wmi_unified.c
index 28830972dee1..28c4bae3b3d7 100644
--- a/CORE/SERVICES/WMI/wmi_unified.c
+++ b/CORE/SERVICES/WMI/wmi_unified.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -45,6 +45,9 @@
#define WMI_MIN_HEAD_ROOM 64
+#define WMI_EMPTY_HTC_QUEUE_MAX_RETRY 40
+#define WMI_SLEEP_TO_FLUSH_HTC_QUEUE 40
+
static void __wmi_control_rx(struct wmi_unified *wmi_handle, wmi_buf_t evt_buf);
/* WMI buffer APIs */
@@ -840,3 +843,45 @@ wmi_unified_connect_htc_service(struct wmi_unified * wmi_handle, void *htc_handl
return EOK;
}
+
+int wmi_get_host_credits(wmi_unified_t wmi_handle)
+{
+ int host_credits;
+
+ HTCGetHostCredits(wmi_handle->htc_handle, &host_credits);
+ return host_credits;
+}
+
+int wmi_get_pending_cmds(wmi_unified_t wmi_handle)
+{
+ return adf_os_atomic_read(&wmi_handle->pending_cmds);
+}
+
+int wmi_is_suspend_ready(wmi_unified_t wmi_handle)
+{
+ int i=0;
+ int wmi_pending_cmds = 0;
+
+ wmi_pending_cmds = wmi_get_pending_cmds(wmi_handle);
+ while (wmi_pending_cmds) {
+
+ /* sleep to let WMI Pending Cmds Flush in HTC queue */
+
+ msleep(WMI_SLEEP_TO_FLUSH_HTC_QUEUE);
+
+ wmi_pending_cmds = wmi_get_pending_cmds(wmi_handle);
+
+ if (i > WMI_EMPTY_HTC_QUEUE_MAX_RETRY) {
+ pr_err("Host has Pending cmds to send. Fail to suspend:%d ;"
+ "available_host_credits:%d\n", wmi_pending_cmds,
+ wmi_get_host_credits(wmi_handle));
+ VOS_ASSERT(0);
+ return -1;
+ }
+
+ i=i+1;
+ }
+
+ pr_info(" Pending wmi_pending_cmds:%d \n", wmi_pending_cmds);
+ return 0;
+}
diff --git a/CORE/SERVICES/WMI/wmi_unified_priv.h b/CORE/SERVICES/WMI/wmi_unified_priv.h
index deea3e278381..17ad918ced43 100644
--- a/CORE/SERVICES/WMI/wmi_unified_priv.h
+++ b/CORE/SERVICES/WMI/wmi_unified_priv.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index c5e44abd7610..86dd99a62425 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -1224,6 +1224,7 @@ typedef struct tagCsrRoamInfo
tANI_S8 rxRssi;
tSirSmeDfsEventInd dfs_event;
tSirChanChangeResponse *channelChangeRespEvent;
+ tANI_U8 timingMeasCap;
}tCsrRoamInfo;
@@ -1253,6 +1254,7 @@ typedef struct sSirSmeAssocIndToUpperLayerCnf
tSirRSNie rsnIE; // RSN IE received from peer
tSirAddie addIE; // Additional IE received from peer, which can be WSC and/or P2P IE
tANI_U8 reassocReq; //set to true if reassoc
+ tANI_U8 timingMeasCap;
} tSirSmeAssocIndToUpperLayerCnf, *tpSirSmeAssocIndToUpperLayerCnf;
typedef struct tagCsrSummaryStatsInfo
diff --git a/CORE/SME/inc/csrLinkList.h b/CORE/SME/inc/csrLinkList.h
index bd0fc8590b2d..f3feb7163c1c 100644
--- a/CORE/SME/inc/csrLinkList.h
+++ b/CORE/SME/inc/csrLinkList.h
@@ -29,7 +29,8 @@
------------------------------------------------------------------------- *
\file csrLinkList.h
- Exports and types for the Common link list interfaces.========================================================================== */
+ Exports and types for the Common link list interfaces.
+========================================================================== */
#ifndef CSR_LINK_LIST_H__
#define CSR_LINK_LIST_H__
diff --git a/CORE/SME/inc/csrNeighborRoam.h b/CORE/SME/inc/csrNeighborRoam.h
index a021da742dcb..85345510c8a1 100644
--- a/CORE/SME/inc/csrNeighborRoam.h
+++ b/CORE/SME/inc/csrNeighborRoam.h
@@ -32,7 +32,8 @@
\file csrNeighborRoam.h
Exports and types for the neighbor roaming algorithm which is sepcifically
- designed for Android.========================================================================== */
+ designed for Android.
+========================================================================== */
#ifndef CSR_NEIGHBOR_ROAM_H
#define CSR_NEIGHBOR_ROAM_H
diff --git a/CORE/SME/inc/csrSupport.h b/CORE/SME/inc/csrSupport.h
index 734a14e24163..64d668579ef6 100644
--- a/CORE/SME/inc/csrSupport.h
+++ b/CORE/SME/inc/csrSupport.h
@@ -31,7 +31,8 @@
\file csrSupport.h
- Exports and types for the Common Scan and Roaming supporting interfaces.========================================================================== */
+ Exports and types for the Common Scan and Roaming supporting interfaces.
+========================================================================== */
#ifndef CSR_SUPPORT_H__
#define CSR_SUPPORT_H__
diff --git a/CORE/SME/inc/oemDataApi.h b/CORE/SME/inc/oemDataApi.h
index e53c5534830a..7369b746aeea 100644
--- a/CORE/SME/inc/oemDataApi.h
+++ b/CORE/SME/inc/oemDataApi.h
@@ -33,7 +33,8 @@
\file oemDataApi.h
- Exports and types for the Common OEM DATA REQ/RSP Module interfaces.========================================================================== */
+ Exports and types for the Common OEM DATA REQ/RSP Module interfaces.
+========================================================================== */
#ifndef __OEM_DATA_API_H__
#define __OEM_DATA_API_H__
diff --git a/CORE/SME/inc/oemDataInternal.h b/CORE/SME/inc/oemDataInternal.h
index f9ab8d9faeef..67b086273bbc 100644
--- a/CORE/SME/inc/oemDataInternal.h
+++ b/CORE/SME/inc/oemDataInternal.h
@@ -33,7 +33,8 @@
\file oemDataInternal.h
- Exports and types for the Common OEM DATA REQ/RSP Module interfaces.========================================================================== */
+ Exports and types for the Common OEM DATA REQ/RSP Module interfaces.
+========================================================================== */
#ifndef __OEM_DATA_INTERNAL_H__
diff --git a/CORE/SME/inc/smeInternal.h b/CORE/SME/inc/smeInternal.h
index 06481618164d..e1ab3f9ea7e5 100644
--- a/CORE/SME/inc/smeInternal.h
+++ b/CORE/SME/inc/smeInternal.h
@@ -143,6 +143,8 @@ typedef struct tagSmeStruct
#ifdef FEATURE_WLAN_CH_AVOID
void (*pChAvoidNotificationCb) (void *hdd_context, void *indi_param);
#endif /* FEATURE_WLAN_CH_AVOID */
+ /* Maximum interfaces allowed by the host */
+ tANI_U8 max_intf_count;
} tSmeStruct, *tpSmeStruct;
diff --git a/CORE/SME/inc/sme_Api.h b/CORE/SME/inc/sme_Api.h
index e9cc13be8973..0537f9e7f3ae 100644
--- a/CORE/SME/inc/sme_Api.h
+++ b/CORE/SME/inc/sme_Api.h
@@ -130,6 +130,7 @@ typedef struct _smeConfigParams
tANI_BOOLEAN fP2pListenOffload;
tANI_BOOLEAN pnoOffload;
tANI_U8 fEnableDebugLog;
+ tANI_U8 max_intf_count;
} tSmeConfigParams, *tpSmeConfigParams;
typedef enum
@@ -2373,7 +2374,6 @@ eHalStatus sme_p2pGetResultFilter(tHalHandle hHal, tANI_U8 HDDSessionId,
tCsrScanResultFilter *pFilter);
#endif //#if defined WLAN_FEATURE_P2P_INTERNAL
-
/* ---------------------------------------------------------------------------
\fn sme_SetMaxTxPower
\brief Used to set the Maximum Transmit Power dynamically. Note: this
@@ -2398,19 +2398,18 @@ eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
eHalStatus sme_SetMaxTxPowerPerBand(eCsrBand band, v_S7_t db);
/* ---------------------------------------------------------------------------
-
\fn sme_SetTxPower
-
- \brief Set Transmit Power dynamically. Note: this setting will
- not persist over reboots.
-
+ \brief Set Transmit Power dynamically.
\param hHal
\param sessionId Target Session ID
- \param mW power to set in mW
+ \param pBSSId BSSId
+ \param dev_mode device mode
+ \param power power to set in dBm
\- return eHalStatus
-
- -------------------------------------------------------------------------------*/
-eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW);
+ ---------------------------------------------------------------------------*/
+eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId,
+ tSirMacAddr pBSSId,
+ tVOS_CON_MODE dev_mode, int power);
/* ---------------------------------------------------------------------------
@@ -3407,6 +3406,14 @@ eHalStatus sme_InitThermalInfo( tHalHandle hHal, tSmeThermalParams thermalParam
\- return eHalStatus
-------------------------------------------------------------------------*/
eHalStatus sme_SetThermalLevel( tHalHandle hHal, tANI_U8 level );
+/* ---------------------------------------------------------------------------
+ \fn sme_TxpowerLimit
+ \brief SME API to set txpower limits
+ \param hHal
+ \param psmetx : power limits for 2g/5g
+ \- return eHalStatus
+ -------------------------------------------------------------------------*/
+eHalStatus sme_TxpowerLimit( tHalHandle hHal, tSirTxPowerLimit *psmetx);
#endif
eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value);
#endif //#if !defined( __SME_API_H )
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 3b5f5db25f46..f122551b12f4 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -62,7 +62,6 @@
#include "csrApi.h"
#include "pmc.h"
#include "vos_nvitem.h"
-#include "wlan_hdd_main.h"
#ifdef WLAN_FEATURE_NEIGHBOR_ROAMING
#include "csrNeighborRoam.h"
#endif /* WLAN_FEATURE_NEIGHBOR_ROAMING */
@@ -5434,6 +5433,7 @@ static tANI_BOOLEAN csrRoamProcessResults( tpAniSirGlobal pMac, tSmeCmd *pComman
roamInfo.staId = ( tANI_U8 )pJoinRsp->staId;
roamInfo.ucastSig = ( tANI_U8 )pJoinRsp->ucastSig;
roamInfo.bcastSig = ( tANI_U8 )pJoinRsp->bcastSig;
+ roamInfo.timingMeasCap = pJoinRsp->timingMeasCap;
}
else
{
@@ -8296,6 +8296,7 @@ void csrRoamJoinedStateMsgProcessor( tpAniSirGlobal pMac, void *pMsgBuf )
vos_mem_copy(&pRoamInfo->bssid, pUpperLayerAssocCnf->bssId,
sizeof(tCsrBssid));
pRoamInfo->wmmEnabledSta = pUpperLayerAssocCnf->wmmEnabledSta;
+ pRoamInfo->timingMeasCap = pUpperLayerAssocCnf->timingMeasCap;
if(CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile) )
{
pMac->roam.roamSession[sessionId].connectState = eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED;
@@ -9248,6 +9249,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
vos_mem_copy(&pRoamInfo->bssid, pAssocInd->bssId,
sizeof(tCsrBssid));
pRoamInfo->wmmEnabledSta = pAssocInd->wmmEnabledSta;
+ pRoamInfo->timingMeasCap = pAssocInd->timingMeasCap;
if(CSR_IS_WDS_AP( pRoamInfo->u.pConnectedProfile))
status = csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_WDS_IND, eCSR_ROAM_RESULT_WDS_ASSOCIATION_IND);//Sta
if(CSR_IS_INFRA_AP(pRoamInfo->u.pConnectedProfile))
@@ -13605,6 +13607,9 @@ eHalStatus csrSendAssocIndToUpperLayerCnfMsg( tpAniSirGlobal pMac,
//reassocReq
*pBuf = pAssocInd->reassocReq;
pBuf += sizeof (tANI_U8);
+ //timingMeasCap
+ *pBuf = pAssocInd->timingMeasCap;
+ pBuf += sizeof (tANI_U8);
msgQ.type = eWNI_SME_UPPER_LAYER_ASSOC_CNF;
msgQ.bodyptr = pMsg;
msgQ.bodyval = 0;
@@ -14120,36 +14125,6 @@ eHalStatus csrProcessAddStaSessionCommand( tpAniSirGlobal pMac, tSmeCmd *pComman
&pCommand->u.addStaSessionCmd,
pCommand->sessionId);
}
-
-/* Function: csr_check_max_interfaces
- * Return: 0 - Success, 1 - Failure
- */
-tANI_U8 csr_check_max_interfaces(tpAniSirGlobal pMac,tANI_U32 i)
-{
- hdd_context_t *pHddCtx;
- v_CONTEXT_t vosContext;
-
- vosContext = vos_get_global_context( VOS_MODULE_ID_HDD, NULL );
- if (NULL == vosContext) {
- smsLog(pMac, LOGE, "%s: Failed to get vos context", __func__);
- return 1;
- }
-
- pHddCtx = vos_get_context( VOS_MODULE_ID_HDD, vosContext);
- if (NULL == pHddCtx) {
- smsLog(pMac, LOGE, "%s: Failed to get hdd context", __func__);
- return 1;
- }
-
- if ((v_U8_t)i >= pHddCtx->max_intf_count){
- smsLog(pMac, LOGE, "%s: Max interfaces! Session creation will fail", __func__);
- return 1;
- }
- else {
- return 0;
- }
-}
-
eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac,
csrRoamCompleteCallback callback,
void *pContext,
@@ -14167,8 +14142,10 @@ eHalStatus csrRoamOpenSession(tpAniSirGlobal pMac,
for( i = 0; i < CSR_ROAM_SESSION_MAX; i++ )
{
- if (csr_check_max_interfaces( pMac, i))
+ if ((v_U8_t)i >= pMac->sme.max_intf_count) {
+ smsLog(pMac, LOGE, "%s: Reached max interfaces! Session creation will fail", __func__);
break;
+ }
if( !CSR_IS_SESSION_VALID( pMac, i ) )
{
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index 7d491721d61d..8dc4f66a16b0 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -31,7 +31,8 @@
\file csrApiScan.c
- Implementation for the Common Scan interfaces.========================================================================== */
+ Implementation for the Common Scan interfaces.
+========================================================================== */
#include "aniGlobal.h"
diff --git a/CORE/SME/src/csr/csrCmdProcess.c b/CORE/SME/src/csr/csrCmdProcess.c
index 2e18471995af..c15d3fecaa4c 100644
--- a/CORE/SME/src/csr/csrCmdProcess.c
+++ b/CORE/SME/src/csr/csrCmdProcess.c
@@ -29,7 +29,8 @@
------------------------------------------------------------------------- *
\file csrCmdProcess.c
- Implementation for processing various commands.========================================================================== */
+ Implementation for processing various commands.
+========================================================================== */
diff --git a/CORE/SME/src/csr/csrInsideApi.h b/CORE/SME/src/csr/csrInsideApi.h
index bc9710cc5280..96ccd13bc9e6 100644
--- a/CORE/SME/src/csr/csrInsideApi.h
+++ b/CORE/SME/src/csr/csrInsideApi.h
@@ -31,7 +31,8 @@
\file csrInsideApi.h
- Define interface only used by CSR.========================================================================== */
+ Define interface only used by CSR.
+========================================================================== */
#ifndef CSR_INSIDE_API_H__
#define CSR_INSIDE_API_H__
diff --git a/CORE/SME/src/csr/csrLinkList.c b/CORE/SME/src/csr/csrLinkList.c
index 765c5cbc2717..da5e40bb28f9 100644
--- a/CORE/SME/src/csr/csrLinkList.c
+++ b/CORE/SME/src/csr/csrLinkList.c
@@ -29,7 +29,8 @@
------------------------------------------------------------------------- *
\file csrLinkList.c
- Implementation for the Common link list interfaces.========================================================================== */
+ Implementation for the Common link list interfaces.
+========================================================================== */
#include "palApi.h"
#include "csrLinkList.h"
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index 8e33d813982d..1aaa3b6ac9b8 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -32,7 +32,8 @@
\file csrNeighborRoam.c
- Implementation for the simple roaming algorithm for 802.11r Fast transitions and Legacy roaming for Android platform.========================================================================== */
+ Implementation for the simple roaming algorithm for 802.11r Fast transitions and Legacy roaming for Android platform.
+========================================================================== */
/*===========================================================================
diff --git a/CORE/SME/src/csr/csrTdlsProcess.c b/CORE/SME/src/csr/csrTdlsProcess.c
index 00a084c4774c..c313062e7c02 100644
--- a/CORE/SME/src/csr/csrTdlsProcess.c
+++ b/CORE/SME/src/csr/csrTdlsProcess.c
@@ -31,7 +31,8 @@
\file csrTdlsProcess.c
- Implementation for the TDLS interface to PE.========================================================================== */
+ Implementation for the TDLS interface to PE.
+========================================================================== */
#ifdef FEATURE_WLAN_TDLS
diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c
index 761ceb30cefc..77db26419421 100644
--- a/CORE/SME/src/csr/csrUtil.c
+++ b/CORE/SME/src/csr/csrUtil.c
@@ -31,7 +31,8 @@
\file csrUtil.c
- Implementation supporting routines for CSR.========================================================================== */
+ Implementation supporting routines for CSR.
+========================================================================== */
#include "aniGlobal.h"
diff --git a/CORE/SME/src/oemData/oemDataApi.c b/CORE/SME/src/oemData/oemDataApi.c
index b261e5cf4eab..71d7df6dbfea 100644
--- a/CORE/SME/src/oemData/oemDataApi.c
+++ b/CORE/SME/src/oemData/oemDataApi.c
@@ -32,7 +32,8 @@
\file oemDataApi.c
- Implementation for the OEM DATA REQ/RSP interfaces.========================================================================== */
+ Implementation for the OEM DATA REQ/RSP interfaces.
+========================================================================== */
#include "aniGlobal.h"
#include "oemDataApi.h"
#include "palApi.h"
diff --git a/CORE/SME/src/sme_common/sme_Api.c b/CORE/SME/src/sme_common/sme_Api.c
index 5b49b9e4f449..9bce9f06b8f2 100644
--- a/CORE/SME/src/sme_common/sme_Api.c
+++ b/CORE/SME/src/sme_common/sme_Api.c
@@ -56,7 +56,6 @@
Include Files
------------------------------------------------------------------------*/
-
#include "smsDebug.h"
#include "sme_Api.h"
#include "csrInsideApi.h"
@@ -1634,6 +1633,9 @@ eHalStatus sme_UpdateConfig(tHalHandle hHal, tpSmeConfigParams pSmeConfigParams)
pMac->fEnableDebugLog = pSmeConfigParams->fEnableDebugLog;
+ /* update interface configuration */
+ pMac->sme.max_intf_count = pSmeConfigParams->max_intf_count;
+
return status;
}
@@ -3947,6 +3949,7 @@ eHalStatus sme_GetConfigParam(tHalHandle hHal, tSmeConfigParams *pParam)
#endif
pParam->fScanOffload = pMac->fScanOffload;
pParam->fP2pListenOffload = pMac->fP2pListenOffload;
+ pParam->max_intf_count = pMac->sme.max_intf_count;
sme_ReleaseGlobalLock( &pMac->sme );
}
@@ -8406,20 +8409,66 @@ eHalStatus sme_SetMaxTxPower(tHalHandle hHal, tSirMacAddr pBssid,
return eHAL_STATUS_SUCCESS;
}
-/* ---------------------------------------------------------------------------
+/* ----------------------------------------------------------------------------
+ \fn sme_SetTxPower
+ \brief Set Transmit Power dynamically.
+ \param hHal
+ \param sessionId Target Session ID
+ \pBSSId BSSID
+ \dev_mode dev_mode such as station, P2PGO, SAP
+ \param dBm power to set
+ \- return eHalStatus
+ ---------------------------------------------------------------------------*/
+#if defined (QCA_WIFI_2_0) && !defined (QCA_WIFI_ISOC)
+eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId,
+ tSirMacAddr pBSSId,
+ tVOS_CON_MODE dev_mode, int dBm)
+{
+ vos_msg_t msg;
+ tpMaxTxPowerParams pTxParams = NULL;
+ tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
+ v_S7_t power = (v_S7_t)dBm;
- \fn sme_SetTxPower
+ MTRACE(macTraceNew(pMac, VOS_MODULE_ID_SME,
+ TRACE_CODE_SME_RX_HDD_SET_TXPOW, sessionId, 0));
- \brief Set Transmit Power dynamically. Note: this setting will
- not persist over reboots.
+ /* make sure there is no overflow */
+ if ((int)power != dBm) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: error, invalid power = %d", __func__, dBm);
+ return eHAL_STATUS_FAILURE;
+ }
- \param hHal
- \param sessionId Target Session ID
- \param mW power to set in mW
- \- return eHalStatus
+ pTxParams = vos_mem_malloc(sizeof(tMaxTxPowerParams));
+ if (NULL == pTxParams)
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: Not able to allocate memory for pTxParams", __func__);
+ return eHAL_STATUS_FAILURE;
+ }
- -------------------------------------------------------------------------------*/
-eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW)
+ vos_mem_copy(pTxParams->bssId, pBSSId, SIR_MAC_ADDR_LENGTH);
+ pTxParams->power = power; /* unit is dBm */
+ pTxParams->dev_mode = dev_mode;
+ msg.type = WDA_SET_TX_POWER_REQ;
+ msg.reserved = 0;
+ msg.bodyptr = pTxParams;
+
+ if (VOS_STATUS_SUCCESS != vos_mq_post_message(VOS_MODULE_ID_WDA, &msg))
+ {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: failed to post WDA_SET_TX_POWER_REQ to WDA",
+ __func__);
+ vos_mem_free(pTxParams);
+ return eHAL_STATUS_FAILURE;
+ }
+
+ return eHAL_STATUS_SUCCESS;
+}
+#else
+eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId,
+ tSirMacAddr pBSSId,
+ tVOS_CON_MODE dev_mode, int mW)
{
eHalStatus status = eHAL_STATUS_FAILURE;
@@ -8428,14 +8477,22 @@ eHalStatus sme_SetTxPower(tHalHandle hHal, v_U8_t sessionId, v_U8_t mW)
MTRACE(macTraceNew(pMac, VOS_MODULE_ID_SME,
TRACE_CODE_SME_RX_HDD_SET_TXPOW, NO_SESSION, 0));
smsLog(pMac, LOG1, FL("set tx power %dmW"), mW);
+
+ if (mW < 0 || mW > 0xff) {
+ VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: error, invalid mW = %d", __func__, mW);
+ return eHAL_STATUS_FAILURE;
+ }
+
status = sme_AcquireGlobalLock(&pMac->sme);
if (HAL_STATUS_SUCCESS(status))
{
- status = csrSetTxPower(pMac, sessionId, mW);
+ status = csrSetTxPower(pMac, sessionId, (v_U8_t)mW);
sme_ReleaseGlobalLock(&pMac->sme);
}
return status;
}
+#endif
/* ---------------------------------------------------------------------------
@@ -11385,6 +11442,39 @@ eHalStatus sme_SetThermalLevel( tHalHandle hHal, tANI_U8 level )
vos_mem_free(pLevel);
return eHAL_STATUS_FAILURE;
}
+/* ---------------------------------------------------------------------------
+ \fn sme_TxpowerLimit
+ \brief SME API to set txpower limits
+ \param hHal
+ \param psmetx : power limits for 2g/5g
+ \- return eHalStatus
+ -------------------------------------------------------------------------*/
+eHalStatus sme_TxpowerLimit(tHalHandle hHal, tSirTxPowerLimit *psmetx)
+{
+ eHalStatus status = eHAL_STATUS_SUCCESS;
+ VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;
+ vos_msg_t vosMessage;
+ tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
+
+ if (eHAL_STATUS_SUCCESS == (status = sme_AcquireGlobalLock(&pMac->sme)))
+ {
+ vosMessage.type = WDA_TX_POWER_LIMIT;
+ vosMessage.reserved = 0;
+ vosMessage.bodyptr = psmetx;
+
+ vosStatus = vos_mq_post_message(VOS_MQ_ID_WDA, &vosMessage);
+ if (!VOS_IS_STATUS_SUCCESS(vosStatus))
+ {
+ VOS_TRACE( VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_ERROR,
+ "%s: not able to post WDA_TX_POWER_LIMIT",
+ __func__);
+ status = eHAL_STATUS_FAILURE;
+ vos_mem_free(psmetx);
+ }
+ sme_ReleaseGlobalLock(&pMac->sme);
+ }
+ return(status);
+}
#endif /* #ifndef QCA_WIFI_ISOC */
eHalStatus sme_UpdateConnectDebug(tHalHandle hHal, tANI_U32 set_value)
diff --git a/CORE/SYS/legacy/src/utils/src/parserApi.c b/CORE/SYS/legacy/src/utils/src/parserApi.c
index 6ce74a28e7d1..4035d9afc091 100644
--- a/CORE/SYS/legacy/src/utils/src/parserApi.c
+++ b/CORE/SYS/legacy/src/utils/src/parserApi.c
@@ -2371,6 +2371,12 @@ sirConvertAssocReqFrame2Struct(tpAniSirGlobal pMac,
limLogOperatingMode( pMac, &pAssocReq->operMode);
}
#endif
+ if (ar->ExtCap.present)
+ {
+ vos_mem_copy(&pAssocReq->ExtCap, &ar->ExtCap, sizeof(tDot11fIEExtCap));
+ limLog(pMac, LOG1, FL("ExtCap is present, timingMeas: %d"),
+ ar->ExtCap.timingMeas);
+ }
vos_mem_free(ar);
return eSIR_SUCCESS;
@@ -2542,6 +2548,13 @@ sirConvertAssocRespFrame2Struct(tpAniSirGlobal pMac,
}
#endif
+ if (ar.ExtCap.present)
+ {
+ vos_mem_copy(&pAssocRsp->ExtCap, &ar.ExtCap, sizeof(tDot11fIEExtCap));
+ limLog(pMac, LOG1, FL("ExtCap is present, timingMeas: %d"),
+ ar.ExtCap.timingMeas);
+ }
+
return eSIR_SUCCESS;
} // End sirConvertAssocRespFrame2Struct.
@@ -2721,6 +2734,14 @@ sirConvertReassocReqFrame2Struct(tpAniSirGlobal pMac,
limLogOperatingMode( pMac, &pAssocReq->operMode);
}
#endif
+
+ if (ar.ExtCap.present)
+ {
+ vos_mem_copy(&pAssocReq->ExtCap, &ar.ExtCap, sizeof(tDot11fIEExtCap));
+ limLog(pMac, LOG1, FL("ExtCap is present, timingMeas: %d"),
+ ar.ExtCap.timingMeas);
+ }
+
return eSIR_SUCCESS;
} // End sirConvertReassocReqFrame2Struct.
diff --git a/CORE/UTILS/FWLOG/dbglog_host.c b/CORE/UTILS/FWLOG/dbglog_host.c
index 0a7a1a0ca881..ab316f20590f 100644
--- a/CORE/UTILS/FWLOG/dbglog_host.c
+++ b/CORE/UTILS/FWLOG/dbglog_host.c
@@ -966,6 +966,10 @@ char * DBG_MSG_ARR[WLAN_MODULE_ID_MAX][MAX_DBG_MSGS] =
"STA_SMPS_DBGID_VIRTUAL_CHAN_SMPS_START",
"STA_SMPS_DBGID_VIRTUAL_CHAN_SMPS_STOP",
"STA_SMPS_DBGID_SEND_SMPS_ACTION_FRAME",
+ "STA_SMPS_DBGID_HOST_FORCED_MODE",
+ "STA_SMPS_DBGID_FW_FORCED_MODE",
+ "STA_SMPS_DBGID_RSSI_THRESHOLD_CROSSED",
+ "STA_SMPS_DBGID_SMPS_ACTION_FRAME_COMPLETION",
"SMPS_DBGID_DEFINITION_END",
},
{ /* SWBMISS */
@@ -1038,6 +1042,14 @@ char * DBG_MSG_ARR[WLAN_MODULE_ID_MAX][MAX_DBG_MSGS] =
"TXBFEE_UPLOADH_EVENT_ALLOC_MEM_FAIL",
"TXBFEE_DBGID_END",
},
+ { /*BATCH SCAN*/
+ },
+ { /*THERMAL MGR*/
+ "THERMAL_MGR_DBGID_DEFINITION_START",
+ "THERMAL_MGR_NEW_THRESH",
+ "THERMAL_MGR_THRESH_CROSSED",
+ "THERMAL_MGR_DBGID_DEFINITION END",
+ },
};
int dbglog_module_log_enable(wmi_unified_t wmi_handle, A_UINT32 mod_id,
diff --git a/CORE/VOSS/src/vos_memory.c b/CORE/VOSS/src/vos_memory.c
index 00fb555922b9..9b531f2eec5f 100644
--- a/CORE/VOSS/src/vos_memory.c
+++ b/CORE/VOSS/src/vos_memory.c
@@ -179,6 +179,9 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum)
struct s_vos_mem_struct* memStruct;
v_VOID_t* memPtr = NULL;
v_SIZE_t new_size;
+ int flags = GFP_KERNEL;
+ unsigned long IrqFlags;
+
if (size > (1024*1024))
{
@@ -189,14 +192,12 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum)
if (in_interrupt())
{
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s is being"
- "called from interrupt context, using GPF_ATOMIC.", __func__);
- return kmalloc(size, GFP_ATOMIC);
+ flags = GFP_ATOMIC;
}
new_size = size + sizeof(struct s_vos_mem_struct) + 8;
- memStruct = (struct s_vos_mem_struct*)kmalloc(new_size,GFP_KERNEL);
+ memStruct = (struct s_vos_mem_struct*)kmalloc(new_size, flags);
if(memStruct != NULL)
{
@@ -209,9 +210,9 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum)
vos_mem_copy(&memStruct->header[0], &WLAN_MEM_HEADER[0], sizeof(WLAN_MEM_HEADER));
vos_mem_copy( (v_U8_t*)(memStruct + 1) + size, &WLAN_MEM_TAIL[0], sizeof(WLAN_MEM_TAIL));
- spin_lock(&vosMemList.lock);
+ spin_lock_irqsave(&vosMemList.lock, IrqFlags);
vosStatus = hdd_list_insert_front(&vosMemList, &memStruct->pNode);
- spin_unlock(&vosMemList.lock);
+ spin_unlock_irqrestore(&vosMemList.lock, IrqFlags);
if(VOS_STATUS_SUCCESS != vosStatus)
{
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
@@ -225,14 +226,16 @@ v_VOID_t * vos_mem_malloc_debug( v_SIZE_t size, char* fileName, v_U32_t lineNum)
v_VOID_t vos_mem_free( v_VOID_t *ptr )
{
+ unsigned long IrqFlags;
+
if (ptr != NULL)
{
VOS_STATUS vosStatus;
struct s_vos_mem_struct* memStruct = ((struct s_vos_mem_struct*)ptr) - 1;
- spin_lock(&vosMemList.lock);
+ spin_lock_irqsave(&vosMemList.lock, IrqFlags);
vosStatus = hdd_list_remove_node(&vosMemList, &memStruct->pNode);
- spin_unlock(&vosMemList.lock);
+ spin_unlock_irqrestore(&vosMemList.lock, IrqFlags);
if(VOS_STATUS_SUCCESS == vosStatus)
{
@@ -261,6 +264,7 @@ v_VOID_t vos_mem_free( v_VOID_t *ptr )
#else
v_VOID_t * vos_mem_malloc( v_SIZE_t size )
{
+ int flags = GFP_KERNEL;
#ifdef CONFIG_WCNSS_MEM_PRE_ALLOC
v_VOID_t* pmem;
#endif
@@ -271,8 +275,7 @@ v_VOID_t * vos_mem_malloc( v_SIZE_t size )
}
if (in_interrupt())
{
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be called from interrupt context!!!", __func__);
- return NULL;
+ flags = GFP_ATOMIC;
}
#ifdef CONFIG_WCNSS_MEM_PRE_ALLOC
if(size > WCNSS_PRE_ALLOC_GET_THRESHOLD)
@@ -282,7 +285,7 @@ v_VOID_t * vos_mem_malloc( v_SIZE_t size )
return pmem;
}
#endif
- return kmalloc(size, GFP_KERNEL);
+ return kmalloc(size, flags);
}
v_VOID_t vos_mem_free( v_VOID_t *ptr )
@@ -290,11 +293,6 @@ v_VOID_t vos_mem_free( v_VOID_t *ptr )
if (ptr == NULL)
return;
- if (in_interrupt())
- {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR, "%s cannot be called from interrupt context!!!", __func__);
- return;
- }
#ifdef CONFIG_WCNSS_MEM_PRE_ALLOC
if(wcnss_prealloc_put(ptr))
return;
diff --git a/CORE/VOSS/src/vos_nvitem.c b/CORE/VOSS/src/vos_nvitem.c
index a0a0d072be99..8ab9f334ed03 100644
--- a/CORE/VOSS/src/vos_nvitem.c
+++ b/CORE/VOSS/src/vos_nvitem.c
@@ -3322,9 +3322,9 @@ int wlan_hdd_linux_reg_notifier(struct wiphy *wiphy,
#endif
}
- if (pHddCtx->isLoadUnloadInProgress) {
- VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
- "%s: Unloading/Loading in Progress, Ignore!!!", __func__);
+ if (pHddCtx->isUnloadInProgress) {
+ VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
+ "%s: Unloading in Progress, Ignore!!!", __func__);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
return;
#else
diff --git a/CORE/VOSS/src/vos_sched.c b/CORE/VOSS/src/vos_sched.c
index 15ebb26f8ffb..1580356f72fa 100644
--- a/CORE/VOSS/src/vos_sched.c
+++ b/CORE/VOSS/src/vos_sched.c
@@ -117,9 +117,14 @@ static int vos_cpu_hotplug_notify(struct notifier_block *block,
pVosSchedContext pSchedContext = get_vos_sched_ctxt();
int i;
- if (!pSchedContext)
+ if ((NULL == pSchedContext) || (NULL == pSchedContext->TlshimRxThread))
return NOTIFY_OK;
+ if (vos_is_load_unload_in_progress(VOS_MODULE_ID_VOSS, NULL))
+ {
+ return NOTIFY_OK;
+ }
+
switch (state) {
case CPU_ONLINE:
if (affine_cpu != 0)
@@ -255,7 +260,7 @@ vos_sched_open
if (vos_alloc_tlshim_pkt_freeq(pSchedContext) != VOS_STATUS_SUCCESS)
return VOS_STATUS_E_FAILURE;
register_hotcpu_notifier(&vos_cpu_hotplug_notifier);
- pSchedContext->cpuHotPlugNotifier = vos_cpu_hotplug_notifier;
+ pSchedContext->cpuHotPlugNotifier = &vos_cpu_hotplug_notifier;
#endif
@@ -2238,7 +2243,8 @@ VOS_STATUS vos_watchdog_wlan_shutdown(void)
/* Release the lock here */
spin_unlock(&gpVosWatchdogContext->wdLock);
- if (pHddCtx->isLoadUnloadInProgress)
+ if ((pHddCtx->isLoadInProgress) ||
+ (pHddCtx->isUnloadInProgress))
{
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_FATAL,
"%s: Load/unload in Progress. Ignoring signaling Watchdog",
diff --git a/CORE/VOSS/src/vos_sched.h b/CORE/VOSS/src/vos_sched.h
index b2751e0cb347..78480b5a97ec 100644
--- a/CORE/VOSS/src/vos_sched.h
+++ b/CORE/VOSS/src/vos_sched.h
@@ -294,7 +294,7 @@ typedef struct _VosSchedContext
struct list_head VosTlshimPktFreeQ;
/* cpu hotplug notifier */
- struct notifier_block cpuHotPlugNotifier;
+ struct notifier_block *cpuHotPlugNotifier;
#endif
} VosSchedContext, *pVosSchedContext;
diff --git a/CORE/WDA/inc/legacy/halMsgApi.h b/CORE/WDA/inc/legacy/halMsgApi.h
index 5843e5d07c0a..28b85b21deab 100644
--- a/CORE/WDA/inc/legacy/halMsgApi.h
+++ b/CORE/WDA/inc/legacy/halMsgApi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2013 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.
*
@@ -1362,6 +1362,7 @@ typedef struct sMaxTxPowerParams
//In response,
//power == tx power used for management frames.
tPowerdBm power;
+ tVOS_CON_MODE dev_mode;
}tMaxTxPowerParams, *tpMaxTxPowerParams;
typedef struct sMaxTxPowerPerBandParams
@@ -1412,6 +1413,7 @@ typedef struct sP2pPsParams
tANI_U32 interval;
tANI_U32 single_noa_duration;
tANI_U8 psSelection;
+ tANI_U8 sessionId;
}tP2pPsParams, *tpP2pPsParams;
typedef struct sTdlsLinkEstablishParams
diff --git a/CORE/WDA/inc/wlan_qct_wda.h b/CORE/WDA/inc/wlan_qct_wda.h
index 160020f8f1a1..abc69dc916f5 100644
--- a/CORE/WDA/inc/wlan_qct_wda.h
+++ b/CORE/WDA/inc/wlan_qct_wda.h
@@ -1172,6 +1172,7 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_SET_MAX_TX_POWER_REQ SIR_HAL_SET_MAX_TX_POWER_REQ
#define WDA_SET_MAX_TX_POWER_RSP SIR_HAL_SET_MAX_TX_POWER_RSP
+#define WDA_SET_TX_POWER_REQ SIR_HAL_SET_TX_POWER_REQ
#define WDA_SET_MAX_TX_POWER_PER_BAND_REQ \
SIR_HAL_SET_MAX_TX_POWER_PER_BAND_REQ
@@ -1298,6 +1299,8 @@ tSirRetStatus uMacPostCtrlMsg(void* pSirGlobal, tSirMbMsg* pMb);
#define WDA_ADD_PERIODIC_TX_PTRN_IND SIR_HAL_ADD_PERIODIC_TX_PTRN_IND
#define WDA_DEL_PERIODIC_TX_PTRN_IND SIR_HAL_DEL_PERIODIC_TX_PTRN_IND
+#define WDA_TX_POWER_LIMIT SIR_HAL_SET_TX_POWER_LIMIT
+
#define WDA_RATE_UPDATE_IND SIR_HAL_RATE_UPDATE_IND
#define WDA_INIT_THERMAL_INFO_CMD SIR_HAL_INIT_THERMAL_INFO_CMD
diff --git a/firmware_bin/WCNSS_qcom_cfg.ini b/firmware_bin/WCNSS_qcom_cfg.ini
index a06ecdb6fc7b..42dffc4cb629 100755
--- a/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/firmware_bin/WCNSS_qcom_cfg.ini
@@ -494,6 +494,10 @@ isP2pDeviceAddrAdministrated=0
#Enable Rx thread
gEnableRxThread=1
+
+# Set Thermal Power limit
+TxPower2g=10
+TxPower5g=10
END
# Note: Configuration parser would not read anything past the END marker
diff --git a/tools/pktlog/pktlogconf.c b/tools/pktlog/pktlogconf.c
index ac9bbb290fe7..1cfbcc44fd6e 100644
--- a/tools/pktlog/pktlogconf.c
+++ b/tools/pktlog/pktlogconf.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) . The Linux Foundation. All rights reserved.
+ * Copyright (c) 2010,2013 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*