From: Simon Horman Date: Tue, 12 Jan 2010 00:50:09 +0000 (+1100) Subject: Staging: otus: zfTkipInit(): increment another pointer X-Git-Tag: MMI-PSA29.97-13-9~24618^2~1^2~212 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0daa04a586f03de8f9022e29fb41c9dc0de28c4a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: otus: zfTkipInit(): increment another pointer Increment the pointer rather than its value. These appear to be logic errors. Thanks to Dan Carpenter for the first hunk of this change. Cc: Dan Carpenter Signed-off-by: Simon Horman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/otus/80211core/ctkip.c b/drivers/staging/otus/80211core/ctkip.c index be42f7aaa37d..ca0740227be4 100644 --- a/drivers/staging/otus/80211core/ctkip.c +++ b/drivers/staging/otus/80211core/ctkip.c @@ -255,7 +255,8 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv) zfMemoryCopy(pSeed->ta, ta, 6); zfMemoryCopy(pSeed->tk, key, 16); - iv16 = *initIv++; + iv16 = *initIv; + initIv++; iv16 += *initIv<<8; initIv++; @@ -264,7 +265,7 @@ void zfTkipInit(u8_t* key, u8_t* ta, struct zsTkipSeed* pSeed, u8_t* initIv) for(i=0; i<4; i++) // initiv is little endian { iv32 += *initIv<<(i*8); - *initIv++; + initIv++; } pSeed->iv32 = iv32+1; // Force Recalculating on Tkip Phase1