public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC
Date: Wed, 28 Nov 2012 21:19:16 +0000	[thread overview]
Message-ID: <1354137556.2633.5.camel@user64-MCP7A> (raw)


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




             reply	other threads:[~2012-11-28 21:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28 21:19 Malcolm Priestley [this message]
2013-01-07 19:07 ` [PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1354137556.2633.5.camel@user64-MCP7A \
    --to=tvboxspy@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox