From ac39bfffe109a6cffcaf3b537505130712161dce Mon Sep 17 00:00:00 2001 From: Sridhar Selvaraj Date: Fri, 14 Jul 2017 16:08:23 +0530 Subject: [PATCH] qcacld-2.0: Update limComputeCrc32 to pass uint16_t qcacld-3.0 to qcacld-2.0 propagation Update limComputeCrc32() to pass uint16_t as a length type. Currently uint8_t is being passed as length and there will be type mismatch when authentication frame to be encrypted will be larger than 255 bytes. Change-Id: Ic009197c13a2d70c9015a184acff2e82bf80eaba CRs-Fixed: 2072937 --- drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c | 2 +- drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c index 85f12dfb876..8f754c77e9f 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.c @@ -609,7 +609,7 @@ limEncryptAuthFrame(tpAniSirGlobal pMac, tANI_U8 keyId, tANI_U8 *pKey, tANI_U8 * */ void -limComputeCrc32(tANI_U8 *pDest, tANI_U8 * pSrc, tANI_U8 len) +limComputeCrc32(tANI_U8 *pDest, tANI_U8 * pSrc, tANI_U16 len) { tANI_U32 crc; int i; diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.h b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.h index 5eafbd7b747..dd097607a18 100644 --- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.h +++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limSecurityUtils.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2015, 2017 The Linux Foundation. All rights reserved. * * Previously licensed under the ISC license by Qualcomm Atheros, Inc. * @@ -73,7 +73,7 @@ void limRestoreFromAuthState(tpAniSirGlobal, // Encryption/Decryption related functions tCfgWepKeyEntry *limLookUpKeyMappings(tSirMacAddr); -void limComputeCrc32(tANI_U8 *, tANI_U8 *, tANI_U8); +void limComputeCrc32(tANI_U8 *, tANI_U8 *, tANI_U16); void limRC4(tANI_U8 *, tANI_U8 *, tANI_U8 *, tANI_U32, tANI_U16); void limEncryptAuthFrame(tpAniSirGlobal, tANI_U8, tANI_U8 *, tANI_U8 *, tANI_U8 *, tANI_U32); tANI_U8 limDecryptAuthFrame(tpAniSirGlobal, tANI_U8 *, tANI_U8 *, tANI_U8 *, tANI_U32, tANI_U16);