From: Malcolm Priestley <tvboxspy@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 2/3] staging: vt6656: Remove ULONG_PTR/DWORD_PTR from driver.
Date: Wed, 28 Nov 2012 21:15:48 +0000 [thread overview]
Message-ID: <1354137348.2633.3.camel@user64-MCP7A> (raw)
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
next reply other threads:[~2012-11-28 21:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 21:15 Malcolm Priestley [this message]
2013-01-07 19:07 ` [PATCH 2/3] staging: vt6656: Remove ULONG_PTR/DWORD_PTR from driver 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=1354137348.2633.3.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;
as well as URLs for NNTP newsgroup(s).