summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2014-04-03 01:19:12 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2014-04-03 01:19:12 -0700
commita7c0feb654b308b7e1bada367dcc453640b5a22f (patch)
tree604740818d8d4da298c6d45eafd2105b1fd4a7b5
parentc0b90262b6c7753555b7d40ebdc141cab7b1b038 (diff)
parent569f620b1fb0ada2c3a31a6260ec6a70e1291e6c (diff)
Merge "Release 1.0.0.79 QCACLD WLAN Driver"
-rw-r--r--CORE/HDD/src/wlan_hdd_tx_rx.c16
-rw-r--r--CORE/MAC/inc/qwlan_version.h4
-rw-r--r--CORE/MAC/src/cfg/cfgProcMsg.c11
-rw-r--r--CORE/MAC/src/pe/lim/limApi.c6
-rw-r--r--CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c8
-rw-r--r--CORE/SERVICES/WMA/wma.c46
-rw-r--r--CORE/SERVICES/WMA/wma.h5
-rw-r--r--CORE/SME/src/csr/csrApiRoam.c9
-rw-r--r--tools/athdiag/athdiag.c10
9 files changed, 94 insertions, 21 deletions
diff --git a/CORE/HDD/src/wlan_hdd_tx_rx.c b/CORE/HDD/src/wlan_hdd_tx_rx.c
index 8d2062f25f55..d8b82187b2b2 100644
--- a/CORE/HDD/src/wlan_hdd_tx_rx.c
+++ b/CORE/HDD/src/wlan_hdd_tx_rx.c
@@ -344,7 +344,7 @@ void hdd_mon_tx_mgmt_pkt(hdd_adapter_t* pAdapter)
hdd_adapter_t* pMonAdapter = NULL;
struct ieee80211_hdr *hdr;
- if (pAdapter == NULL )
+ if (pAdapter == NULL)
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
FL("pAdapter is NULL"));
@@ -353,6 +353,12 @@ void hdd_mon_tx_mgmt_pkt(hdd_adapter_t* pAdapter)
}
pMonAdapter = hdd_get_adapter( pAdapter->pHddCtx, WLAN_HDD_MONITOR );
+ if (pMonAdapter == NULL)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ "%s: pMonAdapter is NULL", __func__);
+ return;
+ }
cfgState = WLAN_HDD_GET_CFG_STATE_PTR( pAdapter );
@@ -1046,6 +1052,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
}
if (!granted) {
+ bool isDefaultAc = VOS_FALSE;
/* ADDTS request for this AC is sent, for now
* send this packet through next avaiable lower
* Access category until ADDTS negotiation completes.
@@ -1060,11 +1067,18 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
ac = WLANTL_AC_BE;
up = SME_QOS_WMM_UP_BE;
break;
+ case WLANTL_AC_BE:
+ ac = WLANTL_AC_BK;
+ up = SME_QOS_WMM_UP_BK;
+ break;
default:
ac = WLANTL_AC_BK;
up = SME_QOS_WMM_UP_BK;
+ isDefaultAc = VOS_TRUE;
break;
}
+ if (isDefaultAc)
+ break;
}
skb->priority = up;
skb->queue_mapping = hddLinuxUpToAcMap[up];
diff --git a/CORE/MAC/inc/qwlan_version.h b/CORE/MAC/inc/qwlan_version.h
index df0cf6140646..42503bad2e7a 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 78
+#define QWLAN_VERSION_BUILD 79
-#define QWLAN_VERSIONSTR "1.0.0.78"
+#define QWLAN_VERSIONSTR "1.0.0.79"
#ifdef QCA_WIFI_2_0
diff --git a/CORE/MAC/src/cfg/cfgProcMsg.c b/CORE/MAC/src/cfg/cfgProcMsg.c
index cc8b22205c43..5058a6c536b0 100644
--- a/CORE/MAC/src/cfg/cfgProcMsg.c
+++ b/CORE/MAC/src/cfg/cfgProcMsg.c
@@ -468,14 +468,14 @@ ProcSetReqInternal(tpAniSirGlobal pMac, tANI_U16 length, tANI_U32 *pParam, tANI_
tANI_U16 cfgId, valueLen, valueLenRoundedUp4;
tANI_U32 value, result;
- PELOG1(cfgLog(pMac, LOGW, FL("Rcvd cfg set request %d bytes"), length);)
+ PELOG1(cfgLog(pMac, LOGl, FL("Rcvd cfg set request %d bytes"), length);)
//for (i=0; i<length/4; i++)
// PELOG2(cfgLog(pMac, LOG2, FL("[%2d] 0x%08x"), i, pParam[i]);)
if (!pMac->cfg.gCfgStatus)
{
cfgId = (tANI_U16)sirReadU32N((tANI_U8*)pParam);
- PELOG1(cfgLog(pMac, LOG1, FL("CFG not ready, param %d"), cfgId);)
+ PELOG1(cfgLog(pMac, LOGW, FL("CFG not ready, param %d"), cfgId);)
pMac->cfg.gParamList[WNI_CFG_SET_CNF_RES] = WNI_CFG_NOT_READY;
pMac->cfg.gParamList[WNI_CFG_SET_CNF_PID] = cfgId;
if( fRsp )
@@ -535,9 +535,10 @@ ProcSetReqInternal(tpAniSirGlobal pMac, tANI_U16 length, tANI_U32 *pParam, tANI_
{
if (valueLenRoundedUp4 > length)
{
- PELOGE(cfgLog(pMac, LOGE, FL("Invalid string length %d in set param %d (tot %d)"),
- valueLen, cfgId, length);)
- result = WNI_CFG_INVALID_LEN;
+ PELOGE(cfgLog(pMac, LOGE, FL("Invalid string length %d"
+ "in set param %d (tot %d)"), valueLen,
+ cfgId, length);)
+ result = WNI_CFG_INVALID_LEN;
}
else
{
diff --git a/CORE/MAC/src/pe/lim/limApi.c b/CORE/MAC/src/pe/lim/limApi.c
index b23c85c34f24..7055c40f6cfb 100644
--- a/CORE/MAC/src/pe/lim/limApi.c
+++ b/CORE/MAC/src/pe/lim/limApi.c
@@ -561,8 +561,8 @@ static tSirRetStatus __limInitConfig( tpAniSirGlobal pMac )
if(cfgSetInt(pMac, WNI_CFG_HT_AMPDU_PARAMS, *(tANI_U8*)pAmpduParamInfo) !=
eSIR_SUCCESS)
{
- PELOGE(limLog(pMac, LOGE, FL("could not update HT AMPDU Param CFG"));)
- return eSIR_FAILURE;
+ limLog(pMac, LOGE, FL("cfg get short preamble failed"));
+ return eSIR_FAILURE;
}
/* WNI_CFG_SHORT_PREAMBLE - this one is not updated in
@@ -1634,7 +1634,7 @@ limUpdateOverlapStaParam(tpAniSirGlobal pMac, tSirMacAddr bssId, tpLimProtStaPar
if (i == LIM_PROT_STA_OVERLAP_CACHE_SIZE)
{
- PELOG1(limLog(pMac, LOG1, FL("Overlap cache is full"));)
+ PELOG1(limLog(pMac, LOGW, FL("Overlap cache is full"));)
}
else
{
diff --git a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
index 4542478f28d1..5e5e4f8656d8 100644
--- a/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
+++ b/CORE/MAC/src/pe/lim/limProcessAssocRspFrame.c
@@ -448,7 +448,8 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub
pMac, pBody, frameLen, pAssocRsp) == eSIR_FAILURE)
{
vos_mem_free(pAssocRsp);
- PELOGE(limLog(pMac, LOGE, FL("Parse error Assoc resp subtype %d, length=%d"), frameLen,subType);)
+ PELOGE(limLog(pMac, LOGE, FL("Parse error Assoc resp subtype %d,"
+ "length=%d"), frameLen,subType);)
vos_mem_free(pBeaconStruct);
return;
@@ -456,7 +457,7 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub
if(!pAssocRsp->suppRatesPresent)
{
- PELOGE(limLog(pMac, LOGW, FL("assoc response does not have supported rate set"));)
+ PELOGE(limLog(pMac, LOGE, FL("assoc response does not have supported rate set"));)
vos_mem_copy(&pAssocRsp->supportedRates,
&psessionEntry->rateSet, sizeof(tSirMacRateSet));
}
@@ -618,7 +619,8 @@ limProcessAssocRspFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo, tANI_U8 sub
// Re/Association response was received
// with invalid AID value
// Log error
- PELOGW(limLog(pMac, LOGW, FL("received Re/AssocRsp frame with invalid aid %X "), pAssocRsp->aid);)
+ PELOGW(limLog(pMac, LOGE, FL("received Re/AssocRsp frame with"
+ "invalid aid %X"), pAssocRsp->aid);)
mlmAssocCnf.resultCode = eSIR_SME_INVALID_ASSOC_RSP_RXED;
mlmAssocCnf.protStatusCode = eSIR_MAC_UNSPEC_FAILURE_STATUS;
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 0dbc2da0fe65..46df0235610c 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -2749,6 +2749,13 @@ VOS_STATUS WDA_open(v_VOID_t *vos_context, v_VOID_t *os_ctx,
__func__);
goto err_event_init;
}
+
+ vos_status = vos_event_init(&wma_handle->wma_resume_event);
+ if (vos_status != VOS_STATUS_SUCCESS) {
+ WMA_LOGP("%s: wma_resume_event initialization failed", __func__);
+ goto err_event_init;
+ }
+
INIT_LIST_HEAD(&wma_handle->vdev_resp_queue);
adf_os_spinlock_init(&wma_handle->vdev_respq_lock);
@@ -11978,6 +11985,8 @@ static int wma_wow_wakeup_host_event(void *handle, u_int8_t *event,
wma_wow_wake_reason_str(wake_info->wake_reason),
wake_info->vdev_id);
+ vos_event_set(&wma->wma_resume_event);
+
switch (wake_info->wake_reason) {
case WOW_REASON_AUTH_REQ_RECV:
wake_lock_duration = WMA_AUTH_REQ_RECV_WAKE_LOCK_TIMEOUT;
@@ -12984,6 +12993,7 @@ static VOS_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
{
wmi_wow_hostwakeup_from_sleep_cmd_fixed_param *cmd;
wmi_buf_t buf;
+ VOS_STATUS vos_status = VOS_STATUS_SUCCESS;
int32_t len;
int ret;
@@ -13002,6 +13012,8 @@ static VOS_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
WMITLV_GET_STRUCT_TLVLEN(
wmi_wow_hostwakeup_from_sleep_cmd_fixed_param));
+ vos_event_reset(&wma->wma_resume_event);
+
ret = wmi_unified_cmd_send(wma->wmi_handle, buf, len,
WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID);
if (ret) {
@@ -13012,7 +13024,19 @@ static VOS_STATUS wma_send_host_wakeup_ind_to_fw(tp_wma_handle wma)
WMA_LOGD("Host wakeup indication sent to fw");
- return VOS_STATUS_SUCCESS;
+ vos_status = vos_wait_single_event(&(wma->wma_resume_event),
+ WMA_RESUME_TIMEOUT);
+ if (VOS_STATUS_SUCCESS != vos_status) {
+ WMA_LOGP("%s: Timeout waiting for resume event from FW", __func__);
+ WMA_LOGP("%s: Pending commands %d credits %d", __func__,
+ wmi_get_pending_cmds(wma->wmi_handle),
+ wmi_get_host_credits(wma->wmi_handle));
+ VOS_ASSERT(0);
+ } else {
+ WMA_LOGD("Host wakeup received");
+ }
+
+ return vos_status;
}
/* Disable wow in PCIe resume context.*/
@@ -17136,6 +17160,7 @@ VOS_STATUS wma_close(v_VOID_t *vos_ctx)
/* close the vos events */
vos_event_destroy(&wma_handle->wma_ready_event);
vos_event_destroy(&wma_handle->target_suspend);
+ vos_event_destroy(&wma_handle->wma_resume_event);
wma_cleanup_vdev_resp(wma_handle);
#ifdef QCA_WIFI_ISOC
vos_event_destroy(&wma_handle->cfg_nv_tx_complete);
@@ -18411,6 +18436,8 @@ int wma_resume_target(WMA_HANDLE handle)
wmi_buf_t wmibuf;
wmi_pdev_resume_cmd_fixed_param *cmd;
int ret;
+ int timeout = 0;
+ int wmi_pending_cmds;
wmibuf = wmi_buf_alloc(wma_handle->wmi_handle, sizeof(*cmd));
if (wmibuf == NULL) {
@@ -18418,15 +18445,26 @@ int wma_resume_target(WMA_HANDLE handle)
}
cmd = (wmi_pdev_resume_cmd_fixed_param *) wmi_buf_data(wmibuf);
WMITLV_SET_HDR(&cmd->tlv_header,
- WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param,
- WMITLV_GET_STRUCT_TLVLEN(wmi_pdev_resume_cmd_fixed_param));
+ WMITLV_TAG_STRUC_wmi_pdev_resume_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_pdev_resume_cmd_fixed_param));
cmd->reserved0 = 0;
ret = wmi_unified_cmd_send(wma_handle->wmi_handle, wmibuf, sizeof(*cmd),
- WMI_PDEV_RESUME_CMDID);
+ WMI_PDEV_RESUME_CMDID);
if(ret != EOK) {
WMA_LOGE("Failed to send WMI_PDEV_RESUME_CMDID command");
wmi_buf_free(wmibuf);
}
+ wmi_pending_cmds = wmi_get_pending_cmds(wma_handle->wmi_handle);
+ while (wmi_pending_cmds && timeout++ < WMA_MAX_RESUME_RETRY) {
+ msleep(100);
+ wmi_pending_cmds = wmi_get_pending_cmds(wma_handle->wmi_handle);
+ }
+
+ if (wmi_pending_cmds) {
+ WMA_LOGE("Failed to deliver WMI_PDEV_RESUME_CMDID command %d\n", timeout);
+ ret = -1;
+ }
+
return ret;
}
#endif
diff --git a/CORE/SERVICES/WMA/wma.h b/CORE/SERVICES/WMA/wma.h
index 580ccbceaa73..6f67668b3959 100644
--- a/CORE/SERVICES/WMA/wma.h
+++ b/CORE/SERVICES/WMA/wma.h
@@ -79,7 +79,9 @@
#define WMA_READY_EVENTID_TIMEOUT 2000
#define WMA_TGT_SUSPEND_COMPLETE_TIMEOUT 1000
#define WMA_WAKE_LOCK_TIMEOUT 1000
-#define MAX_MEM_CHUNKS 32
+#define WMA_MAX_RESUME_RETRY 10
+#define WMA_RESUME_TIMEOUT 1000
+#define MAX_MEM_CHUNKS 32
/*
In prima 12 HW stations are supported including BCAST STA(staId 0)
and SELF STA(staId 1) so total ASSOC stations which can connect to Prima
@@ -504,6 +506,7 @@ typedef struct {
vos_event_t cfg_nv_rx_complete;
#endif
vos_event_t wma_ready_event;
+ vos_event_t wma_resume_event;
vos_event_t target_suspend;
t_cfg_nv_param cfg_nv;
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 1370dee6e70e..090590b26f73 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -2559,6 +2559,9 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
connectionStatus.reason = eCSR_REASON_DISASSOC;
+ if(pRoamInfo)
+ connectionStatus.reasonDisconnect = pRoamInfo->reasonCode;
+
WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
}
if(eCSR_ROAM_RESULT_DEAUTH_IND == u2)
@@ -2570,6 +2573,8 @@ eHalStatus csrRoamCallCallback(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoam
connectionStatus.eventId = eCSR_WLAN_STATUS_DISCONNECT;
connectionStatus.reason = eCSR_REASON_DEAUTH;
+ if(pRoamInfo)
+ connectionStatus.reasonDisconnect = pRoamInfo->reasonCode;
WLAN_VOS_DIAG_EVENT_REPORT(&connectionStatus, EVENT_WLAN_STATUS);
}
#endif //FEATURE_WLAN_DIAG_SUPPORT_CSR
@@ -9370,6 +9375,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pRoamInfo = &roamInfo;
pRoamInfo->statusCode = pDisassocInd->statusCode;
+ pRoamInfo->reasonCode = pDisassocInd->reasonCode;
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
pRoamInfo->staId = (tANI_U8)pDisassocInd->staId;
@@ -9451,6 +9457,7 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
pRoamInfo = &roamInfo;
pRoamInfo->statusCode = pDeauthInd->statusCode;
+ pRoamInfo->reasonCode = pDeauthInd->reasonCode;
pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
pRoamInfo->staId = (tANI_U8)pDeauthInd->staId;
@@ -10568,6 +10575,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
vos_mem_copy(roamInfo.peerMac, pDisassocIndMsg->peerMacAddr,
sizeof(tSirMacAddr));
roamInfo.staId = (tANI_U8)pDisassocIndMsg->staId;
+ roamInfo.reasonCode = pDisassocIndMsg->reasonCode;
}
else if( eWNI_SME_DEAUTH_IND == type )
{
@@ -10575,6 +10583,7 @@ eHalStatus csrRoamLostLink( tpAniSirGlobal pMac, tANI_U32 sessionId, tANI_U32 ty
vos_mem_copy(roamInfo.peerMac, pDeauthIndMsg->peerMacAddr,
sizeof(tSirMacAddr));
roamInfo.staId = (tANI_U8)pDeauthIndMsg->staId;
+ roamInfo.reasonCode = pDeauthIndMsg->reasonCode;
}
smsLog(pMac, LOGW, FL("roamInfo.staId (%d)"), roamInfo.staId);
diff --git a/tools/athdiag/athdiag.c b/tools/athdiag/athdiag.c
index a3b7ef3bc9b7..bbbb0165be8f 100644
--- a/tools/athdiag/athdiag.c
+++ b/tools/athdiag/athdiag.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012 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.
*
@@ -135,6 +135,9 @@ static const struct ath_target_reg_info reg_ar6320_v1[] = {
#define INVALID_TARGET_INDEX 0xffff
+#define MIN_TARGET_INDEX 0
+#define MAX_TARGET_INDEX 2
+
struct ath_target_info {
const char *name;
const struct ath_target_reg_info *reg_info;
@@ -407,11 +410,14 @@ DumpTargetMem(int dev, unsigned int target_idx, char *pathname)
A_UINT8 *buffer;
unsigned int i, address, length, remaining;
+ if ((target_idx < MIN_TARGET_INDEX) || (target_idx >= MAX_TARGET_INDEX))
+ return;
+
buffer = (A_UINT8 *)MALLOC(MAX_BUF);
if (buffer == NULL)
return;
- reg_info = target_info[target_idx].reg_info;
+ reg_info = target_info[target_idx].reg_info;
while ((reg_info->reg_start != 0) || (reg_info->reg_len != 0)) {
memset(filename, 0, sizeof(filename));
snprintf(filename, sizeof(filename), "%s%s", pathname,