linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC
@ 2012-11-28 21:19 Malcolm Priestley
  2013-01-07 19:07 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Malcolm Priestley @ 2012-11-28 21:19 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless


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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC
  2012-11-28 21:19 [PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC Malcolm Priestley
@ 2013-01-07 19:07 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2013-01-07 19:07 UTC (permalink / raw)
  To: Malcolm Priestley; +Cc: linux-wireless

On Wed, Nov 28, 2012 at 09:19:16PM +0000, Malcolm Priestley wrote:
> 
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-07 19:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-28 21:19 [PATCH 3/3] staging: vt6656: dpc.c :RXbBulkInProcessData clean up RSC Malcolm Priestley
2013-01-07 19:07 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).