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


Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/bssdb.c |   89 +++++++++++++++++++---------------------
 drivers/staging/vt6656/ttype.h |    3 --
 2 files changed, 42 insertions(+), 50 deletions(-)

diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
index 539bc1d..d27469e 100644
--- a/drivers/staging/vt6656/bssdb.c
+++ b/drivers/staging/vt6656/bssdb.c
@@ -355,13 +355,13 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
 			 PBYTE pbyIEs,
 			 void *pRxPacketContext)
 {
-
-    PSDevice     pDevice = (PSDevice)hDeviceContext;
-    PSMgmtObject    pMgmt = &(pDevice->sMgmtObj);
-    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
-    PKnownBSS       pBSSList = NULL;
-    unsigned int            ii;
-    BOOL            bParsingQuiet = FALSE;
+	PSDevice pDevice = (PSDevice)hDeviceContext;
+	PSMgmtObject pMgmt = &pDevice->sMgmtObj;
+	PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
+	PKnownBSS pBSSList = NULL;
+	unsigned int ii;
+	int bParsingQuiet = FALSE;
+	u32 uLen;
 


@@ -433,29 +433,25 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
 
     WPA_ClearRSN(pBSSList);
 
-    if (pRSNWPA != NULL) {
-	unsigned int uLen = pRSNWPA->len + 2;
-
-	if (uLen <= (uIELength -
-		     (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
-		pBSSList->wWPALen = uLen;
-		memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
-		WPA_ParseRSN(pBSSList, pRSNWPA);
+	if (pRSNWPA != NULL) {
+		uLen = pRSNWPA->len + 2;
+		if (uLen <= (uIELength - (u32)((u8 *)pRSNWPA - pbyIEs))) {
+			pBSSList->wWPALen = uLen;
+			memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
+			WPA_ParseRSN(pBSSList, pRSNWPA);
+		}
 	}
-    }
 
     WPA2_ClearRSN(pBSSList);
 
-    if (pRSN != NULL) {
-	unsigned int uLen = pRSN->len + 2;
-
-	if (uLen <= (uIELength -
-		     (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
-		pBSSList->wRSNLen = uLen;
-		memcpy(pBSSList->byRSNIE, pRSN, uLen);
-		WPA2vParseRSN(pBSSList, pRSN);
+	if (pRSN != NULL) {
+		uLen = pRSN->len + 2;
+		if (uLen <= (uIELength - (u32)((u8 *)pRSN - pbyIEs))) {
+			pBSSList->wRSNLen = uLen;
+			memcpy(pBSSList->byRSNIE, pRSN, uLen);
+			WPA2vParseRSN(pBSSList, pRSN);
+		}
 	}
-    }
 
     if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) {
 
@@ -536,12 +532,13 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
 			 PBYTE pbyIEs,
 			 void *pRxPacketContext)
 {
-    int             ii, jj;
-    PSDevice        pDevice = (PSDevice)hDeviceContext;
-    PSMgmtObject    pMgmt = &(pDevice->sMgmtObj);
-    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
-    signed long            ldBm, ldBmSum;
-    BOOL            bParsingQuiet = FALSE;
+	PSDevice pDevice = (PSDevice)hDeviceContext;
+	PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
+	PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
+	signed long            ldBm, ldBmSum;
+	int bParsingQuiet = FALSE;
+	int ii, jj;
+	u32 uLen;
 
     if (pBSSList == NULL)
         return FALSE;
@@ -596,27 +593,25 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
 
    WPA_ClearRSN(pBSSList);         //mike update
 
-   if (pRSNWPA != NULL) {
-	unsigned int uLen = pRSNWPA->len + 2;
-	if (uLen <= (uIELength -
-		     (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
-		pBSSList->wWPALen = uLen;
-		memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
-		WPA_ParseRSN(pBSSList, pRSNWPA);
+	if (pRSNWPA != NULL) {
+		uLen = pRSNWPA->len + 2;
+		if (uLen <= (uIELength - (u32)((u8 *)pRSNWPA - pbyIEs))) {
+			pBSSList->wWPALen = uLen;
+			memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
+			WPA_ParseRSN(pBSSList, pRSNWPA);
+		}
 	}
-   }
 
    WPA2_ClearRSN(pBSSList);  //mike update
 
-    if (pRSN != NULL) {
-	unsigned int uLen = pRSN->len + 2;
-	if (uLen <= (uIELength -
-			(unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
-		pBSSList->wRSNLen = uLen;
-		memcpy(pBSSList->byRSNIE, pRSN, uLen);
-		WPA2vParseRSN(pBSSList, pRSN);
+	if (pRSN != NULL) {
+		unsigned int uLen = pRSN->len + 2;
+		if (uLen <= (uIELength - (u32)((u8 *) pRSN - pbyIEs))) {
+			pBSSList->wRSNLen = uLen;
+			memcpy(pBSSList->byRSNIE, pRSN, uLen);
+			WPA2vParseRSN(pBSSList, pRSN);
+		}
 	}
-    }
 
     if (pRxPacket->uRSSI != 0) {
         RFvRSSITodBm(pDevice, (BYTE)(pRxPacket->uRSSI), &ldBm);
diff --git a/drivers/staging/vt6656/ttype.h b/drivers/staging/vt6656/ttype.h
index 89ab494..dbe79be 100644
--- a/drivers/staging/vt6656/ttype.h
+++ b/drivers/staging/vt6656/ttype.h
@@ -50,9 +50,6 @@ typedef u32 DWORD;
 
 /****** Common pointer types ***********************************************/
 
-typedef u32 ULONG_PTR;
-typedef u32 DWORD_PTR;
-
 // boolean pointer
 
 typedef BYTE *           PBYTE;
-- 
1.7.10.4




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

* Re: [PATCH 2/3] staging: vt6656: Remove ULONG_PTR/DWORD_PTR from driver.
  2012-11-28 21:15 [PATCH 2/3] staging: vt6656: Remove ULONG_PTR/DWORD_PTR from driver 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:15:48PM +0000, Malcolm Priestley wrote:
> 
> Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
> ---
>  drivers/staging/vt6656/bssdb.c |   89 +++++++++++++++++++---------------------
>  drivers/staging/vt6656/ttype.h |    3 --
>  2 files changed, 42 insertions(+), 50 deletions(-)
> 
> diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
> index 539bc1d..d27469e 100644
> --- a/drivers/staging/vt6656/bssdb.c
> +++ b/drivers/staging/vt6656/bssdb.c
> @@ -355,13 +355,13 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
>  			 PBYTE pbyIEs,
>  			 void *pRxPacketContext)
>  {
> -
> -    PSDevice     pDevice = (PSDevice)hDeviceContext;
> -    PSMgmtObject    pMgmt = &(pDevice->sMgmtObj);
> -    PSRxMgmtPacket  pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
> -    PKnownBSS       pBSSList = NULL;
> -    unsigned int            ii;
> -    BOOL            bParsingQuiet = FALSE;
> +	PSDevice pDevice = (PSDevice)hDeviceContext;
> +	PSMgmtObject pMgmt = &pDevice->sMgmtObj;
> +	PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
> +	PKnownBSS pBSSList = NULL;
> +	unsigned int ii;
> +	int bParsingQuiet = FALSE;
> +	u32 uLen;

This patch also adjusts formatting, making it hard to see that you
really changed the BOOL variable here, which is not what you said the
patch was doing :(

Please redo this patch, and _only_ make the changes you say you are
making.

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:15 [PATCH 2/3] staging: vt6656: Remove ULONG_PTR/DWORD_PTR from driver 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).