summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashanth Bhatta <bhattap@qca.qualcomm.com>2014-01-31 19:51:22 -0800
committerPrakash Dhavali <pdhavali@qca.qualcomm.com>2014-02-02 15:10:30 -0800
commit8b83787a7dd1172d550dfd5a588730416ed76e4d (patch)
tree521b7bdda7c26c1ab7995942be3509c4c3bcc96e
parenta3cd0ab544376336488fba455617afd84d001be5 (diff)
qcacld: Fix compiler warnings
Fixing compiler warnings for uninitialized variables. And also fixing a warning of function tdlsMsgProcessor exceeding frame size of 1024. Change-Id: I756cfa4d68fff75c4446b5281b44f8f9c07de114
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c13
-rw-r--r--CORE/SME/src/csr/csrTdlsProcess.c12
2 files changed, 7 insertions, 18 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 6f946815e08e..564a713ddd73 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -7144,7 +7144,7 @@ static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
static tANI_U8 wlan_hdd_get_mcs_idx(tANI_U16 maxRate, tANI_U8 rate_flags,
tANI_U8 nss)
{
- tANI_U8 rateFlag = 0, curIdx;
+ tANI_U8 rateFlag = 0, curIdx = 0;
tANI_U16 curRate;
struct index_vht_data_rate_type *supported_vht_mcs_rate;
struct index_data_rate_type *supported_mcs_rate;
@@ -7216,7 +7216,7 @@ static tANI_U8 wlan_hdd_get_mcs_idx(tANI_U16 maxRate, tANI_U8 rate_flags,
}
}
- return (curIdx? (curIdx - 1) : curIdx);
+ return (curIdx ? (curIdx - 1) : curIdx);
}
#endif
static int wlan_hdd_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
@@ -8087,8 +8087,7 @@ static int wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device
tHalHandle halHandle;
hdd_context_t *pHddCtx;
tANI_U8 *pBSSId;
- int status;
- int result;
+ int status = -1;
hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: flushing PMKSA ",__func__);
@@ -8127,9 +8126,9 @@ static int wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device
pBSSId =(tANI_U8 *)(PMKIDCache[j].BSSID);
/*delete the PMKID in CSR*/
- result = sme_RoamDelPMKIDfromCache(halHandle, pAdapter->sessionId, pBSSId);
+ status = sme_RoamDelPMKIDfromCache(halHandle, pAdapter->sessionId, pBSSId);
- if (0!= result)
+ if (0 != status)
{
hddLog(VOS_TRACE_LEVEL_ERROR ,"%s cannot flush PMKIDCache %d.",
__func__,j);
@@ -8140,7 +8139,7 @@ static int wlan_hdd_cfg80211_flush_pmksa(struct wiphy *wiphy, struct net_device
}
PMKIDCacheIndex = 0;
- return result;
+ return status;
}
#endif
diff --git a/CORE/SME/src/csr/csrTdlsProcess.c b/CORE/SME/src/csr/csrTdlsProcess.c
index adf472e724e1..46e1a06148df 100644
--- a/CORE/SME/src/csr/csrTdlsProcess.c
+++ b/CORE/SME/src/csr/csrTdlsProcess.c
@@ -1018,6 +1018,7 @@ static eHalStatus tdlsSaveTdlsPeerInfo(tpAniSirGlobal pMac,
eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
void *pMsgBuf)
{
+ tCsrRoamInfo roamInfo = {0} ;
switch(msgType)
{
case eWNI_SME_TDLS_SEND_MGMT_RSP:
@@ -1030,7 +1031,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
{
tSirTdlsAddStaRsp *addStaRsp = (tSirTdlsAddStaRsp *) pMsgBuf ;
eCsrRoamResult roamResult ;
- tCsrRoamInfo roamInfo = {0} ;
vos_mem_copy( &roamInfo.peerMac, addStaRsp->peerMac,
sizeof(tSirMacAddr)) ;
roamInfo.staId = addStaRsp->staId ;
@@ -1056,7 +1056,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_DEL_STA_RSP:
{
tSirTdlsDelStaRsp *delStaRsp = (tSirTdlsDelStaRsp *) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
vos_mem_copy( &roamInfo.peerMac, delStaRsp->peerMac,
sizeof(tSirMacAddr)) ;
@@ -1076,7 +1075,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_DEL_STA_IND:
{
tpSirTdlsDelStaInd pSirTdlsDelStaInd = (tpSirTdlsDelStaInd) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
vos_mem_copy( &roamInfo.peerMac, pSirTdlsDelStaInd->peerMac,
sizeof(tSirMacAddr)) ;
roamInfo.staId = pSirTdlsDelStaInd->staId ;
@@ -1091,7 +1089,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_DEL_ALL_PEER_IND:
{
tpSirTdlsDelAllPeerInd pSirTdlsDelAllPeerInd = (tpSirTdlsDelAllPeerInd) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
/* Sending the TEARDOWN indication to HDD. */
csrRoamCallCallback(pMac, pSirTdlsDelAllPeerInd->sessionId, &roamInfo, 0,
@@ -1102,7 +1099,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_MGMT_FRM_TX_COMPLETION_IND:
{
tpSirMgmtTxCompletionInd pSirTdlsDelAllPeerInd = (tpSirMgmtTxCompletionInd) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
roamInfo.reasonCode = pSirTdlsDelAllPeerInd->txCompleteStatus;
csrRoamCallCallback(pMac, pSirTdlsDelAllPeerInd->sessionId, &roamInfo,
@@ -1112,7 +1108,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_LINK_ESTABLISH_RSP:
{
tSirTdlsLinkEstablishReqRsp *linkEstablishReqRsp = (tSirTdlsLinkEstablishReqRsp *) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
#if 0
vos_mem_copy(&roamInfo.peerMac, delStaRsp->peerMac,
sizeof(tSirMacAddr)) ;
@@ -1257,7 +1252,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_ADD_TDLS_PEER_IND:
{
tSirTdlsPeerInd *peerInd = (tSirTdlsPeerInd *) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
vos_mem_copy( &roamInfo.peerMac, peerInd->peerMac,
sizeof(tSirMacAddr)) ;
roamInfo.staId = peerInd->staId ;
@@ -1276,7 +1270,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_DELETE_TDLS_PEER_IND:
{
tSirTdlsPeerInd *peerInd = (tSirTdlsPeerInd *) pMsgBuf ;
- tCsrRoamInfo roamInfo = {0} ;
vos_mem_copy( &roamInfo.peerMac, peerInd->peerMac,
sizeof(tSirMacAddr)) ;
roamInfo.staId = peerInd->staId ;
@@ -1295,7 +1288,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_SHOULD_DISCOVER:
{
tSirTdlsEventNotify *tevent = (tSirTdlsEventNotify *) pMsgBuf;
- tCsrRoamInfo roamInfo = {0};
vos_mem_copy(&roamInfo.peerMac, tevent->peerMac,
sizeof(tSirMacAddr));
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
@@ -1311,7 +1303,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_SHOULD_TEARDOWN:
{
tSirTdlsEventNotify *tevent = (tSirTdlsEventNotify *) pMsgBuf;
- tCsrRoamInfo roamInfo = {0};
vos_mem_copy(&roamInfo.peerMac, tevent->peerMac,
sizeof(tSirMacAddr));
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,
@@ -1327,7 +1318,6 @@ eHalStatus tdlsMsgProcessor(tpAniSirGlobal pMac, v_U16_t msgType,
case eWNI_SME_TDLS_PEER_DISCONNECTED:
{
tSirTdlsEventNotify *tevent = (tSirTdlsEventNotify *) pMsgBuf;
- tCsrRoamInfo roamInfo = {0};
vos_mem_copy(&roamInfo.peerMac, tevent->peerMac,
sizeof(tSirMacAddr));
VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_INFO,