Commit cc856e61 authored by Andres More's avatar Andres More Committed by Greg Kroah-Hartman

Staging: vt6656: removed custom UCHAR/USHORT/UINT/ULONG/ULONGLONG typedefs

Cleared all checkpatch warnings but 'do not add new typedefs' ones.
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 213d2e93
...@@ -524,8 +524,8 @@ typedef struct _WLAN_IE_IBSS_DFS { ...@@ -524,8 +524,8 @@ typedef struct _WLAN_IE_IBSS_DFS {
// prototype structure, all mgmt frame types will start with these members // prototype structure, all mgmt frame types will start with these members
typedef struct tagWLAN_FR_MGMT { typedef struct tagWLAN_FR_MGMT {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
...@@ -534,8 +534,8 @@ typedef struct tagWLAN_FR_MGMT { ...@@ -534,8 +534,8 @@ typedef struct tagWLAN_FR_MGMT {
// Beacon frame // Beacon frame
typedef struct tagWLAN_FR_BEACON { typedef struct tagWLAN_FR_BEACON {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
// fixed fields // fixed fields
...@@ -566,8 +566,8 @@ typedef struct tagWLAN_FR_BEACON { ...@@ -566,8 +566,8 @@ typedef struct tagWLAN_FR_BEACON {
// IBSS ATIM frame // IBSS ATIM frame
typedef struct tagWLAN_FR_IBSSATIM { typedef struct tagWLAN_FR_IBSSATIM {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
...@@ -580,8 +580,8 @@ typedef struct tagWLAN_FR_IBSSATIM { ...@@ -580,8 +580,8 @@ typedef struct tagWLAN_FR_IBSSATIM {
// Disassociation // Disassociation
typedef struct tagWLAN_FR_DISASSOC { typedef struct tagWLAN_FR_DISASSOC {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -593,8 +593,8 @@ typedef struct tagWLAN_FR_DISASSOC { ...@@ -593,8 +593,8 @@ typedef struct tagWLAN_FR_DISASSOC {
// Association Request // Association Request
typedef struct tagWLAN_FR_ASSOCREQ { typedef struct tagWLAN_FR_ASSOCREQ {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -617,8 +617,8 @@ typedef struct tagWLAN_FR_ASSOCREQ { ...@@ -617,8 +617,8 @@ typedef struct tagWLAN_FR_ASSOCREQ {
// Association Response // Association Response
typedef struct tagWLAN_FR_ASSOCRESP { typedef struct tagWLAN_FR_ASSOCRESP {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -634,8 +634,8 @@ typedef struct tagWLAN_FR_ASSOCRESP { ...@@ -634,8 +634,8 @@ typedef struct tagWLAN_FR_ASSOCRESP {
// Reassociation Request // Reassociation Request
typedef struct tagWLAN_FR_REASSOCREQ { typedef struct tagWLAN_FR_REASSOCREQ {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
...@@ -659,8 +659,8 @@ typedef struct tagWLAN_FR_REASSOCREQ { ...@@ -659,8 +659,8 @@ typedef struct tagWLAN_FR_REASSOCREQ {
// Reassociation Response // Reassociation Response
typedef struct tagWLAN_FR_REASSOCRESP { typedef struct tagWLAN_FR_REASSOCRESP {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -676,8 +676,8 @@ typedef struct tagWLAN_FR_REASSOCRESP { ...@@ -676,8 +676,8 @@ typedef struct tagWLAN_FR_REASSOCRESP {
// Probe Request // Probe Request
typedef struct tagWLAN_FR_PROBEREQ { typedef struct tagWLAN_FR_PROBEREQ {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -691,8 +691,8 @@ typedef struct tagWLAN_FR_PROBEREQ { ...@@ -691,8 +691,8 @@ typedef struct tagWLAN_FR_PROBEREQ {
// Probe Response // Probe Response
typedef struct tagWLAN_FR_PROBERESP { typedef struct tagWLAN_FR_PROBERESP {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -720,8 +720,8 @@ typedef struct tagWLAN_FR_PROBERESP { ...@@ -720,8 +720,8 @@ typedef struct tagWLAN_FR_PROBERESP {
// Authentication // Authentication
typedef struct tagWLAN_FR_AUTHEN { typedef struct tagWLAN_FR_AUTHEN {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
...@@ -736,8 +736,8 @@ typedef struct tagWLAN_FR_AUTHEN { ...@@ -736,8 +736,8 @@ typedef struct tagWLAN_FR_AUTHEN {
// Deauthenication // Deauthenication
typedef struct tagWLAN_FR_DEAUTHEN { typedef struct tagWLAN_FR_DEAUTHEN {
UINT uType; unsigned int uType;
UINT len; unsigned int len;
PBYTE pBuf; PBYTE pBuf;
PUWLAN_80211HDR pHdr; PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/ /*-- fixed fields -----------*/
......
...@@ -662,11 +662,11 @@ const WORD awcFrameTime[MAX_RATE] = ...@@ -662,11 +662,11 @@ const WORD awcFrameTime[MAX_RATE] =
/* /*
static static
ULONG unsigned long
s_ulGetLowSQ3(PSDevice pDevice); s_ulGetLowSQ3(PSDevice pDevice);
static static
ULONG unsigned long
s_ulGetRatio(PSDevice pDevice); s_ulGetRatio(PSDevice pDevice);
static static
...@@ -689,19 +689,19 @@ s_vClearSQ3Value(PSDevice pDevice); ...@@ -689,19 +689,19 @@ s_vClearSQ3Value(PSDevice pDevice);
* Return Value: FrameTime * Return Value: FrameTime
* *
*/ */
UINT unsigned int
BBuGetFrameTime ( BBuGetFrameTime (
BYTE byPreambleType, BYTE byPreambleType,
BYTE byPktType, BYTE byPktType,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wRate WORD wRate
) )
{ {
UINT uFrameTime; unsigned int uFrameTime;
UINT uPreamble; unsigned int uPreamble;
UINT uTmp; unsigned int uTmp;
UINT uRateIdx = (UINT)wRate; unsigned int uRateIdx = (unsigned int)wRate;
UINT uRate = 0; unsigned int uRate = 0;
if (uRateIdx > RATE_54M) { if (uRateIdx > RATE_54M) {
...@@ -709,7 +709,7 @@ BBuGetFrameTime ( ...@@ -709,7 +709,7 @@ BBuGetFrameTime (
return 0; return 0;
} }
uRate = (UINT)awcFrameTime[uRateIdx]; uRate = (unsigned int)awcFrameTime[uRateIdx];
if (uRateIdx <= 3) { //CCK mode if (uRateIdx <= 3) { //CCK mode
...@@ -759,7 +759,7 @@ BBuGetFrameTime ( ...@@ -759,7 +759,7 @@ BBuGetFrameTime (
void void
BBvCaculateParameter ( BBvCaculateParameter (
PSDevice pDevice, PSDevice pDevice,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wRate, WORD wRate,
BYTE byPacketType, BYTE byPacketType,
PWORD pwPhyLen, PWORD pwPhyLen,
...@@ -767,9 +767,9 @@ BBvCaculateParameter ( ...@@ -767,9 +767,9 @@ BBvCaculateParameter (
PBYTE pbyPhySgn PBYTE pbyPhySgn
) )
{ {
UINT cbBitCount; unsigned int cbBitCount;
UINT cbUsCount = 0; unsigned int cbUsCount = 0;
UINT cbTmp; unsigned int cbTmp;
BOOL bExtBit; BOOL bExtBit;
BYTE byPreambleType = pDevice->byPreambleType; BYTE byPreambleType = pDevice->byPreambleType;
BOOL bCCK = pDevice->bCCK; BOOL bCCK = pDevice->bCCK;
...@@ -1360,13 +1360,11 @@ BBvExitDeepSleep (PSDevice pDevice) ...@@ -1360,13 +1360,11 @@ BBvExitDeepSleep (PSDevice pDevice)
} }
static static unsigned long s_ulGetLowSQ3(PSDevice pDevice)
ULONG
s_ulGetLowSQ3(PSDevice pDevice)
{ {
int ii; int ii;
ULONG ulSQ3 = 0; unsigned long ulSQ3 = 0;
ULONG ulMaxPacket; unsigned long ulMaxPacket;
ulMaxPacket = pDevice->aulPktNum[RATE_54M]; ulMaxPacket = pDevice->aulPktNum[RATE_54M];
if ( pDevice->aulPktNum[RATE_54M] != 0 ) { if ( pDevice->aulPktNum[RATE_54M] != 0 ) {
...@@ -1382,16 +1380,12 @@ ULONG ulMaxPacket; ...@@ -1382,16 +1380,12 @@ ULONG ulMaxPacket;
return ulSQ3; return ulSQ3;
} }
static unsigned long s_ulGetRatio(PSDevice pDevice)
static
ULONG
s_ulGetRatio (PSDevice pDevice)
{ {
int ii,jj; int ii, jj;
ULONG ulRatio = 0; unsigned long ulRatio = 0;
ULONG ulMaxPacket; unsigned long ulMaxPacket;
ULONG ulPacketNum; unsigned long ulPacketNum;
//This is a thousand-ratio //This is a thousand-ratio
ulMaxPacket = pDevice->aulPktNum[RATE_54M]; ulMaxPacket = pDevice->aulPktNum[RATE_54M];
......
...@@ -96,18 +96,18 @@ ...@@ -96,18 +96,18 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
UINT unsigned int
BBuGetFrameTime( BBuGetFrameTime(
BYTE byPreambleType, BYTE byPreambleType,
BYTE byFreqType, BYTE byFreqType,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wRate WORD wRate
); );
void void
BBvCaculateParameter ( BBvCaculateParameter (
PSDevice pDevice, PSDevice pDevice,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wRate, WORD wRate,
BYTE byPacketType, BYTE byPacketType,
PWORD pwPhyLen, PWORD pwPhyLen,
......
...@@ -129,8 +129,8 @@ PKnownBSS BSSpSearchBSSList(void *hDeviceContext, ...@@ -129,8 +129,8 @@ PKnownBSS BSSpSearchBSSList(void *hDeviceContext,
PKnownBSS pCurrBSS = NULL; PKnownBSS pCurrBSS = NULL;
PKnownBSS pSelect = NULL; PKnownBSS pSelect = NULL;
BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00}; BYTE ZeroBSSID[WLAN_BSSID_LEN]={0x00,0x00,0x00,0x00,0x00,0x00};
UINT ii = 0; unsigned int ii = 0;
UINT jj = 0; //DavidWang unsigned int jj = 0;
if (pbyDesireBSSID != NULL) { if (pbyDesireBSSID != NULL) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList BSSID[%02X %02X %02X-%02X %02X %02X]\n", DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BSSpSearchBSSList BSSID[%02X %02X %02X-%02X %02X %02X]\n",
*pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2), *pbyDesireBSSID,*(pbyDesireBSSID+1),*(pbyDesireBSSID+2),
...@@ -291,7 +291,7 @@ void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID) ...@@ -291,7 +291,7 @@ void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT ii; unsigned int ii;
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
if (bKeepCurrBSSID) { if (bKeepCurrBSSID) {
...@@ -336,7 +336,7 @@ PKnownBSS BSSpAddrIsInBSSList(void *hDeviceContext, ...@@ -336,7 +336,7 @@ PKnownBSS BSSpAddrIsInBSSList(void *hDeviceContext,
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PKnownBSS pBSSList = NULL; PKnownBSS pBSSList = NULL;
UINT ii; unsigned int ii;
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
pBSSList = &(pMgmt->sBSSList[ii]); pBSSList = &(pMgmt->sBSSList[ii]);
...@@ -381,7 +381,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, ...@@ -381,7 +381,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
PWLAN_IE_RSN_EXT pRSNWPA, PWLAN_IE_RSN_EXT pRSNWPA,
PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_COUNTRY pIE_Country,
PWLAN_IE_QUIET pIE_Quiet, PWLAN_IE_QUIET pIE_Quiet,
UINT uIELength, unsigned int uIELength,
PBYTE pbyIEs, PBYTE pbyIEs,
void *pRxPacketContext) void *pRxPacketContext)
{ {
...@@ -390,7 +390,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, ...@@ -390,7 +390,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext; PSRxMgmtPacket pRxPacket = (PSRxMgmtPacket)pRxPacketContext;
PKnownBSS pBSSList = NULL; PKnownBSS pBSSList = NULL;
UINT ii; unsigned int ii;
BOOL bParsingQuiet = FALSE; BOOL bParsingQuiet = FALSE;
...@@ -465,24 +465,27 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, ...@@ -465,24 +465,27 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
WPA_ClearRSN(pBSSList); WPA_ClearRSN(pBSSList);
if (pRSNWPA != NULL) { if (pRSNWPA != NULL) {
UINT uLen = pRSNWPA->len + 2; unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSNWPA - pbyIEs))) { if (uLen <= (uIELength -
pBSSList->wWPALen = uLen; (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); pBSSList->wWPALen = uLen;
WPA_ParseRSN(pBSSList, pRSNWPA); memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
} WPA_ParseRSN(pBSSList, pRSNWPA);
}
} }
WPA2_ClearRSN(pBSSList); WPA2_ClearRSN(pBSSList);
if (pRSN != NULL) { if (pRSN != NULL) {
UINT uLen = pRSN->len + 2; unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen; if (uLen <= (uIELength -
memcpy(pBSSList->byRSNIE, pRSN, uLen); (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
WPA2vParseRSN(pBSSList, pRSN); pBSSList->wRSNLen = uLen;
} memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
}
} }
if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) { if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || (pBSSList->bWPA2Valid == TRUE)) {
...@@ -600,7 +603,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, ...@@ -600,7 +603,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_COUNTRY pIE_Country,
PWLAN_IE_QUIET pIE_Quiet, PWLAN_IE_QUIET pIE_Quiet,
PKnownBSS pBSSList, PKnownBSS pBSSList,
UINT uIELength, unsigned int uIELength,
PBYTE pbyIEs, PBYTE pbyIEs,
void *pRxPacketContext) void *pRxPacketContext)
{ {
...@@ -667,24 +670,26 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, ...@@ -667,24 +670,26 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
WPA_ClearRSN(pBSSList); //mike update WPA_ClearRSN(pBSSList); //mike update
if (pRSNWPA != NULL) { if (pRSNWPA != NULL) {
UINT uLen = pRSNWPA->len + 2; unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSNWPA - pbyIEs))) { if (uLen <= (uIELength -
pBSSList->wWPALen = uLen; (unsigned int) (ULONG_PTR) ((PBYTE) pRSNWPA - pbyIEs))) {
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen); pBSSList->wWPALen = uLen;
WPA_ParseRSN(pBSSList, pRSNWPA); memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
} WPA_ParseRSN(pBSSList, pRSNWPA);
} }
}
WPA2_ClearRSN(pBSSList); //mike update WPA2_ClearRSN(pBSSList); //mike update
if (pRSN != NULL) { if (pRSN != NULL) {
UINT uLen = pRSN->len + 2; unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength - (UINT)(ULONG_PTR)((PBYTE)pRSN - pbyIEs))) { if (uLen <= (uIELength -
pBSSList->wRSNLen = uLen; (unsigned int) (ULONG_PTR) ((PBYTE) pRSN - pbyIEs))) {
memcpy(pBSSList->byRSNIE, pRSN, uLen); pBSSList->wRSNLen = uLen;
WPA2vParseRSN(pBSSList, pRSN); memcpy(pBSSList->byRSNIE, pRSN, uLen);
} WPA2vParseRSN(pBSSList, pRSN);
}
} }
if (pRxPacket->uRSSI != 0) { if (pRxPacket->uRSSI != 0) {
...@@ -754,7 +759,7 @@ BOOL BSSbIsSTAInNodeDB(void *hDeviceContext, ...@@ -754,7 +759,7 @@ BOOL BSSbIsSTAInNodeDB(void *hDeviceContext,
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT ii; unsigned int ii;
// Index = 0 reserved for AP Node // Index = 0 reserved for AP Node
for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) { for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
...@@ -786,9 +791,9 @@ void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex) ...@@ -786,9 +791,9 @@ void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex)
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT ii; unsigned int ii;
UINT BigestCount = 0; unsigned int BigestCount = 0;
UINT SelectIndex; unsigned int SelectIndex;
struct sk_buff *skb; struct sk_buff *skb;
// Index = 0 reserved for AP Node (In STA mode) // Index = 0 reserved for AP Node (In STA mode)
// Index = 0 reserved for Broadcast/MultiCast (In AP mode) // Index = 0 reserved for Broadcast/MultiCast (In AP mode)
...@@ -843,7 +848,7 @@ void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex) ...@@ -843,7 +848,7 @@ void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex)
* *
-*/ -*/
void BSSvRemoveOneNode(void *hDeviceContext, UINT uNodeIndex) void BSSvRemoveOneNode(void *hDeviceContext, unsigned int uNodeIndex)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
...@@ -879,7 +884,7 @@ void BSSvUpdateAPNode(void *hDeviceContext, ...@@ -879,7 +884,7 @@ void BSSvUpdateAPNode(void *hDeviceContext,
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT uRateLen = WLAN_RATES_MAXLEN; unsigned int uRateLen = WLAN_RATES_MAXLEN;
memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB)); memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
...@@ -967,11 +972,11 @@ void BSSvSecondCallBack(void *hDeviceContext) ...@@ -967,11 +972,11 @@ void BSSvSecondCallBack(void *hDeviceContext)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT ii; unsigned int ii;
PWLAN_IE_SSID pItemSSID, pCurrSSID; PWLAN_IE_SSID pItemSSID, pCurrSSID;
UINT uSleepySTACnt = 0; unsigned int uSleepySTACnt = 0;
UINT uNonShortSlotSTACnt = 0; unsigned int uNonShortSlotSTACnt = 0;
UINT uLongPreambleSTACnt = 0; unsigned int uLongPreambleSTACnt = 0;
viawget_wpa_header *wpahdr; //DavidWang viawget_wpa_header *wpahdr; //DavidWang
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
...@@ -1360,12 +1365,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -1360,12 +1365,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
BYTE byTxRetry; BYTE byTxRetry;
WORD wRate; WORD wRate;
WORD wFallBackRate = RATE_1M; WORD wFallBackRate = RATE_1M;
BYTE byFallBack; BYTE byFallBack;
UINT ii; unsigned int ii;
PBYTE pbyDestAddr; PBYTE pbyDestAddr;
BYTE byPktNum; BYTE byPktNum;
WORD wFIFOCtl; WORD wFIFOCtl;
...@@ -1516,12 +1521,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -1516,12 +1521,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
-*/ -*/
void BSSvClearNodeDBTable(void *hDeviceContext, void BSSvClearNodeDBTable(void *hDeviceContext,
UINT uStartIndex) unsigned int uStartIndex)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
struct sk_buff *skb; struct sk_buff *skb;
UINT ii; unsigned int ii;
for (ii = uStartIndex; ii < (MAX_NODE_NUM + 1); ii++) { for (ii = uStartIndex; ii < (MAX_NODE_NUM + 1); ii++) {
if (pMgmt->sNodeDBTable[ii].bActive) { if (pMgmt->sNodeDBTable[ii].bActive) {
...@@ -1586,9 +1591,9 @@ void s_vCheckSensitivity(void *hDeviceContext) ...@@ -1586,9 +1591,9 @@ void s_vCheckSensitivity(void *hDeviceContext)
void s_uCalculateLinkQual(void *hDeviceContext) void s_uCalculateLinkQual(void *hDeviceContext)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
ULONG TxOkRatio, TxCnt; unsigned long TxOkRatio, TxCnt;
ULONG RxOkRatio,RxCnt; unsigned long RxOkRatio, RxCnt;
ULONG RssiRatio; unsigned long RssiRatio;
long ldBm; long ldBm;
TxCnt = pDevice->scStatistic.TxNoRetryOkCount + TxCnt = pDevice->scStatistic.TxNoRetryOkCount +
...@@ -1633,7 +1638,7 @@ void BSSvClearAnyBSSJoinRecord(void *hDeviceContext) ...@@ -1633,7 +1638,7 @@ void BSSvClearAnyBSSJoinRecord(void *hDeviceContext)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT ii; unsigned int ii;
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
pMgmt->sBSSList[ii].bSelected = FALSE; pMgmt->sBSSList[ii].bSelected = FALSE;
......
...@@ -97,10 +97,10 @@ typedef struct tagKnownBSS { ...@@ -97,10 +97,10 @@ typedef struct tagKnownBSS {
// BSS info // BSS info
BOOL bActive; BOOL bActive;
BYTE abyBSSID[WLAN_BSSID_LEN]; BYTE abyBSSID[WLAN_BSSID_LEN];
UINT uChannel; unsigned int uChannel;
BYTE abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
UINT uRSSI; unsigned int uRSSI;
BYTE bySQ; BYTE bySQ;
WORD wBeaconInterval; WORD wBeaconInterval;
WORD wCapInfo; WORD wCapInfo;
...@@ -141,9 +141,9 @@ typedef struct tagKnownBSS { ...@@ -141,9 +141,9 @@ typedef struct tagKnownBSS {
WORD wRSNLen; WORD wRSNLen;
// Clear count // Clear count
UINT uClearCount; unsigned int uClearCount;
// BYTE abyIEs[WLAN_BEACON_FR_MAXLEN]; // BYTE abyIEs[WLAN_BEACON_FR_MAXLEN];
UINT uIELength; unsigned int uIELength;
QWORD qwBSSTimestamp; QWORD qwBSSTimestamp;
QWORD qwLocalTSF; // local TSF timer QWORD qwLocalTSF; // local TSF timer
...@@ -178,7 +178,7 @@ typedef struct tagKnownNodeDB { ...@@ -178,7 +178,7 @@ typedef struct tagKnownNodeDB {
BOOL bShortPreamble; BOOL bShortPreamble;
BOOL bERPExist; BOOL bERPExist;
BOOL bShortSlotTime; BOOL bShortSlotTime;
UINT uInActiveCount; unsigned int uInActiveCount;
WORD wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp. WORD wMaxBasicRate; //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
WORD wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon. WORD wMaxSuppRate; //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
WORD wSuppRate; WORD wSuppRate;
...@@ -194,35 +194,35 @@ typedef struct tagKnownNodeDB { ...@@ -194,35 +194,35 @@ typedef struct tagKnownNodeDB {
BOOL bPSEnable; BOOL bPSEnable;
BOOL bRxPSPoll; BOOL bRxPSPoll;
BYTE byAuthSequence; BYTE byAuthSequence;
ULONG ulLastRxJiffer; unsigned long ulLastRxJiffer;
BYTE bySuppRate; BYTE bySuppRate;
DWORD dwFlags; DWORD dwFlags;
WORD wEnQueueCnt; WORD wEnQueueCnt;
BOOL bOnFly; BOOL bOnFly;
ULONGLONG KeyRSC; unsigned long long KeyRSC;
BYTE byKeyIndex; BYTE byKeyIndex;
DWORD dwKeyIndex; DWORD dwKeyIndex;
BYTE byCipherSuite; BYTE byCipherSuite;
DWORD dwTSC47_16; DWORD dwTSC47_16;
WORD wTSC15_0; WORD wTSC15_0;
UINT uWepKeyLength; unsigned int uWepKeyLength;
BYTE abyWepKey[WLAN_WEPMAX_KEYLEN]; BYTE abyWepKey[WLAN_WEPMAX_KEYLEN];
// //
// Auto rate fallback vars // Auto rate fallback vars
BOOL bIsInFallback; BOOL bIsInFallback;
UINT uAverageRSSI; unsigned int uAverageRSSI;
UINT uRateRecoveryTimeout; unsigned int uRateRecoveryTimeout;
UINT uRatePollTimeout; unsigned int uRatePollTimeout;
UINT uTxFailures; unsigned int uTxFailures;
UINT uTxAttempts; unsigned int uTxAttempts;
UINT uTxRetry; unsigned int uTxRetry;
UINT uFailureRatio; unsigned int uFailureRatio;
UINT uRetryRatio; unsigned int uRetryRatio;
UINT uTxOk[MAX_RATE+1]; unsigned int uTxOk[MAX_RATE+1];
UINT uTxFail[MAX_RATE+1]; unsigned int uTxFail[MAX_RATE+1];
UINT uTimeCount; unsigned int uTimeCount;
} KnownNodeDB, *PKnownNodeDB; } KnownNodeDB, *PKnownNodeDB;
...@@ -253,7 +253,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext, ...@@ -253,7 +253,7 @@ BOOL BSSbInsertToBSSList(void *hDeviceContext,
PWLAN_IE_RSN_EXT pRSNWPA, PWLAN_IE_RSN_EXT pRSNWPA,
PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_COUNTRY pIE_Country,
PWLAN_IE_QUIET pIE_Quiet, PWLAN_IE_QUIET pIE_Quiet,
UINT uIELength, unsigned int uIELength,
PBYTE pbyIEs, PBYTE pbyIEs,
void *pRxPacketContext); void *pRxPacketContext);
...@@ -272,7 +272,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext, ...@@ -272,7 +272,7 @@ BOOL BSSbUpdateToBSSList(void *hDeviceContext,
PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_COUNTRY pIE_Country,
PWLAN_IE_QUIET pIE_Quiet, PWLAN_IE_QUIET pIE_Quiet,
PKnownBSS pBSSList, PKnownBSS pBSSList,
UINT uIELength, unsigned int uIELength,
PBYTE pbyIEs, PBYTE pbyIEs,
void *pRxPacketContext); void *pRxPacketContext);
...@@ -295,12 +295,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext, ...@@ -295,12 +295,12 @@ void BSSvUpdateNodeTxCounter(void *hDeviceContext,
BYTE byPktNO); BYTE byPktNO);
void BSSvRemoveOneNode(void *hDeviceContext, void BSSvRemoveOneNode(void *hDeviceContext,
UINT uNodeIndex); unsigned int uNodeIndex);
void BSSvAddMulticastNode(void *hDeviceContext); void BSSvAddMulticastNode(void *hDeviceContext);
void BSSvClearNodeDBTable(void *hDeviceContext, void BSSvClearNodeDBTable(void *hDeviceContext,
UINT uStartIndex); unsigned int uStartIndex);
void BSSvClearAnyBSSJoinRecord(void *hDeviceContext); void BSSvClearAnyBSSJoinRecord(void *hDeviceContext);
......
...@@ -95,7 +95,7 @@ const WORD cwRXBCNTSFOff[MAX_RATE] = ...@@ -95,7 +95,7 @@ const WORD cwRXBCNTSFOff[MAX_RATE] =
* Return Value: TRUE if succeeded; FALSE if failed. * Return Value: TRUE if succeeded; FALSE if failed.
* *
*/ */
BOOL CARDbSetMediaChannel(void *pDeviceHandler, UINT uConnectionChannel) BOOL CARDbSetMediaChannel(void *pDeviceHandler, unsigned int uConnectionChannel)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
BOOL bResult = TRUE; BOOL bResult = TRUE;
...@@ -159,7 +159,7 @@ BOOL bResult = TRUE; ...@@ -159,7 +159,7 @@ BOOL bResult = TRUE;
static WORD swGetCCKControlRate(void *pDeviceHandler, WORD wRateIdx) static WORD swGetCCKControlRate(void *pDeviceHandler, WORD wRateIdx)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
UINT ui = (UINT)wRateIdx; unsigned int ui = (unsigned int)wRateIdx;
while (ui > RATE_1M) { while (ui > RATE_1M) {
if (pDevice->wBasicRate & ((WORD)1 << ui)) { if (pDevice->wBasicRate & ((WORD)1 << ui)) {
return (WORD)ui; return (WORD)ui;
...@@ -185,7 +185,7 @@ static WORD swGetCCKControlRate(void *pDeviceHandler, WORD wRateIdx) ...@@ -185,7 +185,7 @@ static WORD swGetCCKControlRate(void *pDeviceHandler, WORD wRateIdx)
static WORD swGetOFDMControlRate(void *pDeviceHandler, WORD wRateIdx) static WORD swGetOFDMControlRate(void *pDeviceHandler, WORD wRateIdx)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
UINT ui = (UINT)wRateIdx; unsigned int ui = (unsigned int)wRateIdx;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BASIC RATE: %X\n", pDevice->wBasicRate); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BASIC RATE: %X\n", pDevice->wBasicRate);
...@@ -508,7 +508,7 @@ void vUpdateIFS(void *pDeviceHandler) ...@@ -508,7 +508,7 @@ void vUpdateIFS(void *pDeviceHandler)
else {// PK_TYPE_11GA & PK_TYPE_11GB else {// PK_TYPE_11GA & PK_TYPE_11GB
BYTE byRate = 0; BYTE byRate = 0;
BOOL bOFDMRate = FALSE; BOOL bOFDMRate = FALSE;
UINT ii = 0; unsigned int ii = 0;
PWLAN_IE_SUPP_RATES pItemRates = NULL; PWLAN_IE_SUPP_RATES pItemRates = NULL;
pDevice->uSIFS = C_SIFS_BG; pDevice->uSIFS = C_SIFS_BG;
...@@ -806,9 +806,9 @@ BOOL CARDbClearCurrentTSF(void *pDeviceHandler) ...@@ -806,9 +806,9 @@ BOOL CARDbClearCurrentTSF(void *pDeviceHandler)
QWORD CARDqGetNextTBTT (QWORD qwTSF, WORD wBeaconInterval) QWORD CARDqGetNextTBTT (QWORD qwTSF, WORD wBeaconInterval)
{ {
UINT uLowNextTBTT; unsigned int uLowNextTBTT;
UINT uHighRemain, uLowRemain; unsigned int uHighRemain, uLowRemain;
UINT uBeaconInterval; unsigned int uBeaconInterval;
uBeaconInterval = wBeaconInterval * 1024; uBeaconInterval = wBeaconInterval * 1024;
// Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval // Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval
......
...@@ -60,7 +60,8 @@ typedef enum _CARD_OP_MODE { ...@@ -60,7 +60,8 @@ typedef enum _CARD_OP_MODE {
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
BOOL CARDbSetMediaChannel(void *pDeviceHandler, UINT uConnectionChannel); BOOL CARDbSetMediaChannel(void *pDeviceHandler,
unsigned int uConnectionChannel);
void CARDvSetRSPINF(void *pDeviceHandler, BYTE byBBType); void CARDvSetRSPINF(void *pDeviceHandler, BYTE byBBType);
void vUpdateIFS(void *pDeviceHandler); void vUpdateIFS(void *pDeviceHandler);
void CARDvUpdateBasicTopRate(void *pDeviceHandler); void CARDvUpdateBasicTopRate(void *pDeviceHandler);
......
...@@ -389,7 +389,7 @@ static struct ...@@ -389,7 +389,7 @@ static struct
// 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56) // 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56)
************************************************************************/ ************************************************************************/
BOOL BOOL
ChannelValid(UINT CountryCode, UINT ChannelIndex) ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex)
{ {
BOOL bValid; BOOL bValid;
...@@ -425,7 +425,7 @@ ChannelValid(UINT CountryCode, UINT ChannelIndex) ...@@ -425,7 +425,7 @@ ChannelValid(UINT CountryCode, UINT ChannelIndex)
************************************************************************/ ************************************************************************/
BOOL BOOL
CHvChannelGetList ( CHvChannelGetList (
UINT uCountryCodeIdx, unsigned int uCountryCodeIdx,
PBYTE pbyChannelTable PBYTE pbyChannelTable
) )
{ {
...@@ -441,7 +441,7 @@ void CHvInitChannelTable(void *pDeviceHandler) ...@@ -441,7 +441,7 @@ void CHvInitChannelTable(void *pDeviceHandler)
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
BOOL bMultiBand = FALSE; BOOL bMultiBand = FALSE;
UINT ii; unsigned int ii;
for(ii=1;ii<=CB_MAX_CHANNEL;ii++) { for(ii=1;ii<=CB_MAX_CHANNEL;ii++) {
sChannelTbl[ii].bValid = FALSE; sChannelTbl[ii].bValid = FALSE;
......
...@@ -37,20 +37,20 @@ ...@@ -37,20 +37,20 @@
/*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Classes ----------------------------*/
typedef struct tagSChannelTblElement { typedef struct tagSChannelTblElement {
BYTE byChannelNumber; BYTE byChannelNumber;
UINT uFrequency; unsigned int uFrequency;
BOOL bValid; BOOL bValid;
}SChannelTblElement, *PSChannelTblElement; }SChannelTblElement, *PSChannelTblElement;
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
BOOL ChannelValid(UINT CountryCode, UINT ChannelNum); BOOL ChannelValid(unsigned int CountryCode, unsigned int ChannelNum);
void CHvInitChannelTable(void *pDeviceHandler); void CHvInitChannelTable(void *pDeviceHandler);
BYTE CHbyGetChannelMapping(BYTE byChannelNumber); BYTE CHbyGetChannelMapping(BYTE byChannelNumber);
BOOL BOOL
CHvChannelGetList ( CHvChannelGetList (
UINT uCountryCodeIdx, unsigned int uCountryCodeIdx,
PBYTE pbyChannelTable PBYTE pbyChannelTable
); );
......
...@@ -201,11 +201,11 @@ void RATEvParseMaxRate( ...@@ -201,11 +201,11 @@ void RATEvParseMaxRate(
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
UINT ii; unsigned int ii;
BYTE byHighSuppRate = 0; BYTE byHighSuppRate = 0;
BYTE byRate = 0; BYTE byRate = 0;
WORD wOldBasicRate = pDevice->wBasicRate; WORD wOldBasicRate = pDevice->wBasicRate;
UINT uRateLen; unsigned int uRateLen;
if (pItemRates == NULL) if (pItemRates == NULL)
...@@ -241,7 +241,7 @@ UINT uRateLen; ...@@ -241,7 +241,7 @@ UINT uRateLen;
if ((pItemExtRates != NULL) && (pItemExtRates->byElementID == WLAN_EID_EXTSUPP_RATES) && if ((pItemExtRates != NULL) && (pItemExtRates->byElementID == WLAN_EID_EXTSUPP_RATES) &&
(pDevice->byBBType != BB_TYPE_11B)) { (pDevice->byBBType != BB_TYPE_11B)) {
UINT uExtRateLen = pItemExtRates->len; unsigned int uExtRateLen = pItemExtRates->len;
if (uExtRateLen > WLAN_RATES_MAXLEN) if (uExtRateLen > WLAN_RATES_MAXLEN)
uExtRateLen = WLAN_RATES_MAXLEN; uExtRateLen = WLAN_RATES_MAXLEN;
...@@ -311,7 +311,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler; ...@@ -311,7 +311,7 @@ PSDevice pDevice = (PSDevice) pDeviceHandler;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
#if 1 //mike fixed old: use packet lose ratio algorithm to control rate #if 1 //mike fixed old: use packet lose ratio algorithm to control rate
WORD wIdxDownRate = 0; WORD wIdxDownRate = 0;
UINT ii; unsigned int ii;
BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE};
DWORD dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540}; DWORD dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
DWORD dwThroughput = 0; DWORD dwThroughput = 0;
...@@ -392,7 +392,7 @@ DWORD dwTxDiff = 0; ...@@ -392,7 +392,7 @@ DWORD dwTxDiff = 0;
#else //mike fixed new: use differ-signal strength to control rate #else //mike fixed new: use differ-signal strength to control rate
WORD wIdxUpRate = 0; WORD wIdxUpRate = 0;
BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE}; BOOL bAutoRate[MAX_RATE] = {TRUE,TRUE,TRUE,TRUE,FALSE,FALSE,TRUE,TRUE,TRUE,TRUE,TRUE,TRUE};
UINT ii; unsigned int ii;
long ldBm; long ldBm;
if (pMgmt->eScanState != WMAC_NO_SCANNING) { if (pMgmt->eScanState != WMAC_NO_SCANNING) {
...@@ -468,10 +468,10 @@ BYTE ...@@ -468,10 +468,10 @@ BYTE
RATEuSetIE ( RATEuSetIE (
PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates, PWLAN_IE_SUPP_RATES pDstRates,
UINT uRateLen unsigned int uRateLen
) )
{ {
UINT ii, uu, uRateCnt = 0; unsigned int ii, uu, uRateCnt = 0;
if ((pSrcRates == NULL) || (pDstRates == NULL)) if ((pSrcRates == NULL) || (pDstRates == NULL))
return 0; return 0;
......
...@@ -92,7 +92,7 @@ BYTE ...@@ -92,7 +92,7 @@ BYTE
RATEuSetIE( RATEuSetIE(
PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pSrcRates,
PWLAN_IE_SUPP_RATES pDstRates, PWLAN_IE_SUPP_RATES pDstRates,
UINT uRateLen unsigned int uRateLen
); );
WORD WORD
......
...@@ -225,12 +225,12 @@ typedef struct _USB_SEND_CONTEXT { ...@@ -225,12 +225,12 @@ typedef struct _USB_SEND_CONTEXT {
void *pDevice; void *pDevice;
struct sk_buff *pPacket; struct sk_buff *pPacket;
struct urb *pUrb; struct urb *pUrb;
UINT uBufLen; unsigned int uBufLen;
CONTEXT_TYPE Type; CONTEXT_TYPE Type;
SEthernetHeader sEthHeader; SEthernetHeader sEthHeader;
void *Next; void *Next;
BOOL bBoolInUse; BOOL bBoolInUse;
UCHAR Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS]; unsigned char Data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
} USB_SEND_CONTEXT, *PUSB_SEND_CONTEXT; } USB_SEND_CONTEXT, *PUSB_SEND_CONTEXT;
...@@ -248,7 +248,7 @@ typedef struct _DEFAULT_CONFIG { ...@@ -248,7 +248,7 @@ typedef struct _DEFAULT_CONFIG {
// Structure to keep track of usb interrupt packets // Structure to keep track of usb interrupt packets
// //
typedef struct { typedef struct {
UINT uDataLen; unsigned int uDataLen;
PBYTE pDataBuf; PBYTE pDataBuf;
// struct urb *pUrb; // struct urb *pUrb;
BOOL bInUse; BOOL bInUse;
...@@ -295,7 +295,7 @@ typedef enum __DEVICE_NDIS_STATUS { ...@@ -295,7 +295,7 @@ typedef enum __DEVICE_NDIS_STATUS {
#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
// PMKID Structures // PMKID Structures
typedef UCHAR NDIS_802_11_PMKID_VALUE[16]; typedef unsigned char NDIS_802_11_PMKID_VALUE[16];
typedef enum _NDIS_802_11_WEP_STATUS typedef enum _NDIS_802_11_WEP_STATUS
...@@ -327,7 +327,7 @@ typedef enum _NDIS_802_11_STATUS_TYPE ...@@ -327,7 +327,7 @@ typedef enum _NDIS_802_11_STATUS_TYPE
//Added new types for PMKID Candidate lists. //Added new types for PMKID Candidate lists.
typedef struct _PMKID_CANDIDATE { typedef struct _PMKID_CANDIDATE {
NDIS_802_11_MAC_ADDRESS BSSID; NDIS_802_11_MAC_ADDRESS BSSID;
ULONG Flags; unsigned long Flags;
} PMKID_CANDIDATE, *PPMKID_CANDIDATE; } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
...@@ -338,15 +338,15 @@ typedef struct _BSSID_INFO ...@@ -338,15 +338,15 @@ typedef struct _BSSID_INFO
} BSSID_INFO, *PBSSID_INFO; } BSSID_INFO, *PBSSID_INFO;
typedef struct tagSPMKID { typedef struct tagSPMKID {
ULONG Length; unsigned long Length;
ULONG BSSIDInfoCount; unsigned long BSSIDInfoCount;
BSSID_INFO BSSIDInfo[MAX_BSSIDINFO_4_PMKID]; BSSID_INFO BSSIDInfo[MAX_BSSIDINFO_4_PMKID];
} SPMKID, *PSPMKID; } SPMKID, *PSPMKID;
typedef struct tagSPMKIDCandidateEvent { typedef struct tagSPMKIDCandidateEvent {
NDIS_802_11_STATUS_TYPE StatusType; NDIS_802_11_STATUS_TYPE StatusType;
ULONG Version; // Version of the structure unsigned long Version; /* Version of the structure */
ULONG NumCandidates; // No. of pmkid candidates unsigned long NumCandidates; /* No. of pmkid candidates */
PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST]; PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent; } SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
...@@ -376,7 +376,7 @@ typedef struct tagSCache{ ...@@ -376,7 +376,7 @@ typedef struct tagSCache{
/* The receive cache is updated circularly. The next entry to be written is /* The receive cache is updated circularly. The next entry to be written is
* indexed by the "InPtr". * indexed by the "InPtr".
*/ */
UINT uInPtr; // Place to use next unsigned int uInPtr; /* Place to use next */
SCacheEntry asCacheEntry[DUPLICATE_RX_CACHE_LENGTH]; SCacheEntry asCacheEntry[DUPLICATE_RX_CACHE_LENGTH];
} SCache, *PSCache; } SCache, *PSCache;
...@@ -387,10 +387,10 @@ typedef struct tagSDeFragControlBlock ...@@ -387,10 +387,10 @@ typedef struct tagSDeFragControlBlock
WORD wSequence; WORD wSequence;
WORD wFragNum; WORD wFragNum;
BYTE abyAddr2[ETH_ALEN]; BYTE abyAddr2[ETH_ALEN];
UINT uLifetime; unsigned int uLifetime;
struct sk_buff* skb; struct sk_buff* skb;
PBYTE pbyRxBuffer; PBYTE pbyRxBuffer;
UINT cbFrameLength; unsigned int cbFrameLength;
BOOL bInUse; BOOL bInUse;
} SDeFragControlBlock, *PSDeFragControlBlock; } SDeFragControlBlock, *PSDeFragControlBlock;
...@@ -463,14 +463,14 @@ typedef struct __device_info { ...@@ -463,14 +463,14 @@ typedef struct __device_info {
BYTE byRevId; BYTE byRevId;
u32 flags; u32 flags;
ULONG Flags; unsigned long Flags;
SCache sDupRxCache; SCache sDupRxCache;
SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG]; SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG];
UINT cbDFCB; unsigned int cbDFCB;
UINT cbFreeDFCB; unsigned int cbFreeDFCB;
UINT uCurrentDFCBIdx; unsigned int uCurrentDFCBIdx;
// +++USB // +++USB
...@@ -478,29 +478,29 @@ typedef struct __device_info { ...@@ -478,29 +478,29 @@ typedef struct __device_info {
struct urb *pInterruptURB; struct urb *pInterruptURB;
struct usb_ctrlrequest sUsbCtlRequest; struct usb_ctrlrequest sUsbCtlRequest;
UINT int_interval; unsigned int int_interval;
// //
// Variables to track resources for the BULK In Pipe // Variables to track resources for the BULK In Pipe
// //
PRCB pRCBMem; PRCB pRCBMem;
PRCB apRCB[CB_MAX_RX_DESC]; PRCB apRCB[CB_MAX_RX_DESC];
UINT cbRD; unsigned int cbRD;
PRCB FirstRecvFreeList; PRCB FirstRecvFreeList;
PRCB LastRecvFreeList; PRCB LastRecvFreeList;
UINT NumRecvFreeList; unsigned int NumRecvFreeList;
PRCB FirstRecvMngList; PRCB FirstRecvMngList;
PRCB LastRecvMngList; PRCB LastRecvMngList;
UINT NumRecvMngList; unsigned int NumRecvMngList;
BOOL bIsRxWorkItemQueued; BOOL bIsRxWorkItemQueued;
BOOL bIsRxMngWorkItemQueued; BOOL bIsRxMngWorkItemQueued;
ULONG ulRcvRefCount; // number of packets that have not been returned back unsigned long ulRcvRefCount; /* packets that have not returned back */
// //
// Variables to track resources for the BULK Out Pipe // Variables to track resources for the BULK Out Pipe
// //
PUSB_SEND_CONTEXT apTD[CB_MAX_TX_DESC]; PUSB_SEND_CONTEXT apTD[CB_MAX_TX_DESC];
UINT cbTD; unsigned int cbTD;
// //
// Variables to track resources for the Interript In Pipe // Variables to track resources for the Interript In Pipe
...@@ -517,20 +517,20 @@ typedef struct __device_info { ...@@ -517,20 +517,20 @@ typedef struct __device_info {
// //
// Statistic for USB // Statistic for USB
// protect with spinlock // protect with spinlock
ULONG ulBulkInPosted; unsigned long ulBulkInPosted;
ULONG ulBulkInError; unsigned long ulBulkInError;
ULONG ulBulkInContCRCError; unsigned long ulBulkInContCRCError;
ULONG ulBulkInBytesRead; unsigned long ulBulkInBytesRead;
ULONG ulBulkOutPosted; unsigned long ulBulkOutPosted;
ULONG ulBulkOutError; unsigned long ulBulkOutError;
ULONG ulBulkOutContCRCError; unsigned long ulBulkOutContCRCError;
ULONG ulBulkOutBytesWrite; unsigned long ulBulkOutBytesWrite;
ULONG ulIntInPosted; unsigned long ulIntInPosted;
ULONG ulIntInError; unsigned long ulIntInError;
ULONG ulIntInContCRCError; unsigned long ulIntInContCRCError;
ULONG ulIntInBytesRead; unsigned long ulIntInBytesRead;
// Version control // Version control
...@@ -560,24 +560,24 @@ typedef struct __device_info { ...@@ -560,24 +560,24 @@ typedef struct __device_info {
// //
// Maintain statistical debug info. // Maintain statistical debug info.
// //
ULONG packetsReceived; unsigned long packetsReceived;
ULONG packetsReceivedDropped; unsigned long packetsReceivedDropped;
ULONG packetsReceivedOverflow; unsigned long packetsReceivedOverflow;
ULONG packetsSent; unsigned long packetsSent;
ULONG packetsSentDropped; unsigned long packetsSentDropped;
ULONG SendContextsInUse; unsigned long SendContextsInUse;
ULONG RcvBuffersInUse; unsigned long RcvBuffersInUse;
// 802.11 management // 802.11 management
SMgmtObject sMgmtObj; SMgmtObject sMgmtObj;
QWORD qwCurrTSF; QWORD qwCurrTSF;
UINT cbBulkInMax; unsigned int cbBulkInMax;
BOOL bPSRxBeacon; BOOL bPSRxBeacon;
// 802.11 MAC specific // 802.11 MAC specific
UINT uCurrRSSI; unsigned int uCurrRSSI;
BYTE byCurrSQ; BYTE byCurrSQ;
...@@ -598,30 +598,31 @@ typedef struct __device_info { ...@@ -598,30 +598,31 @@ typedef struct __device_info {
BOOL bDiversityRegCtlON; BOOL bDiversityRegCtlON;
BOOL bDiversityEnable; BOOL bDiversityEnable;
ULONG ulDiversityNValue; unsigned long ulDiversityNValue;
ULONG ulDiversityMValue; unsigned long ulDiversityMValue;
BYTE byTMax; BYTE byTMax;
BYTE byTMax2; BYTE byTMax2;
BYTE byTMax3; BYTE byTMax3;
ULONG ulSQ3TH; unsigned long ulSQ3TH;
ULONG uDiversityCnt; unsigned long uDiversityCnt;
BYTE byAntennaState; BYTE byAntennaState;
ULONG ulRatio_State0; unsigned long ulRatio_State0;
ULONG ulRatio_State1; unsigned long ulRatio_State1;
ULONG ulSQ3_State0; unsigned long ulSQ3_State0;
ULONG ulSQ3_State1; unsigned long ulSQ3_State1;
ULONG aulSQ3Val[MAX_RATE]; unsigned long aulSQ3Val[MAX_RATE];
ULONG aulPktNum[MAX_RATE]; unsigned long aulPktNum[MAX_RATE];
// IFS & Cw /* IFS & Cw */
UINT uSIFS; //Current SIFS unsigned int uSIFS; /* Current SIFS */
UINT uDIFS; //Current DIFS unsigned int uDIFS; /* Current DIFS */
UINT uEIFS; //Current EIFS unsigned int uEIFS; /* Current EIFS */
UINT uSlot; //Current SlotTime unsigned int uSlot; /* Current SlotTime */
UINT uCwMin; //Current CwMin unsigned int uCwMin; /* Current CwMin */
UINT uCwMax; //CwMax is fixed on 1023. unsigned int uCwMax; /* CwMax is fixed on 1023 */
// PHY parameter // PHY parameter
BYTE bySIFS; BYTE bySIFS;
BYTE byDIFS; BYTE byDIFS;
...@@ -646,7 +647,7 @@ typedef struct __device_info { ...@@ -646,7 +647,7 @@ typedef struct __device_info {
BYTE byMinChannel; BYTE byMinChannel;
BYTE byMaxChannel; BYTE byMaxChannel;
UINT uConnectionRate; unsigned int uConnectionRate;
BYTE byPreambleType; BYTE byPreambleType;
BYTE byShortPreamble; BYTE byShortPreamble;
...@@ -700,7 +701,7 @@ typedef struct __device_info { ...@@ -700,7 +701,7 @@ typedef struct __device_info {
WORD wListenInterval; WORD wListenInterval;
BOOL bPWBitOn; BOOL bPWBitOn;
WMAC_POWER_MODE ePSMode; WMAC_POWER_MODE ePSMode;
ULONG ulPSModeWaitTx; unsigned long ulPSModeWaitTx;
BOOL bPSModeTxBurst; BOOL bPSModeTxBurst;
// Beacon releated // Beacon releated
...@@ -709,7 +710,7 @@ typedef struct __device_info { ...@@ -709,7 +710,7 @@ typedef struct __device_info {
BOOL bBeaconSent; BOOL bBeaconSent;
BOOL bFixRate; BOOL bFixRate;
BYTE byCurrentCh; BYTE byCurrentCh;
UINT uScanTime; unsigned int uScanTime;
CMD_STATE eCommandState; CMD_STATE eCommandState;
...@@ -720,15 +721,15 @@ typedef struct __device_info { ...@@ -720,15 +721,15 @@ typedef struct __device_info {
BOOL bStopBeacon; BOOL bStopBeacon;
BOOL bStopDataPkt; BOOL bStopDataPkt;
BOOL bStopTx0Pkt; BOOL bStopTx0Pkt;
UINT uAutoReConnectTime; unsigned int uAutoReConnectTime;
UINT uIsroamingTime; unsigned int uIsroamingTime;
// 802.11 counter // 802.11 counter
CMD_ITEM eCmdQueue[CMD_Q_SIZE]; CMD_ITEM eCmdQueue[CMD_Q_SIZE];
UINT uCmdDequeueIdx; unsigned int uCmdDequeueIdx;
UINT uCmdEnqueueIdx; unsigned int uCmdEnqueueIdx;
UINT cbFreeCmdQueue; unsigned int cbFreeCmdQueue;
BOOL bCmdRunning; BOOL bCmdRunning;
BOOL bCmdClear; BOOL bCmdClear;
BOOL bNeedRadioOFF; BOOL bNeedRadioOFF;
...@@ -740,7 +741,7 @@ typedef struct __device_info { ...@@ -740,7 +741,7 @@ typedef struct __device_info {
BYTE bSameBSSCurNum; //DavidWang BYTE bSameBSSCurNum; //DavidWang
BOOL bRoaming; BOOL bRoaming;
BOOL b11hEable; BOOL b11hEable;
ULONG ulTxPower; unsigned long ulTxPower;
// Encryption // Encryption
NDIS_802_11_WEP_STATUS eEncryptionStatus; NDIS_802_11_WEP_STATUS eEncryptionStatus;
...@@ -761,11 +762,11 @@ typedef struct __device_info { ...@@ -761,11 +762,11 @@ typedef struct __device_info {
BOOL bAES; BOOL bAES;
BYTE byCntMeasure; BYTE byCntMeasure;
UINT uKeyLength; unsigned int uKeyLength;
BYTE abyKey[WLAN_WEP232_KEYLEN]; BYTE abyKey[WLAN_WEP232_KEYLEN];
// for AP mode // for AP mode
UINT uAssocCount; unsigned int uAssocCount;
BOOL bMoreData; BOOL bMoreData;
// QoS // QoS
...@@ -780,7 +781,7 @@ typedef struct __device_info { ...@@ -780,7 +781,7 @@ typedef struct __device_info {
// For Update BaseBand VGA Gain Offset // For Update BaseBand VGA Gain Offset
BOOL bUpdateBBVGA; BOOL bUpdateBBVGA;
UINT uBBVGADiffCount; unsigned int uBBVGADiffCount;
BYTE byBBVGANew; BYTE byBBVGANew;
BYTE byBBVGACurrent; BYTE byBBVGACurrent;
BYTE abyBBVGA[BB_VGA_LEVEL]; BYTE abyBBVGA[BB_VGA_LEVEL];
...@@ -812,7 +813,7 @@ typedef struct __device_info { ...@@ -812,7 +813,7 @@ typedef struct __device_info {
//2007-0115-01<Add>by MikeLiu //2007-0115-01<Add>by MikeLiu
#ifdef TxInSleep #ifdef TxInSleep
struct timer_list sTimerTxData; struct timer_list sTimerTxData;
ULONG nTxDataTimeCout; unsigned long nTxDataTimeCout;
BOOL fTxDataInSleep; BOOL fTxDataInSleep;
BOOL IsTxDataTrigger; BOOL IsTxDataTrigger;
#endif #endif
...@@ -863,7 +864,7 @@ typedef struct __device_info { ...@@ -863,7 +864,7 @@ typedef struct __device_info {
struct net_device *apdev; struct net_device *apdev;
int (*tx_80211)(struct sk_buff *skb, struct net_device *dev); int (*tx_80211)(struct sk_buff *skb, struct net_device *dev);
#endif #endif
UINT uChannel; unsigned int uChannel;
struct iw_statistics wstats; // wireless stats struct iw_statistics wstats; // wireless stats
BOOL bCommit; BOOL bCommit;
...@@ -928,7 +929,9 @@ typedef struct __device_info { ...@@ -928,7 +929,9 @@ typedef struct __device_info {
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
//BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, UINT uNodeIndex); /* BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb,
* unsigned int uNodeIndex);
*/
BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF); BOOL device_alloc_frag_buf(PSDevice pDevice, PSDeFragControlBlock pDeF);
#endif #endif
......
...@@ -89,7 +89,7 @@ void ...@@ -89,7 +89,7 @@ void
s_vProcessRxMACHeader ( s_vProcessRxMACHeader (
PSDevice pDevice, PSDevice pDevice,
PBYTE pbyRxBufferAddr, PBYTE pbyRxBufferAddr,
UINT cbPacketSize, unsigned int cbPacketSize,
BOOL bIsWEP, BOOL bIsWEP,
BOOL bExtIV, BOOL bExtIV,
PUINT pcbHeadSize PUINT pcbHeadSize
...@@ -106,8 +106,8 @@ static BOOL s_bAPModeRxCtl( ...@@ -106,8 +106,8 @@ static BOOL s_bAPModeRxCtl(
static BOOL s_bAPModeRxData ( static BOOL s_bAPModeRxData (
PSDevice pDevice, PSDevice pDevice,
struct sk_buff *skb, struct sk_buff *skb,
UINT FrameSize, unsigned int FrameSize,
UINT cbHeaderOffset, unsigned int cbHeaderOffset,
signed int iSANodeIndex, signed int iSANodeIndex,
signed int iDANodeIndex signed int iDANodeIndex
); );
...@@ -116,7 +116,7 @@ static BOOL s_bAPModeRxData ( ...@@ -116,7 +116,7 @@ static BOOL s_bAPModeRxData (
static BOOL s_bHandleRxEncryption( static BOOL s_bHandleRxEncryption(
PSDevice pDevice, PSDevice pDevice,
PBYTE pbyFrame, PBYTE pbyFrame,
UINT FrameSize, unsigned int FrameSize,
PBYTE pbyRsr, PBYTE pbyRsr,
PBYTE pbyNewRsr, PBYTE pbyNewRsr,
PSKeyItem * pKeyOut, PSKeyItem * pKeyOut,
...@@ -129,7 +129,7 @@ static BOOL s_bHostWepRxEncryption( ...@@ -129,7 +129,7 @@ static BOOL s_bHostWepRxEncryption(
PSDevice pDevice, PSDevice pDevice,
PBYTE pbyFrame, PBYTE pbyFrame,
UINT FrameSize, unsigned int FrameSize,
PBYTE pbyRsr, PBYTE pbyRsr,
BOOL bOnFly, BOOL bOnFly,
PSKeyItem pKey, PSKeyItem pKey,
...@@ -164,14 +164,14 @@ void ...@@ -164,14 +164,14 @@ void
s_vProcessRxMACHeader ( s_vProcessRxMACHeader (
PSDevice pDevice, PSDevice pDevice,
PBYTE pbyRxBufferAddr, PBYTE pbyRxBufferAddr,
UINT cbPacketSize, unsigned int cbPacketSize,
BOOL bIsWEP, BOOL bIsWEP,
BOOL bExtIV, BOOL bExtIV,
PUINT pcbHeadSize PUINT pcbHeadSize
) )
{ {
PBYTE pbyRxBuffer; PBYTE pbyRxBuffer;
UINT cbHeaderSize = 0; unsigned int cbHeaderSize = 0;
PWORD pwType; PWORD pwType;
PS802_11Header pMACHeader; PS802_11Header pMACHeader;
int ii; int ii;
...@@ -266,7 +266,7 @@ s_vGetDASA ( ...@@ -266,7 +266,7 @@ s_vGetDASA (
PSEthernetHeader psEthHeader PSEthernetHeader psEthHeader
) )
{ {
UINT cbHeaderSize = 0; unsigned int cbHeaderSize = 0;
PS802_11Header pMACHeader; PS802_11Header pMACHeader;
int ii; int ii;
...@@ -318,7 +318,7 @@ BOOL ...@@ -318,7 +318,7 @@ BOOL
RXbBulkInProcessData ( RXbBulkInProcessData (
PSDevice pDevice, PSDevice pDevice,
PRCB pRCB, PRCB pRCB,
ULONG BytesToIndicate unsigned long BytesToIndicate
) )
{ {
...@@ -333,20 +333,20 @@ RXbBulkInProcessData ( ...@@ -333,20 +333,20 @@ RXbBulkInProcessData (
PQWORD pqwTSFTime; PQWORD pqwTSFTime;
PBYTE pbyFrame; PBYTE pbyFrame;
BOOL bDeFragRx = FALSE; BOOL bDeFragRx = FALSE;
UINT cbHeaderOffset; unsigned int cbHeaderOffset;
UINT FrameSize; unsigned int FrameSize;
WORD wEtherType = 0; WORD wEtherType = 0;
signed int iSANodeIndex = -1; signed int iSANodeIndex = -1;
signed int iDANodeIndex = -1; signed int iDANodeIndex = -1;
UINT ii; unsigned int ii;
UINT cbIVOffset; unsigned int cbIVOffset;
PBYTE pbyRxSts; PBYTE pbyRxSts;
PBYTE pbyRxRate; PBYTE pbyRxRate;
PBYTE pbySQ; PBYTE pbySQ;
#ifdef Calcu_LinkQual #ifdef Calcu_LinkQual
PBYTE pby3SQ; PBYTE pby3SQ;
#endif #endif
UINT cbHeaderSize; unsigned int cbHeaderSize;
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
WORD wRxTSC15_0 = 0; WORD wRxTSC15_0 = 0;
DWORD dwRxTSC47_16 = 0; DWORD dwRxTSC47_16 = 0;
...@@ -372,7 +372,7 @@ RXbBulkInProcessData ( ...@@ -372,7 +372,7 @@ RXbBulkInProcessData (
//[31:16]RcvByteCount ( not include 4-byte Status ) //[31:16]RcvByteCount ( not include 4-byte Status )
dwWbkStatus = *( (PDWORD)(skb->data) ); dwWbkStatus = *( (PDWORD)(skb->data) );
FrameSize = (UINT)(dwWbkStatus >> 16); FrameSize = (unsigned int)(dwWbkStatus >> 16);
FrameSize += 4; FrameSize += 4;
if (BytesToIndicate != FrameSize) { if (BytesToIndicate != FrameSize) {
...@@ -934,9 +934,9 @@ RXbBulkInProcessData ( ...@@ -934,9 +934,9 @@ RXbBulkInProcessData (
if (bIsWEP) { if (bIsWEP) {
WORD wLocalTSC15_0 = 0; WORD wLocalTSC15_0 = 0;
DWORD dwLocalTSC47_16 = 0; DWORD dwLocalTSC47_16 = 0;
ULONGLONG RSC = 0; unsigned long long RSC = 0;
// endian issues // endian issues
RSC = *((ULONGLONG *) &(pKey->KeyRSC)); RSC = *((unsigned long long *) &(pKey->KeyRSC));
wLocalTSC15_0 = (WORD) RSC; wLocalTSC15_0 = (WORD) RSC;
dwLocalTSC47_16 = (DWORD) (RSC>>16); dwLocalTSC47_16 = (DWORD) (RSC>>16);
...@@ -1151,7 +1151,7 @@ static BOOL s_bAPModeRxCtl ( ...@@ -1151,7 +1151,7 @@ static BOOL s_bAPModeRxCtl (
static BOOL s_bHandleRxEncryption ( static BOOL s_bHandleRxEncryption (
PSDevice pDevice, PSDevice pDevice,
PBYTE pbyFrame, PBYTE pbyFrame,
UINT FrameSize, unsigned int FrameSize,
PBYTE pbyRsr, PBYTE pbyRsr,
PBYTE pbyNewRsr, PBYTE pbyNewRsr,
PSKeyItem * pKeyOut, PSKeyItem * pKeyOut,
...@@ -1160,7 +1160,7 @@ static BOOL s_bHandleRxEncryption ( ...@@ -1160,7 +1160,7 @@ static BOOL s_bHandleRxEncryption (
PDWORD pdwRxTSC47_16 PDWORD pdwRxTSC47_16
) )
{ {
UINT PayloadLen = FrameSize; unsigned int PayloadLen = FrameSize;
PBYTE pbyIV; PBYTE pbyIV;
BYTE byKeyIdx; BYTE byKeyIdx;
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
...@@ -1297,7 +1297,7 @@ static BOOL s_bHandleRxEncryption ( ...@@ -1297,7 +1297,7 @@ static BOOL s_bHandleRxEncryption (
static BOOL s_bHostWepRxEncryption ( static BOOL s_bHostWepRxEncryption (
PSDevice pDevice, PSDevice pDevice,
PBYTE pbyFrame, PBYTE pbyFrame,
UINT FrameSize, unsigned int FrameSize,
PBYTE pbyRsr, PBYTE pbyRsr,
BOOL bOnFly, BOOL bOnFly,
PSKeyItem pKey, PSKeyItem pKey,
...@@ -1308,7 +1308,7 @@ static BOOL s_bHostWepRxEncryption ( ...@@ -1308,7 +1308,7 @@ static BOOL s_bHostWepRxEncryption (
) )
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT PayloadLen = FrameSize; unsigned int PayloadLen = FrameSize;
PBYTE pbyIV; PBYTE pbyIV;
BYTE byKeyIdx; BYTE byKeyIdx;
BYTE byDecMode = KEY_CTL_WEP; BYTE byDecMode = KEY_CTL_WEP;
...@@ -1429,8 +1429,8 @@ static BOOL s_bHostWepRxEncryption ( ...@@ -1429,8 +1429,8 @@ static BOOL s_bHostWepRxEncryption (
static BOOL s_bAPModeRxData ( static BOOL s_bAPModeRxData (
PSDevice pDevice, PSDevice pDevice,
struct sk_buff *skb, struct sk_buff *skb,
UINT FrameSize, unsigned int FrameSize,
UINT cbHeaderOffset, unsigned int cbHeaderOffset,
signed int iSANodeIndex, signed int iSANodeIndex,
signed int iDANodeIndex signed int iDANodeIndex
) )
...@@ -1503,7 +1503,8 @@ static BOOL s_bAPModeRxData ( ...@@ -1503,7 +1503,8 @@ static BOOL s_bAPModeRxData (
iDANodeIndex = 0; iDANodeIndex = 0;
if ((pDevice->uAssocCount > 1) && (iDANodeIndex >= 0)) { if ((pDevice->uAssocCount > 1) && (iDANodeIndex >= 0)) {
bRelayPacketSend(pDevice, (PBYTE)(skb->data + cbHeaderOffset), FrameSize, (UINT)iDANodeIndex); bRelayPacketSend(pDevice, (PBYTE) (skb->data + cbHeaderOffset),
FrameSize, (unsigned int) iDANodeIndex);
} }
if (bRelayOnly) if (bRelayOnly)
......
...@@ -55,7 +55,7 @@ BOOL ...@@ -55,7 +55,7 @@ BOOL
RXbBulkInProcessData( RXbBulkInProcessData(
PSDevice pDevice, PSDevice pDevice,
PRCB pRCB, PRCB pRCB,
ULONG BytesToIndicate unsigned long BytesToIndicate
); );
#endif /* __RXTX_H__ */ #endif /* __RXTX_H__ */
...@@ -210,7 +210,7 @@ int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked) ...@@ -210,7 +210,7 @@ int vt6656_hostap_set_hostapd(PSDevice pDevice, int val, int rtnl_locked)
static int hostap_remove_sta(PSDevice pDevice, static int hostap_remove_sta(PSDevice pDevice,
struct viawget_hostapd_param *param) struct viawget_hostapd_param *param)
{ {
UINT uNodeIndex; unsigned int uNodeIndex;
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
...@@ -239,7 +239,7 @@ static int hostap_add_sta(PSDevice pDevice, ...@@ -239,7 +239,7 @@ static int hostap_add_sta(PSDevice pDevice,
struct viawget_hostapd_param *param) struct viawget_hostapd_param *param)
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT uNodeIndex; unsigned int uNodeIndex;
if (!BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { if (!BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
...@@ -299,7 +299,7 @@ static int hostap_get_info_sta(PSDevice pDevice, ...@@ -299,7 +299,7 @@ static int hostap_get_info_sta(PSDevice pDevice,
struct viawget_hostapd_param *param) struct viawget_hostapd_param *param)
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT uNodeIndex; unsigned int uNodeIndex;
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
param->u.get_info_sta.inactive_sec = param->u.get_info_sta.inactive_sec =
...@@ -333,7 +333,7 @@ static int hostap_reset_txexc_sta(PSDevice pDevice, ...@@ -333,7 +333,7 @@ static int hostap_reset_txexc_sta(PSDevice pDevice,
struct viawget_hostapd_param *param) struct viawget_hostapd_param *param)
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT uNodeIndex; unsigned int uNodeIndex;
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts = 0; pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts = 0;
...@@ -363,13 +363,13 @@ static int hostap_set_flags_sta(PSDevice pDevice, ...@@ -363,13 +363,13 @@ static int hostap_set_flags_sta(PSDevice pDevice,
struct viawget_hostapd_param *param) struct viawget_hostapd_param *param)
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT uNodeIndex; unsigned int uNodeIndex;
if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) { if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or; pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or;
pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and; pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n", DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x\n",
(UINT)pMgmt->sNodeDBTable[uNodeIndex].dwFlags); (unsigned int) pMgmt->sNodeDBTable[uNodeIndex].dwFlags);
} }
else { else {
return -ENOENT; return -ENOENT;
......
...@@ -72,10 +72,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -72,10 +72,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
SNodeList sNodeList; SNodeList sNodeList;
PSBSSIDList pList; PSBSSIDList pList;
PSNodeList pNodeList; PSNodeList pNodeList;
UINT cbListCount; unsigned int cbListCount;
PKnownBSS pBSS; PKnownBSS pBSS;
PKnownNodeDB pNode; PKnownNodeDB pNode;
UINT ii, jj; unsigned int ii, jj;
SCmdLinkStatus sLinkStatus; SCmdLinkStatus sLinkStatus;
BYTE abySuppRates[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16}; BYTE abySuppRates[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
BYTE abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; BYTE abyNullAddr[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
...@@ -337,7 +337,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -337,7 +337,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
pList->sBSSIDList[ii].wBeaconInterval = pBSS->wBeaconInterval; pList->sBSSIDList[ii].wBeaconInterval = pBSS->wBeaconInterval;
pList->sBSSIDList[ii].wCapInfo = pBSS->wCapInfo; pList->sBSSIDList[ii].wCapInfo = pBSS->wCapInfo;
RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm); RFvRSSITodBm(pDevice, (BYTE)(pBSS->uRSSI), &ldBm);
pList->sBSSIDList[ii].uRSSI = (UINT)ldBm; pList->sBSSIDList[ii].uRSSI = (unsigned int) ldBm;
// pList->sBSSIDList[ii].uRSSI = pBSS->uRSSI; // pList->sBSSIDList[ii].uRSSI = pBSS->uRSSI;
memcpy(pList->sBSSIDList[ii].abyBSSID, pBSS->abyBSSID, WLAN_BSSID_LEN); memcpy(pList->sBSSIDList[ii].abyBSSID, pBSS->abyBSSID, WLAN_BSSID_LEN);
pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID; pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID;
......
...@@ -47,7 +47,7 @@ void vConfigWEPKey ( ...@@ -47,7 +47,7 @@ void vConfigWEPKey (
PSDevice pDevice, PSDevice pDevice,
DWORD dwKeyIndex, DWORD dwKeyIndex,
PBYTE pbyKey, PBYTE pbyKey,
ULONG uKeyLength unsigned long uKeyLength
); );
*/ */
......
...@@ -769,7 +769,7 @@ int iwctl_siwap(struct net_device *dev, ...@@ -769,7 +769,7 @@ int iwctl_siwap(struct net_device *dev,
//mike add: if desired AP is hidden ssid(there are two same BSSID in list), //mike add: if desired AP is hidden ssid(there are two same BSSID in list),
// then ignore,because you don't known which one to be connect with?? // then ignore,because you don't known which one to be connect with??
{ {
UINT ii , uSameBssidNum=0; unsigned int ii, uSameBssidNum = 0;
for (ii = 0; ii < MAX_BSS_NUM; ii++) { for (ii = 0; ii < MAX_BSS_NUM; ii++) {
if (pMgmt->sBSSList[ii].bActive && if (pMgmt->sBSSList[ii].bActive &&
IS_ETH_ADDRESS_EQUAL(pMgmt->sBSSList[ii].abyBSSID,pMgmt->abyDesireBSSID)) { IS_ETH_ADDRESS_EQUAL(pMgmt->sBSSList[ii].abyBSSID,pMgmt->abyDesireBSSID)) {
...@@ -933,7 +933,7 @@ int iwctl_siwessid(struct net_device *dev, ...@@ -933,7 +933,7 @@ int iwctl_siwessid(struct net_device *dev,
{ {
PKnownBSS pCurr = NULL; PKnownBSS pCurr = NULL;
BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
UINT ii , uSameBssidNum=0; unsigned int ii, uSameBssidNum = 0;
memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID)); memcpy(abyTmpDesireSSID,pMgmt->abyDesireSSID,sizeof(abyTmpDesireSSID));
pCurr = BSSpSearchBSSList(pDevice, pCurr = BSSpSearchBSSList(pDevice,
...@@ -1440,7 +1440,7 @@ int iwctl_giwencode(struct net_device *dev, ...@@ -1440,7 +1440,7 @@ int iwctl_giwencode(struct net_device *dev,
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
int rc = 0; int rc = 0;
char abyKey[WLAN_WEP232_KEYLEN]; char abyKey[WLAN_WEP232_KEYLEN];
UINT index = (UINT)(wrq->flags & IW_ENCODE_INDEX); unsigned int index = (unsigned int)(wrq->flags & IW_ENCODE_INDEX);
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n");
...@@ -1486,7 +1486,7 @@ int iwctl_giwencode(struct net_device *dev, ...@@ -1486,7 +1486,7 @@ int iwctl_giwencode(struct net_device *dev,
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
char abyKey[WLAN_WEP232_KEYLEN]; char abyKey[WLAN_WEP232_KEYLEN];
UINT index = (UINT)(wrq->flags & IW_ENCODE_INDEX); unsigned int index = (unsigned int)(wrq->flags & IW_ENCODE_INDEX);
PSKeyItem pKey = NULL; PSKeyItem pKey = NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n");
......
...@@ -223,7 +223,7 @@ BOOL KeybSetKey( ...@@ -223,7 +223,7 @@ BOOL KeybSetKey(
PSKeyManagement pTable, PSKeyManagement pTable,
PBYTE pbyBSSID, PBYTE pbyBSSID,
DWORD dwKeyIndex, DWORD dwKeyIndex,
ULONG uKeyLength, unsigned long uKeyLength,
PQWORD pKeyRSC, PQWORD pKeyRSC,
PBYTE pbyKey, PBYTE pbyKey,
BYTE byKeyDecMode BYTE byKeyDecMode
...@@ -231,9 +231,9 @@ BOOL KeybSetKey( ...@@ -231,9 +231,9 @@ BOOL KeybSetKey(
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
int i,j; int i,j;
UINT ii; unsigned int ii;
PSKeyItem pKey; PSKeyItem pKey;
UINT uKeyIdx; unsigned int uKeyIdx;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetKey: %lX\n", dwKeyIndex); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetKey: %lX\n", dwKeyIndex);
...@@ -670,19 +670,19 @@ BOOL KeybSetDefaultKey( ...@@ -670,19 +670,19 @@ BOOL KeybSetDefaultKey(
void *pDeviceHandler, void *pDeviceHandler,
PSKeyManagement pTable, PSKeyManagement pTable,
DWORD dwKeyIndex, DWORD dwKeyIndex,
ULONG uKeyLength, unsigned long uKeyLength,
PQWORD pKeyRSC, PQWORD pKeyRSC,
PBYTE pbyKey, PBYTE pbyKey,
BYTE byKeyDecMode BYTE byKeyDecMode
) )
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
UINT ii; unsigned int ii;
PSKeyItem pKey; PSKeyItem pKey;
UINT uKeyIdx; unsigned int uKeyIdx;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetDefaultKey: %1x, %d \n", (int)dwKeyIndex, (int)uKeyLength);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enter KeybSetDefaultKey: %1x, %d\n",
(int) dwKeyIndex, (int) uKeyLength);
if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key if ((dwKeyIndex & PAIRWISE_KEY) != 0) { // Pairwise key
return (FALSE); return (FALSE);
...@@ -778,7 +778,7 @@ BOOL KeybSetAllGroupKey( ...@@ -778,7 +778,7 @@ BOOL KeybSetAllGroupKey(
void *pDeviceHandler, void *pDeviceHandler,
PSKeyManagement pTable, PSKeyManagement pTable,
DWORD dwKeyIndex, DWORD dwKeyIndex,
ULONG uKeyLength, unsigned long uKeyLength,
PQWORD pKeyRSC, PQWORD pKeyRSC,
PBYTE pbyKey, PBYTE pbyKey,
BYTE byKeyDecMode BYTE byKeyDecMode
...@@ -786,9 +786,9 @@ BOOL KeybSetAllGroupKey( ...@@ -786,9 +786,9 @@ BOOL KeybSetAllGroupKey(
{ {
PSDevice pDevice = (PSDevice) pDeviceHandler; PSDevice pDevice = (PSDevice) pDeviceHandler;
int i; int i;
UINT ii; unsigned int ii;
PSKeyItem pKey; PSKeyItem pKey;
UINT uKeyIdx; unsigned int uKeyIdx;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %lX\n", dwKeyIndex);
......
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
typedef struct tagSKeyItem typedef struct tagSKeyItem
{ {
BOOL bKeyValid; BOOL bKeyValid;
ULONG uKeyLength; unsigned long uKeyLength;
BYTE abyKey[MAX_KEY_LEN]; BYTE abyKey[MAX_KEY_LEN];
QWORD KeyRSC; QWORD KeyRSC;
DWORD dwTSC47_16; DWORD dwTSC47_16;
...@@ -107,7 +107,7 @@ BOOL KeybSetKey( ...@@ -107,7 +107,7 @@ BOOL KeybSetKey(
PSKeyManagement pTable, PSKeyManagement pTable,
PBYTE pbyBSSID, PBYTE pbyBSSID,
DWORD dwKeyIndex, DWORD dwKeyIndex,
ULONG uKeyLength, unsigned long uKeyLength,
PQWORD pKeyRSC, PQWORD pKeyRSC,
PBYTE pbyKey, PBYTE pbyKey,
BYTE byKeyDecMode BYTE byKeyDecMode
...@@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey( ...@@ -146,7 +146,7 @@ BOOL KeybSetDefaultKey(
void *pDeviceHandler, void *pDeviceHandler,
PSKeyManagement pTable, PSKeyManagement pTable,
DWORD dwKeyIndex, DWORD dwKeyIndex,
ULONG uKeyLength, unsigned long uKeyLength,
PQWORD pKeyRSC, PQWORD pKeyRSC,
PBYTE pbyKey, PBYTE pbyKey,
BYTE byKeyDecMode BYTE byKeyDecMode
...@@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey( ...@@ -156,7 +156,7 @@ BOOL KeybSetAllGroupKey(
void *pDeviceHandler, void *pDeviceHandler,
PSKeyManagement pTable, PSKeyManagement pTable,
DWORD dwKeyIndex, DWORD dwKeyIndex,
ULONG uKeyLength, unsigned long uKeyLength,
PQWORD pKeyRSC, PQWORD pKeyRSC,
PBYTE pbyKey, PBYTE pbyKey,
BYTE byKeyDecMode BYTE byKeyDecMode
......
...@@ -70,7 +70,7 @@ static int msglevel =MSG_LEVEL_INFO; ...@@ -70,7 +70,7 @@ static int msglevel =MSG_LEVEL_INFO;
*/ */
void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx) void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx)
{ {
UINT uByteIdx; unsigned int uByteIdx;
BYTE byBitMask; BYTE byBitMask;
BYTE pbyData[2]; BYTE pbyData[2];
...@@ -110,7 +110,7 @@ void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx) ...@@ -110,7 +110,7 @@ void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx)
* Return Value: none * Return Value: none
* *
*/ */
void MACvWriteMultiAddr(PSDevice pDevice, UINT uByteIdx, BYTE byData) void MACvWriteMultiAddr(PSDevice pDevice, unsigned int uByteIdx, BYTE byData)
{ {
BYTE byData1; BYTE byData1;
...@@ -199,7 +199,7 @@ BYTE pbyData[4]; ...@@ -199,7 +199,7 @@ BYTE pbyData[4];
* Return Value: none * Return Value: none
* *
*/ */
void MACvDisableKeyEntry (PSDevice pDevice, UINT uEntryIdx) void MACvDisableKeyEntry(PSDevice pDevice, unsigned int uEntryIdx)
{ {
WORD wOffset; WORD wOffset;
BYTE byData; BYTE byData;
...@@ -239,7 +239,9 @@ BYTE byData; ...@@ -239,7 +239,9 @@ BYTE byData;
* Return Value: none * Return Value: none
* *
*/ */
void MACvSetKeyEntry (PSDevice pDevice, WORD wKeyCtl, UINT uEntryIdx, UINT uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey) void MACvSetKeyEntry(PSDevice pDevice, WORD wKeyCtl,
unsigned int uEntryIdx, unsigned int uKeyIdx,
PBYTE pbyAddr, PDWORD pdwKey)
{ {
PBYTE pbyKey; PBYTE pbyKey;
WORD wOffset; WORD wOffset;
...@@ -247,10 +249,6 @@ DWORD dwData1,dwData2; ...@@ -247,10 +249,6 @@ DWORD dwData1,dwData2;
int ii; int ii;
BYTE pbyData[24]; BYTE pbyData[24];
if ( pDevice->byLocalID <= MAC_REVISION_A1 ) { if ( pDevice->byLocalID <= MAC_REVISION_A1 ) {
if ( pDevice->sMgmtObj.byCSSPK == KEY_CTL_CCMP ) if ( pDevice->sMgmtObj.byCSSPK == KEY_CTL_CCMP )
return; return;
......
...@@ -421,12 +421,13 @@ ...@@ -421,12 +421,13 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx); void MACvSetMultiAddrByHash (PSDevice pDevice, BYTE byHashIdx);
void MACvWriteMultiAddr(PSDevice pDevice, UINT uByteIdx, BYTE byData); void MACvWriteMultiAddr(PSDevice pDevice, unsigned int uByteIdx, BYTE byData);
BOOL MACbShutdown(PSDevice pDevice);; BOOL MACbShutdown(PSDevice pDevice);;
void MACvSetBBType(PSDevice pDevice,BYTE byType); void MACvSetBBType(PSDevice pDevice,BYTE byType);
void MACvSetMISCFifo (PSDevice pDevice, WORD wOffset, DWORD dwData); void MACvSetMISCFifo (PSDevice pDevice, WORD wOffset, DWORD dwData);
void MACvDisableKeyEntry(PSDevice pDevice, UINT uEntryIdx); void MACvDisableKeyEntry(PSDevice pDevice, unsigned int uEntryIdx);
void MACvSetKeyEntry(PSDevice pDevice, WORD wKeyCtl, UINT uEntryIdx, UINT uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey); void MACvSetKeyEntry(PSDevice pDevice, WORD wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey);
void MACvRegBitsOff(PSDevice pDevice, BYTE byRegOfs, BYTE byBits); void MACvRegBitsOff(PSDevice pDevice, BYTE byRegOfs, BYTE byBits);
void MACvRegBitsOn(PSDevice pDevice, BYTE byRegOfs, BYTE byBits); void MACvRegBitsOn(PSDevice pDevice, BYTE byRegOfs, BYTE byBits);
......
...@@ -277,8 +277,10 @@ static void device_free_frag_bufs(PSDevice pDevice); ...@@ -277,8 +277,10 @@ static void device_free_frag_bufs(PSDevice pDevice);
static BOOL device_alloc_bufs(PSDevice pDevice); static BOOL device_alloc_bufs(PSDevice pDevice);
static int Read_config_file(PSDevice pDevice); static int Read_config_file(PSDevice pDevice);
static UCHAR *Config_FileOperation(PSDevice pDevice); static unsigned char *Config_FileOperation(PSDevice pDevice);
static int Config_FileGetParameter(UCHAR *string, UCHAR *dest,UCHAR *source); static int Config_FileGetParameter(unsigned char *string,
unsigned char *dest,
unsigned char *source);
//2008-0714<Add>by Mike Liu //2008-0714<Add>by Mike Liu
static BOOL device_release_WPADEV(PSDevice pDevice); static BOOL device_release_WPADEV(PSDevice pDevice);
...@@ -334,17 +336,17 @@ device_set_options(PSDevice pDevice) { ...@@ -334,17 +336,17 @@ device_set_options(PSDevice pDevice) {
static void device_init_diversity_timer(PSDevice pDevice) static void device_init_diversity_timer(PSDevice pDevice)
{ {
init_timer(&pDevice->TimerSQ3Tmax1); init_timer(&pDevice->TimerSQ3Tmax1);
pDevice->TimerSQ3Tmax1.data = (ULONG)pDevice; pDevice->TimerSQ3Tmax1.data = (unsigned long)pDevice;
pDevice->TimerSQ3Tmax1.function = (TimerFunction)TimerSQ3CallBack; pDevice->TimerSQ3Tmax1.function = (TimerFunction)TimerSQ3CallBack;
pDevice->TimerSQ3Tmax1.expires = RUN_AT(HZ); pDevice->TimerSQ3Tmax1.expires = RUN_AT(HZ);
init_timer(&pDevice->TimerSQ3Tmax2); init_timer(&pDevice->TimerSQ3Tmax2);
pDevice->TimerSQ3Tmax2.data = (ULONG)pDevice; pDevice->TimerSQ3Tmax2.data = (unsigned long)pDevice;
pDevice->TimerSQ3Tmax2.function = (TimerFunction)TimerSQ3CallBack; pDevice->TimerSQ3Tmax2.function = (TimerFunction)TimerSQ3CallBack;
pDevice->TimerSQ3Tmax2.expires = RUN_AT(HZ); pDevice->TimerSQ3Tmax2.expires = RUN_AT(HZ);
init_timer(&pDevice->TimerSQ3Tmax3); init_timer(&pDevice->TimerSQ3Tmax3);
pDevice->TimerSQ3Tmax3.data = (ULONG)pDevice; pDevice->TimerSQ3Tmax3.data = (unsigned long)pDevice;
pDevice->TimerSQ3Tmax3.function = (TimerFunction)TimerSQ3Tmax3CallBack; pDevice->TimerSQ3Tmax3.function = (TimerFunction)TimerSQ3Tmax3CallBack;
pDevice->TimerSQ3Tmax3.expires = RUN_AT(HZ); pDevice->TimerSQ3Tmax3.expires = RUN_AT(HZ);
...@@ -362,7 +364,7 @@ static BOOL device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType) ...@@ -362,7 +364,7 @@ static BOOL device_init_registers(PSDevice pDevice, DEVICE_INIT_TYPE InitType)
u8 abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; u8 abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8}; u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
BYTE byAntenna; BYTE byAntenna;
UINT ii; unsigned int ii;
CMD_CARD_INIT sInitCmd; CMD_CARD_INIT sInitCmd;
NTSTATUS ntStatus = STATUS_SUCCESS; NTSTATUS ntStatus = STATUS_SUCCESS;
RSP_CARD_INIT sInitRsp; RSP_CARD_INIT sInitRsp;
...@@ -1336,7 +1338,7 @@ device_release_WPADEV(pDevice); ...@@ -1336,7 +1338,7 @@ device_release_WPADEV(pDevice);
static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) { static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
PSDevice pDevice=netdev_priv(dev); PSDevice pDevice=netdev_priv(dev);
PBYTE pbMPDU; PBYTE pbMPDU;
UINT cbMPDULen = 0; unsigned int cbMPDULen = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_dma0_tx_80211\n");
...@@ -1411,24 +1413,27 @@ static inline u32 ether_crc(int length, unsigned char *data) ...@@ -1411,24 +1413,27 @@ static inline u32 ether_crc(int length, unsigned char *data)
} }
//find out the start position of str2 from str1 //find out the start position of str2 from str1
static UCHAR *kstrstr(const UCHAR *str1,const UCHAR *str2) { static unsigned char *kstrstr(const unsigned char *str1,
int str1_len=strlen(str1); const unsigned char *str2) {
int str2_len=strlen(str2); int str1_len = strlen(str1);
int str2_len = strlen(str2);
while (str1_len >= str2_len) { while (str1_len >= str2_len) {
str1_len--; str1_len--;
if(memcmp(str1,str2,str2_len)==0) if(memcmp(str1,str2,str2_len)==0)
return (UCHAR *)str1; return (unsigned char *) str1;
str1++; str1++;
} }
return NULL; return NULL;
} }
static int Config_FileGetParameter(UCHAR *string, UCHAR *dest,UCHAR *source) static int Config_FileGetParameter(unsigned char *string,
unsigned char *dest,
unsigned char *source)
{ {
UCHAR buf1[100]; unsigned char buf1[100];
UCHAR buf2[100]; unsigned char buf2[100];
UCHAR *start_p=NULL,*end_p=NULL,*tmp_p=NULL; unsigned char *start_p = NULL, *end_p = NULL, *tmp_p = NULL;
int ii; int ii;
memset(buf1,0,100); memset(buf1,0,100);
...@@ -1480,13 +1485,14 @@ for(ii=1;;ii++) { ...@@ -1480,13 +1485,14 @@ for(ii=1;;ii++) {
} }
//if read fail,return NULL,or return data pointer; //if read fail,return NULL,or return data pointer;
static UCHAR *Config_FileOperation(PSDevice pDevice) { static unsigned char *Config_FileOperation(PSDevice pDevice)
UCHAR *config_path=CONFIG_PATH; {
UCHAR *buffer=NULL; unsigned char *config_path = CONFIG_PATH;
unsigned char *buffer = NULL;
struct file *filp=NULL; struct file *filp=NULL;
mm_segment_t old_fs = get_fs(); mm_segment_t old_fs = get_fs();
//int oldfsuid=0,oldfsgid=0; //int oldfsuid=0,oldfsgid=0;
int result=0; int result = 0;
set_fs (KERNEL_DS); set_fs (KERNEL_DS);
/* Can't do this anymore, so we rely on correct filesystem permissions: /* Can't do this anymore, so we rely on correct filesystem permissions:
...@@ -1545,9 +1551,9 @@ if(result!=0) { ...@@ -1545,9 +1551,9 @@ if(result!=0) {
//return --->-1:fail; >=0:successful //return --->-1:fail; >=0:successful
static int Read_config_file(PSDevice pDevice) { static int Read_config_file(PSDevice pDevice) {
int result=0; int result = 0;
UCHAR tmpbuffer[100]; unsigned char tmpbuffer[100];
UCHAR *buffer=NULL; unsigned char *buffer = NULL;
//init config setting //init config setting
pDevice->config_file.ZoneType = -1; pDevice->config_file.ZoneType = -1;
......
...@@ -152,9 +152,10 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr ...@@ -152,9 +152,10 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr
* Return Value: none * Return Value: none
* *
*/ */
void STAvUpdateRDStatCounter (PSStatCounter pStatistic, void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, BYTE byRxRate, BYTE byRSR, BYTE byNewRSR,
PBYTE pbyBuffer, UINT cbFrameLength) BYTE byRxSts, BYTE byRxRate,
PBYTE pbyBuffer, unsigned int cbFrameLength)
{ {
/* need change */ /* need change */
PS802_11Header pHeader = (PS802_11Header)pbyBuffer; PS802_11Header pHeader = (PS802_11Header)pbyBuffer;
...@@ -169,15 +170,18 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic, ...@@ -169,15 +170,18 @@ void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
/* update counters in case of successful transmission */ /* update counters in case of successful transmission */
if (byRSR & RSR_ADDRBROAD) { if (byRSR & RSR_ADDRBROAD) {
pStatistic->ullRxBroadcastFrames++; pStatistic->ullRxBroadcastFrames++;
pStatistic->ullRxBroadcastBytes += (ULONGLONG)cbFrameLength; pStatistic->ullRxBroadcastBytes +=
(unsigned long long) cbFrameLength;
} }
else if (byRSR & RSR_ADDRMULTI) { else if (byRSR & RSR_ADDRMULTI) {
pStatistic->ullRxMulticastFrames++; pStatistic->ullRxMulticastFrames++;
pStatistic->ullRxMulticastBytes += (ULONGLONG)cbFrameLength; pStatistic->ullRxMulticastBytes +=
(unsigned long long) cbFrameLength;
} }
else { else {
pStatistic->ullRxDirectedFrames++; pStatistic->ullRxDirectedFrames++;
pStatistic->ullRxDirectedBytes += (ULONGLONG)cbFrameLength; pStatistic->ullRxDirectedBytes +=
(unsigned long long) cbFrameLength;
} }
} }
} }
...@@ -396,7 +400,7 @@ STAvUpdateRDStatCounterEx ( ...@@ -396,7 +400,7 @@ STAvUpdateRDStatCounterEx (
BYTE byRxSts, BYTE byRxSts,
BYTE byRxRate, BYTE byRxRate,
PBYTE pbyBuffer, PBYTE pbyBuffer,
UINT cbFrameLength unsigned int cbFrameLength
) )
{ {
STAvUpdateRDStatCounter( STAvUpdateRDStatCounter(
...@@ -536,19 +540,22 @@ STAvUpdate802_11Counter( ...@@ -536,19 +540,22 @@ STAvUpdate802_11Counter(
) )
{ {
//p802_11Counter->TransmittedFragmentCount //p802_11Counter->TransmittedFragmentCount
p802_11Counter->MulticastTransmittedFrameCount = (ULONGLONG) (pStatistic->dwTsrBroadcast + p802_11Counter->MulticastTransmittedFrameCount =
pStatistic->dwTsrMulticast); (unsigned long long) (pStatistic->dwTsrBroadcast +
p802_11Counter->FailedCount = (ULONGLONG) (pStatistic->dwTsrErr); pStatistic->dwTsrMulticast);
p802_11Counter->RetryCount = (ULONGLONG) (pStatistic->dwTsrRetry); p802_11Counter->FailedCount = (unsigned long long) (pStatistic->dwTsrErr);
p802_11Counter->MultipleRetryCount = (ULONGLONG) (pStatistic->dwTsrMoreThanOnceRetry); p802_11Counter->RetryCount = (unsigned long long) (pStatistic->dwTsrRetry);
p802_11Counter->MultipleRetryCount =
(unsigned long long) (pStatistic->dwTsrMoreThanOnceRetry);
//p802_11Counter->FrameDuplicateCount //p802_11Counter->FrameDuplicateCount
p802_11Counter->RTSSuccessCount += (ULONGLONG) byRTSSuccess; p802_11Counter->RTSSuccessCount += (unsigned long long) byRTSSuccess;
p802_11Counter->RTSFailureCount += (ULONGLONG) byRTSFail; p802_11Counter->RTSFailureCount += (unsigned long long) byRTSFail;
p802_11Counter->ACKFailureCount += (ULONGLONG) byACKFail; p802_11Counter->ACKFailureCount += (unsigned long long) byACKFail;
p802_11Counter->FCSErrorCount += (ULONGLONG) byFCSErr; p802_11Counter->FCSErrorCount += (unsigned long long) byFCSErr;
//p802_11Counter->ReceivedFragmentCount //p802_11Counter->ReceivedFragmentCount
p802_11Counter->MulticastReceivedFrameCount = (ULONGLONG) (pStatistic->dwRsrBroadcast + p802_11Counter->MulticastReceivedFrameCount =
pStatistic->dwRsrMulticast); (unsigned long long) (pStatistic->dwRsrBroadcast +
pStatistic->dwRsrMulticast);
} }
/* /*
......
...@@ -52,32 +52,34 @@ typedef struct tagSUSBCounter { ...@@ -52,32 +52,34 @@ typedef struct tagSUSBCounter {
typedef struct tagSDot11Counters { typedef struct tagSDot11Counters {
// ULONG Length; // Length of structure /* unsigned long Length; // Length of structure */
ULONGLONG TransmittedFragmentCount; unsigned long long TransmittedFragmentCount;
ULONGLONG MulticastTransmittedFrameCount; unsigned long long MulticastTransmittedFrameCount;
ULONGLONG FailedCount; unsigned long long FailedCount;
ULONGLONG RetryCount; unsigned long long RetryCount;
ULONGLONG MultipleRetryCount; unsigned long long MultipleRetryCount;
ULONGLONG RTSSuccessCount; unsigned long long RTSSuccessCount;
ULONGLONG RTSFailureCount; unsigned long long RTSFailureCount;
ULONGLONG ACKFailureCount; unsigned long long ACKFailureCount;
ULONGLONG FrameDuplicateCount; unsigned long long FrameDuplicateCount;
ULONGLONG ReceivedFragmentCount; unsigned long long ReceivedFragmentCount;
ULONGLONG MulticastReceivedFrameCount; unsigned long long MulticastReceivedFrameCount;
ULONGLONG FCSErrorCount; unsigned long long FCSErrorCount;
ULONGLONG TKIPLocalMICFailures; unsigned long long TKIPLocalMICFailures;
ULONGLONG TKIPRemoteMICFailures; unsigned long long TKIPRemoteMICFailures;
ULONGLONG TKIPICVErrors; unsigned long long TKIPICVErrors;
ULONGLONG TKIPCounterMeasuresInvoked; unsigned long long TKIPCounterMeasuresInvoked;
ULONGLONG TKIPReplays; unsigned long long TKIPReplays;
ULONGLONG CCMPFormatErrors; unsigned long long CCMPFormatErrors;
ULONGLONG CCMPReplays; unsigned long long CCMPReplays;
ULONGLONG CCMPDecryptErrors; unsigned long long CCMPDecryptErrors;
ULONGLONG FourWayHandshakeFailures; unsigned long long FourWayHandshakeFailures;
// ULONGLONG WEPUndecryptableCount; /*
// ULONGLONG WEPICVErrorCount; * unsigned long long WEPUndecryptableCount;
// ULONGLONG DecryptSuccessCount; * unsigned long long WEPICVErrorCount;
// ULONGLONG DecryptFailureCount; * unsigned long long DecryptSuccessCount;
* unsigned long long DecryptFailureCount;
*/
} SDot11Counters, *PSDot11Counters; } SDot11Counters, *PSDot11Counters;
...@@ -151,37 +153,37 @@ typedef struct tagSRmonCounter { ...@@ -151,37 +153,37 @@ typedef struct tagSRmonCounter {
// Custom counter // Custom counter
// //
typedef struct tagSCustomCounters { typedef struct tagSCustomCounters {
ULONG Length; unsigned long Length;
ULONGLONG ullTsrAllOK; unsigned long long ullTsrAllOK;
ULONGLONG ullRsr11M; unsigned long long ullRsr11M;
ULONGLONG ullRsr5M; unsigned long long ullRsr5M;
ULONGLONG ullRsr2M; unsigned long long ullRsr2M;
ULONGLONG ullRsr1M; unsigned long long ullRsr1M;
ULONGLONG ullRsr11MCRCOk; unsigned long long ullRsr11MCRCOk;
ULONGLONG ullRsr5MCRCOk; unsigned long long ullRsr5MCRCOk;
ULONGLONG ullRsr2MCRCOk; unsigned long long ullRsr2MCRCOk;
ULONGLONG ullRsr1MCRCOk; unsigned long long ullRsr1MCRCOk;
ULONGLONG ullRsr54M; unsigned long long ullRsr54M;
ULONGLONG ullRsr48M; unsigned long long ullRsr48M;
ULONGLONG ullRsr36M; unsigned long long ullRsr36M;
ULONGLONG ullRsr24M; unsigned long long ullRsr24M;
ULONGLONG ullRsr18M; unsigned long long ullRsr18M;
ULONGLONG ullRsr12M; unsigned long long ullRsr12M;
ULONGLONG ullRsr9M; unsigned long long ullRsr9M;
ULONGLONG ullRsr6M; unsigned long long ullRsr6M;
ULONGLONG ullRsr54MCRCOk; unsigned long long ullRsr54MCRCOk;
ULONGLONG ullRsr48MCRCOk; unsigned long long ullRsr48MCRCOk;
ULONGLONG ullRsr36MCRCOk; unsigned long long ullRsr36MCRCOk;
ULONGLONG ullRsr24MCRCOk; unsigned long long ullRsr24MCRCOk;
ULONGLONG ullRsr18MCRCOk; unsigned long long ullRsr18MCRCOk;
ULONGLONG ullRsr12MCRCOk; unsigned long long ullRsr12MCRCOk;
ULONGLONG ullRsr9MCRCOk; unsigned long long ullRsr9MCRCOk;
ULONGLONG ullRsr6MCRCOk; unsigned long long ullRsr6MCRCOk;
} SCustomCounters, *PSCustomCounters; } SCustomCounters, *PSCustomCounters;
...@@ -190,7 +192,7 @@ typedef struct tagSCustomCounters { ...@@ -190,7 +192,7 @@ typedef struct tagSCustomCounters {
// Custom counter // Custom counter
// //
typedef struct tagSISRCounters { typedef struct tagSISRCounters {
ULONG Length; unsigned long Length;
DWORD dwIsrTx0OK; DWORD dwIsrTx0OK;
DWORD dwIsrAC0TxOK; DWORD dwIsrAC0TxOK;
...@@ -277,15 +279,15 @@ typedef struct tagSStatCounter { ...@@ -277,15 +279,15 @@ typedef struct tagSStatCounter {
DWORD dwRsrMulticast; DWORD dwRsrMulticast;
DWORD dwRsrDirected; DWORD dwRsrDirected;
// 64-bit OID // 64-bit OID
ULONGLONG ullRsrOK; unsigned long long ullRsrOK;
// for some optional OIDs (64 bits) and DMI support // for some optional OIDs (64 bits) and DMI support
ULONGLONG ullRxBroadcastBytes; unsigned long long ullRxBroadcastBytes;
ULONGLONG ullRxMulticastBytes; unsigned long long ullRxMulticastBytes;
ULONGLONG ullRxDirectedBytes; unsigned long long ullRxDirectedBytes;
ULONGLONG ullRxBroadcastFrames; unsigned long long ullRxBroadcastFrames;
ULONGLONG ullRxMulticastFrames; unsigned long long ullRxMulticastFrames;
ULONGLONG ullRxDirectedFrames; unsigned long long ullRxDirectedFrames;
DWORD dwRsrRxFragment; DWORD dwRsrRxFragment;
DWORD dwRsrRxFrmLen64; DWORD dwRsrRxFrmLen64;
...@@ -330,15 +332,15 @@ typedef struct tagSStatCounter { ...@@ -330,15 +332,15 @@ typedef struct tagSStatCounter {
// 64-bit OID // 64-bit OID
ULONGLONG ullTsrOK; unsigned long long ullTsrOK;
// for some optional OIDs (64 bits) and DMI support // for some optional OIDs (64 bits) and DMI support
ULONGLONG ullTxBroadcastFrames; unsigned long long ullTxBroadcastFrames;
ULONGLONG ullTxMulticastFrames; unsigned long long ullTxMulticastFrames;
ULONGLONG ullTxDirectedFrames; unsigned long long ullTxDirectedFrames;
ULONGLONG ullTxBroadcastBytes; unsigned long long ullTxBroadcastBytes;
ULONGLONG ullTxMulticastBytes; unsigned long long ullTxMulticastBytes;
ULONGLONG ullTxDirectedBytes; unsigned long long ullTxDirectedBytes;
// for autorate // for autorate
DWORD dwTxOk[MAX_RATE+1]; DWORD dwTxOk[MAX_RATE+1];
...@@ -356,15 +358,15 @@ typedef struct tagSStatCounter { ...@@ -356,15 +358,15 @@ typedef struct tagSStatCounter {
#ifdef Calcu_LinkQual #ifdef Calcu_LinkQual
//Tx count: //Tx count:
ULONG TxNoRetryOkCount; //success tx no retry ! unsigned long TxNoRetryOkCount; /* success tx no retry ! */
ULONG TxRetryOkCount; //success tx but retry ! unsigned long TxRetryOkCount; /* success tx but retry ! */
ULONG TxFailCount; //fail tx ? unsigned long TxFailCount; /* fail tx ? */
//Rx count: //Rx count:
ULONG RxOkCnt; //success rx ! unsigned long RxOkCnt; /* success rx ! */
ULONG RxFcsErrCnt; //fail rx ? unsigned long RxFcsErrCnt; /* fail rx ? */
//statistic //statistic
ULONG SignalStren; unsigned long SignalStren;
ULONG LinkQuality; unsigned long LinkQuality;
#endif #endif
} SStatCounter, *PSStatCounter; } SStatCounter, *PSStatCounter;
...@@ -382,13 +384,14 @@ void STAvClearAllCounter(PSStatCounter pStatistic); ...@@ -382,13 +384,14 @@ void STAvClearAllCounter(PSStatCounter pStatistic);
void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr1); void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, BYTE byIsr0, BYTE byIsr1);
void STAvUpdateRDStatCounter(PSStatCounter pStatistic, void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, BYTE byRxRate, BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
PBYTE pbyBuffer, UINT cbFrameLength); BYTE byRxRate, PBYTE pbyBuffer,
unsigned int cbFrameLength);
void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic, void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxSts, BYTE byRxRate, BYTE byRSR, BYTE byNewRSR, BYTE byRxSts,
PBYTE pbyBuffer, UINT cbFrameLength); BYTE byRxRate, PBYTE pbyBuffer,
unsigned int cbFrameLength);
void void
STAvUpdateTDStatCounter ( STAvUpdateTDStatCounter (
......
...@@ -64,7 +64,7 @@ static void s_vAppendByte(BYTE b); /* Add a single byte to the internal ...@@ -64,7 +64,7 @@ static void s_vAppendByte(BYTE b); /* Add a single byte to the internal
static DWORD L, R; /* Current state */ static DWORD L, R; /* Current state */
static DWORD K0, K1; /* Key */ static DWORD K0, K1; /* Key */
static DWORD M; /* Message accumulator (single word) */ static DWORD M; /* Message accumulator (single word) */
static UINT nBytesInM; /* # bytes in M */ static unsigned int nBytesInM; /* # bytes in M */
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
...@@ -73,7 +73,7 @@ static DWORD s_dwGetUINT32 (BYTE * p) ...@@ -73,7 +73,7 @@ static DWORD s_dwGetUINT32 (BYTE * p)
// Convert from BYTE[] to DWORD in a portable way // Convert from BYTE[] to DWORD in a portable way
{ {
DWORD res = 0; DWORD res = 0;
UINT i; unsigned int i;
for(i=0; i<4; i++ ) for(i=0; i<4; i++ )
res |= (*p++) << (8*i); res |= (*p++) << (8*i);
return res; return res;
...@@ -82,7 +82,7 @@ static DWORD s_dwGetUINT32 (BYTE * p) ...@@ -82,7 +82,7 @@ static DWORD s_dwGetUINT32 (BYTE * p)
static void s_vPutUINT32(BYTE *p, DWORD val) static void s_vPutUINT32(BYTE *p, DWORD val)
// Convert from DWORD to BYTE[] in a portable way // Convert from DWORD to BYTE[] in a portable way
{ {
UINT i; unsigned int i;
for(i=0; i<4; i++ ) { for(i=0; i<4; i++ ) {
*p++ = (BYTE) (val & 0xff); *p++ = (BYTE) (val & 0xff);
val >>= 8; val >>= 8;
...@@ -148,7 +148,7 @@ void MIC_vUnInit(void) ...@@ -148,7 +148,7 @@ void MIC_vUnInit(void)
s_vClear(); s_vClear();
} }
void MIC_vAppend(PBYTE src, UINT nBytes) void MIC_vAppend(PBYTE src, unsigned int nBytes)
{ {
/* This is simple */ /* This is simple */
while (nBytes > 0) { while (nBytes > 0) {
......
...@@ -40,7 +40,7 @@ void MIC_vInit(DWORD dwK0, DWORD dwK1); ...@@ -40,7 +40,7 @@ void MIC_vInit(DWORD dwK0, DWORD dwK1);
void MIC_vUnInit(void); void MIC_vUnInit(void);
// Append bytes to the message to be MICed // Append bytes to the message to be MICed
void MIC_vAppend(PBYTE src, UINT nBytes); void MIC_vAppend(PBYTE src, unsigned int nBytes);
// Get the MIC result. Destination should accept 8 bytes of result. // Get the MIC result. Destination should accept 8 bytes of result.
// This also resets the message to empty. // This also resets the message to empty.
......
...@@ -32,13 +32,13 @@ ...@@ -32,13 +32,13 @@
#include "rc4.h" #include "rc4.h"
void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len) void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len)
{ {
UINT ust1, ust2; unsigned int ust1, ust2;
UINT keyindex; unsigned int keyindex;
UINT stateindex; unsigned int stateindex;
PBYTE pbyst; PBYTE pbyst;
UINT idx; unsigned int idx;
pbyst = pRC4->abystate; pbyst = pRC4->abystate;
pRC4->ux = 0; pRC4->ux = 0;
...@@ -58,11 +58,11 @@ void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len) ...@@ -58,11 +58,11 @@ void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len)
} }
} }
UINT rc4_byte(PRC4Ext pRC4) unsigned int rc4_byte(PRC4Ext pRC4)
{ {
UINT ux; unsigned int ux;
UINT uy; unsigned int uy;
UINT ustx, usty; unsigned int ustx, usty;
PBYTE pbyst; PBYTE pbyst;
pbyst = pRC4->abystate; pbyst = pRC4->abystate;
...@@ -79,9 +79,9 @@ UINT rc4_byte(PRC4Ext pRC4) ...@@ -79,9 +79,9 @@ UINT rc4_byte(PRC4Ext pRC4)
} }
void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest,
PBYTE pbySrc, UINT cbData_len) PBYTE pbySrc, unsigned int cbData_len)
{ {
UINT ii; unsigned int ii;
for (ii = 0; ii < cbData_len; ii++) for (ii = 0; ii < cbData_len; ii++)
pbyDest[ii] = (BYTE)(pbySrc[ii] ^ rc4_byte(pRC4)); pbyDest[ii] = (BYTE)(pbySrc[ii] ^ rc4_byte(pRC4));
} }
...@@ -35,13 +35,14 @@ ...@@ -35,13 +35,14 @@
/*--------------------- Export Definitions -------------------------*/ /*--------------------- Export Definitions -------------------------*/
/*--------------------- Export Types ------------------------------*/ /*--------------------- Export Types ------------------------------*/
typedef struct { typedef struct {
UINT ux; unsigned int ux;
UINT uy; unsigned int uy;
BYTE abystate[256]; BYTE abystate[256];
} RC4Ext, *PRC4Ext; } RC4Ext, *PRC4Ext;
void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, UINT cbKey_len); void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len);
UINT rc4_byte(PRC4Ext pRC4); unsigned int rc4_byte(PRC4Ext pRC4);
void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc, UINT cbData_len); void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc,
unsigned int cbData_len);
#endif /* __RC4_H__ */ #endif /* __RC4_H__ */
...@@ -758,8 +758,8 @@ BOOL IFRFbWriteEmbeded (PSDevice pDevice, DWORD dwData) ...@@ -758,8 +758,8 @@ BOOL IFRFbWriteEmbeded (PSDevice pDevice, DWORD dwData)
*/ */
BOOL RFbSetPower ( BOOL RFbSetPower (
PSDevice pDevice, PSDevice pDevice,
UINT uRATE, unsigned int uRATE,
UINT uCH unsigned int uCH
) )
{ {
BOOL bResult = TRUE; BOOL bResult = TRUE;
...@@ -813,7 +813,7 @@ BYTE byPwr = pDevice->byCCKPwr; ...@@ -813,7 +813,7 @@ BYTE byPwr = pDevice->byCCKPwr;
BOOL RFbRawSetPower ( BOOL RFbRawSetPower (
PSDevice pDevice, PSDevice pDevice,
BYTE byPwr, BYTE byPwr,
UINT uRATE unsigned int uRATE
) )
{ {
BOOL bResult = TRUE; BOOL bResult = TRUE;
......
...@@ -66,14 +66,14 @@ extern const BYTE RFaby11aChannelIndex[200]; ...@@ -66,14 +66,14 @@ extern const BYTE RFaby11aChannelIndex[200];
BOOL IFRFbWriteEmbeded(PSDevice pDevice, DWORD dwData); BOOL IFRFbWriteEmbeded(PSDevice pDevice, DWORD dwData);
BOOL RFbSetPower ( BOOL RFbSetPower (
PSDevice pDevice, PSDevice pDevice,
UINT uRATE, unsigned int uRATE,
UINT uCH unsigned int uCH
); );
BOOL RFbRawSetPower( BOOL RFbRawSetPower(
PSDevice pDevice, PSDevice pDevice,
BYTE byPwr, BYTE byPwr,
UINT uRATE unsigned int uRATE
); );
void void
......
...@@ -139,26 +139,24 @@ s_vGenerateTxParameter( ...@@ -139,26 +139,24 @@ s_vGenerateTxParameter(
void *pvRrvTime, void *pvRrvTime,
void *pvRTS, void *pvRTS,
void *pvCTS, void *pvCTS,
UINT cbFrameSize, unsigned int cbFrameSize,
BOOL bNeedACK, BOOL bNeedACK,
UINT uDMAIdx, unsigned int uDMAIdx,
PSEthernetHeader psEthHeader PSEthernetHeader psEthHeader
); );
static static unsigned int s_uFillDataHead(
UINT
s_uFillDataHead (
PSDevice pDevice, PSDevice pDevice,
BYTE byPktType, BYTE byPktType,
WORD wCurrentRate, WORD wCurrentRate,
void *pTxDataHead, void *pTxDataHead,
UINT cbFrameLength, unsigned int cbFrameLength,
UINT uDMAIdx, unsigned int uDMAIdx,
BOOL bNeedAck, BOOL bNeedAck,
UINT uFragIdx, unsigned int uFragIdx,
UINT cbLastFragmentSize, unsigned int cbLastFragmentSize,
UINT uMACfragNum, unsigned int uMACfragNum,
BYTE byFBOption BYTE byFBOption
); );
...@@ -174,8 +172,8 @@ s_vGenerateMACHeader ( ...@@ -174,8 +172,8 @@ s_vGenerateMACHeader (
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
BOOL bNeedEncrypt, BOOL bNeedEncrypt,
WORD wFragType, WORD wFragType,
UINT uDMAIdx, unsigned int uDMAIdx,
UINT uFragIdx unsigned int uFragIdx
); );
static static
...@@ -199,24 +197,20 @@ s_vSWencryption ( ...@@ -199,24 +197,20 @@ s_vSWencryption (
WORD wPayloadSize WORD wPayloadSize
); );
static static unsigned int s_uGetTxRsvTime(
UINT
s_uGetTxRsvTime (
PSDevice pDevice, PSDevice pDevice,
BYTE byPktType, BYTE byPktType,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wRate, WORD wRate,
BOOL bNeedAck BOOL bNeedAck
); );
static static unsigned int s_uGetRTSCTSRsvTime(
UINT
s_uGetRTSCTSRsvTime (
PSDevice pDevice, PSDevice pDevice,
BYTE byRTSRsvType, BYTE byRTSRsvType,
BYTE byPktType, BYTE byPktType,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wCurrentRate WORD wCurrentRate
); );
...@@ -224,10 +218,10 @@ static ...@@ -224,10 +218,10 @@ static
void void
s_vFillCTSHead ( s_vFillCTSHead (
PSDevice pDevice, PSDevice pDevice,
UINT uDMAIdx, unsigned int uDMAIdx,
BYTE byPktType, BYTE byPktType,
void *pvCTS, void *pvCTS,
UINT cbFrameLength, unsigned int cbFrameLength,
BOOL bNeedAck, BOOL bNeedAck,
BOOL bDisCRC, BOOL bDisCRC,
WORD wCurrentRate, WORD wCurrentRate,
...@@ -240,7 +234,7 @@ s_vFillRTSHead( ...@@ -240,7 +234,7 @@ s_vFillRTSHead(
PSDevice pDevice, PSDevice pDevice,
BYTE byPktType, BYTE byPktType,
void *pvRTS, void *pvRTS,
UINT cbFrameLength, unsigned int cbFrameLength,
BOOL bNeedAck, BOOL bNeedAck,
BOOL bDisCRC, BOOL bDisCRC,
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
...@@ -248,28 +242,26 @@ s_vFillRTSHead( ...@@ -248,28 +242,26 @@ s_vFillRTSHead(
BYTE byFBOption BYTE byFBOption
); );
static static unsigned int s_uGetDataDuration(
UINT
s_uGetDataDuration (
PSDevice pDevice, PSDevice pDevice,
BYTE byDurType, BYTE byDurType,
UINT cbFrameLength, unsigned int cbFrameLength,
BYTE byPktType, BYTE byPktType,
WORD wRate, WORD wRate,
BOOL bNeedAck, BOOL bNeedAck,
UINT uFragIdx, unsigned int uFragIdx,
UINT cbLastFragmentSize, unsigned int cbLastFragmentSize,
UINT uMACfragNum, unsigned int uMACfragNum,
BYTE byFBOption BYTE byFBOption
); );
static static
UINT unsigned int
s_uGetRTSCTSDuration ( s_uGetRTSCTSDuration (
PSDevice pDevice, PSDevice pDevice,
BYTE byDurType, BYTE byDurType,
UINT cbFrameLength, unsigned int cbFrameLength,
BYTE byPktType, BYTE byPktType,
WORD wRate, WORD wRate,
BOOL bNeedAck, BOOL bNeedAck,
...@@ -287,7 +279,7 @@ s_vGetFreeContext( ...@@ -287,7 +279,7 @@ s_vGetFreeContext(
{ {
PUSB_SEND_CONTEXT pContext = NULL; PUSB_SEND_CONTEXT pContext = NULL;
PUSB_SEND_CONTEXT pReturnContext = NULL; PUSB_SEND_CONTEXT pReturnContext = NULL;
UINT ii; unsigned int ii;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
...@@ -456,7 +448,7 @@ s_vSWencryption ( ...@@ -456,7 +448,7 @@ s_vSWencryption (
WORD wPayloadSize WORD wPayloadSize
) )
{ {
UINT cbICVlen = 4; unsigned int cbICVlen = 4;
DWORD dwICV = 0xFFFFFFFFL; DWORD dwICV = 0xFFFFFFFFL;
PDWORD pdwICV; PDWORD pdwICV;
...@@ -497,16 +489,16 @@ s_vSWencryption ( ...@@ -497,16 +489,16 @@ s_vSWencryption (
PK_TYPE_11GA 3 PK_TYPE_11GA 3
*/ */
static static
UINT unsigned int
s_uGetTxRsvTime ( s_uGetTxRsvTime (
PSDevice pDevice, PSDevice pDevice,
BYTE byPktType, BYTE byPktType,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wRate, WORD wRate,
BOOL bNeedAck BOOL bNeedAck
) )
{ {
UINT uDataTime, uAckTime; unsigned int uDataTime, uAckTime;
uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wRate); uDataTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType, cbFrameLength, wRate);
if (byPktType == PK_TYPE_11B) {//llb,CCK mode if (byPktType == PK_TYPE_11B) {//llb,CCK mode
...@@ -525,16 +517,16 @@ s_uGetTxRsvTime ( ...@@ -525,16 +517,16 @@ s_uGetTxRsvTime (
//byFreqType: 0=>5GHZ 1=>2.4GHZ //byFreqType: 0=>5GHZ 1=>2.4GHZ
static static
UINT unsigned int
s_uGetRTSCTSRsvTime ( s_uGetRTSCTSRsvTime (
PSDevice pDevice, PSDevice pDevice,
BYTE byRTSRsvType, BYTE byRTSRsvType,
BYTE byPktType, BYTE byPktType,
UINT cbFrameLength, unsigned int cbFrameLength,
WORD wCurrentRate WORD wCurrentRate
) )
{ {
UINT uRrvTime , uRTSTime, uCTSTime, uAckTime, uDataTime; unsigned int uRrvTime , uRTSTime, uCTSTime, uAckTime, uDataTime;
uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0; uRrvTime = uRTSTime = uCTSTime = uAckTime = uDataTime = 0;
...@@ -567,23 +559,22 @@ s_uGetRTSCTSRsvTime ( ...@@ -567,23 +559,22 @@ s_uGetRTSCTSRsvTime (
//byFreqType 0: 5GHz, 1:2.4Ghz //byFreqType 0: 5GHz, 1:2.4Ghz
static static
UINT unsigned int
s_uGetDataDuration ( s_uGetDataDuration (
PSDevice pDevice, PSDevice pDevice,
BYTE byDurType, BYTE byDurType,
UINT cbFrameLength, unsigned int cbFrameLength,
BYTE byPktType, BYTE byPktType,
WORD wRate, WORD wRate,
BOOL bNeedAck, BOOL bNeedAck,
UINT uFragIdx, unsigned int uFragIdx,
UINT cbLastFragmentSize, unsigned int cbLastFragmentSize,
UINT uMACfragNum, unsigned int uMACfragNum,
BYTE byFBOption BYTE byFBOption
) )
{ {
BOOL bLastFrag = 0; BOOL bLastFrag = 0;
UINT uAckTime =0, uNextPktTime = 0; unsigned int uAckTime = 0, uNextPktTime = 0;
if (uFragIdx == (uMACfragNum-1)) { if (uFragIdx == (uMACfragNum-1)) {
bLastFrag = 1; bLastFrag = 1;
...@@ -737,18 +728,18 @@ s_uGetDataDuration ( ...@@ -737,18 +728,18 @@ s_uGetDataDuration (
//byFreqType: 0=>5GHZ 1=>2.4GHZ //byFreqType: 0=>5GHZ 1=>2.4GHZ
static static
UINT unsigned int
s_uGetRTSCTSDuration ( s_uGetRTSCTSDuration (
PSDevice pDevice, PSDevice pDevice,
BYTE byDurType, BYTE byDurType,
UINT cbFrameLength, unsigned int cbFrameLength,
BYTE byPktType, BYTE byPktType,
WORD wRate, WORD wRate,
BOOL bNeedAck, BOOL bNeedAck,
BYTE byFBOption BYTE byFBOption
) )
{ {
UINT uCTSTime = 0, uDurTime = 0; unsigned int uCTSTime = 0, uDurTime = 0;
switch (byDurType) { switch (byDurType) {
...@@ -836,18 +827,18 @@ s_uGetRTSCTSDuration ( ...@@ -836,18 +827,18 @@ s_uGetRTSCTSDuration (
static static
UINT unsigned int
s_uFillDataHead ( s_uFillDataHead (
PSDevice pDevice, PSDevice pDevice,
BYTE byPktType, BYTE byPktType,
WORD wCurrentRate, WORD wCurrentRate,
void *pTxDataHead, void *pTxDataHead,
UINT cbFrameLength, unsigned int cbFrameLength,
UINT uDMAIdx, unsigned int uDMAIdx,
BOOL bNeedAck, BOOL bNeedAck,
UINT uFragIdx, unsigned int uFragIdx,
UINT cbLastFragmentSize, unsigned int cbLastFragmentSize,
UINT uMACfragNum, unsigned int uMACfragNum,
BYTE byFBOption BYTE byFBOption
) )
{ {
...@@ -986,7 +977,7 @@ s_vFillRTSHead ( ...@@ -986,7 +977,7 @@ s_vFillRTSHead (
PSDevice pDevice, PSDevice pDevice,
BYTE byPktType, BYTE byPktType,
void *pvRTS, void *pvRTS,
UINT cbFrameLength, unsigned int cbFrameLength,
BOOL bNeedAck, BOOL bNeedAck,
BOOL bDisCRC, BOOL bDisCRC,
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
...@@ -994,7 +985,7 @@ s_vFillRTSHead ( ...@@ -994,7 +985,7 @@ s_vFillRTSHead (
BYTE byFBOption BYTE byFBOption
) )
{ {
UINT uRTSFrameLen = 20; unsigned int uRTSFrameLen = 20;
WORD wLen = 0x0000; WORD wLen = 0x0000;
if (pvRTS == NULL) if (pvRTS == NULL)
...@@ -1212,17 +1203,17 @@ static ...@@ -1212,17 +1203,17 @@ static
void void
s_vFillCTSHead ( s_vFillCTSHead (
PSDevice pDevice, PSDevice pDevice,
UINT uDMAIdx, unsigned int uDMAIdx,
BYTE byPktType, BYTE byPktType,
void *pvCTS, void *pvCTS,
UINT cbFrameLength, unsigned int cbFrameLength,
BOOL bNeedAck, BOOL bNeedAck,
BOOL bDisCRC, BOOL bDisCRC,
WORD wCurrentRate, WORD wCurrentRate,
BYTE byFBOption BYTE byFBOption
) )
{ {
UINT uCTSFrameLen = 14; unsigned int uCTSFrameLen = 14;
WORD wLen = 0x0000; WORD wLen = 0x0000;
if (pvCTS == NULL) { if (pvCTS == NULL) {
...@@ -1307,7 +1298,7 @@ s_vFillCTSHead ( ...@@ -1307,7 +1298,7 @@ s_vFillCTSHead (
* Return Value: none * Return Value: none
* *
-*/ -*/
// UINT cbFrameSize,//Hdr+Payload+FCS
static static
void void
s_vGenerateTxParameter ( s_vGenerateTxParameter (
...@@ -1318,13 +1309,13 @@ s_vGenerateTxParameter ( ...@@ -1318,13 +1309,13 @@ s_vGenerateTxParameter (
void *pvRrvTime, void *pvRrvTime,
void *pvRTS, void *pvRTS,
void *pvCTS, void *pvCTS,
UINT cbFrameSize, unsigned int cbFrameSize,
BOOL bNeedACK, BOOL bNeedACK,
UINT uDMAIdx, unsigned int uDMAIdx,
PSEthernetHeader psEthHeader PSEthernetHeader psEthHeader
) )
{ {
UINT cbMACHdLen = WLAN_HDR_ADDR3_LEN; //24 unsigned int cbMACHdLen = WLAN_HDR_ADDR3_LEN; /* 24 */
WORD wFifoCtl; WORD wFifoCtl;
BOOL bDisCRC = FALSE; BOOL bDisCRC = FALSE;
BYTE byFBOption = AUTO_FB_NONE; BYTE byFBOption = AUTO_FB_NONE;
...@@ -1422,7 +1413,7 @@ s_vGenerateTxParameter ( ...@@ -1422,7 +1413,7 @@ s_vGenerateTxParameter (
/* /*
PBYTE pbyBuffer,//point to pTxBufHead PBYTE pbyBuffer,//point to pTxBufHead
WORD wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last WORD wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last
UINT cbFragmentSize,//Hdr+payoad+FCS unsigned int cbFragmentSize,//Hdr+payoad+FCS
*/ */
...@@ -1432,29 +1423,30 @@ s_bPacketToWirelessUsb( ...@@ -1432,29 +1423,30 @@ s_bPacketToWirelessUsb(
BYTE byPktType, BYTE byPktType,
PBYTE usbPacketBuf, PBYTE usbPacketBuf,
BOOL bNeedEncryption, BOOL bNeedEncryption,
UINT uSkbPacketLen, unsigned int uSkbPacketLen,
UINT uDMAIdx, unsigned int uDMAIdx,
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
PBYTE pPacket, PBYTE pPacket,
PSKeyItem pTransmitKey, PSKeyItem pTransmitKey,
UINT uNodeIndex, unsigned int uNodeIndex,
WORD wCurrentRate, WORD wCurrentRate,
UINT *pcbHeaderLen, unsigned int *pcbHeaderLen,
UINT *pcbTotalLen unsigned int *pcbTotalLen
) )
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT cbFrameSize,cbFrameBodySize; unsigned int cbFrameSize, cbFrameBodySize;
PTX_BUFFER pTxBufHead; PTX_BUFFER pTxBufHead;
UINT cb802_1_H_len; unsigned int cb802_1_H_len;
UINT cbIVlen=0,cbICVlen=0,cbMIClen=0,cbMACHdLen=0,cbFCSlen=4; unsigned int cbIVlen = 0, cbICVlen = 0, cbMIClen = 0,
UINT cbMICHDR = 0; cbMACHdLen = 0, cbFCSlen = 4;
unsigned int cbMICHDR = 0;
BOOL bNeedACK,bRTS; BOOL bNeedACK,bRTS;
PBYTE pbyType,pbyMacHdr,pbyIVHead,pbyPayloadHead,pbyTxBufferAddr; PBYTE pbyType,pbyMacHdr,pbyIVHead,pbyPayloadHead,pbyTxBufferAddr;
BYTE abySNAP_RFC1042[6] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00}; BYTE abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
BYTE abySNAP_Bridgetunnel[6] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8}; BYTE abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
UINT uDuration; unsigned int uDuration;
UINT cbHeaderLength= 0,uPadding = 0; unsigned int cbHeaderLength = 0, uPadding = 0;
void *pvRrvTime; void *pvRrvTime;
PSMICHDRHead pMICHDR; PSMICHDRHead pMICHDR;
void *pvRTS; void *pvRTS;
...@@ -1809,7 +1801,7 @@ s_bPacketToWirelessUsb( ...@@ -1809,7 +1801,7 @@ s_bPacketToWirelessUsb(
} }
if (pDevice->bSoftwareGenCrcErr == TRUE) { if (pDevice->bSoftwareGenCrcErr == TRUE) {
UINT cbLen; unsigned int cbLen;
PDWORD pdwCRC; PDWORD pdwCRC;
dwCRC = 0xFFFFFFFFL; dwCRC = 0xFFFFFFFFL;
...@@ -1865,8 +1857,8 @@ s_vGenerateMACHeader ( ...@@ -1865,8 +1857,8 @@ s_vGenerateMACHeader (
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
BOOL bNeedEncrypt, BOOL bNeedEncrypt,
WORD wFragType, WORD wFragType,
UINT uDMAIdx, unsigned int uDMAIdx,
UINT uFragIdx unsigned int uFragIdx
) )
{ {
PS802_11Header pMACHeader = (PS802_11Header)pbyBufferAddr; PS802_11Header pMACHeader = (PS802_11Header)pbyBufferAddr;
...@@ -1968,22 +1960,22 @@ CMD_STATUS csMgmt_xmit( ...@@ -1968,22 +1960,22 @@ CMD_STATUS csMgmt_xmit(
void *pvRTS; void *pvRTS;
PSCTS pCTS; PSCTS pCTS;
void *pvTxDataHd; void *pvTxDataHd;
UINT uDuration; unsigned int uDuration;
UINT cbReqCount; unsigned int cbReqCount;
PS802_11Header pMACHeader; PS802_11Header pMACHeader;
UINT cbHeaderSize; unsigned int cbHeaderSize;
UINT cbFrameBodySize; unsigned int cbFrameBodySize;
BOOL bNeedACK; BOOL bNeedACK;
BOOL bIsPSPOLL = FALSE; BOOL bIsPSPOLL = FALSE;
PSTxBufHead pTxBufHead; PSTxBufHead pTxBufHead;
UINT cbFrameSize; unsigned int cbFrameSize;
UINT cbIVlen = 0; unsigned int cbIVlen = 0;
UINT cbICVlen = 0; unsigned int cbICVlen = 0;
UINT cbMIClen = 0; unsigned int cbMIClen = 0;
UINT cbFCSlen = 4; unsigned int cbFCSlen = 4;
UINT uPadding = 0; unsigned int uPadding = 0;
WORD wTxBufSize; WORD wTxBufSize;
UINT cbMacHdLen; unsigned int cbMacHdLen;
SEthernetHeader sEthHeader; SEthernetHeader sEthHeader;
void *pvRrvTime; void *pvRrvTime;
void *pMICHDR; void *pMICHDR;
...@@ -2258,15 +2250,15 @@ csBeacon_xmit( ...@@ -2258,15 +2250,15 @@ csBeacon_xmit(
) )
{ {
UINT cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN; unsigned int cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN;
UINT cbHeaderSize = 0; unsigned int cbHeaderSize = 0;
WORD wTxBufSize = sizeof(STxShortBufHead); WORD wTxBufSize = sizeof(STxShortBufHead);
PSTxShortBufHead pTxBufHead; PSTxShortBufHead pTxBufHead;
PS802_11Header pMACHeader; PS802_11Header pMACHeader;
PSTxDataHead_ab pTxDataHead; PSTxDataHead_ab pTxDataHead;
WORD wCurrentRate; WORD wCurrentRate;
UINT cbFrameBodySize; unsigned int cbFrameBodySize;
UINT cbReqCount; unsigned int cbReqCount;
PBEACON_BUFFER pTX_Buffer; PBEACON_BUFFER pTX_Buffer;
PBYTE pbyTxBufferAddr; PBYTE pbyTxBufferAddr;
PUSB_SEND_CONTEXT pContext; PUSB_SEND_CONTEXT pContext;
...@@ -2353,41 +2345,41 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) { ...@@ -2353,41 +2345,41 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {
void *pvRTS; void *pvRTS;
void *pvCTS; void *pvCTS;
void *pvTxDataHd; void *pvTxDataHd;
UINT uDuration; unsigned int uDuration;
UINT cbReqCount; unsigned int cbReqCount;
PS802_11Header pMACHeader; PS802_11Header pMACHeader;
UINT cbHeaderSize; unsigned int cbHeaderSize;
UINT cbFrameBodySize; unsigned int cbFrameBodySize;
BOOL bNeedACK; BOOL bNeedACK;
BOOL bIsPSPOLL = FALSE; BOOL bIsPSPOLL = FALSE;
PSTxBufHead pTxBufHead; PSTxBufHead pTxBufHead;
UINT cbFrameSize; unsigned int cbFrameSize;
UINT cbIVlen = 0; unsigned int cbIVlen = 0;
UINT cbICVlen = 0; unsigned int cbICVlen = 0;
UINT cbMIClen = 0; unsigned int cbMIClen = 0;
UINT cbFCSlen = 4; unsigned int cbFCSlen = 4;
UINT uPadding = 0; unsigned int uPadding = 0;
UINT cbMICHDR = 0; unsigned int cbMICHDR = 0;
UINT uLength = 0; unsigned int uLength = 0;
DWORD dwMICKey0, dwMICKey1; DWORD dwMICKey0, dwMICKey1;
DWORD dwMIC_Priority; DWORD dwMIC_Priority;
PDWORD pdwMIC_L; PDWORD pdwMIC_L;
PDWORD pdwMIC_R; PDWORD pdwMIC_R;
WORD wTxBufSize; WORD wTxBufSize;
UINT cbMacHdLen; unsigned int cbMacHdLen;
SEthernetHeader sEthHeader; SEthernetHeader sEthHeader;
void *pvRrvTime; void *pvRrvTime;
void *pMICHDR; void *pMICHDR;
WORD wCurrentRate = RATE_1M; WORD wCurrentRate = RATE_1M;
PUWLAN_80211HDR p80211Header; PUWLAN_80211HDR p80211Header;
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
BOOL bNodeExist = FALSE; BOOL bNodeExist = FALSE;
SKeyItem STempKey; SKeyItem STempKey;
PSKeyItem pTransmitKey = NULL; PSKeyItem pTransmitKey = NULL;
PBYTE pbyIVHead; PBYTE pbyIVHead;
PBYTE pbyPayloadHead; PBYTE pbyPayloadHead;
PBYTE pbyMacHdr; PBYTE pbyMacHdr;
UINT cbExtSuppRate = 0; unsigned int cbExtSuppRate = 0;
PTX_BUFFER pTX_Buffer; PTX_BUFFER pTX_Buffer;
PUSB_SEND_CONTEXT pContext; PUSB_SEND_CONTEXT pContext;
// PWLAN_IE pItem; // PWLAN_IE pItem;
...@@ -2754,20 +2746,20 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) { ...@@ -2754,20 +2746,20 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb) {
NTSTATUS NTSTATUS
nsDMA_tx_packet( nsDMA_tx_packet(
PSDevice pDevice, PSDevice pDevice,
UINT uDMAIdx, unsigned int uDMAIdx,
struct sk_buff *skb struct sk_buff *skb
) )
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT BytesToWrite =0,uHeaderLen = 0; unsigned int BytesToWrite = 0, uHeaderLen = 0;
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
WORD wAID; WORD wAID;
BYTE byPktType; BYTE byPktType;
BOOL bNeedEncryption = FALSE; BOOL bNeedEncryption = FALSE;
PSKeyItem pTransmitKey = NULL; PSKeyItem pTransmitKey = NULL;
SKeyItem STempKey; SKeyItem STempKey;
UINT ii; unsigned int ii;
BOOL bTKIP_UseGTK = FALSE; BOOL bTKIP_UseGTK = FALSE;
BOOL bNeedDeAuth = FALSE; BOOL bNeedDeAuth = FALSE;
PBYTE pbyBSSID; PBYTE pbyBSSID;
...@@ -2775,7 +2767,7 @@ nsDMA_tx_packet( ...@@ -2775,7 +2767,7 @@ nsDMA_tx_packet(
PUSB_SEND_CONTEXT pContext; PUSB_SEND_CONTEXT pContext;
BOOL fConvertedPacket; BOOL fConvertedPacket;
PTX_BUFFER pTX_Buffer; PTX_BUFFER pTX_Buffer;
UINT status; unsigned int status;
WORD wKeepRate = pDevice->wCurrentRate; WORD wKeepRate = pDevice->wCurrentRate;
struct net_device_stats* pStats = &pDevice->stats; struct net_device_stats* pStats = &pDevice->stats;
//#ifdef WPA_SM_Transtatus //#ifdef WPA_SM_Transtatus
...@@ -3177,12 +3169,12 @@ BOOL ...@@ -3177,12 +3169,12 @@ BOOL
bRelayPacketSend ( bRelayPacketSend (
PSDevice pDevice, PSDevice pDevice,
PBYTE pbySkbData, PBYTE pbySkbData,
UINT uDataLen, unsigned int uDataLen,
UINT uNodeIndex unsigned int uNodeIndex
) )
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT BytesToWrite =0,uHeaderLen = 0; unsigned int BytesToWrite = 0, uHeaderLen = 0;
BYTE byPktType = PK_TYPE_11B; BYTE byPktType = PK_TYPE_11B;
BOOL bNeedEncryption = FALSE; BOOL bNeedEncryption = FALSE;
SKeyItem STempKey; SKeyItem STempKey;
...@@ -3192,7 +3184,7 @@ bRelayPacketSend ( ...@@ -3192,7 +3184,7 @@ bRelayPacketSend (
BYTE byPktTyp; BYTE byPktTyp;
BOOL fConvertedPacket; BOOL fConvertedPacket;
PTX_BUFFER pTX_Buffer; PTX_BUFFER pTX_Buffer;
UINT status; unsigned int status;
WORD wKeepRate = pDevice->wCurrentRate; WORD wKeepRate = pDevice->wCurrentRate;
......
...@@ -671,21 +671,24 @@ bPacketToWirelessUsb( ...@@ -671,21 +671,24 @@ bPacketToWirelessUsb(
BYTE byPktType, BYTE byPktType,
PBYTE usbPacketBuf, PBYTE usbPacketBuf,
BOOL bNeedEncrypt, BOOL bNeedEncrypt,
UINT cbPayloadSize, unsigned int cbPayloadSize,
UINT uDMAIdx, unsigned int uDMAIdx,
PSEthernetHeader psEthHeader, PSEthernetHeader psEthHeader,
PBYTE pPacket, PBYTE pPacket,
PSKeyItem pTransmitKey, PSKeyItem pTransmitKey,
UINT uNodeIndex, unsigned int uNodeIndex,
WORD wCurrentRate, WORD wCurrentRate,
UINT *pcbHeaderLen, unsigned int *pcbHeaderLen,
UINT *pcbTotalLen unsigned int *pcbTotalLen
); );
void vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb); void vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb);
NTSTATUS nsDMA_tx_packet(PSDevice pDevice, UINT uDMAIdx, struct sk_buff *skb); NTSTATUS nsDMA_tx_packet(PSDevice pDevice,
unsigned int uDMAIdx,
struct sk_buff *skb);
CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket); CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket);
CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket); CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket);
BOOL bRelayPacketSend(PSDevice pDevice, PBYTE pbySkbData, UINT uDataLen, UINT uNodeIndex); BOOL bRelayPacketSend(PSDevice pDevice, PBYTE pbySkbData,
unsigned int uDataLen, unsigned int uNodeIndex);
#endif /* __RXTX_H__ */ #endif /* __RXTX_H__ */
...@@ -132,7 +132,7 @@ static const DWORD s_adwCrc32Table[256] = { ...@@ -132,7 +132,7 @@ static const DWORD s_adwCrc32Table[256] = {
* Return Value: CRC-32 * Return Value: CRC-32
* *
-*/ -*/
DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed) DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed)
{ {
DWORD dwCrc; DWORD dwCrc;
...@@ -165,7 +165,7 @@ DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed) ...@@ -165,7 +165,7 @@ DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed)
* Return Value: CRC-32 * Return Value: CRC-32
* *
-*/ -*/
DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte) DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte)
{ {
return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL); return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL);
} }
...@@ -191,7 +191,7 @@ DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte) ...@@ -191,7 +191,7 @@ DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte)
* Return Value: CRC-32 * Return Value: CRC-32
* *
-*/ -*/
DWORD CRCdwGetCrc32Ex(PBYTE pbyData, UINT cbByte, DWORD dwPreCRC) DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC)
{ {
return CRCdwCrc32(pbyData, cbByte, dwPreCRC); return CRCdwCrc32(pbyData, cbByte, dwPreCRC);
} }
......
...@@ -43,8 +43,8 @@ ...@@ -43,8 +43,8 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
DWORD CRCdwCrc32(PBYTE pbyData, UINT cbByte, DWORD dwCrcSeed); DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed);
DWORD CRCdwGetCrc32(PBYTE pbyData, UINT cbByte); DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte);
DWORD CRCdwGetCrc32Ex(PBYTE pbyData, UINT cbByte, DWORD dwPreCRC); DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC);
#endif /* __TCRC_H__ */ #endif /* __TCRC_H__ */
...@@ -96,7 +96,7 @@ BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr) ...@@ -96,7 +96,7 @@ BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr)
* Return Value: TRUE if ok; FALSE if error. * Return Value: TRUE if ok; FALSE if error.
* *
*/ */
BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, UINT cbFrameLength) BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength)
{ {
DWORD dwCRC; DWORD dwCRC;
......
...@@ -228,6 +228,6 @@ S802_11Header, *PS802_11Header; ...@@ -228,6 +228,6 @@ S802_11Header, *PS802_11Header;
BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr); BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr);
//BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr); //BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr);
BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, UINT cbFrameLength); BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength);
#endif /* __TETHER_H__ */ #endif /* __TETHER_H__ */
...@@ -72,12 +72,6 @@ typedef int BOOL; ...@@ -72,12 +72,6 @@ typedef int BOOL;
/****** Simple typedefs ***************************************************/ /****** Simple typedefs ***************************************************/
typedef unsigned char UCHAR;
typedef unsigned short USHORT;
typedef unsigned int UINT;
typedef unsigned long ULONG;
typedef unsigned long long ULONGLONG; //64 bit
typedef unsigned char BYTE; // 8-bit typedef unsigned char BYTE; // 8-bit
typedef unsigned short WORD; // 16-bit typedef unsigned short WORD; // 16-bit
typedef unsigned long DWORD; // 32-bit typedef unsigned long DWORD; // 32-bit
......
...@@ -141,7 +141,7 @@ ...@@ -141,7 +141,7 @@
#define PCAvDelayByIO(uDelayUnit) { \ #define PCAvDelayByIO(uDelayUnit) { \
BYTE byData; \ BYTE byData; \
ULONG ii; \ unsigned long ii; \
\ \
if (uDelayUnit <= 50) { \ if (uDelayUnit <= 50) { \
udelay(uDelayUnit); \ udelay(uDelayUnit); \
......
...@@ -484,12 +484,11 @@ s_nsInterruptUsbIoCompleteRead( ...@@ -484,12 +484,11 @@ s_nsInterruptUsbIoCompleteRead(
pDevice->fKillEventPollingThread = TRUE; pDevice->fKillEventPollingThread = TRUE;
// } // }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"IntUSBIoCompleteControl STATUS = %d\n", ntStatus ); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"IntUSBIoCompleteControl STATUS = %d\n", ntStatus );
} } else {
else { pDevice->ulIntInBytesRead += (unsigned long) urb->actual_length;
pDevice->ulIntInBytesRead += (ULONG)urb->actual_length; pDevice->ulIntInContCRCError = 0;
pDevice->ulIntInContCRCError = 0; pDevice->bEventAvailable = TRUE;
pDevice->bEventAvailable = TRUE; INTnsProcessData(pDevice);
INTnsProcessData(pDevice);
} }
STAvUpdateUSBCounter(&pDevice->scStatistic.USB_InterruptStat, ntStatus); STAvUpdateUSBCounter(&pDevice->scStatistic.USB_InterruptStat, ntStatus);
...@@ -614,7 +613,7 @@ s_nsBulkInUsbIoCompleteRead( ...@@ -614,7 +613,7 @@ s_nsBulkInUsbIoCompleteRead(
{ {
PRCB pRCB = (PRCB)urb->context; PRCB pRCB = (PRCB)urb->context;
PSDevice pDevice = (PSDevice)pRCB->pDevice; PSDevice pDevice = (PSDevice)pRCB->pDevice;
ULONG bytesRead; unsigned long bytesRead;
BOOL bIndicateReceive = FALSE; BOOL bIndicateReceive = FALSE;
BOOL bReAllocSkb = FALSE; BOOL bReAllocSkb = FALSE;
NTSTATUS status; NTSTATUS status;
...@@ -774,7 +773,7 @@ s_nsBulkOutIoCompleteWrite( ...@@ -774,7 +773,7 @@ s_nsBulkOutIoCompleteWrite(
PSDevice pDevice; PSDevice pDevice;
NTSTATUS status; NTSTATUS status;
CONTEXT_TYPE ContextType; CONTEXT_TYPE ContextType;
ULONG ulBufLen; unsigned long ulBufLen;
PUSB_SEND_CONTEXT pContext; PUSB_SEND_CONTEXT pContext;
......
...@@ -219,7 +219,7 @@ s_vProbeChannel( ...@@ -219,7 +219,7 @@ s_vProbeChannel(
PBYTE pbyRate; PBYTE pbyRate;
PSTxMgmtPacket pTxPacket; PSTxMgmtPacket pTxPacket;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
UINT ii; unsigned int ii;
if (pDevice->byBBType == BB_TYPE_11A) { if (pDevice->byBBType == BB_TYPE_11A) {
...@@ -316,15 +316,15 @@ s_MgrMakeProbeRequest( ...@@ -316,15 +316,15 @@ s_MgrMakeProbeRequest(
return pTxPacket; return pTxPacket;
} }
void vCommandTimerWait(void *hDeviceContext, UINT MSecond) void vCommandTimerWait(void *hDeviceContext, unsigned int MSecond)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
init_timer(&pDevice->sTimerCommand); init_timer(&pDevice->sTimerCommand);
pDevice->sTimerCommand.data = (ULONG)pDevice; pDevice->sTimerCommand.data = (unsigned long)pDevice;
pDevice->sTimerCommand.function = (TimerFunction)vRunCommand; pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
// RUN_AT :1 msec ~= (HZ/1024) // RUN_AT :1 msec ~= (HZ/1024)
pDevice->sTimerCommand.expires = (UINT)RUN_AT((MSecond * HZ) >> 10); pDevice->sTimerCommand.expires = (unsigned int)RUN_AT((MSecond * HZ) >> 10);
add_timer(&pDevice->sTimerCommand); add_timer(&pDevice->sTimerCommand);
return; return;
} }
...@@ -336,7 +336,7 @@ void vRunCommand(void *hDeviceContext) ...@@ -336,7 +336,7 @@ void vRunCommand(void *hDeviceContext)
PWLAN_IE_SSID pItemSSID; PWLAN_IE_SSID pItemSSID;
PWLAN_IE_SSID pItemSSIDCurr; PWLAN_IE_SSID pItemSSIDCurr;
CMD_STATUS Status; CMD_STATUS Status;
UINT ii; unsigned int ii;
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
struct sk_buff *skb; struct sk_buff *skb;
BYTE byData; BYTE byData;
...@@ -760,7 +760,7 @@ void vRunCommand(void *hDeviceContext) ...@@ -760,7 +760,7 @@ void vRunCommand(void *hDeviceContext)
// printk("Re-initial TxDataTimer****\n"); // printk("Re-initial TxDataTimer****\n");
del_timer(&pDevice->sTimerTxData); del_timer(&pDevice->sTimerTxData);
init_timer(&pDevice->sTimerTxData); init_timer(&pDevice->sTimerTxData);
pDevice->sTimerTxData.data = (ULONG)pDevice; pDevice->sTimerTxData.data = (unsigned long) pDevice;
pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData; pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData;
pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
pDevice->fTxDataInSleep = FALSE; pDevice->fTxDataInSleep = FALSE;
...@@ -1264,8 +1264,8 @@ BOOL bScheduleCommand(void *hDeviceContext, ...@@ -1264,8 +1264,8 @@ BOOL bScheduleCommand(void *hDeviceContext,
static BOOL s_bClearBSSID_SCAN(void *hDeviceContext) static BOOL s_bClearBSSID_SCAN(void *hDeviceContext)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
UINT uCmdDequeueIdx = pDevice->uCmdDequeueIdx; unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;
UINT ii; unsigned int ii;
if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) { if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) {
for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii ++) { for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii ++) {
...@@ -1289,7 +1289,7 @@ void vResetCommandTimer(void *hDeviceContext) ...@@ -1289,7 +1289,7 @@ void vResetCommandTimer(void *hDeviceContext)
del_timer(&pDevice->sTimerCommand); del_timer(&pDevice->sTimerCommand);
//init timer //init timer
init_timer(&pDevice->sTimerCommand); init_timer(&pDevice->sTimerCommand);
pDevice->sTimerCommand.data = (ULONG)pDevice; pDevice->sTimerCommand.data = (unsigned long)pDevice;
pDevice->sTimerCommand.function = (TimerFunction)vRunCommand; pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
pDevice->sTimerCommand.expires = RUN_AT(HZ); pDevice->sTimerCommand.expires = RUN_AT(HZ);
pDevice->cbFreeCmdQueue = CMD_Q_SIZE; pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader)
{ {
UINT uIndex; unsigned int uIndex;
UINT ii; unsigned int ii;
PSCacheEntry pCacheEntry; PSCacheEntry pCacheEntry;
if (IS_FC_RETRY(pMACHeader)) { if (IS_FC_RETRY(pMACHeader)) {
...@@ -111,9 +111,9 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader) ...@@ -111,9 +111,9 @@ BOOL WCTLbIsDuplicate (PSCache pCache, PS802_11Header pMACHeader)
* Return Value: index number in Defragment Database * Return Value: index number in Defragment Database
* *
*/ */
UINT WCTLuSearchDFCB (PSDevice pDevice, PS802_11Header pMACHeader) unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader)
{ {
UINT ii; unsigned int ii;
for(ii=0;ii<pDevice->cbDFCB;ii++) { for(ii=0;ii<pDevice->cbDFCB;ii++) {
if ((pDevice->sRxDFCB[ii].bInUse == TRUE) && if ((pDevice->sRxDFCB[ii].bInUse == TRUE) &&
...@@ -141,9 +141,9 @@ UINT ii; ...@@ -141,9 +141,9 @@ UINT ii;
* Return Value: index number in Defragment Database * Return Value: index number in Defragment Database
* *
*/ */
UINT WCTLuInsertDFCB (PSDevice pDevice, PS802_11Header pMACHeader) unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader)
{ {
UINT ii; unsigned int ii;
if (pDevice->cbFreeDFCB == 0) if (pDevice->cbFreeDFCB == 0)
return(pDevice->cbDFCB); return(pDevice->cbDFCB);
...@@ -180,9 +180,10 @@ UINT ii; ...@@ -180,9 +180,10 @@ UINT ii;
* Return Value: TRUE if it is valid fragment packet and we have resource to defragment; otherwise FALSE * Return Value: TRUE if it is valid fragment packet and we have resource to defragment; otherwise FALSE
* *
*/ */
BOOL WCTLbHandleFragment (PSDevice pDevice, PS802_11Header pMACHeader, UINT cbFrameLength, BOOL bWEP, BOOL bExtIV) BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader,
unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV)
{ {
UINT uHeaderSize; unsigned int uHeaderSize;
if (bWEP == TRUE) { if (bWEP == TRUE) {
......
...@@ -90,7 +90,6 @@ ...@@ -90,7 +90,6 @@
(uVar)++; \ (uVar)++; \
} }
/*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
...@@ -98,8 +97,9 @@ ...@@ -98,8 +97,9 @@
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
BOOL WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader); BOOL WCTLbIsDuplicate(PSCache pCache, PS802_11Header pMACHeader);
BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader, UINT cbFrameLength, BOOL bWEP, BOOL bExtIV); BOOL WCTLbHandleFragment(PSDevice pDevice, PS802_11Header pMACHeader,
UINT WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader); unsigned int cbFrameLength, BOOL bWEP, BOOL bExtIV);
UINT WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader); unsigned int WCTLuSearchDFCB(PSDevice pDevice, PS802_11Header pMACHeader);
unsigned int WCTLuInsertDFCB(PSDevice pDevice, PS802_11Header pMACHeader);
#endif /* __WCTL_H__ */ #endif /* __WCTL_H__ */
...@@ -118,7 +118,7 @@ s_vMgrRxAssocRequest( ...@@ -118,7 +118,7 @@ s_vMgrRxAssocRequest(
PSDevice pDevice, PSDevice pDevice,
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
PSRxMgmtPacket pRxPacket, PSRxMgmtPacket pRxPacket,
UINT uNodeIndex unsigned int uNodeIndex
); );
static static
...@@ -242,7 +242,7 @@ s_MgrMakeBeacon( ...@@ -242,7 +242,7 @@ s_MgrMakeBeacon(
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
WORD wCurrCapInfo, WORD wCurrCapInfo,
WORD wCurrBeaconPeriod, WORD wCurrBeaconPeriod,
UINT uCurrChannel, unsigned int uCurrChannel,
WORD wCurrATIMWinodw, WORD wCurrATIMWinodw,
PWLAN_IE_SSID pCurrSSID, PWLAN_IE_SSID pCurrSSID,
PBYTE pCurrBSSID, PBYTE pCurrBSSID,
...@@ -287,7 +287,7 @@ s_MgrMakeProbeResponse( ...@@ -287,7 +287,7 @@ s_MgrMakeProbeResponse(
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
WORD wCurrCapInfo, WORD wCurrCapInfo,
WORD wCurrBeaconPeriod, WORD wCurrBeaconPeriod,
UINT uCurrChannel, unsigned int uCurrChannel,
WORD wCurrATIMWinodw, WORD wCurrATIMWinodw,
PBYTE pDstAddr, PBYTE pDstAddr,
PWLAN_IE_SSID pCurrSSID, PWLAN_IE_SSID pCurrSSID,
...@@ -310,7 +310,7 @@ static ...@@ -310,7 +310,7 @@ static
void void
s_vMgrSynchBSS ( s_vMgrSynchBSS (
PSDevice pDevice, PSDevice pDevice,
UINT uBSSMode, unsigned int uBSSMode,
PKnownBSS pCurr, PKnownBSS pCurr,
PCMD_STATUS pStatus PCMD_STATUS pStatus
); );
...@@ -364,19 +364,19 @@ void vMgrObjectInit(void *hDeviceContext) ...@@ -364,19 +364,19 @@ void vMgrObjectInit(void *hDeviceContext)
BSSvClearBSSList((void *) pDevice, FALSE); BSSvClearBSSList((void *) pDevice, FALSE);
init_timer(&pMgmt->sTimerSecondCallback); init_timer(&pMgmt->sTimerSecondCallback);
pMgmt->sTimerSecondCallback.data = (ULONG)pDevice; pMgmt->sTimerSecondCallback.data = (unsigned long)pDevice;
pMgmt->sTimerSecondCallback.function = (TimerFunction)BSSvSecondCallBack; pMgmt->sTimerSecondCallback.function = (TimerFunction)BSSvSecondCallBack;
pMgmt->sTimerSecondCallback.expires = RUN_AT(HZ); pMgmt->sTimerSecondCallback.expires = RUN_AT(HZ);
init_timer(&pDevice->sTimerCommand); init_timer(&pDevice->sTimerCommand);
pDevice->sTimerCommand.data = (ULONG)pDevice; pDevice->sTimerCommand.data = (unsigned long)pDevice;
pDevice->sTimerCommand.function = (TimerFunction)vRunCommand; pDevice->sTimerCommand.function = (TimerFunction)vRunCommand;
pDevice->sTimerCommand.expires = RUN_AT(HZ); pDevice->sTimerCommand.expires = RUN_AT(HZ);
//2007-0115-10<Add>by MikeLiu //2007-0115-10<Add>by MikeLiu
#ifdef TxInSleep #ifdef TxInSleep
init_timer(&pDevice->sTimerTxData); init_timer(&pDevice->sTimerTxData);
pDevice->sTimerTxData.data = (ULONG)pDevice; pDevice->sTimerTxData.data = (unsigned long)pDevice;
pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData; pDevice->sTimerTxData.function = (TimerFunction)BSSvSecondTxData;
pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback pDevice->sTimerTxData.expires = RUN_AT(10*HZ); //10s callback
pDevice->fTxDataInSleep = FALSE; pDevice->fTxDataInSleep = FALSE;
...@@ -619,7 +619,7 @@ s_vMgrRxAssocRequest( ...@@ -619,7 +619,7 @@ s_vMgrRxAssocRequest(
PSDevice pDevice, PSDevice pDevice,
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
PSRxMgmtPacket pRxPacket, PSRxMgmtPacket pRxPacket,
UINT uNodeIndex unsigned int uNodeIndex
) )
{ {
WLAN_FR_ASSOCREQ sFrame; WLAN_FR_ASSOCREQ sFrame;
...@@ -627,7 +627,7 @@ s_vMgrRxAssocRequest( ...@@ -627,7 +627,7 @@ s_vMgrRxAssocRequest(
PSTxMgmtPacket pTxPacket; PSTxMgmtPacket pTxPacket;
WORD wAssocStatus = 0; WORD wAssocStatus = 0;
WORD wAssocAID = 0; WORD wAssocAID = 0;
UINT uRateLen = WLAN_RATES_MAXLEN; unsigned int uRateLen = WLAN_RATES_MAXLEN;
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
...@@ -775,7 +775,7 @@ s_vMgrRxReAssocRequest( ...@@ -775,7 +775,7 @@ s_vMgrRxReAssocRequest(
PSDevice pDevice, PSDevice pDevice,
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
PSRxMgmtPacket pRxPacket, PSRxMgmtPacket pRxPacket,
UINT uNodeIndex unsigned int uNodeIndex
) )
{ {
WLAN_FR_REASSOCREQ sFrame; WLAN_FR_REASSOCREQ sFrame;
...@@ -783,7 +783,7 @@ s_vMgrRxReAssocRequest( ...@@ -783,7 +783,7 @@ s_vMgrRxReAssocRequest(
PSTxMgmtPacket pTxPacket; PSTxMgmtPacket pTxPacket;
WORD wAssocStatus = 0; WORD wAssocStatus = 0;
WORD wAssocAID = 0; WORD wAssocAID = 0;
UINT uRateLen = WLAN_RATES_MAXLEN; unsigned int uRateLen = WLAN_RATES_MAXLEN;
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
...@@ -1257,7 +1257,7 @@ s_vMgrRxAuthenSequence_1( ...@@ -1257,7 +1257,7 @@ s_vMgrRxAuthenSequence_1(
) )
{ {
PSTxMgmtPacket pTxPacket = NULL; PSTxMgmtPacket pTxPacket = NULL;
UINT uNodeIndex; unsigned int uNodeIndex;
WLAN_FR_AUTHEN sFrame; WLAN_FR_AUTHEN sFrame;
PSKeyItem pTransmitKey; PSKeyItem pTransmitKey;
...@@ -1464,8 +1464,8 @@ s_vMgrRxAuthenSequence_3( ...@@ -1464,8 +1464,8 @@ s_vMgrRxAuthenSequence_3(
) )
{ {
PSTxMgmtPacket pTxPacket = NULL; PSTxMgmtPacket pTxPacket = NULL;
UINT uStatusCode = 0 ; unsigned int uStatusCode = 0 ;
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
WLAN_FR_AUTHEN sFrame; WLAN_FR_AUTHEN sFrame;
if (!WLAN_GET_FC_ISWEP(pFrame->pHdr->sA3.wFrameCtl)) { if (!WLAN_GET_FC_ISWEP(pFrame->pHdr->sA3.wFrameCtl)) {
...@@ -1590,7 +1590,7 @@ s_vMgrRxDisassociation( ...@@ -1590,7 +1590,7 @@ s_vMgrRxDisassociation(
) )
{ {
WLAN_FR_DISASSOC sFrame; WLAN_FR_DISASSOC sFrame;
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
CMD_STATUS CmdStatus; CMD_STATUS CmdStatus;
viawget_wpa_header *wpahdr; viawget_wpa_header *wpahdr;
...@@ -1680,7 +1680,7 @@ s_vMgrRxDeauthentication( ...@@ -1680,7 +1680,7 @@ s_vMgrRxDeauthentication(
) )
{ {
WLAN_FR_DEAUTHEN sFrame; WLAN_FR_DEAUTHEN sFrame;
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
viawget_wpa_header *wpahdr; viawget_wpa_header *wpahdr;
...@@ -1817,17 +1817,17 @@ s_vMgrRxBeacon( ...@@ -1817,17 +1817,17 @@ s_vMgrRxBeacon(
BOOL bUpdateTSF = FALSE; BOOL bUpdateTSF = FALSE;
BOOL bIsAPBeacon = FALSE; BOOL bIsAPBeacon = FALSE;
BOOL bIsChannelEqual = FALSE; BOOL bIsChannelEqual = FALSE;
UINT uLocateByteIndex; unsigned int uLocateByteIndex;
BYTE byTIMBitOn = 0; BYTE byTIMBitOn = 0;
WORD wAIDNumber = 0; WORD wAIDNumber = 0;
UINT uNodeIndex; unsigned int uNodeIndex;
QWORD qwTimestamp, qwLocalTSF; QWORD qwTimestamp, qwLocalTSF;
QWORD qwCurrTSF; QWORD qwCurrTSF;
WORD wStartIndex = 0; WORD wStartIndex = 0;
WORD wAIDIndex = 0; WORD wAIDIndex = 0;
BYTE byCurrChannel = pRxPacket->byRxChannel; BYTE byCurrChannel = pRxPacket->byRxChannel;
ERPObject sERP; ERPObject sERP;
UINT uRateLen = WLAN_RATES_MAXLEN; unsigned int uRateLen = WLAN_RATES_MAXLEN;
BOOL bChannelHit = FALSE; BOOL bChannelHit = FALSE;
BYTE byOldPreambleType; BYTE byOldPreambleType;
...@@ -2336,7 +2336,7 @@ void vMgrCreateOwnIBSS(void *hDeviceContext, ...@@ -2336,7 +2336,7 @@ void vMgrCreateOwnIBSS(void *hDeviceContext,
BYTE byTopCCKBasicRate; BYTE byTopCCKBasicRate;
BYTE byTopOFDMBasicRate; BYTE byTopOFDMBasicRate;
QWORD qwCurrTSF; QWORD qwCurrTSF;
UINT ii; unsigned int ii;
BYTE abyRATE[] = {0x82, 0x84, 0x8B, 0x96, 0x24, 0x30, 0x48, 0x6C, 0x0C, 0x12, 0x18, 0x60}; BYTE abyRATE[] = {0x82, 0x84, 0x8B, 0x96, 0x24, 0x30, 0x48, 0x6C, 0x0C, 0x12, 0x18, 0x60};
BYTE abyCCK_RATE[] = {0x82, 0x84, 0x8B, 0x96}; BYTE abyCCK_RATE[] = {0x82, 0x84, 0x8B, 0x96};
BYTE abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C}; BYTE abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
...@@ -2601,11 +2601,11 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) ...@@ -2601,11 +2601,11 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus)
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
PKnownBSS pCurr = NULL; PKnownBSS pCurr = NULL;
UINT ii, uu; unsigned int ii, uu;
PWLAN_IE_SUPP_RATES pItemRates = NULL; PWLAN_IE_SUPP_RATES pItemRates = NULL;
PWLAN_IE_SUPP_RATES pItemExtRates = NULL; PWLAN_IE_SUPP_RATES pItemExtRates = NULL;
PWLAN_IE_SSID pItemSSID; PWLAN_IE_SSID pItemSSID;
UINT uRateLen = WLAN_RATES_MAXLEN; unsigned int uRateLen = WLAN_RATES_MAXLEN;
WORD wMaxBasicRate = RATE_1M; WORD wMaxBasicRate = RATE_1M;
WORD wMaxSuppRate = RATE_1M; WORD wMaxSuppRate = RATE_1M;
WORD wSuppRate; WORD wSuppRate;
...@@ -2705,9 +2705,10 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus) ...@@ -2705,9 +2705,10 @@ void vMgrJoinBSSBegin(void *hDeviceContext, PCMD_STATUS pStatus)
uRateLen); uRateLen);
// Stuffing Rate IE // Stuffing Rate IE
if ((pItemExtRates->len > 0) && (pItemRates->len < 8)) { if ((pItemExtRates->len > 0) && (pItemRates->len < 8)) {
for (ii = 0; ii < (UINT)(8 - pItemRates->len); ) { for (ii = 0; ii < (unsigned int) (8 - pItemRates->len); ) {
pItemRates->abyRates[pItemRates->len + ii] = pItemExtRates->abyRates[ii]; pItemRates->abyRates[pItemRates->len + ii] =
ii ++; pItemExtRates->abyRates[ii];
ii++;
if (pItemExtRates->len <= ii) if (pItemExtRates->len <= ii)
break; break;
} }
...@@ -2931,7 +2932,7 @@ static ...@@ -2931,7 +2932,7 @@ static
void void
s_vMgrSynchBSS ( s_vMgrSynchBSS (
PSDevice pDevice, PSDevice pDevice,
UINT uBSSMode, unsigned int uBSSMode,
PKnownBSS pCurr, PKnownBSS pCurr,
PCMD_STATUS pStatus PCMD_STATUS pStatus
) )
...@@ -3096,7 +3097,7 @@ s_vMgrSynchBSS ( ...@@ -3096,7 +3097,7 @@ s_vMgrSynchBSS (
) )
{ {
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
// UINT ii , uSameBssidNum=0; /* unsigned int ii, uSameBssidNum=0; */
// for (ii = 0; ii < MAX_BSS_NUM; ii++) { // for (ii = 0; ii < MAX_BSS_NUM; ii++) {
// if (pMgmt->sBSSList[ii].bActive && // if (pMgmt->sBSSList[ii].bActive &&
...@@ -3155,7 +3156,7 @@ s_vMgrFormatTIM( ...@@ -3155,7 +3156,7 @@ s_vMgrFormatTIM(
{ {
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80}; BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
BYTE byMap; BYTE byMap;
UINT ii, jj; unsigned int ii, jj;
BOOL bStartFound = FALSE; BOOL bStartFound = FALSE;
BOOL bMulticast = FALSE; BOOL bMulticast = FALSE;
WORD wStartIndex = 0; WORD wStartIndex = 0;
...@@ -3228,7 +3229,7 @@ s_MgrMakeBeacon( ...@@ -3228,7 +3229,7 @@ s_MgrMakeBeacon(
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
WORD wCurrCapInfo, WORD wCurrCapInfo,
WORD wCurrBeaconPeriod, WORD wCurrBeaconPeriod,
UINT uCurrChannel, unsigned int uCurrChannel,
WORD wCurrATIMWinodw, WORD wCurrATIMWinodw,
PWLAN_IE_SSID pCurrSSID, PWLAN_IE_SSID pCurrSSID,
PBYTE pCurrBSSID, PBYTE pCurrBSSID,
...@@ -3402,7 +3403,7 @@ s_MgrMakeProbeResponse( ...@@ -3402,7 +3403,7 @@ s_MgrMakeProbeResponse(
PSMgmtObject pMgmt, PSMgmtObject pMgmt,
WORD wCurrCapInfo, WORD wCurrCapInfo,
WORD wCurrBeaconPeriod, WORD wCurrBeaconPeriod,
UINT uCurrChannel, unsigned int uCurrChannel,
WORD wCurrATIMWinodw, WORD wCurrATIMWinodw,
PBYTE pDstAddr, PBYTE pDstAddr,
PWLAN_IE_SSID pCurrSSID, PWLAN_IE_SSID pCurrSSID,
...@@ -3672,7 +3673,7 @@ s_MgrMakeAssocRequest( ...@@ -3672,7 +3673,7 @@ s_MgrMakeAssocRequest(
} else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
(pMgmt->pCurrBSS != NULL)) { (pMgmt->pCurrBSS != NULL)) {
UINT ii; unsigned int ii;
PWORD pwPMKID; PWORD pwPMKID;
// WPA IE // WPA IE
...@@ -3932,7 +3933,7 @@ s_MgrMakeReAssocRequest( ...@@ -3932,7 +3933,7 @@ s_MgrMakeReAssocRequest(
} else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) || } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
(pMgmt->pCurrBSS != NULL)) { (pMgmt->pCurrBSS != NULL)) {
UINT ii; unsigned int ii;
PWORD pwPMKID; PWORD pwPMKID;
/* WPA IE */ /* WPA IE */
...@@ -4422,7 +4423,7 @@ void vMgrRxManagePacket(void *hDeviceContext, ...@@ -4422,7 +4423,7 @@ void vMgrRxManagePacket(void *hDeviceContext,
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
BOOL bInScan = FALSE; BOOL bInScan = FALSE;
UINT uNodeIndex = 0; unsigned int uNodeIndex = 0;
NODE_STATE eNodeState = 0; NODE_STATE eNodeState = 0;
CMD_STATUS Status; CMD_STATUS Status;
...@@ -4689,7 +4690,7 @@ BOOL bAdd_PMKID_Candidate(void *hDeviceContext, ...@@ -4689,7 +4690,7 @@ BOOL bAdd_PMKID_Candidate(void *hDeviceContext,
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PPMKID_CANDIDATE pCandidateList; PPMKID_CANDIDATE pCandidateList;
UINT ii = 0; unsigned int ii = 0;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
......
...@@ -84,37 +84,37 @@ ...@@ -84,37 +84,37 @@
//mike define: make timer to expire after desired times //mike define: make timer to expire after desired times
#define timer_expire(timer,next_tick) mod_timer(&timer, RUN_AT(next_tick)) #define timer_expire(timer,next_tick) mod_timer(&timer, RUN_AT(next_tick))
typedef void (*TimerFunction)(ULONG); typedef void (*TimerFunction)(unsigned long);
//+++ NDIS related //+++ NDIS related
typedef UCHAR NDIS_802_11_MAC_ADDRESS[6]; typedef unsigned char NDIS_802_11_MAC_ADDRESS[ETH_ALEN];
typedef struct _NDIS_802_11_AI_REQFI typedef struct _NDIS_802_11_AI_REQFI
{ {
USHORT Capabilities; unsigned short Capabilities;
USHORT ListenInterval; unsigned short ListenInterval;
NDIS_802_11_MAC_ADDRESS CurrentAPAddress; NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
typedef struct _NDIS_802_11_AI_RESFI typedef struct _NDIS_802_11_AI_RESFI
{ {
USHORT Capabilities; unsigned short Capabilities;
USHORT StatusCode; unsigned short StatusCode;
USHORT AssociationId; unsigned short AssociationId;
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
{ {
ULONG Length; unsigned long Length;
USHORT AvailableRequestFixedIEs; unsigned short AvailableRequestFixedIEs;
NDIS_802_11_AI_REQFI RequestFixedIEs; NDIS_802_11_AI_REQFI RequestFixedIEs;
ULONG RequestIELength; unsigned long RequestIELength;
ULONG OffsetRequestIEs; unsigned long OffsetRequestIEs;
USHORT AvailableResponseFixedIEs; unsigned short AvailableResponseFixedIEs;
NDIS_802_11_AI_RESFI ResponseFixedIEs; NDIS_802_11_AI_RESFI ResponseFixedIEs;
ULONG ResponseIELength; unsigned long ResponseIELength;
ULONG OffsetResponseIEs; unsigned long OffsetResponseIEs;
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
...@@ -123,7 +123,7 @@ typedef struct tagSAssocInfo { ...@@ -123,7 +123,7 @@ typedef struct tagSAssocInfo {
NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo; NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo;
BYTE abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN]; BYTE abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN];
// store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION // store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION
ULONG RequestIELength; unsigned long RequestIELength;
BYTE abyReqIEs[WLAN_BEACON_FR_MAXLEN]; BYTE abyReqIEs[WLAN_BEACON_FR_MAXLEN];
} SAssocInfo, *PSAssocInfo; } SAssocInfo, *PSAssocInfo;
//--- //---
...@@ -222,8 +222,8 @@ typedef enum tagWMAC_POWER_MODE { ...@@ -222,8 +222,8 @@ typedef enum tagWMAC_POWER_MODE {
typedef struct tagSTxMgmtPacket { typedef struct tagSTxMgmtPacket {
PUWLAN_80211HDR p80211Header; PUWLAN_80211HDR p80211Header;
UINT cbMPDULen; unsigned int cbMPDULen;
UINT cbPayloadLen; unsigned int cbPayloadLen;
} STxMgmtPacket, *PSTxMgmtPacket; } STxMgmtPacket, *PSTxMgmtPacket;
...@@ -233,9 +233,9 @@ typedef struct tagSRxMgmtPacket { ...@@ -233,9 +233,9 @@ typedef struct tagSRxMgmtPacket {
PUWLAN_80211HDR p80211Header; PUWLAN_80211HDR p80211Header;
QWORD qwLocalTSF; QWORD qwLocalTSF;
UINT cbMPDULen; unsigned int cbMPDULen;
UINT cbPayloadLen; unsigned int cbPayloadLen;
UINT uRSSI; unsigned int uRSSI;
BYTE bySQ; BYTE bySQ;
BYTE byRxRate; BYTE byRxRate;
BYTE byRxChannel; BYTE byRxChannel;
...@@ -272,21 +272,21 @@ typedef struct tagSMgmtObject ...@@ -272,21 +272,21 @@ typedef struct tagSMgmtObject
BOOL bCurrBSSIDFilterOn; BOOL bCurrBSSIDFilterOn;
// Current state vars // Current state vars
UINT uCurrChannel; unsigned int uCurrChannel;
BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE abyCurrBSSID[WLAN_BSSID_LEN]; BYTE abyCurrBSSID[WLAN_BSSID_LEN];
WORD wCurrCapInfo; WORD wCurrCapInfo;
WORD wCurrAID; WORD wCurrAID;
UINT uRSSITrigger; unsigned int uRSSITrigger;
WORD wCurrATIMWindow; WORD wCurrATIMWindow;
WORD wCurrBeaconPeriod; WORD wCurrBeaconPeriod;
BOOL bIsDS; BOOL bIsDS;
BYTE byERPContext; BYTE byERPContext;
CMD_STATE eCommandState; CMD_STATE eCommandState;
UINT uScanChannel; unsigned int uScanChannel;
// Desire joinning BSS vars // Desire joinning BSS vars
BYTE abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
...@@ -301,22 +301,22 @@ typedef struct tagSMgmtObject ...@@ -301,22 +301,22 @@ typedef struct tagSMgmtObject
// Adhoc or AP configuration vars // Adhoc or AP configuration vars
WORD wIBSSBeaconPeriod; WORD wIBSSBeaconPeriod;
WORD wIBSSATIMWindow; WORD wIBSSATIMWindow;
UINT uIBSSChannel; unsigned int uIBSSChannel;
BYTE abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1]; BYTE abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
BYTE byAPBBType; BYTE byAPBBType;
BYTE abyWPAIE[MAX_WPA_IE_LEN]; BYTE abyWPAIE[MAX_WPA_IE_LEN];
WORD wWPAIELen; WORD wWPAIELen;
UINT uAssocCount; unsigned int uAssocCount;
BOOL bMoreData; BOOL bMoreData;
// Scan state vars // Scan state vars
WMAC_SCAN_STATE eScanState; WMAC_SCAN_STATE eScanState;
WMAC_SCAN_TYPE eScanType; WMAC_SCAN_TYPE eScanType;
UINT uScanStartCh; unsigned int uScanStartCh;
UINT uScanEndCh; unsigned int uScanEndCh;
WORD wScanSteps; WORD wScanSteps;
UINT uScanBSSType; unsigned int uScanBSSType;
// Desire scannig vars // Desire scannig vars
BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1]; BYTE abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
BYTE abyScanBSSID[WLAN_BSSID_LEN]; BYTE abyScanBSSID[WLAN_BSSID_LEN];
...@@ -344,8 +344,8 @@ typedef struct tagSMgmtObject ...@@ -344,8 +344,8 @@ typedef struct tagSMgmtObject
BYTE abyPSTxMap[MAX_NODE_NUM + 1]; BYTE abyPSTxMap[MAX_NODE_NUM + 1];
// managment command related // managment command related
UINT uCmdBusy; unsigned int uCmdBusy;
UINT uCmdHostAPBusy; unsigned int uCmdHostAPBusy;
// managment packet pool // managment packet pool
PBYTE pbyMgmtPacketPool; PBYTE pbyMgmtPacketPool;
...@@ -389,7 +389,7 @@ typedef struct tagSMgmtObject ...@@ -389,7 +389,7 @@ typedef struct tagSMgmtObject
BOOL bSwitchChannel; BOOL bSwitchChannel;
BYTE byNewChannel; BYTE byNewChannel;
PWLAN_IE_MEASURE_REP pCurrMeasureEIDRep; PWLAN_IE_MEASURE_REP pCurrMeasureEIDRep;
UINT uLengthOfRepEIDs; unsigned int uLengthOfRepEIDs;
BYTE abyCurrentMSRReq[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; BYTE abyCurrentMSRReq[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
BYTE abyCurrentMSRRep[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN]; BYTE abyCurrentMSRRep[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
BYTE abyIECountry[WLAN_A3FR_MAXLEN]; BYTE abyIECountry[WLAN_A3FR_MAXLEN];
......
...@@ -260,14 +260,14 @@ WPA2vParseRSN ( ...@@ -260,14 +260,14 @@ WPA2vParseRSN (
* Return Value: length of IEs. * Return Value: length of IEs.
* *
-*/ -*/
UINT unsigned int
WPA2uSetIEs(void *pMgmtHandle, WPA2uSetIEs(void *pMgmtHandle,
PWLAN_IE_RSN pRSNIEs PWLAN_IE_RSN pRSNIEs
) )
{ {
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle; PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle;
PBYTE pbyBuffer = NULL; PBYTE pbyBuffer = NULL;
UINT ii = 0; unsigned int ii = 0;
PWORD pwPMKID = NULL; PWORD pwPMKID = NULL;
if (pRSNIEs == NULL) { if (pRSNIEs == NULL) {
......
...@@ -45,7 +45,7 @@ typedef struct tagsPMKIDInfo { ...@@ -45,7 +45,7 @@ typedef struct tagsPMKIDInfo {
} PMKIDInfo, *PPMKIDInfo; } PMKIDInfo, *PPMKIDInfo;
typedef struct tagSPMKIDCache { typedef struct tagSPMKIDCache {
ULONG BSSIDInfoCount; unsigned long BSSIDInfoCount;
PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE]; PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE];
} SPMKIDCache, *PSPMKIDCache; } SPMKIDCache, *PSPMKIDCache;
...@@ -69,7 +69,7 @@ WPA2vParseRSN ( ...@@ -69,7 +69,7 @@ WPA2vParseRSN (
PWLAN_IE_RSN pRSN PWLAN_IE_RSN pRSN
); );
UINT unsigned int
WPA2uSetIEs( WPA2uSetIEs(
void *pMgmtHandle, void *pMgmtHandle,
PWLAN_IE_RSN pRSNIEs PWLAN_IE_RSN pRSNIEs
......
...@@ -52,9 +52,7 @@ typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, ...@@ -52,9 +52,7 @@ typedef enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
#define GENERIC_INFO_ELEM 0xdd #define GENERIC_INFO_ELEM 0xdd
#define RSN_INFO_ELEM 0x30 #define RSN_INFO_ELEM 0x30
typedef unsigned long long NDIS_802_11_KEY_RSC;
typedef ULONGLONG NDIS_802_11_KEY_RSC;
/*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Classes ----------------------------*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment