summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirav Shah <nnshah@qti.qualcomm.com>2014-05-13 20:40:58 +0530
committerPitani Venkata Rajesh Kumar <c_vpitan@qti.qualcomm.com>2014-05-15 16:19:44 +0530
commit1ce135c56ca94825e7a080f941cf5afea1397c19 (patch)
treefdf31780437ac2975da2e6b6a96d1ba3de9f8b04
parented0754ecc04176b0445287a2c8d19f68bfbaba6d (diff)
LIM : Correction in implementation of vos_freq_to_band
vos_freq_to_band is changed to vos_chan_to_band to convert channelId to appropriate band. Eariler it was expecting channel frequency. Change-Id: I7ef08a4b871f0e21152a1cceabc26512e80ee227 CRs-fixed: 663614
-rw-r--r--CORE/MAC/src/pe/lim/limScanResultUtils.c4
-rw-r--r--CORE/SME/src/csr/csrApiScan.c2
-rw-r--r--CORE/VOSS/inc/vos_utils.h3
-rw-r--r--CORE/VOSS/src/vos_utils.c4
4 files changed, 6 insertions, 7 deletions
diff --git a/CORE/MAC/src/pe/lim/limScanResultUtils.c b/CORE/MAC/src/pe/lim/limScanResultUtils.c
index a087f611a92d..fb0dd39bba61 100644
--- a/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -732,8 +732,8 @@ limLookupNaddHashEntry(tpAniSirGlobal pMac,
(tANI_U8 *) ptemp->bssDescription.bssId,
sizeof(tSirMacAddr))) && //matching BSSID
// matching band to update new channel info
- (vos_freq_to_band(pBssDescr->bssDescription.channelId) ==
- vos_freq_to_band(ptemp->bssDescription.channelId)) &&
+ (vos_chan_to_band(pBssDescr->bssDescription.channelId) ==
+ vos_chan_to_band(ptemp->bssDescription.channelId)) &&
vos_mem_compare( ((tANI_U8 *) &pBssDescr->bssDescription.ieFields + 1),
((tANI_U8 *) &ptemp->bssDescription.ieFields + 1),
(tANI_U8) (ssidLen + 1)) &&
diff --git a/CORE/SME/src/csr/csrApiScan.c b/CORE/SME/src/csr/csrApiScan.c
index dd07cfc82be8..785a72390781 100644
--- a/CORE/SME/src/csr/csrApiScan.c
+++ b/CORE/SME/src/csr/csrApiScan.c
@@ -4761,7 +4761,7 @@ tANI_BOOLEAN csrIsDuplicateBssDescription( tpAniSirGlobal pMac, tSirBssDescripti
{
if (pCap1->ess &&
csrIsMacAddressEqual( pMac, (tCsrBssid *)pSirBssDesc1->bssId, (tCsrBssid *)pSirBssDesc2->bssId)&&
- (fForced || (vos_freq_to_band(pSirBssDesc1->channelId) == vos_freq_to_band((pSirBssDesc2->channelId)))))
+ (fForced || (vos_chan_to_band(pSirBssDesc1->channelId) == vos_chan_to_band((pSirBssDesc2->channelId)))))
{
fMatch = TRUE;
// Check for SSID match, if exists
diff --git a/CORE/VOSS/inc/vos_utils.h b/CORE/VOSS/inc/vos_utils.h
index 920e3fe95fac..f3f32dfc94dc 100644
--- a/CORE/VOSS/inc/vos_utils.h
+++ b/CORE/VOSS/inc/vos_utils.h
@@ -65,7 +65,6 @@
#define VOS_CHAN_SPACING_20MHZ 20
#define VOS_CHAN_14_FREQ 2484
#define VOS_CHAN_15_FREQ 2512
-
/*--------------------------------------------------------------------------
Type declarations
------------------------------------------------------------------------*/
@@ -170,7 +169,7 @@ VOS_STATUS vos_decrypt_AES(v_U32_t cryptHandle, /* Handle */
v_U32_t vos_chan_to_freq(v_U8_t chan);
v_U8_t vos_freq_to_chan(v_U32_t freq);
-v_U8_t vos_freq_to_band(v_U32_t freq);
+v_U8_t vos_chan_to_band(v_U32_t chan);
#ifdef WLAN_FEATURE_11W
v_BOOL_t vos_is_mmie_valid(v_U8_t *key, v_U8_t *ipn,
v_U8_t* frm, v_U8_t* efrm);
diff --git a/CORE/VOSS/src/vos_utils.c b/CORE/VOSS/src/vos_utils.c
index 9ca2dd183585..2beabf8bf27b 100644
--- a/CORE/VOSS/src/vos_utils.c
+++ b/CORE/VOSS/src/vos_utils.c
@@ -1029,9 +1029,9 @@ v_U8_t vos_freq_to_chan(v_U32_t freq)
}
-v_U8_t vos_freq_to_band(v_U32_t freq)
+v_U8_t vos_chan_to_band(v_U32_t chan)
{
- if (freq <= VOS_CHAN_14_FREQ)
+ if (chan <= VOS_24_GHZ_CHANNEL_14)
return VOS_BAND_2GHZ;
return VOS_BAND_5GHZ;