Signed-off-by: Malcolm Priestley <[email protected]>
---
drivers/staging/vt6656/dpc.c | 29 ++++++++++++++---------------
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 8f21bc7..5d94faf 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -359,6 +359,9 @@ RXbBulkInProcessData (
WORD wPLCPwithPadding;
PS802_11Header pMACHeader;
BOOL bRxeapol_key = FALSE;
+ u16 wLocalTSC15_0 = 0;
+ u32 dwLocalTSC47_16 = 0;
+ u64 RSC = 0;
@@ -895,21 +898,17 @@ RXbBulkInProcessData (
// ++++++++++ Reply Counter Check +++++++++++++
- if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) ||
- (pKey->byCipherSuite == KEY_CTL_CCMP))) {
- if (bIsWEP) {
- WORD wLocalTSC15_0 = 0;
- DWORD dwLocalTSC47_16 = 0;
- unsigned long long RSC = 0;
- // endian issues
- RSC = *((unsigned long long *) &(pKey->KeyRSC));
- wLocalTSC15_0 = (WORD) RSC;
- dwLocalTSC47_16 = (DWORD) (RSC>>16);
-
- RSC = dwRxTSC47_16;
- RSC <<= 16;
- RSC += wRxTSC15_0;
- memcpy(&(pKey->KeyRSC), &RSC, sizeof(u64));
+ if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) ||
+ (pKey->byCipherSuite == KEY_CTL_CCMP))) {
+
+ if (bIsWEP) {
+ RSC = pKey->KeyRSC;
+ wLocalTSC15_0 = (RSC & 0xffffU);
+ dwLocalTSC47_16 = (u32)(RSC >> 16);
+ RSC = dwRxTSC47_16;
+ RSC <<= 16;
+ RSC += wRxTSC15_0;
+ pKey->KeyRSC = RSC;
if ( (pDevice->sMgmtObj.eCurrMode == WMAC_MODE_ESS_STA) &&
(pDevice->sMgmtObj.eCurrState == WMAC_STATE_ASSOC)) {
--
1.7.10.4
On Wed, Nov 28, 2012 at 09:19:16PM +0000, Malcolm Priestley wrote:
>
> Signed-off-by: Malcolm Priestley <[email protected]>
I need a much better changelog entry here, to be able to accept this.
For one, I have no idea what "clean up RSC" means...
thanks,
greg k-h