diff options
| author | Srinivas Girigowda <sgirigow@qca.qualcomm.com> | 2014-03-17 12:26:25 -0700 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2014-03-19 13:16:49 -0700 |
| commit | fcfe69681f8e3854f1a3d28a536d1312af119e4e (patch) | |
| tree | 611506a983c8bf78fe33a89ab90bbcfa8c8c1bf1 | |
| parent | 22c1982b23d9b6a393d7713ae17d26c3ce0530c9 (diff) | |
qcacld: Code cleanup and Fix static analysis issues
This change is to fix the issues reported by Static
analysis tool and remove commented code
Change-Id: Id819a9e04217b9804aba04f0043da51167b10940
CRs-Fixed: 633902
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_p2p.c | 6 | ||||
| -rw-r--r-- | CORE/SME/src/csr/csrNeighborRoam.c | 37 | ||||
| -rw-r--r-- | CORE/SYS/legacy/src/utils/src/macTrace.c | 5 |
3 files changed, 17 insertions, 31 deletions
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c index 061a34806f6e..533650fe433b 100644 --- a/CORE/HDD/src/wlan_hdd_p2p.c +++ b/CORE/HDD/src/wlan_hdd_p2p.c @@ -825,7 +825,8 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev, // Assign the preserved cookie value here to appear as // same RoC to supplicant - if (pAdapter->internalRoCinProgress == VOS_TRUE) + if (cfgState->remain_on_chan_ctx && + (pAdapter->internalRoCinProgress == VOS_TRUE)) cfgState->remain_on_chan_ctx->cookie = old_roc_ctx.cookie; if(0 != status) @@ -870,7 +871,8 @@ int wlan_hdd_action( struct wiphy *wiphy, struct net_device *dev, { // If Ready indication timeout occuers then indicate complete // RoC to supplicant is internalRoCin Progress is set - if(pAdapter->internalRoCinProgress == VOS_TRUE) + if(cfgState->remain_on_chan_ctx && + (pAdapter->internalRoCinProgress == VOS_TRUE)) { hddLog( LOGE, "Indicate Complete RoC to supplicant for" "cookie %llu Timeout",cfgState->remain_on_chan_ctx->cookie); diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c index c64391d34251..2ca85d954572 100644 --- a/CORE/SME/src/csr/csrNeighborRoam.c +++ b/CORE/SME/src/csr/csrNeighborRoam.c @@ -3211,14 +3211,12 @@ VOS_STATUS csrNeighborRoamMergeChannelLists( ---------------------------------------------------------------------------*/ VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac) { - tpRrmNeighborReportDesc pNeighborBssDesc; - tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo; - tANI_U8 numChannels = 0, i = 0; - tANI_U8 channelList[MAX_BSS_IN_NEIGHBOR_RPT]; - tANI_U8 mergedOutputNumOfChannels = 0; -#if 0 - eHalStatus status = eHAL_STATUS_SUCCESS; -#endif + tpRrmNeighborReportDesc pNeighborBssDesc; + tpCsrNeighborRoamControlInfo pNeighborRoamInfo = &pMac->roam.neighborRoamInfo; + tANI_U8 numChannels = 0; + tANI_U8 i = 0; + tANI_U8 channelList[MAX_BSS_IN_NEIGHBOR_RPT]; + tANI_U8 mergedOutputNumOfChannels = 0; /* This should always start from 0 whenever we create a channel list out of neighbor AP list */ pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport = 0; @@ -3239,15 +3237,12 @@ VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac) pNeighborRoamInfo->FTRoamInfo.numBssFromNeighborReport++; /* Saving the channel list non-redundantly */ - if (numChannels > 0) + for (i = 0; (i < numChannels && i < MAX_BSS_IN_NEIGHBOR_RPT); i++) { - for (i = 0; i < numChannels; i++) - { - if (pNeighborBssDesc->pNeighborBssDescription->channel == channelList[i]) - break; - } - + if (pNeighborBssDesc->pNeighborBssDescription->channel == channelList[i]) + break; } + if (i == numChannels) { if (pNeighborBssDesc->pNeighborBssDescription->channel) @@ -3281,18 +3276,6 @@ VOS_STATUS csrNeighborRoamCreateChanListFromNeighborReport(tpAniSirGlobal pMac) if (pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList) { -#if 0 - // Before we free the existing channel list for a safety net make sure - // we have a union of the IAPP and the already existing list. - status = csrNeighborRoamMergeChannelLists( - pMac, - pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList, - pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.numOfChannels, - channelList, - numChannels, - &numChannels ); -#endif - vos_mem_free(pNeighborRoamInfo->roamChannelInfo.currentChannelListInfo.ChannelList); } diff --git a/CORE/SYS/legacy/src/utils/src/macTrace.c b/CORE/SYS/legacy/src/utils/src/macTrace.c index ced550caf698..0c1c01df25f5 100644 --- a/CORE/SYS/legacy/src/utils/src/macTrace.c +++ b/CORE/SYS/legacy/src/utils/src/macTrace.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. * @@ -1134,7 +1134,8 @@ void macTraceDumpAll(tpAniSirGlobal pMac, tANI_U8 code, tANI_U8 session, tANI_U3 } } - pRecord = &gTraceTbl[i]; + if ((i >= 0 && i < MAX_TRACE_RECORDS)) + pRecord = &gTraceTbl[i]; for (;;) { |
