Search Linux Wireless

[PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Malcolm Priestley <tvboxspy@xxxxxxxxx>
---
 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



--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux