Staging: vt6655: remove PBYTE typedef

Use unsigned char * instead.

Signed-off-by: Charles Clément <caratorn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Charles Clément 2010-06-05 15:13:47 -07:00 committed by Greg Kroah-Hartman
parent b2e876b608
commit 2989e96f17
57 changed files with 503 additions and 503 deletions

View File

@ -282,8 +282,8 @@
#define WLAN_MGMT_GET_TIM_OFFSET(b) (((b) & ~BIT0) >> 1)
/* 3-Addr & 4-Addr */
#define WLAN_HDR_A3_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR3_LEN)
#define WLAN_HDR_A4_DATA_PTR(p) (((PBYTE)(p)) + WLAN_HDR_ADDR4_LEN)
#define WLAN_HDR_A3_DATA_PTR(p) (((unsigned char *)(p)) + WLAN_HDR_ADDR3_LEN)
#define WLAN_HDR_A4_DATA_PTR(p) (((unsigned char *)(p)) + WLAN_HDR_ADDR4_LEN)
/* IEEE ADDR */
#define IEEE_ADDR_UNIVERSAL 0x02

View File

@ -139,9 +139,9 @@ vMgrDecodeBeacon(
+ WLAN_BEACON_OFF_CAPINFO);
// Information elements
pItem = (PWLAN_IE)((PBYTE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)))
pItem = (PWLAN_IE)((unsigned char *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)))
+ WLAN_BEACON_OFF_SSID);
while( ((PBYTE)pItem) < (pFrame->pBuf + pFrame->len) ){
while( ((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len) ){
switch (pItem->byElementID) {
case WLAN_EID_SSID:
@ -223,7 +223,7 @@ vMgrDecodeBeacon(
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
}
return;
@ -386,7 +386,7 @@ vMgrDecodeAssocRequest(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_ASSOCREQ_OFF_SSID);
while (((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while (((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID){
case WLAN_EID_SSID:
if (pFrame->pSSID == NULL)
@ -418,7 +418,7 @@ vMgrDecodeAssocRequest(
pItem->byElementID);
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
}
return;
}
@ -488,9 +488,10 @@ vMgrDecodeAssocResponse(
+ WLAN_ASSOCRESP_OFF_SUPP_RATES);
pItem = (PWLAN_IE)(pFrame->pSuppRates);
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
if ((((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len)) &&
(pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem);
}
@ -564,7 +565,7 @@ vMgrDecodeReassocRequest(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_REASSOCREQ_OFF_SSID);
while(((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) {
while(((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len)) {
switch (pItem->byElementID){
case WLAN_EID_SSID:
@ -597,7 +598,7 @@ vMgrDecodeReassocRequest(
pItem->byElementID);
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
}
return;
}
@ -649,7 +650,7 @@ vMgrDecodeProbeRequest(
// Information elements
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)));
while( ((PBYTE)pItem) < (pFrame->pBuf + pFrame->len) ) {
while( ((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len) ) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
@ -672,7 +673,7 @@ vMgrDecodeProbeRequest(
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
}
return;
}
@ -746,7 +747,7 @@ vMgrDecodeProbeResponse(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_PROBERESP_OFF_SSID);
while( ((PBYTE)pItem) < (pFrame->pBuf + pFrame->len) ) {
while( ((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len) ) {
switch (pItem->byElementID) {
case WLAN_EID_SSID:
if (pFrame->pSSID == NULL)
@ -821,7 +822,7 @@ vMgrDecodeProbeResponse(
break;
}
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
}
return;
}
@ -890,7 +891,7 @@ vMgrDecodeAuthen(
pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
+ WLAN_AUTHEN_OFF_CHALLENGE);
if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE)) {
if ((((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE)) {
pFrame->pChallenge = (PWLAN_IE_CHALLENGE)pItem;
}
@ -1017,9 +1018,10 @@ vMgrDecodeReassocResponse(
+ WLAN_REASSOCRESP_OFF_SUPP_RATES);
pItem = (PWLAN_IE)(pFrame->pSuppRates);
pItem = (PWLAN_IE)(((PBYTE)pItem) + 2 + pItem->len);
pItem = (PWLAN_IE)(((unsigned char *)pItem) + 2 + pItem->len);
if ((((PBYTE)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
if ((((unsigned char *)pItem) < (pFrame->pBuf + pFrame->len)) &&
(pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
}
return;

View File

@ -497,7 +497,7 @@ typedef struct tagWLAN_FR_MGMT {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
} WLAN_FR_MGMT, *PWLAN_FR_MGMT;
@ -507,7 +507,7 @@ typedef struct tagWLAN_FR_BEACON {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
// fixed fields
PQWORD pqwTimestamp;
@ -539,7 +539,7 @@ typedef struct tagWLAN_FR_IBSSATIM {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
// fixed fields
@ -553,7 +553,7 @@ typedef struct tagWLAN_FR_DISASSOC {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwReason;
@ -566,7 +566,7 @@ typedef struct tagWLAN_FR_ASSOCREQ {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
@ -587,7 +587,7 @@ typedef struct tagWLAN_FR_ASSOCRESP {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
@ -604,7 +604,7 @@ typedef struct tagWLAN_FR_REASSOCREQ {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
@ -626,7 +626,7 @@ typedef struct tagWLAN_FR_REASSOCRESP {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwCapInfo;
@ -643,7 +643,7 @@ typedef struct tagWLAN_FR_PROBEREQ {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
/*-- info elements ----------*/
@ -658,7 +658,7 @@ typedef struct tagWLAN_FR_PROBERESP {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PQWORD pqwTimestamp;
@ -687,7 +687,7 @@ typedef struct tagWLAN_FR_AUTHEN {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwAuthAlgorithm;
@ -703,7 +703,7 @@ typedef struct tagWLAN_FR_DEAUTHEN {
unsigned int uType;
unsigned int len;
PBYTE pBuf;
unsigned char *pBuf;
PUWLAN_80211HDR pHdr;
/*-- fixed fields -----------*/
PWORD pwReason;

View File

@ -125,9 +125,9 @@ static BOOL s_bRxTPCReq(PSMgmtObject pMgmt, PWLAN_FRAME_TPCREQ pTPCReq, BYTE byR
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
pFrame = (PWLAN_FRAME_TPCREP)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pFrame = (PWLAN_FRAME_TPCREP)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
pFrame->Header.wFrameCtl = ( WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |
WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ACTION)
@ -276,7 +276,7 @@ BOOL IEEE11hbMSRRepTx (
pTxPacket = (PSTxMgmtPacket)pMgmt->abyCurrentMSRRep;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
pMSRRep->Header.wFrameCtl = ( WLAN_SET_FC_FTYPE(WLAN_FTYPE_MGMT) |

View File

@ -243,7 +243,7 @@ BYTE abyRoundKey[16];
* Return Value: MIC compare result
*
*/
BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize)
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, WORD wFrameSize)
{
BYTE abyNonce[13];
BYTE MIC_IV[16];
@ -256,8 +256,8 @@ BYTE abyPlainText[16];
BYTE abyLastCipher[16];
PS802_11Header pMACHeader = (PS802_11Header) pbyFrame;
PBYTE pbyIV;
PBYTE pbyPayload;
unsigned char *pbyIV;
unsigned char *pbyPayload;
WORD wHLen = 22;
WORD wPayloadSize = wFrameSize - 8 - 8 - 4 - WLAN_HDR_ADDR3_LEN;//8 is IV, 8 is MIC, 4 is CRC
BOOL bA4 = FALSE;

View File

@ -41,6 +41,6 @@
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
BOOL AESbGenCCMP(PBYTE pbyRxKey, PBYTE pbyFrame, WORD wFrameSize);
BOOL AESbGenCCMP(unsigned char *pbyRxKey, unsigned char *pbyFrame, WORD wFrameSize);
#endif //__AES_H__

View File

@ -1850,8 +1850,8 @@ BBvCaculateParameter (
WORD wRate,
BYTE byPacketType,
PWORD pwPhyLen,
PBYTE pbyPhySrv,
PBYTE pbyPhySgn
unsigned char *pbyPhySrv,
unsigned char *pbyPhySgn
)
{
unsigned int cbBitCount;
@ -2015,7 +2015,7 @@ BBvCaculateParameter (
* Return Value: TRUE if succeeded; FALSE if failed.
*
*/
BOOL BBbReadEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, PBYTE pbyData)
BOOL BBbReadEmbeded (DWORD_PTR dwIoBase, BYTE byBBAddr, unsigned char *pbyData)
{
WORD ww;
BYTE byValue;
@ -2321,7 +2321,7 @@ BOOL BBbVT3253Init (PSDevice pDevice)
* Return Value: none
*
*/
void BBvReadAllRegs (DWORD_PTR dwIoBase, PBYTE pbyBBRegs)
void BBvReadAllRegs (DWORD_PTR dwIoBase, unsigned char *pbyBBRegs)
{
int ii;
BYTE byBase = 1;

View File

@ -133,14 +133,14 @@ BBvCaculateParameter (
WORD wRate,
BYTE byPacketType,
PWORD pwPhyLen,
PBYTE pbyPhySrv,
PBYTE pbyPhySgn
unsigned char *pbyPhySrv,
unsigned char *pbyPhySgn
);
BOOL BBbReadEmbeded(DWORD_PTR dwIoBase, BYTE byBBAddr, PBYTE pbyData);
BOOL BBbReadEmbeded(DWORD_PTR dwIoBase, BYTE byBBAddr, unsigned char *pbyData);
BOOL BBbWriteEmbeded(DWORD_PTR dwIoBase, BYTE byBBAddr, BYTE byData);
void BBvReadAllRegs(DWORD_PTR dwIoBase, PBYTE pbyBBRegs);
void BBvReadAllRegs(DWORD_PTR dwIoBase, unsigned char *pbyBBRegs);
void BBvLoopbackOn(PSDevice pDevice);
void BBvLoopbackOff(PSDevice pDevice);
void BBvSetShortSlotTime(PSDevice pDevice);

View File

@ -126,14 +126,14 @@ void s_vCheckPreEDThreshold(
PKnownBSS
BSSpSearchBSSList(
void *hDeviceContext,
PBYTE pbyDesireBSSID,
PBYTE pbyDesireSSID,
unsigned char *pbyDesireBSSID,
unsigned char *pbyDesireSSID,
CARD_PHY_TYPE ePhyType
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = pDevice->pMgmt;
PBYTE pbyBSSID = NULL;
unsigned char *pbyBSSID = NULL;
PWLAN_IE_SSID pSSID = NULL;
PKnownBSS pCurrBSS = NULL;
PKnownBSS pSelect = NULL;
@ -326,7 +326,7 @@ BSSvClearBSSList(
PKnownBSS
BSSpAddrIsInBSSList(
void *hDeviceContext,
PBYTE abyBSSID,
unsigned char *abyBSSID,
PWLAN_IE_SSID pSSID
)
{
@ -369,7 +369,7 @@ BSSpAddrIsInBSSList(
BOOL
BSSbInsertToBSSList (
void *hDeviceContext,
PBYTE abyBSSIDAddr,
unsigned char *abyBSSIDAddr,
QWORD qwTimestamp,
WORD wBeaconInterval,
WORD wCapInfo,
@ -383,7 +383,7 @@ BSSbInsertToBSSList (
PWLAN_IE_COUNTRY pIE_Country,
PWLAN_IE_QUIET pIE_Quiet,
unsigned int uIELength,
PBYTE pbyIEs,
unsigned char *pbyIEs,
void *pRxPacketContext
)
{
@ -470,7 +470,7 @@ BSSbInsertToBSSList (
if (pRSNWPA != NULL) {
unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((PBYTE)pRSNWPA - pbyIEs))) {
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((unsigned char *)pRSNWPA - pbyIEs))) {
pBSSList->wWPALen = uLen;
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
WPA_ParseRSN(pBSSList, pRSNWPA);
@ -481,7 +481,7 @@ BSSbInsertToBSSList (
if (pRSN != NULL) {
unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((PBYTE)pRSN - pbyIEs))) {
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((unsigned char *)pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen;
memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
@ -601,7 +601,7 @@ BSSbUpdateToBSSList (
PWLAN_IE_QUIET pIE_Quiet,
PKnownBSS pBSSList,
unsigned int uIELength,
PBYTE pbyIEs,
unsigned char *pbyIEs,
void *pRxPacketContext
)
{
@ -671,7 +671,7 @@ BSSbUpdateToBSSList (
if (pRSNWPA != NULL) {
unsigned int uLen = pRSNWPA->len + 2;
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((PBYTE)pRSNWPA - pbyIEs))) {
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((unsigned char *)pRSNWPA - pbyIEs))) {
pBSSList->wWPALen = uLen;
memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
WPA_ParseRSN(pBSSList, pRSNWPA);
@ -682,7 +682,7 @@ BSSbUpdateToBSSList (
if (pRSN != NULL) {
unsigned int uLen = pRSN->len + 2;
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((PBYTE)pRSN - pbyIEs))) {
if (uLen <= (uIELength - (unsigned int)(ULONG_PTR)((unsigned char *)pRSN - pbyIEs))) {
pBSSList->wRSNLen = uLen;
memcpy(pBSSList->byRSNIE, pRSN, uLen);
WPA2vParseRSN(pBSSList, pRSN);
@ -765,7 +765,7 @@ BSSbUpdateToBSSList (
BOOL
BSSDBbIsSTAInNodeDB(
void *pMgmtObject,
PBYTE abyDstAddr,
unsigned char *abyDstAddr,
PUINT puNodeIndex
)
{
@ -1393,7 +1393,7 @@ BSSvUpdateNodeTxCounter(
void *hDeviceContext,
BYTE byTsr0,
BYTE byTsr1,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
unsigned int uFIFOHeaderSize
)
{

View File

@ -245,15 +245,15 @@ typedef struct tagKnownNodeDB {
PKnownBSS
BSSpSearchBSSList(
void *hDeviceContext,
PBYTE pbyDesireBSSID,
PBYTE pbyDesireSSID,
unsigned char *pbyDesireBSSID,
unsigned char *pbyDesireSSID,
CARD_PHY_TYPE ePhyType
);
PKnownBSS
BSSpAddrIsInBSSList(
void *hDeviceContext,
PBYTE abyBSSID,
unsigned char *abyBSSID,
PWLAN_IE_SSID pSSID
);
@ -266,7 +266,7 @@ BSSvClearBSSList(
BOOL
BSSbInsertToBSSList(
void *hDeviceContext,
PBYTE abyBSSIDAddr,
unsigned char *abyBSSIDAddr,
QWORD qwTimestamp,
WORD wBeaconInterval,
WORD wCapInfo,
@ -280,7 +280,7 @@ BSSbInsertToBSSList(
PWLAN_IE_COUNTRY pIE_Country,
PWLAN_IE_QUIET pIE_Quiet,
unsigned int uIELength,
PBYTE pbyIEs,
unsigned char *pbyIEs,
void *pRxPacketContext
);
@ -303,7 +303,7 @@ BSSbUpdateToBSSList(
PWLAN_IE_QUIET pIE_Quiet,
PKnownBSS pBSSList,
unsigned int uIELength,
PBYTE pbyIEs,
unsigned char *pbyIEs,
void *pRxPacketContext
);
@ -311,7 +311,7 @@ BSSbUpdateToBSSList(
BOOL
BSSDBbIsSTAInNodeDB(
void *hDeviceContext,
PBYTE abyDstAddr,
unsigned char *abyDstAddr,
PUINT puNodeIndex
);
@ -341,7 +341,7 @@ BSSvUpdateNodeTxCounter(
void *hDeviceContext,
BYTE byTsr0,
BYTE byTsr1,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
unsigned int uFIFOHeaderSize
);

View File

@ -427,8 +427,8 @@ void
s_vCaculateOFDMRParameter(
BYTE byRate,
CARD_PHY_TYPE ePHYType,
PBYTE pbyTxRate,
PBYTE pbyRsvTime
unsigned char *pbyTxRate,
unsigned char *pbyRsvTime
);
@ -499,8 +499,8 @@ void
s_vCaculateOFDMRParameter (
BYTE byRate,
CARD_PHY_TYPE ePHYType,
PBYTE pbyTxRate,
PBYTE pbyRsvTime
unsigned char *pbyTxRate,
unsigned char *pbyRsvTime
)
{
switch (byRate) {
@ -1296,7 +1296,7 @@ BOOL CARDbStartTxPacket (void *pDeviceHandler, CARD_PKT_TYPE ePktType)
* Return Value: TRUE if success; FALSE if failed.
*
*/
BOOL CARDbSetBSSID(void *pDeviceHandler, PBYTE pbyBSSID, CARD_OP_MODE eOPMode)
BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
@ -1522,7 +1522,7 @@ MACvRegBitsOff(pDevice->PortOffset, MAC_REG_GPIOCTL0, LED_ACTSET); //LED issue
BOOL CARDbRemoveKey (void *pDeviceHandler, PBYTE pbyBSSID)
BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
@ -1550,7 +1550,7 @@ BOOL CARDbRemoveKey (void *pDeviceHandler, PBYTE pbyBSSID)
BOOL
CARDbAdd_PMKID_Candidate (
void *pDeviceHandler,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
BOOL bRSNCapExist,
WORD wRSNCap
)
@ -2129,8 +2129,8 @@ CARDvSetPowerConstraint (
void
CARDvGetPowerCapability (
void *pDeviceHandler,
PBYTE pbyMinPower,
PBYTE pbyMaxPower
unsigned char *pbyMinPower,
unsigned char *pbyMaxPower
)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
@ -2165,14 +2165,14 @@ CARDvGetPowerCapability (
BYTE
CARDbySetSupportChannels (
void *pDeviceHandler,
PBYTE pbyIEs
unsigned char *pbyIEs
)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;
unsigned int ii;
BYTE byCount;
PWLAN_IE_SUPP_CH pIE = (PWLAN_IE_SUPP_CH) pbyIEs;
PBYTE pbyChTupple;
unsigned char *pbyChTupple;
BYTE byLen = 0;
@ -2267,7 +2267,7 @@ CARDbyGetTransmitPower (
BOOL
CARDbChannelGetList (
unsigned int uCountryCodeIdx,
PBYTE pbyChannelTable
unsigned char *pbyChannelTable
)
{
if (uCountryCodeIdx >= CCODE_MAX) {
@ -2308,8 +2308,8 @@ BOOL
CARDbGetChannelMapInfo(
void *pDeviceHandler,
unsigned int uChannelIndex,
PBYTE pbyChannelNumber,
PBYTE pbyMap
unsigned char *pbyChannelNumber,
unsigned char *pbyMap
)
{
// PSDevice pDevice = (PSDevice) pDeviceHandler;

View File

@ -116,7 +116,7 @@ BOOL CARDbUpdateTSF(void *pDeviceHandler, BYTE byRxRate, QWORD qwBSSTimestamp, Q
BOOL CARDbStopTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
BOOL CARDbStartTxPacket(void *pDeviceHandler, CARD_PKT_TYPE ePktType);
BOOL CARDbSetBeaconPeriod(void *pDeviceHandler, WORD wBeaconInterval);
BOOL CARDbSetBSSID(void *pDeviceHandler, PBYTE pbyBSSID, CARD_OP_MODE eOPMode);
BOOL CARDbSetBSSID(void *pDeviceHandler, unsigned char *pbyBSSID, CARD_OP_MODE eOPMode);
BOOL
CARDbPowerDown(
@ -129,12 +129,12 @@ BOOL CARDbSetTxDataRate(
);
BOOL CARDbRemoveKey (void *pDeviceHandler, PBYTE pbyBSSID);
BOOL CARDbRemoveKey (void *pDeviceHandler, unsigned char *pbyBSSID);
BOOL
CARDbAdd_PMKID_Candidate (
void *pDeviceHandler,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
BOOL bRSNCapExist,
WORD wRSNCap
);
@ -195,14 +195,14 @@ CARDvSetPowerConstraint (
void
CARDvGetPowerCapability (
void *pDeviceHandler,
PBYTE pbyMinPower,
PBYTE pbyMaxPower
unsigned char *pbyMinPower,
unsigned char *pbyMaxPower
);
BYTE
CARDbySetSupportChannels (
void *pDeviceHandler,
PBYTE pbyIEs
unsigned char *pbyIEs
);
char
@ -213,7 +213,7 @@ CARDbyGetTransmitPower (
BOOL
CARDbChannelGetList (
unsigned int uCountryCodeIdx,
PBYTE pbyChannelTable
unsigned char *pbyChannelTable
);
void
@ -226,8 +226,8 @@ BOOL
CARDbGetChannelMapInfo(
void *pDeviceHandler,
unsigned int uChannelIndex,
PBYTE pbyChannelNumber,
PBYTE pbyMap
unsigned char *pbyChannelNumber,
unsigned char *pbyMap
);
void

View File

@ -203,8 +203,8 @@ RATEvParseMaxRate (
PWORD pwMaxBasicRate,
PWORD pwMaxSuppRate,
PWORD pwSuppRate,
PBYTE pbyTopCCKRate,
PBYTE pbyTopOFDMRate
unsigned char *pbyTopCCKRate,
unsigned char *pbyTopOFDMRate
)
{
PSDevice pDevice = (PSDevice) pDeviceHandler;

View File

@ -63,8 +63,8 @@ RATEvParseMaxRate(
PWORD pwMaxBasicRate,
PWORD pwMaxSuppRate,
PWORD pwSuppRate,
PBYTE pbyTopCCKRate,
PBYTE pbyTopOFDMRate
unsigned char *pbyTopCCKRate,
unsigned char *pbyTopOFDMRate
);
void

View File

@ -350,7 +350,7 @@ STDES1;
typedef struct tagDEVICE_TD_INFO{
struct sk_buff* skb;
PBYTE buf;
unsigned char *buf;
dma_addr_t skb_dma;
dma_addr_t buf_dma;
dma_addr_t curr_desc;

View File

@ -324,7 +324,7 @@ typedef struct tagSDeFragControlBlock
BYTE abyAddr2[ETH_ALEN];
unsigned int uLifetime;
struct sk_buff* skb;
PBYTE pbyRxBuffer;
unsigned char *pbyRxBuffer;
unsigned int cbFrameLength;
BOOL bInUse;
} SDeFragControlBlock, *PSDeFragControlBlock;
@ -417,9 +417,9 @@ typedef struct __device_info {
dma_addr_t tx_bufs_dma1;
dma_addr_t tx_beacon_dma;
PBYTE tx0_bufs;
PBYTE tx1_bufs;
PBYTE tx_beacon_bufs;
unsigned char *tx0_bufs;
unsigned char *tx1_bufs;
unsigned char *tx_beacon_bufs;
CHIP_TYPE chip_id;
@ -507,7 +507,7 @@ typedef struct __device_info {
BYTE byTxAntennaMode;
BOOL bTxRxAntInv;
PBYTE pbyTmpBuff;
unsigned char *pbyTmpBuff;
unsigned int uSIFS; //Current SIFS
unsigned int uDIFS; //Current DIFS
unsigned int uEIFS; //Current EIFS

View File

@ -1699,13 +1699,13 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
STAvUpdateTDStatCounter(&pDevice->scStatistic,
byTsr0, byTsr1,
(PBYTE)(pTD->pTDInfo->buf + uFIFOHeaderSize),
(unsigned char *)(pTD->pTDInfo->buf + uFIFOHeaderSize),
uFrameSize, uIdx);
BSSvUpdateNodeTxCounter(pDevice,
byTsr0, byTsr1,
(PBYTE)(pTD->pTDInfo->buf),
(unsigned char *)(pTD->pTDInfo->buf),
uFIFOHeaderSize
);
@ -1756,7 +1756,7 @@ static int device_tx_srv(PSDevice pDevice, unsigned int uIdx) {
BYTE byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
skb = pTD->pTDInfo->skb;
if (BSSDBbIsSTAInNodeDB(pMgmt, (PBYTE)(skb->data), &uNodeIndex)) {
if (BSSDBbIsSTAInNodeDB(pMgmt, (unsigned char *)(skb->data), &uNodeIndex)) {
if (pMgmt->sNodeDBTable[uNodeIndex].bPSEnable) {
skb_queue_tail(&pMgmt->sNodeDBTable[uNodeIndex].sTxPSQueue, skb);
pMgmt->sNodeDBTable[uNodeIndex].wEnQueueCnt++;
@ -2084,7 +2084,7 @@ device_release_WPADEV(pDevice);
static int device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev) {
PSDevice pDevice=netdev_priv(dev);
PBYTE pbMPDU;
unsigned char *pbMPDU;
unsigned int cbMPDULen = 0;
@ -2154,7 +2154,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
pHeadTD->m_td1TD1.byTCR = (TCR_EDP|TCR_STP);
memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), ETH_HLEN);
memcpy(pDevice->sTxEthHeader.abyDstAddr, (unsigned char *)(skb->data), ETH_HLEN);
cbFrameBodySize = skb->len - ETH_HLEN;
// 802.1H
@ -2228,7 +2228,7 @@ BOOL device_dma0_xmit(PSDevice pDevice, struct sk_buff *skb, unsigned int uNodeI
}
vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption,
cbFrameBodySize, TYPE_TXDMA0, pHeadTD,
&pDevice->sTxEthHeader, (PBYTE)skb->data, pTransmitKey, uNodeIndex,
&pDevice->sTxEthHeader, (unsigned char *)skb->data, pTransmitKey, uNodeIndex,
&uMACfragNum,
&cbHeaderSize
);
@ -2284,7 +2284,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
unsigned int ii;
BOOL bTKIP_UseGTK = FALSE;
BOOL bNeedDeAuth = FALSE;
PBYTE pbyBSSID;
unsigned char *pbyBSSID;
BOOL bNodeExist = FALSE;
@ -2309,7 +2309,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
spin_unlock_irq(&pDevice->lock);
return 0;
}
if (is_multicast_ether_addr((PBYTE)(skb->data))) {
if (is_multicast_ether_addr((unsigned char *)(skb->data))) {
uNodeIndex = 0;
bNodeExist = TRUE;
if (pMgmt->sNodeDBTable[0].bPSEnable) {
@ -2321,7 +2321,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
return 0;
}
}else {
if (BSSDBbIsSTAInNodeDB(pMgmt, (PBYTE)(skb->data), &uNodeIndex)) {
if (BSSDBbIsSTAInNodeDB(pMgmt, (unsigned char *)(skb->data), &uNodeIndex)) {
if (pMgmt->sNodeDBTable[uNodeIndex].bPSEnable) {
skb_queue_tail(&pMgmt->sNodeDBTable[uNodeIndex].sTxPSQueue, skb);
pMgmt->sNodeDBTable[uNodeIndex].wEnQueueCnt++;
@ -2358,7 +2358,7 @@ static int device_xmit(struct sk_buff *skb, struct net_device *dev) {
pHeadTD->m_td1TD1.byTCR = (TCR_EDP|TCR_STP);
memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)(skb->data), ETH_HLEN);
memcpy(pDevice->sTxEthHeader.abyDstAddr, (unsigned char *)(skb->data), ETH_HLEN);
cbFrameBodySize = skb->len - ETH_HLEN;
// 802.1H
if (ntohs(pDevice->sTxEthHeader.wType) > ETH_DATA_LEN) {
@ -2586,7 +2586,7 @@ pDevice->byTopCCKBasicRate,pDevice->byTopOFDMBasicRate);
#endif
vGenerateFIFOHeader(pDevice, byPktType, pDevice->pbyTmpBuff, bNeedEncryption,
cbFrameBodySize, TYPE_AC0DMA, pHeadTD,
&pDevice->sTxEthHeader, (PBYTE)skb->data, pTransmitKey, uNodeIndex,
&pDevice->sTxEthHeader, (unsigned char *)skb->data, pTransmitKey, uNodeIndex,
&uMACfragNum,
&cbHeaderSize
);

View File

@ -82,7 +82,7 @@ static BYTE s_byGetRateIdx(BYTE byRate);
static
void
s_vGetDASA(
PBYTE pbyRxBufferAddr,
unsigned char *pbyRxBufferAddr,
PUINT pcbHeaderSize,
PSEthernetHeader psEthHeader
);
@ -91,7 +91,7 @@ static
void
s_vProcessRxMACHeader (
PSDevice pDevice,
PBYTE pbyRxBufferAddr,
unsigned char *pbyRxBufferAddr,
unsigned int cbPacketSize,
BOOL bIsWEP,
BOOL bExtIV,
@ -100,7 +100,7 @@ s_vProcessRxMACHeader (
static BOOL s_bAPModeRxCtl(
PSDevice pDevice,
PBYTE pbyFrame,
unsigned char *pbyFrame,
int iSANodeIndex
);
@ -118,10 +118,10 @@ static BOOL s_bAPModeRxData (
static BOOL s_bHandleRxEncryption(
PSDevice pDevice,
PBYTE pbyFrame,
unsigned char *pbyFrame,
unsigned int FrameSize,
PBYTE pbyRsr,
PBYTE pbyNewRsr,
unsigned char *pbyRsr,
unsigned char *pbyNewRsr,
PSKeyItem *pKeyOut,
int * pbExtIV,
PWORD pwRxTSC15_0,
@ -131,12 +131,12 @@ static BOOL s_bHandleRxEncryption(
static BOOL s_bHostWepRxEncryption(
PSDevice pDevice,
PBYTE pbyFrame,
unsigned char *pbyFrame,
unsigned int FrameSize,
PBYTE pbyRsr,
unsigned char *pbyRsr,
BOOL bOnFly,
PSKeyItem pKey,
PBYTE pbyNewRsr,
unsigned char *pbyNewRsr,
int * pbExtIV,
PWORD pwRxTSC15_0,
PDWORD pdwRxTSC47_16
@ -166,14 +166,14 @@ static
void
s_vProcessRxMACHeader (
PSDevice pDevice,
PBYTE pbyRxBufferAddr,
unsigned char *pbyRxBufferAddr,
unsigned int cbPacketSize,
BOOL bIsWEP,
BOOL bExtIV,
PUINT pcbHeadSize
)
{
PBYTE pbyRxBuffer;
unsigned char *pbyRxBuffer;
unsigned int cbHeaderSize = 0;
PWORD pwType;
PS802_11Header pMACHeader;
@ -182,7 +182,7 @@ s_vProcessRxMACHeader (
pMACHeader = (PS802_11Header) (pbyRxBufferAddr + cbHeaderSize);
s_vGetDASA((PBYTE)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader);
s_vGetDASA((unsigned char *)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader);
if (bIsWEP) {
if (bExtIV) {
@ -197,7 +197,7 @@ s_vProcessRxMACHeader (
cbHeaderSize += WLAN_HDR_ADDR3_LEN;
};
pbyRxBuffer = (PBYTE) (pbyRxBufferAddr + cbHeaderSize);
pbyRxBuffer = (unsigned char *) (pbyRxBufferAddr + cbHeaderSize);
if (!compare_ether_addr(pbyRxBuffer, &pDevice->abySNAP_Bridgetunnel[0])) {
cbHeaderSize += 6;
}
@ -237,7 +237,7 @@ s_vProcessRxMACHeader (
}
cbHeaderSize -= (ETH_ALEN * 2);
pbyRxBuffer = (PBYTE) (pbyRxBufferAddr + cbHeaderSize);
pbyRxBuffer = (unsigned char *) (pbyRxBufferAddr + cbHeaderSize);
for(ii=0;ii<ETH_ALEN;ii++)
*pbyRxBuffer++ = pDevice->sRxEthHeader.abyDstAddr[ii];
for(ii=0;ii<ETH_ALEN;ii++)
@ -264,7 +264,7 @@ static BYTE s_byGetRateIdx (BYTE byRate)
static
void
s_vGetDASA (
PBYTE pbyRxBufferAddr,
unsigned char *pbyRxBufferAddr,
PUINT pcbHeaderSize,
PSEthernetHeader psEthHeader
)
@ -349,12 +349,12 @@ device_receive_frame (
PSMgmtObject pMgmt = pDevice->pMgmt;
PSRxMgmtPacket pRxPacket = &(pDevice->pMgmt->sRxPacket);
PS802_11Header p802_11Header;
PBYTE pbyRsr;
PBYTE pbyNewRsr;
PBYTE pbyRSSI;
unsigned char *pbyRsr;
unsigned char *pbyNewRsr;
unsigned char *pbyRSSI;
PQWORD pqwTSFTime;
PWORD pwFrameSize;
PBYTE pbyFrame;
unsigned char *pbyFrame;
BOOL bDeFragRx = FALSE;
BOOL bIsWEP = FALSE;
unsigned int cbHeaderOffset;
@ -365,9 +365,9 @@ device_receive_frame (
unsigned int ii;
unsigned int cbIVOffset;
BOOL bExtIV = FALSE;
PBYTE pbyRxSts;
PBYTE pbyRxRate;
PBYTE pbySQ;
unsigned char *pbyRxSts;
unsigned char *pbyRxRate;
unsigned char *pbySQ;
unsigned int cbHeaderSize;
PSKeyItem pKey = NULL;
WORD wRxTSC15_0 = 0;
@ -402,14 +402,14 @@ device_receive_frame (
return FALSE;
}
pbyRxSts = (PBYTE) (skb->data);
pbyRxRate = (PBYTE) (skb->data + 1);
pbyRsr = (PBYTE) (skb->data + FrameSize - 1);
pbyRSSI = (PBYTE) (skb->data + FrameSize - 2);
pbyNewRsr = (PBYTE) (skb->data + FrameSize - 3);
pbySQ = (PBYTE) (skb->data + FrameSize - 4);
pbyRxSts = (unsigned char *) (skb->data);
pbyRxRate = (unsigned char *) (skb->data + 1);
pbyRsr = (unsigned char *) (skb->data + FrameSize - 1);
pbyRSSI = (unsigned char *) (skb->data + FrameSize - 2);
pbyNewRsr = (unsigned char *) (skb->data + FrameSize - 3);
pbySQ = (unsigned char *) (skb->data + FrameSize - 4);
pqwTSFTime = (PQWORD) (skb->data + FrameSize - 12);
pbyFrame = (PBYTE)(skb->data + 4);
pbyFrame = (unsigned char *)(skb->data + 4);
// get packet size
FrameSize = cpu_to_le16(*pwFrameSize);
@ -431,7 +431,7 @@ device_receive_frame (
#endif
pMACHeader=(PS802_11Header)((PBYTE) (skb->data)+8);
pMACHeader=(PS802_11Header)((unsigned char *) (skb->data)+8);
//PLICE_DEBUG<-
if (pDevice->bMeasureInProgress == TRUE) {
if ((*pbyRsr & RSR_CRCOK) != 0) {
@ -475,14 +475,14 @@ device_receive_frame (
s_vGetDASA(skb->data+4, &cbHeaderSize, &pDevice->sRxEthHeader);
// filter packet send from myself
if (!compare_ether_addr((PBYTE)&(pDevice->sRxEthHeader.abySrcAddr[0]), pDevice->abyCurrentNetAddr))
if (!compare_ether_addr((unsigned char *)&(pDevice->sRxEthHeader.abySrcAddr[0]), pDevice->abyCurrentNetAddr))
return FALSE;
if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) || (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)) {
if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) {
p802_11Header = (PS802_11Header) (pbyFrame);
// get SA NodeIndex
if (BSSDBbIsSTAInNodeDB(pMgmt, (PBYTE)(p802_11Header->abyAddr2), &iSANodeIndex)) {
if (BSSDBbIsSTAInNodeDB(pMgmt, (unsigned char *)(p802_11Header->abyAddr2), &iSANodeIndex)) {
pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies;
pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0;
}
@ -594,8 +594,8 @@ device_receive_frame (
// Handle Control & Manage Frame
if (IS_TYPE_MGMT((skb->data+4))) {
PBYTE pbyData1;
PBYTE pbyData2;
unsigned char *pbyData1;
unsigned char *pbyData2;
pRxPacket->p80211Header = (PUWLAN_80211HDR)(skb->data+4);
pRxPacket->cbMPDULen = FrameSize;
@ -827,11 +827,11 @@ device_receive_frame (
}
MIC_vInit(dwMICKey0, dwMICKey1);
MIC_vAppend((PBYTE)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12);
MIC_vAppend((unsigned char *)&(pDevice->sRxEthHeader.abyDstAddr[0]), 12);
dwMIC_Priority = 0;
MIC_vAppend((PBYTE)&dwMIC_Priority, 4);
MIC_vAppend((unsigned char *)&dwMIC_Priority, 4);
// 4 is Rcv buffer header, 24 is MAC Header, and 8 is IV and Ext IV.
MIC_vAppend((PBYTE)(skb->data + 4 + WLAN_HDR_ADDR3_LEN + 8),
MIC_vAppend((unsigned char *)(skb->data + 4 + WLAN_HDR_ADDR3_LEN + 8),
FrameSize - WLAN_HDR_ADDR3_LEN - 8);
MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R);
MIC_vUnInit();
@ -963,7 +963,7 @@ device_receive_frame (
}
s_vProcessRxMACHeader(pDevice, (PBYTE)(skb->data+4), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset);
s_vProcessRxMACHeader(pDevice, (unsigned char *)(skb->data+4), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset);
FrameSize -= cbHeaderOffset;
cbHeaderOffset += 4; // 4 is Rcv buffer header
@ -1040,7 +1040,7 @@ device_receive_frame (
static BOOL s_bAPModeRxCtl (
PSDevice pDevice,
PBYTE pbyFrame,
unsigned char *pbyFrame,
int iSANodeIndex
)
{
@ -1063,7 +1063,7 @@ static BOOL s_bAPModeRxCtl (
// reason = (6) class 2 received from nonauth sta
vMgrDeAuthenBeginSta(pDevice,
pMgmt,
(PBYTE)(p802_11Header->abyAddr2),
(unsigned char *)(p802_11Header->abyAddr2),
(WLAN_MGMT_REASON_CLASS2_NONAUTH),
&Status
);
@ -1075,7 +1075,7 @@ static BOOL s_bAPModeRxCtl (
// reason = (7) class 3 received from nonassoc sta
vMgrDisassocBeginSta(pDevice,
pMgmt,
(PBYTE)(p802_11Header->abyAddr2),
(unsigned char *)(p802_11Header->abyAddr2),
(WLAN_MGMT_REASON_CLASS3_NONASSOC),
&Status
);
@ -1122,7 +1122,7 @@ static BOOL s_bAPModeRxCtl (
else {
vMgrDeAuthenBeginSta(pDevice,
pMgmt,
(PBYTE)(p802_11Header->abyAddr2),
(unsigned char *)(p802_11Header->abyAddr2),
(WLAN_MGMT_REASON_CLASS2_NONAUTH),
&Status
);
@ -1164,10 +1164,10 @@ static BOOL s_bAPModeRxCtl (
static BOOL s_bHandleRxEncryption (
PSDevice pDevice,
PBYTE pbyFrame,
unsigned char *pbyFrame,
unsigned int FrameSize,
PBYTE pbyRsr,
PBYTE pbyNewRsr,
unsigned char *pbyRsr,
unsigned char *pbyNewRsr,
PSKeyItem *pKeyOut,
int * pbExtIV,
PWORD pwRxTSC15_0,
@ -1175,7 +1175,7 @@ static BOOL s_bHandleRxEncryption (
)
{
unsigned int PayloadLen = FrameSize;
PBYTE pbyIV;
unsigned char *pbyIV;
BYTE byKeyIdx;
PSKeyItem pKey = NULL;
BYTE byDecMode = KEY_CTL_WEP;
@ -1310,19 +1310,19 @@ static BOOL s_bHandleRxEncryption (
static BOOL s_bHostWepRxEncryption (
PSDevice pDevice,
PBYTE pbyFrame,
unsigned char *pbyFrame,
unsigned int FrameSize,
PBYTE pbyRsr,
unsigned char *pbyRsr,
BOOL bOnFly,
PSKeyItem pKey,
PBYTE pbyNewRsr,
unsigned char *pbyNewRsr,
int * pbExtIV,
PWORD pwRxTSC15_0,
PDWORD pdwRxTSC47_16
)
{
unsigned int PayloadLen = FrameSize;
PBYTE pbyIV;
unsigned char *pbyIV;
BYTE byKeyIdx;
BYTE byDecMode = KEY_CTL_WEP;
PS802_11Header pMACHeader;
@ -1460,7 +1460,7 @@ static BOOL s_bAPModeRxData (
if (FrameSize > CB_MAX_BUF_SIZE)
return FALSE;
// check DA
if(is_multicast_ether_addr((PBYTE)(skb->data+cbHeaderOffset))) {
if(is_multicast_ether_addr((unsigned char *)(skb->data+cbHeaderOffset))) {
if (pMgmt->sNodeDBTable[0].bPSEnable) {
skbcpy = dev_alloc_skb((int)pDevice->rx_buf_sz);
@ -1486,7 +1486,7 @@ static BOOL s_bAPModeRxData (
}
else {
// check if relay
if (BSSDBbIsSTAInNodeDB(pMgmt, (PBYTE)(skb->data+cbHeaderOffset), &iDANodeIndex)) {
if (BSSDBbIsSTAInNodeDB(pMgmt, (unsigned char *)(skb->data+cbHeaderOffset), &iDANodeIndex)) {
if (pMgmt->sNodeDBTable[iDANodeIndex].eNodeState >= NODE_ASSOC) {
if (pMgmt->sNodeDBTable[iDANodeIndex].bPSEnable) {
// queue this skb until next PS tx, and then release.
@ -1515,7 +1515,7 @@ static BOOL s_bAPModeRxData (
iDANodeIndex = 0;
if ((pDevice->uAssocCount > 1) && (iDANodeIndex >= 0)) {
ROUTEbRelay(pDevice, (PBYTE)(skb->data + cbHeaderOffset), FrameSize, (unsigned int)iDANodeIndex);
ROUTEbRelay(pDevice, (unsigned char *)(skb->data + cbHeaderOffset), FrameSize, (unsigned int)iDANodeIndex);
}
if (bRelayOnly)

View File

@ -580,7 +580,7 @@ static int hostap_set_encryption(PSDevice pDevice,
dwKeyIndex & ~(USE_KEYRSC),
param->u.crypt.key_len,
(PQWORD) &(KeyRSC),
(PBYTE)abyKey,
(unsigned char *)abyKey,
KEY_CTL_WEP,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) {
@ -649,7 +649,7 @@ static int hostap_set_encryption(PSDevice pDevice,
dwKeyIndex,
param->u.crypt.key_len,
(PQWORD) &(KeyRSC),
(PBYTE)abyKey,
(unsigned char *)abyKey,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) {

View File

@ -257,7 +257,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
dwKeyIndex,
sWEPCmd.auWepKeyLength[ii],
NULL,
(PBYTE)&sWEPCmd.abyWepKey[ii][0],
(unsigned char *)&sWEPCmd.abyWepKey[ii][0],
KEY_CTL_WEP,
pDevice->PortOffset,
pDevice->byLocalID);
@ -718,7 +718,7 @@ void
vConfigWEPKey (
PSDevice pDevice,
DWORD dwKeyIndex,
PBYTE pbyKey,
unsigned char *pbyKey,
unsigned long uKeyLength
)
{

View File

@ -46,7 +46,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq);
void vConfigWEPKey (
PSDevice pDevice,
DWORD dwKeyIndex,
PBYTE pbyKey,
unsigned char *pbyKey,
unsigned long uKeyLength
);
*/

View File

@ -2096,7 +2096,7 @@ int iwctl_siwmlme(struct net_device *dev,
switch(mlme->cmd){
case IW_MLME_DEAUTH:
//this command seems to be not complete,please test it --einsnliu
//bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (PBYTE)&reason);
//bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (unsigned char *)&reason);
break;
case IW_MLME_DISASSOC:
if(pDevice->bLinkPass == TRUE){

View File

@ -133,7 +133,7 @@ void KeyvInitTable (PSKeyManagement pTable, DWORD_PTR dwIoBase)
*/
BOOL KeybGetKey (
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyIndex,
PSKeyItem *pKey
)
@ -191,11 +191,11 @@ BOOL KeybGetKey (
*/
BOOL KeybSetKey (
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyIndex,
unsigned long uKeyLength,
PQWORD pKeyRSC,
PBYTE pbyKey,
unsigned char *pbyKey,
BYTE byKeyDecMode,
DWORD_PTR dwIoBase,
BYTE byLocalID
@ -364,7 +364,7 @@ BOOL KeybSetKey (
*/
BOOL KeybRemoveKey (
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyIndex,
DWORD_PTR dwIoBase
)
@ -437,7 +437,7 @@ BOOL KeybRemoveKey (
*/
BOOL KeybRemoveAllKey (
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD_PTR dwIoBase
)
{
@ -519,7 +519,7 @@ void KeyvRemoveAllWEPKey (
*/
BOOL KeybGetTransmitKey (
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyType,
PSKeyItem *pKey
)
@ -636,7 +636,7 @@ BOOL KeybSetDefaultKey (
DWORD dwKeyIndex,
unsigned long uKeyLength,
PQWORD pKeyRSC,
PBYTE pbyKey,
unsigned char *pbyKey,
BYTE byKeyDecMode,
DWORD_PTR dwIoBase,
BYTE byLocalID
@ -743,7 +743,7 @@ BOOL KeybSetAllGroupKey (
DWORD dwKeyIndex,
unsigned long uKeyLength,
PQWORD pKeyRSC,
PBYTE pbyKey,
unsigned char *pbyKey,
BYTE byKeyDecMode,
DWORD_PTR dwIoBase,
BYTE byLocalID

View File

@ -105,18 +105,18 @@ void KeyvInitTable(PSKeyManagement pTable, DWORD_PTR dwIoBase);
BOOL KeybGetKey(
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyIndex,
PSKeyItem *pKey
);
BOOL KeybSetKey(
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyIndex,
unsigned long uKeyLength,
PQWORD pKeyRSC,
PBYTE pbyKey,
unsigned char *pbyKey,
BYTE byKeyDecMode,
DWORD_PTR dwIoBase,
BYTE byLocalID
@ -127,7 +127,7 @@ BOOL KeybSetDefaultKey(
DWORD dwKeyIndex,
unsigned long uKeyLength,
PQWORD pKeyRSC,
PBYTE pbyKey,
unsigned char *pbyKey,
BYTE byKeyDecMode,
DWORD_PTR dwIoBase,
BYTE byLocalID
@ -135,14 +135,14 @@ BOOL KeybSetDefaultKey(
BOOL KeybRemoveKey(
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyIndex,
DWORD_PTR dwIoBase
);
BOOL KeybGetTransmitKey(
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD dwKeyType,
PSKeyItem *pKey
);
@ -154,7 +154,7 @@ BOOL KeybCheckPairewiseKey(
BOOL KeybRemoveAllKey(
PSKeyManagement pTable,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
DWORD_PTR dwIoBase
);
@ -174,7 +174,7 @@ BOOL KeybSetAllGroupKey (
DWORD dwKeyIndex,
unsigned long uKeyLength,
PQWORD pKeyRSC,
PBYTE pbyKey,
unsigned char *pbyKey,
BYTE byKeyDecMode,
DWORD_PTR dwIoBase,
BYTE byLocalID

View File

@ -103,7 +103,7 @@ static int msglevel =MSG_LEVEL_INFO;
* Return Value: none
*
*/
void MACvReadAllRegs (DWORD_PTR dwIoBase, PBYTE pbyMacRegs)
void MACvReadAllRegs (DWORD_PTR dwIoBase, unsigned char *pbyMacRegs)
{
int ii;
@ -342,7 +342,7 @@ void MACvSetRxThreshold (DWORD_PTR dwIoBase, BYTE byThreshold)
* Return Value: none
*
*/
void MACvGetRxThreshold (DWORD_PTR dwIoBase, PBYTE pbyThreshold)
void MACvGetRxThreshold (DWORD_PTR dwIoBase, unsigned char *pbyThreshold)
{
// get FCR0
VNSvInPortB(dwIoBase + MAC_REG_FCR0, pbyThreshold);
@ -388,7 +388,7 @@ void MACvSetTxThreshold (DWORD_PTR dwIoBase, BYTE byThreshold)
* Return Value: none
*
*/
void MACvGetTxThreshold (DWORD_PTR dwIoBase, PBYTE pbyThreshold)
void MACvGetTxThreshold (DWORD_PTR dwIoBase, unsigned char *pbyThreshold)
{
// get FCR0
VNSvInPortB(dwIoBase + MAC_REG_FCR0, pbyThreshold);
@ -434,7 +434,7 @@ void MACvSetDmaLength (DWORD_PTR dwIoBase, BYTE byDmaLength)
* Return Value: none
*
*/
void MACvGetDmaLength (DWORD_PTR dwIoBase, PBYTE pbyDmaLength)
void MACvGetDmaLength (DWORD_PTR dwIoBase, unsigned char *pbyDmaLength)
{
// get FCR0
VNSvInPortB(dwIoBase + MAC_REG_FCR0, pbyDmaLength);
@ -474,7 +474,7 @@ void MACvSetShortRetryLimit (DWORD_PTR dwIoBase, BYTE byRetryLimit)
* Return Value: none
*
*/
void MACvGetShortRetryLimit (DWORD_PTR dwIoBase, PBYTE pbyRetryLimit)
void MACvGetShortRetryLimit (DWORD_PTR dwIoBase, unsigned char *pbyRetryLimit)
{
// get SRT
VNSvInPortB(dwIoBase + MAC_REG_SRT, pbyRetryLimit);
@ -513,7 +513,7 @@ void MACvSetLongRetryLimit (DWORD_PTR dwIoBase, BYTE byRetryLimit)
* Return Value: none
*
*/
void MACvGetLongRetryLimit (DWORD_PTR dwIoBase, PBYTE pbyRetryLimit)
void MACvGetLongRetryLimit (DWORD_PTR dwIoBase, unsigned char *pbyRetryLimit)
{
// get LRT
VNSvInPortB(dwIoBase + MAC_REG_LRT, pbyRetryLimit);
@ -643,7 +643,7 @@ void MACvSetPacketFilter (DWORD_PTR dwIoBase, WORD wFilterType)
* Return Value: none
*
*/
void MACvSaveContext (DWORD_PTR dwIoBase, PBYTE pbyCxtBuf)
void MACvSaveContext (DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf)
{
int ii;
@ -676,7 +676,7 @@ void MACvSaveContext (DWORD_PTR dwIoBase, PBYTE pbyCxtBuf)
* Return Value: none
*
*/
void MACvRestoreContext (DWORD_PTR dwIoBase, PBYTE pbyCxtBuf)
void MACvRestoreContext (DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf)
{
int ii;
@ -728,7 +728,7 @@ void MACvRestoreContext (DWORD_PTR dwIoBase, PBYTE pbyCxtBuf)
* Return Value: TRUE if all values are the same; otherwise FALSE
*
*/
BOOL MACbCompareContext (DWORD_PTR dwIoBase, PBYTE pbyCxtBuf)
BOOL MACbCompareContext (DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf)
{
DWORD dwData;
@ -1456,7 +1456,7 @@ BOOL MACbPSWakeup (DWORD_PTR dwIoBase)
*/
void MACvSetKeyEntry (DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey, BYTE byLocalID)
unsigned int uKeyIdx, unsigned char *pbyAddr, PDWORD pdwKey, BYTE byLocalID)
{
WORD wOffset;
DWORD dwData;

View File

@ -765,7 +765,7 @@
{ \
VNSvOutPortB(dwIoBase + MAC_REG_PAGE1SEL, 1); \
VNSvInPortB(dwIoBase + MAC_REG_BSSID0, \
(PBYTE)pbyEtherAddr); \
(unsigned char *)pbyEtherAddr); \
VNSvInPortB(dwIoBase + MAC_REG_BSSID0 + 1, \
pbyEtherAddr + 1); \
VNSvInPortB(dwIoBase + MAC_REG_BSSID0 + 2, \
@ -801,7 +801,7 @@
{ \
VNSvOutPortB(dwIoBase + MAC_REG_PAGE1SEL, 1); \
VNSvInPortB(dwIoBase + MAC_REG_PAR0, \
(PBYTE)pbyEtherAddr); \
(unsigned char *)pbyEtherAddr); \
VNSvInPortB(dwIoBase + MAC_REG_PAR0 + 1, \
pbyEtherAddr + 1); \
VNSvInPortB(dwIoBase + MAC_REG_PAR0 + 2, \
@ -1075,7 +1075,7 @@
/*--------------------- Export Functions --------------------------*/
extern WORD TxRate_iwconfig;//2008-5-8 <add> by chester
void MACvReadAllRegs(DWORD_PTR dwIoBase, PBYTE pbyMacRegs);
void MACvReadAllRegs(DWORD_PTR dwIoBase, unsigned char *pbyMacRegs);
BOOL MACbIsRegBitsOn(DWORD_PTR dwIoBase, BYTE byRegOfs, BYTE byTestBits);
BOOL MACbIsRegBitsOff(DWORD_PTR dwIoBase, BYTE byRegOfs, BYTE byTestBits);
@ -1088,28 +1088,28 @@ void MACvSetMultiAddrByHash(DWORD_PTR dwIoBase, BYTE byHashIdx);
void MACvResetMultiAddrByHash(DWORD_PTR dwIoBase, BYTE byHashIdx);
void MACvSetRxThreshold(DWORD_PTR dwIoBase, BYTE byThreshold);
void MACvGetRxThreshold(DWORD_PTR dwIoBase, PBYTE pbyThreshold);
void MACvGetRxThreshold(DWORD_PTR dwIoBase, unsigned char *pbyThreshold);
void MACvSetTxThreshold(DWORD_PTR dwIoBase, BYTE byThreshold);
void MACvGetTxThreshold(DWORD_PTR dwIoBase, PBYTE pbyThreshold);
void MACvGetTxThreshold(DWORD_PTR dwIoBase, unsigned char *pbyThreshold);
void MACvSetDmaLength(DWORD_PTR dwIoBase, BYTE byDmaLength);
void MACvGetDmaLength(DWORD_PTR dwIoBase, PBYTE pbyDmaLength);
void MACvGetDmaLength(DWORD_PTR dwIoBase, unsigned char *pbyDmaLength);
void MACvSetShortRetryLimit(DWORD_PTR dwIoBase, BYTE byRetryLimit);
void MACvGetShortRetryLimit(DWORD_PTR dwIoBase, PBYTE pbyRetryLimit);
void MACvGetShortRetryLimit(DWORD_PTR dwIoBase, unsigned char *pbyRetryLimit);
void MACvSetLongRetryLimit(DWORD_PTR dwIoBase, BYTE byRetryLimit);
void MACvGetLongRetryLimit(DWORD_PTR dwIoBase, PBYTE pbyRetryLimit);
void MACvGetLongRetryLimit(DWORD_PTR dwIoBase, unsigned char *pbyRetryLimit);
void MACvSetLoopbackMode(DWORD_PTR dwIoBase, BYTE byLoopbackMode);
BOOL MACbIsInLoopbackMode(DWORD_PTR dwIoBase);
void MACvSetPacketFilter(DWORD_PTR dwIoBase, WORD wFilterType);
void MACvSaveContext(DWORD_PTR dwIoBase, PBYTE pbyCxtBuf);
void MACvRestoreContext(DWORD_PTR dwIoBase, PBYTE pbyCxtBuf);
BOOL MACbCompareContext(DWORD_PTR dwIoBase, PBYTE pbyCxtBuf);
void MACvSaveContext(DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf);
void MACvRestoreContext(DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf);
BOOL MACbCompareContext(DWORD_PTR dwIoBase, unsigned char *pbyCxtBuf);
BOOL MACbSoftwareReset(DWORD_PTR dwIoBase);
BOOL MACbSafeSoftwareReset(DWORD_PTR dwIoBase);
@ -1140,7 +1140,7 @@ BOOL MACbFlushSYNCFifo(DWORD_PTR dwIoBase);
BOOL MACbPSWakeup(DWORD_PTR dwIoBase);
void MACvSetKeyEntry(DWORD_PTR dwIoBase, WORD wKeyCtl, unsigned int uEntryIdx,
unsigned int uKeyIdx, PBYTE pbyAddr, PDWORD pdwKey, BYTE byLocalID);
unsigned int uKeyIdx, unsigned char *pbyAddr, PDWORD pdwKey, BYTE byLocalID);
void MACvDisableKeyEntry(DWORD_PTR dwIoBase, unsigned int uEntryIdx);
void MACvSetDefaultKeyEntry(DWORD_PTR dwIoBase, unsigned int uKeyLen,
unsigned int uKeyIdx, PDWORD pdwKey, BYTE byLocalID);

View File

@ -178,7 +178,7 @@ void STAvUpdateIsrStatCounter (PSStatCounter pStatistic, DWORD dwIsr)
*/
void STAvUpdateRDStatCounter (PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxRate,
PBYTE pbyBuffer, unsigned int cbFrameLength)
unsigned char *pbyBuffer, unsigned int cbFrameLength)
{
//need change
PS802_11Header pHeader = (PS802_11Header)pbyBuffer;
@ -392,7 +392,7 @@ STAvUpdateRDStatCounterEx (
BYTE byRSR,
BYTE byNewRSR,
BYTE byRxRate,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
unsigned int cbFrameLength
)
{
@ -408,7 +408,7 @@ STAvUpdateRDStatCounterEx (
// rx length
pStatistic->dwCntRxFrmLength = cbFrameLength;
// rx pattern, we just see 10 bytes for sample
memcpy(pStatistic->abyCntRxPattern, (PBYTE)pbyBuffer, 10);
memcpy(pStatistic->abyCntRxPattern, (unsigned char *)pbyBuffer, 10);
}
@ -434,13 +434,13 @@ STAvUpdateTDStatCounter (
PSStatCounter pStatistic,
BYTE byTSR0,
BYTE byTSR1,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
unsigned int cbFrameLength,
unsigned int uIdx
)
{
PWLAN_80211HDR_A4 pHeader;
PBYTE pbyDestAddr;
unsigned char *pbyDestAddr;
BYTE byTSR0_NCR = byTSR0 & TSR0_NCR;
@ -522,7 +522,7 @@ STAvUpdateTDStatCounter (
void
STAvUpdateTDStatCounterEx (
PSStatCounter pStatistic,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
DWORD cbFrameLength
)
{

View File

@ -348,18 +348,18 @@ void STAvUpdateIsrStatCounter(PSStatCounter pStatistic, DWORD dwIsr);
void STAvUpdateRDStatCounter(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRSR, BYTE byRxRate,
PBYTE pbyBuffer, unsigned int cbFrameLength);
unsigned char *pbyBuffer, unsigned int cbFrameLength);
void STAvUpdateRDStatCounterEx(PSStatCounter pStatistic,
BYTE byRSR, BYTE byNewRsr, BYTE byRxRate,
PBYTE pbyBuffer, unsigned int cbFrameLength);
unsigned char *pbyBuffer, unsigned int cbFrameLength);
void STAvUpdateTDStatCounter(PSStatCounter pStatistic, BYTE byTSR0, BYTE byTSR1,
PBYTE pbyBuffer, unsigned int cbFrameLength, unsigned int uIdx);
unsigned char *pbyBuffer, unsigned int cbFrameLength, unsigned int uIdx);
void STAvUpdateTDStatCounterEx(
PSStatCounter pStatistic,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
DWORD cbFrameLength
);

View File

@ -149,7 +149,7 @@ void MIC_vUnInit (void)
s_vClear();
}
void MIC_vAppend (PBYTE src, unsigned int nBytes)
void MIC_vAppend (unsigned char *src, unsigned int nBytes)
{
// This is simple
while (nBytes > 0)

View File

@ -40,7 +40,7 @@ void MIC_vInit(DWORD dwK0, DWORD dwK1);
void MIC_vUnInit(void);
// Append bytes to the message to be MICed
void MIC_vAppend(PBYTE src, unsigned int nBytes);
void MIC_vAppend(unsigned char *src, unsigned int nBytes);
// Get the MIC result. Destination should accept 8 bytes of result.
// This also resets the message to empty.

View File

@ -262,7 +262,7 @@ PSvSendPSPOLL(
memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_HDR_ADDR2_LEN);
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16(
(
WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) |
@ -329,7 +329,7 @@ PSbSendNullPacket(
memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN);
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
if (pDevice->bEnablePSMode) {

View File

@ -32,12 +32,12 @@
#include "rc4.h"
void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len)
void rc4_init(PRC4Ext pRC4, unsigned char *pbyKey, unsigned int cbKey_len)
{
unsigned int ust1, ust2;
unsigned int keyindex;
unsigned int stateindex;
PBYTE pbyst;
unsigned char *pbyst;
unsigned int idx;
pbyst = pRC4->abystate;
@ -63,7 +63,7 @@ unsigned int rc4_byte(PRC4Ext pRC4)
unsigned int ux;
unsigned int uy;
unsigned int ustx, usty;
PBYTE pbyst;
unsigned char *pbyst;
pbyst = pRC4->abystate;
ux = (pRC4->ux + 1) & 0xff;
@ -78,8 +78,8 @@ unsigned int rc4_byte(PRC4Ext pRC4)
return pbyst[(ustx + usty) & 0xff];
}
void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest,
PBYTE pbySrc, unsigned int cbData_len)
void rc4_encrypt(PRC4Ext pRC4, unsigned char *pbyDest,
unsigned char *pbySrc, unsigned int cbData_len)
{
unsigned int ii;
for (ii = 0; ii < cbData_len; ii++)

View File

@ -40,8 +40,8 @@ typedef struct {
BYTE abystate[256];
} RC4Ext, *PRC4Ext;
void rc4_init(PRC4Ext pRC4, PBYTE pbyKey, unsigned int cbKey_len);
void rc4_init(PRC4Ext pRC4, unsigned char *pbyKey, unsigned int cbKey_len);
unsigned int rc4_byte(PRC4Ext pRC4);
void rc4_encrypt(PRC4Ext pRC4, PBYTE pbyDest, PBYTE pbySrc, unsigned int cbData_len);
void rc4_encrypt(PRC4Ext pRC4, unsigned char *pbyDest, unsigned char *pbySrc, unsigned int cbData_len);
#endif //__RC4_H__

View File

@ -118,12 +118,12 @@ static
void
s_vFillTxKey(
PSDevice pDevice,
PBYTE pbyBuf,
PBYTE pbyIVHead,
unsigned char *pbyBuf,
unsigned char *pbyIVHead,
PSKeyItem pTransmitKey,
PBYTE pbyHdrBuf,
unsigned char *pbyHdrBuf,
WORD wPayloadLen,
PBYTE pMICHDR
unsigned char *pMICHDR
);
@ -162,7 +162,7 @@ s_vGenerateTxParameter(
static void s_vFillFragParameter(
PSDevice pDevice,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
unsigned int uTxType,
void * pvtdCurr,
WORD wFragType,
@ -175,12 +175,12 @@ unsigned int
s_cbFillTxBufHead (
PSDevice pDevice,
BYTE byPktType,
PBYTE pbyTxBufferAddr,
unsigned char *pbyTxBufferAddr,
unsigned int cbFrameBodySize,
unsigned int uDMAIdx,
PSTxDesc pHeadTD,
PSEthernetHeader psEthHeader,
PBYTE pPacket,
unsigned char *pPacket,
BOOL bNeedEncrypt,
PSKeyItem pTransmitKey,
unsigned int uNodeIndex,
@ -213,16 +213,16 @@ static
void
s_vFillTxKey (
PSDevice pDevice,
PBYTE pbyBuf,
PBYTE pbyIVHead,
unsigned char *pbyBuf,
unsigned char *pbyIVHead,
PSKeyItem pTransmitKey,
PBYTE pbyHdrBuf,
unsigned char *pbyHdrBuf,
WORD wPayloadLen,
PBYTE pMICHDR
unsigned char *pMICHDR
)
{
PDWORD pdwIV = (PDWORD) pbyIVHead;
PDWORD pdwExtIV = (PDWORD) ((PBYTE)pbyIVHead+4);
PDWORD pdwExtIV = (PDWORD) ((unsigned char *)pbyIVHead+4);
WORD wValue;
PS802_11Header pMACHeader = (PS802_11Header)pbyHdrBuf;
DWORD dwRevIVCounter;
@ -240,13 +240,13 @@ s_vFillTxKey (
if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN ){
memcpy(pDevice->abyPRNG, (PBYTE)&(dwRevIVCounter), 3);
memcpy(pDevice->abyPRNG, (unsigned char *)&(dwRevIVCounter), 3);
memcpy(pDevice->abyPRNG+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
} else {
memcpy(pbyBuf, (PBYTE)&(dwRevIVCounter), 3);
memcpy(pbyBuf, (unsigned char *)&(dwRevIVCounter), 3);
memcpy(pbyBuf+3, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
if(pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) {
memcpy(pbyBuf+8, (PBYTE)&(dwRevIVCounter), 3);
memcpy(pbyBuf+8, (unsigned char *)&(dwRevIVCounter), 3);
memcpy(pbyBuf+11, pTransmitKey->abyKey, pTransmitKey->uKeyLength);
}
memcpy(pDevice->abyPRNG, pbyBuf, 16);
@ -291,26 +291,26 @@ s_vFillTxKey (
//Fill MICHDR0
*pMICHDR = 0x59;
*((PBYTE)(pMICHDR+1)) = 0; // TxPriority
*((unsigned char *)(pMICHDR+1)) = 0; // TxPriority
memcpy(pMICHDR+2, &(pMACHeader->abyAddr2[0]), 6);
*((PBYTE)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
*((PBYTE)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
*((PBYTE)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
*((PBYTE)(pMICHDR+11)) = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
*((PBYTE)(pMICHDR+12)) = HIBYTE(pTransmitKey->wTSC15_0);
*((PBYTE)(pMICHDR+13)) = LOBYTE(pTransmitKey->wTSC15_0);
*((PBYTE)(pMICHDR+14)) = HIBYTE(wPayloadLen);
*((PBYTE)(pMICHDR+15)) = LOBYTE(wPayloadLen);
*((unsigned char *)(pMICHDR+8)) = HIBYTE(HIWORD(pTransmitKey->dwTSC47_16));
*((unsigned char *)(pMICHDR+9)) = LOBYTE(HIWORD(pTransmitKey->dwTSC47_16));
*((unsigned char *)(pMICHDR+10)) = HIBYTE(LOWORD(pTransmitKey->dwTSC47_16));
*((unsigned char *)(pMICHDR+11)) = LOBYTE(LOWORD(pTransmitKey->dwTSC47_16));
*((unsigned char *)(pMICHDR+12)) = HIBYTE(pTransmitKey->wTSC15_0);
*((unsigned char *)(pMICHDR+13)) = LOBYTE(pTransmitKey->wTSC15_0);
*((unsigned char *)(pMICHDR+14)) = HIBYTE(wPayloadLen);
*((unsigned char *)(pMICHDR+15)) = LOBYTE(wPayloadLen);
//Fill MICHDR1
*((PBYTE)(pMICHDR+16)) = 0; // HLEN[15:8]
*((unsigned char *)(pMICHDR+16)) = 0; // HLEN[15:8]
if (pDevice->bLongHeader) {
*((PBYTE)(pMICHDR+17)) = 28; // HLEN[7:0]
*((unsigned char *)(pMICHDR+17)) = 28; // HLEN[7:0]
} else {
*((PBYTE)(pMICHDR+17)) = 22; // HLEN[7:0]
*((unsigned char *)(pMICHDR+17)) = 22; // HLEN[7:0]
}
wValue = cpu_to_le16(pMACHeader->wFrameCtl & 0xC78F);
memcpy(pMICHDR+18, (PBYTE)&wValue, 2); // MSKFRACTL
memcpy(pMICHDR+18, (unsigned char *)&wValue, 2); // MSKFRACTL
memcpy(pMICHDR+20, &(pMACHeader->abyAddr1[0]), 6);
memcpy(pMICHDR+26, &(pMACHeader->abyAddr2[0]), 6);
@ -319,7 +319,7 @@ s_vFillTxKey (
wValue = pMACHeader->wSeqCtl;
wValue &= 0x000F;
wValue = cpu_to_le16(wValue);
memcpy(pMICHDR+38, (PBYTE)&wValue, 2); // MSKSEQCTL
memcpy(pMICHDR+38, (unsigned char *)&wValue, 2); // MSKSEQCTL
if (pDevice->bLongHeader) {
memcpy(pMICHDR+40, &(pMACHeader->abyAddr4[0]), 6);
}
@ -332,7 +332,7 @@ void
s_vSWencryption (
PSDevice pDevice,
PSKeyItem pTransmitKey,
PBYTE pbyPayloadHead,
unsigned char *pbyPayloadHead,
WORD wPayloadSize
)
{
@ -745,11 +745,11 @@ s_uFillDataHead (
PSTxDataHead_g pBuf = (PSTxDataHead_g)pTxDataHead;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a)
);
pBuf->wTransmitLength_a = cpu_to_le16(wLen);
BBvCaculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b)
);
pBuf->wTransmitLength_b = cpu_to_le16(wLen);
//Get Duration and TimeStamp
@ -771,11 +771,11 @@ s_uFillDataHead (
PSTxDataHead_g_FB pBuf = (PSTxDataHead_g_FB)pTxDataHead;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a)
);
pBuf->wTransmitLength_a = cpu_to_le16(wLen);
BBvCaculateParameter(pDevice, cbFrameLength, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b)
);
pBuf->wTransmitLength_b = cpu_to_le16(wLen);
//Get Duration and TimeStamp
@ -800,7 +800,7 @@ s_uFillDataHead (
PSTxDataHead_a_FB pBuf = (PSTxDataHead_a_FB)pTxDataHead;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField)
);
pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration and TimeStampOff
@ -817,7 +817,7 @@ s_uFillDataHead (
PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField)
);
pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration and TimeStampOff
@ -835,7 +835,7 @@ s_uFillDataHead (
PSTxDataHead_ab pBuf = (PSTxDataHead_ab)pTxDataHead;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, cbFrameLength, wCurrentRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField)
);
pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration and TimeStampOff
@ -883,11 +883,11 @@ s_vFillRTSHead (
PSRTS_g pBuf = (PSRTS_g)pvRTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b)
);
pBuf->wTransmitLength_b = cpu_to_le16(wLen);
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a)
);
pBuf->wTransmitLength_a = cpu_to_le16(wLen);
//Get Duration
@ -916,11 +916,11 @@ s_vFillRTSHead (
PSRTS_g_FB pBuf = (PSRTS_g_FB)pvRTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b)
);
pBuf->wTransmitLength_b = cpu_to_le16(wLen);
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_a), (PBYTE)&(pBuf->bySignalField_a)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_a), (unsigned char *)&(pBuf->bySignalField_a)
);
pBuf->wTransmitLength_a = cpu_to_le16(wLen);
@ -958,7 +958,7 @@ s_vFillRTSHead (
PSRTS_ab pBuf = (PSRTS_ab)pvRTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField)
);
pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration
@ -987,7 +987,7 @@ s_vFillRTSHead (
PSRTS_a_FB pBuf = (PSRTS_a_FB)pvRTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopOFDMBasicRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField)
);
pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration
@ -1017,7 +1017,7 @@ s_vFillRTSHead (
PSRTS_ab pBuf = (PSRTS_ab)pvRTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uRTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField), (PBYTE)&(pBuf->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField), (unsigned char *)&(pBuf->bySignalField)
);
pBuf->wTransmitLength = cpu_to_le16(wLen);
//Get Duration
@ -1077,7 +1077,7 @@ s_vFillCTSHead (
PSCTS_FB pBuf = (PSCTS_FB)pvCTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b)
);
@ -1104,7 +1104,7 @@ s_vFillCTSHead (
PSCTS pBuf = (PSCTS)pvCTS;
//Get SignalField,ServiceField,Length
BBvCaculateParameter(pDevice, uCTSFrameLen, pDevice->byTopCCKBasicRate, PK_TYPE_11B,
(PWORD)&(wLen), (PBYTE)&(pBuf->byServiceField_b), (PBYTE)&(pBuf->bySignalField_b)
(PWORD)&(wLen), (unsigned char *)&(pBuf->byServiceField_b), (unsigned char *)&(pBuf->bySignalField_b)
);
pBuf->wTransmitLength_b = cpu_to_le16(wLen);
//Get CTSDuration_ba
@ -1263,7 +1263,7 @@ s_vGenerateTxParameter (
//DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"s_vGenerateTxParameter END.\n");
}
/*
PBYTE pbyBuffer,//point to pTxBufHead
unsigned char *pbyBuffer,//point to pTxBufHead
WORD wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last
unsigned int cbFragmentSize,//Hdr+payoad+FCS
*/
@ -1271,7 +1271,7 @@ static
void
s_vFillFragParameter(
PSDevice pDevice,
PBYTE pbyBuffer,
unsigned char *pbyBuffer,
unsigned int uTxType,
void * pvtdCurr,
WORD wFragType,
@ -1320,12 +1320,12 @@ unsigned int
s_cbFillTxBufHead (
PSDevice pDevice,
BYTE byPktType,
PBYTE pbyTxBufferAddr,
unsigned char *pbyTxBufferAddr,
unsigned int cbFrameBodySize,
unsigned int uDMAIdx,
PSTxDesc pHeadTD,
PSEthernetHeader psEthHeader,
PBYTE pPacket,
unsigned char *pPacket,
BOOL bNeedEncrypt,
PSKeyItem pTransmitKey,
unsigned int uNodeIndex,
@ -1339,12 +1339,12 @@ s_cbFillTxBufHead (
unsigned int cbLastFragmentSize; //Hdr+(IV)+payoad+(MIC)+(ICV)+FCS
unsigned int cbLastFragPayloadSize;
unsigned int uFragIdx;
PBYTE pbyPayloadHead;
PBYTE pbyIVHead;
PBYTE pbyMacHdr;
unsigned char *pbyPayloadHead;
unsigned char *pbyIVHead;
unsigned char *pbyMacHdr;
WORD wFragType; //00:Non-Frag, 01:Start, 10:Mid, 11:Last
unsigned int uDuration;
PBYTE pbyBuffer;
unsigned char *pbyBuffer;
// unsigned int uKeyEntryIdx = NUM_KEY_ENTRY+1;
// BYTE byKeySel = 0xFF;
unsigned int cbIVlen = 0;
@ -1371,7 +1371,7 @@ s_cbFillTxBufHead (
BOOL bNeedACK;
BOOL bRTS;
BOOL bIsAdhoc;
PBYTE pbyType;
unsigned char *pbyType;
PSTxDesc ptdCurr;
PSTxBufHead psTxBufHd = (PSTxBufHead) pbyTxBufferAddr;
// unsigned int tmpDescIdx;
@ -1562,17 +1562,17 @@ s_cbFillTxBufHead (
}
// DO Software Michael
MIC_vInit(dwMICKey0, dwMICKey1);
MIC_vAppend((PBYTE)&(psEthHeader->abyDstAddr[0]), 12);
MIC_vAppend((unsigned char *)&(psEthHeader->abyDstAddr[0]), 12);
dwMIC_Priority = 0;
MIC_vAppend((PBYTE)&dwMIC_Priority, 4);
MIC_vAppend((unsigned char *)&dwMIC_Priority, 4);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1);
}
///////////////////////////////////////////////////////////////////
pbyMacHdr = (PBYTE)(pbyTxBufferAddr + cbHeaderLength);
pbyPayloadHead = (PBYTE)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen);
pbyIVHead = (PBYTE)(pbyMacHdr + cbMACHdLen + uPadding);
pbyMacHdr = (unsigned char *)(pbyTxBufferAddr + cbHeaderLength);
pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen);
pbyIVHead = (unsigned char *)(pbyMacHdr + cbMACHdLen + uPadding);
if ((cbFrameSize > pDevice->wFragmentationThreshold) && (bNeedACK == TRUE) && (bIsWEP256 == FALSE)) {
// Fragmentation
@ -1611,8 +1611,8 @@ s_cbFillTxBufHead (
if (bNeedEncrypt == TRUE) {
//Fill TXKEY
s_vFillTxKey(pDevice, (PBYTE)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFragPayloadSize, (PBYTE)pMICHDR);
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFragPayloadSize, (unsigned char *)pMICHDR);
//Fill IV(ExtIV,RSNHDR)
if (pDevice->bEnableHostWEP) {
pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
@ -1625,12 +1625,12 @@ s_cbFillTxBufHead (
if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
if ((psEthHeader->wType == TYPE_PKT_IPX) ||
(psEthHeader->wType == cpu_to_le16(0xF380))) {
memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6);
memcpy((unsigned char *) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6);
}
else {
memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6);
memcpy((unsigned char *) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6);
}
pbyType = (PBYTE) (pbyPayloadHead + 6);
pbyType = (unsigned char *) (pbyPayloadHead + 6);
memcpy(pbyType, &(psEthHeader->wType), sizeof(WORD));
cb802_1_H_len = 8;
}
@ -1641,15 +1641,15 @@ s_cbFillTxBufHead (
//---------------------------
//Fill MICHDR
//if (pDevice->bAES) {
// s_vFillMICHDR(pDevice, (PBYTE)pMICHDR, pbyMacHdr, (WORD)cbFragPayloadSize);
// s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, pbyMacHdr, (WORD)cbFragPayloadSize);
//}
//cbReqCount += s_uDoEncryption(pDevice, psEthHeader, (void *)psTxBufHd, byKeySel,
// pbyPayloadHead, (WORD)cbFragPayloadSize, uDMAIdx);
//pbyBuffer = (PBYTE)pDevice->aamTxBuf[uDMAIdx][uDescIdx].pbyVAddr;
pbyBuffer = (PBYTE)pHeadTD->pTDInfo->buf;
//pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][uDescIdx].pbyVAddr;
pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen + cb802_1_H_len;
//copy TxBufferHeader + MacHeader to desc
@ -1716,8 +1716,8 @@ s_cbFillTxBufHead (
if (bNeedEncrypt == TRUE) {
//Fill TXKEY
s_vFillTxKey(pDevice, (PBYTE)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbLastFragPayloadSize, (PBYTE)pMICHDR);
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbLastFragPayloadSize, (unsigned char *)pMICHDR);
if (pDevice->bEnableHostWEP) {
pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
@ -1734,8 +1734,8 @@ s_cbFillTxBufHead (
pbyBuffer = (PBYTE)pHeadTD->pTDInfo->buf;
//pbyBuffer = (PBYTE)pDevice->aamTxBuf[uDMAIdx][tmpDescIdx].pbyVAddr;
pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
//pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][tmpDescIdx].pbyVAddr;
uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen;
@ -1766,23 +1766,23 @@ s_cbFillTxBufHead (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Last MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R);
} else {
if (uMICFragLen >= 4) {
memcpy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)),
memcpy((pbyBuffer + uLength), ((unsigned char *)&dwSafeMIC_R + (uMICFragLen - 4)),
(cbMIClen - uMICFragLen));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen >= 4: %X, %d\n",
*(PBYTE)((PBYTE)&dwSafeMIC_R + (uMICFragLen - 4)),
*(unsigned char *)((unsigned char *)&dwSafeMIC_R + (uMICFragLen - 4)),
(cbMIClen - uMICFragLen));
} else {
memcpy((pbyBuffer + uLength), ((PBYTE)&dwSafeMIC_L + uMICFragLen),
memcpy((pbyBuffer + uLength), ((unsigned char *)&dwSafeMIC_L + uMICFragLen),
(4 - uMICFragLen));
memcpy((pbyBuffer + uLength + (4 - uMICFragLen)), &dwSafeMIC_R, 4);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"LAST: uMICFragLen < 4: %X, %d\n",
*(PBYTE)((PBYTE)&dwSafeMIC_R + uMICFragLen - 4),
*(unsigned char *)((unsigned char *)&dwSafeMIC_R + uMICFragLen - 4),
(cbMIClen - uMICFragLen));
}
/*
for (ii = 0; ii < cbLastFragPayloadSize + 8 + 24; ii++) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii - 8 - 24)));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((unsigned char *)((pbyBuffer + uLength) + ii - 8 - 24)));
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n\n");
*/
@ -1847,8 +1847,8 @@ s_cbFillTxBufHead (
if (bNeedEncrypt == TRUE) {
//Fill TXKEY
s_vFillTxKey(pDevice, (PBYTE)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFragPayloadSize, (PBYTE)pMICHDR);
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFragPayloadSize, (unsigned char *)pMICHDR);
if (pDevice->bEnableHostWEP) {
pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
@ -1862,14 +1862,14 @@ s_cbFillTxBufHead (
//---------------------------
//Fill MICHDR
//if (pDevice->bAES) {
// s_vFillMICHDR(pDevice, (PBYTE)pMICHDR, pbyMacHdr, (WORD)cbFragPayloadSize);
// s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, pbyMacHdr, (WORD)cbFragPayloadSize);
//}
//cbReqCount += s_uDoEncryption(pDevice, psEthHeader, (void *)psTxBufHd, byKeySel,
// pbyPayloadHead, (WORD)cbFragPayloadSize, uDMAIdx);
pbyBuffer = (PBYTE)pHeadTD->pTDInfo->buf;
//pbyBuffer = (PBYTE)pDevice->aamTxBuf[uDMAIdx][tmpDescIdx].pbyVAddr;
pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
//pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][tmpDescIdx].pbyVAddr;
uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen;
@ -1906,7 +1906,7 @@ s_cbFillTxBufHead (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Fill MIC in Middle frag [%d]\n", uMICFragLen);
/*
for (ii = 0; ii < uMICFragLen; ii++) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength + uTmpLen) + ii)));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((unsigned char *)((pbyBuffer + uLength + uTmpLen) + ii)));
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
*/
@ -1915,7 +1915,7 @@ s_cbFillTxBufHead (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Middle frag len: %d\n", uTmpLen);
/*
for (ii = 0; ii < uTmpLen; ii++) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii)));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((unsigned char *)((pbyBuffer + uLength) + ii)));
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n\n");
*/
@ -1976,8 +1976,8 @@ s_cbFillTxBufHead (
if (bNeedEncrypt == TRUE) {
//Fill TXKEY
s_vFillTxKey(pDevice, (PBYTE)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFrameBodySize, (PBYTE)pMICHDR);
s_vFillTxKey(pDevice, (unsigned char *)(psTxBufHd->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFrameBodySize, (unsigned char *)pMICHDR);
if (pDevice->bEnableHostWEP) {
pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;
@ -1989,12 +1989,12 @@ s_cbFillTxBufHead (
if (ntohs(psEthHeader->wType) > ETH_DATA_LEN) {
if ((psEthHeader->wType == TYPE_PKT_IPX) ||
(psEthHeader->wType == cpu_to_le16(0xF380))) {
memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6);
memcpy((unsigned char *) (pbyPayloadHead), &pDevice->abySNAP_Bridgetunnel[0], 6);
}
else {
memcpy((PBYTE) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6);
memcpy((unsigned char *) (pbyPayloadHead), &pDevice->abySNAP_RFC1042[0], 6);
}
pbyType = (PBYTE) (pbyPayloadHead + 6);
pbyType = (unsigned char *) (pbyPayloadHead + 6);
memcpy(pbyType, &(psEthHeader->wType), sizeof(WORD));
cb802_1_H_len = 8;
}
@ -2006,11 +2006,11 @@ s_cbFillTxBufHead (
//Fill MICHDR
//if (pDevice->bAES) {
// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Fill MICHDR...\n");
// s_vFillMICHDR(pDevice, (PBYTE)pMICHDR, pbyMacHdr, (WORD)cbFrameBodySize);
// s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, pbyMacHdr, (WORD)cbFrameBodySize);
//}
pbyBuffer = (PBYTE)pHeadTD->pTDInfo->buf;
//pbyBuffer = (PBYTE)pDevice->aamTxBuf[uDMAIdx][uDescIdx].pbyVAddr;
pbyBuffer = (unsigned char *)pHeadTD->pTDInfo->buf;
//pbyBuffer = (unsigned char *)pDevice->aamTxBuf[uDMAIdx][uDescIdx].pbyVAddr;
uLength = cbHeaderLength + cbMACHdLen + uPadding + cbIVlen + cb802_1_H_len;
@ -2028,7 +2028,7 @@ s_cbFillTxBufHead (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Length:%d, %d\n", cbFrameBodySize - cb802_1_H_len, uLength);
/*
for (ii = 0; ii < (cbFrameBodySize - cb802_1_H_len); ii++) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((PBYTE)((pbyBuffer + uLength) + ii)));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *((unsigned char *)((pbyBuffer + uLength) + ii)));
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
*/
@ -2053,7 +2053,7 @@ s_cbFillTxBufHead (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lx, %lx\n", *pdwMIC_L, *pdwMIC_R);
/*
for (ii = 0; ii < 8; ii++) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(((PBYTE)(pdwMIC_L) + ii)));
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(((unsigned char *)(pdwMIC_L) + ii)));
}
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
*/
@ -2097,13 +2097,13 @@ void
vGenerateFIFOHeader (
PSDevice pDevice,
BYTE byPktType,
PBYTE pbyTxBufferAddr,
unsigned char *pbyTxBufferAddr,
BOOL bNeedEncrypt,
unsigned int cbPayloadSize,
unsigned int uDMAIdx,
PSTxDesc pHeadTD,
PSEthernetHeader psEthHeader,
PBYTE pPacket,
unsigned char *pPacket,
PSKeyItem pTransmitKey,
unsigned int uNodeIndex,
PUINT puMACfragNum,
@ -2267,7 +2267,7 @@ vGenerateFIFOHeader (
void
vGenerateMACHeader (
PSDevice pDevice,
PBYTE pbyBufferAddr,
unsigned char *pbyBufferAddr,
WORD wDuration,
PSEthernetHeader psEthHeader,
BOOL bNeedEncrypt,
@ -2341,7 +2341,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
PSTxDesc pFrstTD;
BYTE byPktType;
PBYTE pbyTxBufferAddr;
unsigned char *pbyTxBufferAddr;
void * pvRTS;
PSCTS pCTS;
void * pvTxDataHd;
@ -2373,7 +2373,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
}
pFrstTD = pDevice->apCurrTD[TYPE_TXDMA0];
pbyTxBufferAddr = (PBYTE)pFrstTD->pTDInfo->buf;
pbyTxBufferAddr = (unsigned char *)pFrstTD->pTDInfo->buf;
cbFrameBodySize = pPacket->cbPayloadLen;
pTxBufHead = (PSTxBufHead) pbyTxBufferAddr;
wTxBufSize = sizeof(STxBufHead);
@ -2539,17 +2539,17 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
cbReqCount = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen + cbFrameBodySize;
if (WLAN_GET_FC_ISWEP(pPacket->p80211Header->sA4.wFrameCtl) != 0) {
PBYTE pbyIVHead;
PBYTE pbyPayloadHead;
PBYTE pbyBSSID;
unsigned char *pbyIVHead;
unsigned char *pbyPayloadHead;
unsigned char *pbyBSSID;
PSKeyItem pTransmitKey = NULL;
pbyIVHead = (PBYTE)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding);
pbyPayloadHead = (PBYTE)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding + cbIVlen);
pbyIVHead = (unsigned char *)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding);
pbyPayloadHead = (unsigned char *)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding + cbIVlen);
//Fill TXKEY
//Kyle: Need fix: TKIP and AES did't encryt Mnt Packet.
//s_vFillTxKey(pDevice, (PBYTE)pTxBufHead->adwTxKey, NULL);
//s_vFillTxKey(pDevice, (unsigned char *)pTxBufHead->adwTxKey, NULL);
//Fill IV(ExtIV,RSNHDR)
//s_vFillPrePayload(pDevice, pbyIVHead, NULL);
@ -2558,7 +2558,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
//---------------------------
//Fill MICHDR
//if (pDevice->bAES) {
// s_vFillMICHDR(pDevice, (PBYTE)pMICHDR, (PBYTE)pMACHeader, (WORD)cbFrameBodySize);
// s_vFillMICHDR(pDevice, (unsigned char *)pMICHDR, (unsigned char *)pMACHeader, (WORD)cbFrameBodySize);
//}
do {
if ((pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) &&
@ -2586,11 +2586,11 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
}
} while(FALSE);
//Fill TXKEY
s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
(PBYTE)pMACHeader, (WORD)cbFrameBodySize, NULL);
s_vFillTxKey(pDevice, (unsigned char *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
(unsigned char *)pMACHeader, (WORD)cbFrameBodySize, NULL);
memcpy(pMACHeader, pPacket->p80211Header, cbMacHdLen);
memcpy(pbyPayloadHead, ((PBYTE)(pPacket->p80211Header) + cbMacHdLen),
memcpy(pbyPayloadHead, ((unsigned char *)(pPacket->p80211Header) + cbMacHdLen),
cbFrameBodySize);
}
else {
@ -2662,7 +2662,7 @@ CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
BYTE byPktType;
PBYTE pbyBuffer = (PBYTE)pDevice->tx_beacon_bufs;
unsigned char *pbyBuffer = (unsigned char *)pDevice->tx_beacon_bufs;
unsigned int cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN;
unsigned int cbHeaderSize = 0;
WORD wTxBufSize = sizeof(STxShortBufHead);
@ -2703,7 +2703,7 @@ CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket) {
}
BBvCaculateParameter(pDevice, cbFrameSize, wCurrentRate, byPktType,
(PWORD)&(wLen), (PBYTE)&(pTxDataHead->byServiceField), (PBYTE)&(pTxDataHead->bySignalField)
(PWORD)&(wLen), (unsigned char *)&(pTxDataHead->byServiceField), (unsigned char *)&(pTxDataHead->bySignalField)
);
pTxDataHead->wTransmitLength = cpu_to_le16(wLen);
//Get TimeStampOff
@ -2826,11 +2826,11 @@ cbGetFragCount (
void
vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned int cbMPDULen) {
vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, unsigned int cbMPDULen) {
PSTxDesc pFrstTD;
BYTE byPktType;
PBYTE pbyTxBufferAddr;
unsigned char *pbyTxBufferAddr;
void * pvRTS;
void * pvCTS;
void * pvTxDataHd;
@ -2866,9 +2866,9 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned in
BOOL bNodeExist = FALSE;
SKeyItem STempKey;
PSKeyItem pTransmitKey = NULL;
PBYTE pbyIVHead;
PBYTE pbyPayloadHead;
PBYTE pbyMacHdr;
unsigned char *pbyIVHead;
unsigned char *pbyPayloadHead;
unsigned char *pbyMacHdr;
unsigned int cbExtSuppRate = 0;
// PWLAN_IE pItem;
@ -2886,7 +2886,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned in
pFrstTD = pDevice->apCurrTD[TYPE_TXDMA0];
pbyTxBufferAddr = (PBYTE)pFrstTD->pTDInfo->buf;
pbyTxBufferAddr = (unsigned char *)pFrstTD->pTDInfo->buf;
pTxBufHead = (PSTxBufHead) pbyTxBufferAddr;
wTxBufSize = sizeof(STxBufHead);
memset(pTxBufHead, 0, wTxBufSize);
@ -2948,7 +2948,7 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned in
}
else {
if (pDevice->bEnableHostWEP) {
if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (PBYTE)(p80211Header->sA3.abyAddr1), &uNodeIndex))
if (BSSDBbIsSTAInNodeDB(pDevice->pMgmt, (unsigned char *)(p80211Header->sA3.abyAddr1), &uNodeIndex))
bNodeExist = TRUE;
};
bNeedACK = TRUE;
@ -3082,9 +3082,9 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned in
cbReqCount = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen + (cbFrameBodySize + cbMIClen) + cbExtSuppRate;
pbyMacHdr = (PBYTE)(pbyTxBufferAddr + cbHeaderSize);
pbyPayloadHead = (PBYTE)(pbyMacHdr + cbMacHdLen + uPadding + cbIVlen);
pbyIVHead = (PBYTE)(pbyMacHdr + cbMacHdLen + uPadding);
pbyMacHdr = (unsigned char *)(pbyTxBufferAddr + cbHeaderSize);
pbyPayloadHead = (unsigned char *)(pbyMacHdr + cbMacHdLen + uPadding + cbIVlen);
pbyIVHead = (unsigned char *)(pbyMacHdr + cbMacHdLen + uPadding);
// Copy the Packet into a tx Buffer
memcpy(pbyMacHdr, pbMPDU, cbMacHdLen);
@ -3132,9 +3132,9 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned in
// DO Software Michael
MIC_vInit(dwMICKey0, dwMICKey1);
MIC_vAppend((PBYTE)&(sEthHeader.abyDstAddr[0]), 12);
MIC_vAppend((unsigned char *)&(sEthHeader.abyDstAddr[0]), 12);
dwMIC_Priority = 0;
MIC_vAppend((PBYTE)&dwMIC_Priority, 4);
MIC_vAppend((unsigned char *)&dwMIC_Priority, 4);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"DMA0_tx_8021:MIC KEY: %lX, %lX\n", dwMICKey0, dwMICKey1);
uLength = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen;
@ -3160,8 +3160,8 @@ vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned in
}
s_vFillTxKey(pDevice, (PBYTE)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFrameBodySize, (PBYTE)pMICHDR);
s_vFillTxKey(pDevice, (unsigned char *)(pTxBufHead->adwTxKey), pbyIVHead, pTransmitKey,
pbyMacHdr, (WORD)cbFrameBodySize, (unsigned char *)pMICHDR);
if (pDevice->bEnableHostWEP) {
pMgmt->sNodeDBTable[uNodeIndex].dwTSC47_16 = pTransmitKey->dwTSC47_16;

View File

@ -43,7 +43,7 @@
void vGenerateMACHeader(
PSDevice pDevice,
DWORD dwTxBufferAddr,
PBYTE pbySkbData,
unsigned char *pbySkbData,
unsigned int cbPacketSize,
BOOL bDMA0Used,
PUINT pcbHeadSize,
@ -63,7 +63,7 @@ void vProcessRxMACHeader (
void
vGenerateMACHeader (
PSDevice pDevice,
PBYTE pbyBufferAddr,
unsigned char *pbyBufferAddr,
WORD wDuration,
PSEthernetHeader psEthHeader,
BOOL bNeedEncrypt,
@ -86,13 +86,13 @@ void
vGenerateFIFOHeader (
PSDevice pDevice,
BYTE byPktTyp,
PBYTE pbyTxBufferAddr,
unsigned char *pbyTxBufferAddr,
BOOL bNeedEncrypt,
unsigned int cbPayloadSize,
unsigned int uDMAIdx,
PSTxDesc pHeadTD,
PSEthernetHeader psEthHeader,
PBYTE pPacket,
unsigned char *pPacket,
PSKeyItem pTransmitKey,
unsigned int uNodeIndex,
PUINT puMACfragNum,
@ -100,7 +100,7 @@ vGenerateFIFOHeader (
);
void vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, PBYTE pbMPDU, unsigned int cbMPDULen);
void vDMA0_tx_80211(PSDevice pDevice, struct sk_buff *skb, unsigned char *pbMPDU, unsigned int cbMPDULen);
CMD_STATUS csMgmt_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket);
CMD_STATUS csBeacon_xmit(PSDevice pDevice, PSTxMgmtPacket pPacket);

View File

@ -266,7 +266,7 @@ BOOL SROMbIsRegBitsOff(DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byTestBits)
* Return Value: none
*
*/
void SROMvReadAllContents(DWORD_PTR dwIoBase, PBYTE pbyEepromRegs)
void SROMvReadAllContents(DWORD_PTR dwIoBase, unsigned char *pbyEepromRegs)
{
int ii;
@ -291,7 +291,7 @@ void SROMvReadAllContents(DWORD_PTR dwIoBase, PBYTE pbyEepromRegs)
* Return Value: none
*
*/
void SROMvWriteAllContents(DWORD_PTR dwIoBase, PBYTE pbyEepromRegs)
void SROMvWriteAllContents(DWORD_PTR dwIoBase, unsigned char *pbyEepromRegs)
{
int ii;
@ -315,7 +315,7 @@ void SROMvWriteAllContents(DWORD_PTR dwIoBase, PBYTE pbyEepromRegs)
* Return Value: none
*
*/
void SROMvReadEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress)
void SROMvReadEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress)
{
BYTE ii;
@ -340,7 +340,7 @@ void SROMvReadEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress)
* Return Value: none
*
*/
void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress)
void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress)
{
BYTE ii;
@ -366,9 +366,9 @@ void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress)
*/
void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, PDWORD pdwSubSysVenId)
{
PBYTE pbyData;
unsigned char *pbyData;
pbyData = (PBYTE)pdwSubSysVenId;
pbyData = (unsigned char *)pdwSubSysVenId;
/* sub vendor */
*pbyData = SROMbyReadEmbedded(dwIoBase, 6);
*(pbyData+1) = SROMbyReadEmbedded(dwIoBase, 7);

View File

@ -144,11 +144,11 @@ void SROMvRegBitsOff(DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byBits);
BOOL SROMbIsRegBitsOn(DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byTestBits);
BOOL SROMbIsRegBitsOff(DWORD_PTR dwIoBase, BYTE byContntOffset, BYTE byTestBits);
void SROMvReadAllContents(DWORD_PTR dwIoBase, PBYTE pbyEepromRegs);
void SROMvWriteAllContents(DWORD_PTR dwIoBase, PBYTE pbyEepromRegs);
void SROMvReadAllContents(DWORD_PTR dwIoBase, unsigned char *pbyEepromRegs);
void SROMvWriteAllContents(DWORD_PTR dwIoBase, unsigned char *pbyEepromRegs);
void SROMvReadEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress);
void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, PBYTE pbyEtherAddress);
void SROMvReadEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress);
void SROMvWriteEtherAddress(DWORD_PTR dwIoBase, unsigned char *pbyEtherAddress);
void SROMvReadSubSysVenId(DWORD_PTR dwIoBase, PDWORD pdwSubSysVenId);

View File

@ -132,7 +132,7 @@ static const DWORD s_adwCrc32Table[256] = {
* Return Value: CRC-32
*
-*/
DWORD CRCdwCrc32 (PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed)
DWORD CRCdwCrc32 (unsigned char *pbyData, unsigned int cbByte, DWORD dwCrcSeed)
{
DWORD dwCrc;
@ -164,7 +164,7 @@ DWORD CRCdwCrc32 (PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed)
* Return Value: CRC-32
*
-*/
DWORD CRCdwGetCrc32 (PBYTE pbyData, unsigned int cbByte)
DWORD CRCdwGetCrc32 (unsigned char *pbyData, unsigned int cbByte)
{
return ~CRCdwCrc32(pbyData, cbByte, 0xFFFFFFFFL);
}
@ -190,7 +190,7 @@ DWORD CRCdwGetCrc32 (PBYTE pbyData, unsigned int cbByte)
* Return Value: CRC-32
*
-*/
DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC)
DWORD CRCdwGetCrc32Ex(unsigned char *pbyData, unsigned int cbByte, DWORD dwPreCRC)
{
return CRCdwCrc32(pbyData, cbByte, dwPreCRC);
}

View File

@ -43,9 +43,9 @@
/*--------------------- Export Functions --------------------------*/
DWORD CRCdwCrc32(PBYTE pbyData, unsigned int cbByte, DWORD dwCrcSeed);
DWORD CRCdwGetCrc32(PBYTE pbyData, unsigned int cbByte);
DWORD CRCdwGetCrc32Ex(PBYTE pbyData, unsigned int cbByte, DWORD dwPreCRC);
DWORD CRCdwCrc32(unsigned char *pbyData, unsigned int cbByte, DWORD dwCrcSeed);
DWORD CRCdwGetCrc32(unsigned char *pbyData, unsigned int cbByte);
DWORD CRCdwGetCrc32Ex(unsigned char *pbyData, unsigned int cbByte, DWORD dwPreCRC);
#endif // __TCRC_H__

View File

@ -61,7 +61,7 @@
* Return Value: Hash value
*
*/
BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr)
BYTE ETHbyGetHashIndexByCrc32 (unsigned char *pbyMultiAddr)
{
int ii;
BYTE byTmpHash;
@ -96,7 +96,7 @@ BYTE ETHbyGetHashIndexByCrc32 (PBYTE pbyMultiAddr)
* Return Value: TRUE if ok; FALSE if error.
*
*/
BOOL ETHbIsBufferCrc32Ok (PBYTE pbyBuffer, unsigned int cbFrameLength)
BOOL ETHbIsBufferCrc32Ok (unsigned char *pbyBuffer, unsigned int cbFrameLength)
{
DWORD dwCRC;

View File

@ -193,9 +193,9 @@ S802_11Header, *PS802_11Header;
/*--------------------- Export Functions --------------------------*/
BYTE ETHbyGetHashIndexByCrc32(PBYTE pbyMultiAddr);
//BYTE ETHbyGetHashIndexByCrc(PBYTE pbyMultiAddr);
BOOL ETHbIsBufferCrc32Ok(PBYTE pbyBuffer, unsigned int cbFrameLength);
BYTE ETHbyGetHashIndexByCrc32(unsigned char *pbyMultiAddr);
//BYTE ETHbyGetHashIndexByCrc(unsigned char *pbyMultiAddr);
BOOL ETHbIsBufferCrc32Ok(unsigned char *pbyBuffer, unsigned int cbFrameLength);
#endif // __TETHER_H__

View File

@ -184,11 +184,11 @@ unsigned int rotr1(unsigned int a)
*
*/
void TKIPvMixKey(
PBYTE pbyTKey,
PBYTE pbyTA,
unsigned char *pbyTKey,
unsigned char *pbyTA,
WORD wTSC15_0,
DWORD dwTSC47_16,
PBYTE pbyRC4Key
unsigned char *pbyRC4Key
)
{
unsigned int p1k[5];

View File

@ -47,11 +47,11 @@
/*--------------------- Export Functions --------------------------*/
void TKIPvMixKey(
PBYTE pbyTKey,
PBYTE pbyTA,
unsigned char *pbyTKey,
unsigned char *pbyTA,
WORD wTSC15_0,
DWORD dwTSC47_16,
PBYTE pbyRC4Key
unsigned char *pbyRC4Key
);
#endif // __TKIP_H__

View File

@ -92,8 +92,6 @@ typedef unsigned long DWORD_PTR; // 32-bit
// boolean pointer
typedef unsigned int * PUINT;
typedef BYTE * PBYTE;
typedef WORD * PWORD;
typedef DWORD * PDWORD;

View File

@ -76,7 +76,7 @@
#define VNSvInPortB(dwIOAddress, pbyData) { \
volatile BYTE* pbyAddr = ((PBYTE)(dwIOAddress)); \
volatile BYTE* pbyAddr = ((unsigned char *)(dwIOAddress)); \
*(pbyData) = readb(pbyAddr); \
}
@ -93,7 +93,7 @@
#define VNSvOutPortB(dwIOAddress, byData) { \
volatile BYTE* pbyAddr = ((PBYTE)(dwIOAddress)); \
volatile BYTE* pbyAddr = ((unsigned char *)(dwIOAddress)); \
writeb((BYTE)byData, pbyAddr); \
}

View File

@ -497,10 +497,10 @@ VNTWIFIvGetNextBSS (
void
VNTWIFIvUpdateNodeTxCounter(
void *pMgmtHandle,
PBYTE pbyDestAddress,
unsigned char *pbyDestAddress,
BOOL bTxOk,
WORD wRate,
PBYTE pbyTxFailCount
unsigned char *pbyTxFailCount
)
{
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
@ -532,11 +532,11 @@ VNTWIFIvUpdateNodeTxCounter(
void
VNTWIFIvGetTxRate(
void *pMgmtHandle,
PBYTE pbyDestAddress,
unsigned char *pbyDestAddress,
PWORD pwTxDataRate,
PBYTE pbyACKRate,
PBYTE pbyCCKBasicRate,
PBYTE pbyOFDMBasicRate
unsigned char *pbyACKRate,
unsigned char *pbyCCKBasicRate,
unsigned char *pbyOFDMBasicRate
)
{
PSMgmtObject pMgmt = (PSMgmtObject)pMgmtHandle;
@ -721,11 +721,11 @@ VNTWIFIbMeasureReport(
BYTE byReportMode,
BYTE byBasicMap,
BYTE byCCAFraction,
PBYTE pbyRPIs
unsigned char *pbyRPIs
)
{
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtObject;
PBYTE pbyCurrentEID = (PBYTE) (pMgmt->pCurrMeasureEIDRep);
unsigned char *pbyCurrentEID = (unsigned char *) (pMgmt->pCurrMeasureEIDRep);
//spin_lock_irq(&pDevice->lock);
if ((pvMeasureEID != NULL) &&

View File

@ -229,21 +229,21 @@ VNTWIFIvGetNextBSS (
void
VNTWIFIvUpdateNodeTxCounter(
void *pMgmtHandle,
PBYTE pbyDestAddress,
unsigned char *pbyDestAddress,
BOOL bTxOk,
WORD wRate,
PBYTE pbyTxFailCount
unsigned char *pbyTxFailCount
);
void
VNTWIFIvGetTxRate(
void *pMgmtHandle,
PBYTE pbyDestAddress,
unsigned char *pbyDestAddress,
PWORD pwTxDataRate,
PBYTE pbyACKRate,
PBYTE pbyCCKBasicRate,
PBYTE pbyOFDMBasicRate
unsigned char *pbyACKRate,
unsigned char *pbyCCKBasicRate,
unsigned char *pbyOFDMBasicRate
);
/*
BOOL
@ -294,7 +294,7 @@ VNTWIFIbMeasureReport(
BYTE byReportMode,
BYTE byBasicMap,
BYTE byCCAFraction,
PBYTE pbyRPIs
unsigned char *pbyRPIs
);
BOOL

View File

@ -77,7 +77,7 @@ PSTxMgmtPacket
s_MgrMakeProbeRequest(
PSDevice pDevice,
PSMgmtObject pMgmt,
PBYTE pScanBSSID,
unsigned char *pScanBSSID,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pCurrRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
@ -213,7 +213,7 @@ s_vProbeChannel(
//6M, 9M, 12M, 48M
BYTE abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES, 8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
BYTE abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES, 4, 0x02, 0x04, 0x0B, 0x16};
PBYTE pbyRate;
unsigned char *pbyRate;
PSTxMgmtPacket pTxPacket;
PSMgmtObject pMgmt = pDevice->pMgmt;
unsigned int ii;
@ -269,7 +269,7 @@ PSTxMgmtPacket
s_MgrMakeProbeRequest(
PSDevice pDevice,
PSMgmtObject pMgmt,
PBYTE pScanBSSID,
unsigned char *pScanBSSID,
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pCurrRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
@ -282,8 +282,8 @@ s_MgrMakeProbeRequest(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_PROBEREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_PROBEREQ_FR_MAXLEN;
vMgrEncodeProbeRequest(&sFrame);
sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
@ -982,7 +982,7 @@ s_bCommandComplete (
BOOL bScheduleCommand (
void *hDeviceContext,
CMD_CODE eCommand,
PBYTE pbyItem0
unsigned char *pbyItem0
)
{
PSDevice pDevice = (PSDevice)hDeviceContext;

View File

@ -127,7 +127,7 @@ BOOL
bScheduleCommand(
void *hDeviceContext,
CMD_CODE eCommand,
PBYTE pbyItem0
unsigned char *pbyItem0
);
void

View File

@ -205,7 +205,7 @@ unsigned int uHeaderSize;
}
}
// reserve 4 byte to match MAC RX Buffer
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (PBYTE) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (unsigned char *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4);
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, pMACHeader, cbFrameLength);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength;
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength;
@ -220,7 +220,7 @@ unsigned int uHeaderSize;
(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum == (pMACHeader->wSeqCtl & 0x000F)) &&
((pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength + cbFrameLength - uHeaderSize) < 2346)) {
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((PBYTE) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize));
memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((unsigned char *) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize));
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength += (cbFrameLength - uHeaderSize);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += (cbFrameLength - uHeaderSize);
pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;

View File

@ -104,7 +104,7 @@ PSTxMgmtPacket
s_MgrMakeAssocRequest(
PSDevice pDevice,
PSMgmtObject pMgmt,
PBYTE pDAddr,
unsigned char *pDAddr,
WORD wCurrCapInfo,
WORD wListenInterval,
PWLAN_IE_SSID pCurrSSID,
@ -126,7 +126,7 @@ PSTxMgmtPacket
s_MgrMakeReAssocRequest(
PSDevice pDevice,
PSMgmtObject pMgmt,
PBYTE pDAddr,
unsigned char *pDAddr,
WORD wCurrCapInfo,
WORD wListenInterval,
PWLAN_IE_SSID pCurrSSID,
@ -245,7 +245,7 @@ s_MgrMakeBeacon(
unsigned int uCurrChannel,
WORD wCurrATIMWinodw,
PWLAN_IE_SSID pCurrSSID,
PBYTE pCurrBSSID,
unsigned char *pCurrBSSID,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
);
@ -260,7 +260,7 @@ s_MgrMakeAssocResponse(
WORD wCurrCapInfo,
WORD wAssocStatus,
WORD wAssocAID,
PBYTE pDstAddr,
unsigned char *pDstAddr,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
);
@ -274,7 +274,7 @@ s_MgrMakeReAssocResponse(
WORD wCurrCapInfo,
WORD wAssocStatus,
WORD wAssocAID,
PBYTE pDstAddr,
unsigned char *pDstAddr,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
);
@ -289,9 +289,9 @@ s_MgrMakeProbeResponse(
WORD wCurrBeaconPeriod,
unsigned int uCurrChannel,
WORD wCurrATIMWinodw,
PBYTE pDstAddr,
unsigned char *pDstAddr,
PWLAN_IE_SSID pCurrSSID,
PBYTE pCurrBSSID,
unsigned char *pCurrBSSID,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates,
BYTE byPHYType
@ -320,8 +320,8 @@ static BOOL
s_bCipherMatch (
PKnownBSS pBSSNode,
NDIS_802_11_ENCRYPTION_STATUS EncStatus,
PBYTE pbyCCSPK,
PBYTE pbyCCSGK
unsigned char *pbyCCSPK,
unsigned char *pbyCCSGK
);
static void Encyption_Rebuild(
@ -619,7 +619,7 @@ void
vMgrDisassocBeginSta(
void *hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
unsigned char *abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
)
@ -630,10 +630,10 @@ vMgrDisassocBeginSta(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_DISASSOC_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
// Setup the sFrame structure
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_DISASSOC_FR_MAXLEN;
// format fixed field frame structure
@ -708,7 +708,7 @@ s_vMgrRxAssocRequest(
memset(abyCurrSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
memset(abyCurrExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeAssocRequest(&sFrame);
@ -866,7 +866,7 @@ s_vMgrRxReAssocRequest(
//decode the frame
memset(&sFrame, 0, sizeof(WLAN_FR_REASSOCREQ));
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeReassocRequest(&sFrame);
if (pMgmt->sNodeDBTable[uNodeIndex].eNodeState >= NODE_AUTH) {
@ -1000,7 +1000,7 @@ s_vMgrRxAssocResponse(
{
WLAN_FR_ASSOCRESP sFrame;
PWLAN_IE_SSID pItemSSID;
PBYTE pbyIEs;
unsigned char *pbyIEs;
viawget_wpa_header *wpahdr;
@ -1009,7 +1009,7 @@ s_vMgrRxAssocResponse(
pMgmt->eCurrState == WMAC_STATE_ASSOC) {
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
// decode the frame
vMgrDecodeAssocResponse(&sFrame);
if ((sFrame.pwCapInfo == 0) ||
@ -1163,8 +1163,8 @@ vMgrAuthenBeginSta(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
vMgrEncodeAuthen(&sFrame);
/* insert values */
@ -1212,7 +1212,7 @@ void
vMgrDeAuthenBeginSta(
void *hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
unsigned char *abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
)
@ -1224,8 +1224,8 @@ vMgrDeAuthenBeginSta(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_DEAUTHEN_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_DEAUTHEN_FR_MAXLEN;
vMgrEncodeDeauthen(&sFrame);
/* insert values */
@ -1282,7 +1282,7 @@ s_vMgrRxAuthentication(
// decode the frame
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeAuthen(&sFrame);
switch (cpu_to_le16((*(sFrame.pwAuthSequence )))){
case 1:
@ -1353,8 +1353,8 @@ s_vMgrRxAuthenSequence_1(
// send auth reply
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
// format buffer structure
vMgrEncodeAuthen(&sFrame);
@ -1466,8 +1466,8 @@ s_vMgrRxAuthenSequence_2(
if (cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS) {
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
// format buffer structure
vMgrEncodeAuthen(&sFrame);
@ -1573,8 +1573,8 @@ reply:
// send auth reply
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_AUTHEN_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
// format buffer structure
vMgrEncodeAuthen(&sFrame);
@ -1674,7 +1674,7 @@ s_vMgrRxDisassociation(
// if is acting an AP..
// a STA is leaving this BSS..
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
if (BSSDBbIsSTAInNodeDB(pMgmt, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) {
BSSvRemoveOneNode(pDevice, uNodeIndex);
}
@ -1684,7 +1684,7 @@ s_vMgrRxDisassociation(
}
else if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ){
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeDisassociation(&sFrame);
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason)));
//TODO: do something let upper layer know or
@ -1754,7 +1754,7 @@ s_vMgrRxDeauthentication(
// if is acting an AP..
// a STA is leaving this BSS..
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
if (BSSDBbIsSTAInNodeDB(pMgmt, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) {
BSSvRemoveOneNode(pDevice, uNodeIndex);
}
@ -1765,7 +1765,7 @@ s_vMgrRxDeauthentication(
else {
if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ) {
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeDeauthen(&sFrame);
DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP deauthed me, reason=%d.\n", cpu_to_le16((*(sFrame.pwReason))));
// TODO: update BSS list for specific BSSID if pre-authentication case
@ -1900,7 +1900,7 @@ s_vMgrRxBeacon(
memset(&sFrame, 0, sizeof(WLAN_FR_BEACON));
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
// decode the beacon frame
vMgrDecodeBeacon(&sFrame);
@ -3229,7 +3229,7 @@ s_MgrMakeBeacon(
unsigned int uCurrChannel,
WORD wCurrATIMWinodw,
PWLAN_IE_SSID pCurrSSID,
PBYTE pCurrBSSID,
unsigned char *pCurrBSSID,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
)
@ -3237,7 +3237,7 @@ s_MgrMakeBeacon(
PSTxMgmtPacket pTxPacket = NULL;
WLAN_FR_BEACON sFrame;
BYTE abyBroadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
PBYTE pbyBuffer;
unsigned char *pbyBuffer;
unsigned int uLength = 0;
PWLAN_IE_IBSS_DFS pIBSSDFS = NULL;
unsigned int ii;
@ -3245,9 +3245,9 @@ s_MgrMakeBeacon(
// prepare beacon frame
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_BEACON_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
// Setup the sFrame structure.
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_BEACON_FR_MAXLEN;
vMgrEncodeBeacon(&sFrame);
// Setup the header
@ -3342,7 +3342,7 @@ s_MgrMakeBeacon(
if ((pMgmt->b11hEnable == TRUE) &&
(pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
// Country IE
pbyBuffer = (PBYTE)(sFrame.pBuf + sFrame.len);
pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len);
CARDvSetCountryIE(pMgmt->pAdapter, pbyBuffer);
CARDvSetCountryInfo(pMgmt->pAdapter, PHY_TYPE_11A, pbyBuffer);
uLength += ((PWLAN_IE_COUNTRY) pbyBuffer)->len + WLAN_IEHDR_LEN;
@ -3457,9 +3457,9 @@ s_MgrMakeProbeResponse(
WORD wCurrBeaconPeriod,
unsigned int uCurrChannel,
WORD wCurrATIMWinodw,
PBYTE pDstAddr,
unsigned char *pDstAddr,
PWLAN_IE_SSID pCurrSSID,
PBYTE pCurrBSSID,
unsigned char *pCurrBSSID,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates,
BYTE byPHYType
@ -3467,7 +3467,7 @@ s_MgrMakeProbeResponse(
{
PSTxMgmtPacket pTxPacket = NULL;
WLAN_FR_PROBERESP sFrame;
PBYTE pbyBuffer;
unsigned char *pbyBuffer;
unsigned int uLength = 0;
PWLAN_IE_IBSS_DFS pIBSSDFS = NULL;
unsigned int ii;
@ -3475,9 +3475,9 @@ s_MgrMakeProbeResponse(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_PROBERESP_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
// Setup the sFrame structure.
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_PROBERESP_FR_MAXLEN;
vMgrEncodeProbeResponse(&sFrame);
// Setup the header
@ -3546,7 +3546,7 @@ s_MgrMakeProbeResponse(
if ((pMgmt->b11hEnable == TRUE) &&
(pMgmt->eCurrentPHYMode == PHY_TYPE_11A)) {
// Country IE
pbyBuffer = (PBYTE)(sFrame.pBuf + sFrame.len);
pbyBuffer = (unsigned char *)(sFrame.pBuf + sFrame.len);
CARDvSetCountryIE(pMgmt->pAdapter, pbyBuffer);
CARDvSetCountryInfo(pMgmt->pAdapter, PHY_TYPE_11A, pbyBuffer);
uLength += ((PWLAN_IE_COUNTRY) pbyBuffer)->len + WLAN_IEHDR_LEN;
@ -3642,7 +3642,7 @@ PSTxMgmtPacket
s_MgrMakeAssocRequest(
PSDevice pDevice,
PSMgmtObject pMgmt,
PBYTE pDAddr,
unsigned char *pDAddr,
WORD wCurrCapInfo,
WORD wListenInterval,
PWLAN_IE_SSID pCurrSSID,
@ -3652,15 +3652,15 @@ s_MgrMakeAssocRequest(
{
PSTxMgmtPacket pTxPacket = NULL;
WLAN_FR_ASSOCREQ sFrame;
PBYTE pbyIEs;
PBYTE pbyRSN;
unsigned char *pbyIEs;
unsigned char *pbyRSN;
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_ASSOCREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
// Setup the sFrame structure.
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_ASSOCREQ_FR_MAXLEN;
// format fixed field frame structure
vMgrEncodeAssocRequest(&sFrame);
@ -3722,7 +3722,7 @@ s_MgrMakeAssocRequest(
}
if (sFrame.pCurrSuppCh == NULL) {
sFrame.pCurrSuppCh = (PWLAN_IE_SUPP_CH)(sFrame.pBuf + sFrame.len);
sFrame.len += CARDbySetSupportChannels(pMgmt->pAdapter,(PBYTE)sFrame.pCurrSuppCh);
sFrame.len += CARDbySetSupportChannels(pMgmt->pAdapter,(unsigned char *)sFrame.pCurrSuppCh);
}
}
@ -3765,7 +3765,7 @@ s_MgrMakeAssocRequest(
sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_NONE;
}
// Auth Key Management Suite
pbyRSN = (PBYTE)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len);
pbyRSN = (unsigned char *)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len);
*pbyRSN++=0x01;
*pbyRSN++=0x00;
*pbyRSN++=0x00;
@ -3917,7 +3917,7 @@ PSTxMgmtPacket
s_MgrMakeReAssocRequest(
PSDevice pDevice,
PSMgmtObject pMgmt,
PBYTE pDAddr,
unsigned char *pDAddr,
WORD wCurrCapInfo,
WORD wListenInterval,
PWLAN_IE_SSID pCurrSSID,
@ -3927,15 +3927,15 @@ s_MgrMakeReAssocRequest(
{
PSTxMgmtPacket pTxPacket = NULL;
WLAN_FR_REASSOCREQ sFrame;
PBYTE pbyIEs;
PBYTE pbyRSN;
unsigned char *pbyIEs;
unsigned char *pbyRSN;
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset( pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_REASSOCREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
/* Setup the sFrame structure. */
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_REASSOCREQ_FR_MAXLEN;
// format fixed field frame structure
@ -4024,7 +4024,7 @@ s_MgrMakeReAssocRequest(
sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_NONE;
}
// Auth Key Management Suite
pbyRSN = (PBYTE)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len);
pbyRSN = (unsigned char *)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len);
*pbyRSN++=0x01;
*pbyRSN++=0x00;
*pbyRSN++=0x00;
@ -4172,7 +4172,7 @@ s_MgrMakeAssocResponse(
WORD wCurrCapInfo,
WORD wAssocStatus,
WORD wAssocAID,
PBYTE pDstAddr,
unsigned char *pDstAddr,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
)
@ -4183,9 +4183,9 @@ s_MgrMakeAssocResponse(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_ASSOCREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
// Setup the sFrame structure
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN;
vMgrEncodeAssocResponse(&sFrame);
// Setup the header
@ -4246,7 +4246,7 @@ s_MgrMakeReAssocResponse(
WORD wCurrCapInfo,
WORD wAssocStatus,
WORD wAssocAID,
PBYTE pDstAddr,
unsigned char *pDstAddr,
PWLAN_IE_SUPP_RATES pCurrSuppRates,
PWLAN_IE_SUPP_RATES pCurrExtSuppRates
)
@ -4257,9 +4257,9 @@ s_MgrMakeReAssocResponse(
pTxPacket = (PSTxMgmtPacket)pMgmt->pbyMgmtPacketPool;
memset(pTxPacket, 0, sizeof(STxMgmtPacket) + WLAN_ASSOCREQ_FR_MAXLEN);
pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));
pTxPacket->p80211Header = (PUWLAN_80211HDR)((unsigned char *)pTxPacket + sizeof(STxMgmtPacket));
// Setup the sFrame structure
sFrame.pBuf = (PBYTE)pTxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pTxPacket->p80211Header;
sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN;
vMgrEncodeReassocResponse(&sFrame);
// Setup the header
@ -4331,7 +4331,7 @@ s_vMgrRxProbeResponse(
memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP));
// decode the frame
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeProbeResponse(&sFrame);
if ((sFrame.pqwTimestamp == 0) ||
@ -4458,7 +4458,7 @@ s_vMgrRxProbeRequest(
memset(&sFrame, 0, sizeof(WLAN_FR_PROBEREQ));
// decode the frame
sFrame.len = pRxPacket->cbMPDULen;
sFrame.pBuf = (PBYTE)pRxPacket->p80211Header;
sFrame.pBuf = (unsigned char *)pRxPacket->p80211Header;
vMgrDecodeProbeRequest(&sFrame);
/*
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request rx:MAC addr:%02x-%02x-%02x=%02x-%02x-%02x \n",
@ -4495,7 +4495,7 @@ s_vMgrRxProbeRequest(
0,
sFrame.pHdr->sA3.abyAddr2,
(PWLAN_IE_SSID)pMgmt->abyCurrSSID,
(PBYTE)pMgmt->abyCurrBSSID,
(unsigned char *)pMgmt->abyCurrBSSID,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
byPHYType
@ -4708,7 +4708,7 @@ bMgrPrepareBeaconToSend(
pMgmt->uCurrChannel,
pMgmt->wCurrATIMWindow, //0,
(PWLAN_IE_SSID)pMgmt->abyCurrSSID,
(PBYTE)pMgmt->abyCurrBSSID,
(unsigned char *)pMgmt->abyCurrBSSID,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
(PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates
);
@ -4810,7 +4810,7 @@ s_vMgrLogStatus(
BOOL
bAdd_PMKID_Candidate (
void *hDeviceContext,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
PSRSNCapObject psRSNCapObj
)
{
@ -4885,8 +4885,8 @@ static BOOL
s_bCipherMatch (
PKnownBSS pBSSNode,
NDIS_802_11_ENCRYPTION_STATUS EncStatus,
PBYTE pbyCCSPK,
PBYTE pbyCCSGK
unsigned char *pbyCCSPK,
unsigned char *pbyCCSGK
)
{
BYTE byMulticastCipher = KEY_CTL_INVALID;

View File

@ -332,7 +332,7 @@ typedef struct tagSMgmtObject
WORD wListenInterval;
WORD wCountToWakeUp;
BOOL bInTIMWake;
PBYTE pbyPSPacketPool;
unsigned char *pbyPSPacketPool;
BYTE byPSPacketPool[sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN];
BOOL bRxBeaconInTBTTWake;
BYTE abyPSTxMap[MAX_NODE_NUM + 1];
@ -342,7 +342,7 @@ typedef struct tagSMgmtObject
unsigned int uCmdHostAPBusy;
// management packet pool
PBYTE pbyMgmtPacketPool;
unsigned char *pbyMgmtPacketPool;
BYTE byMgmtPacketPool[sizeof(STxMgmtPacket) + WLAN_A3FR_MAXLEN];
@ -432,7 +432,7 @@ void
vMgrDisassocBeginSta(
void *hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
unsigned char *abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
);
@ -475,7 +475,7 @@ void
vMgrDeAuthenBeginSta(
void *hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
unsigned char *abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
);
@ -490,7 +490,7 @@ bMgrPrepareBeaconToSend(
BOOL
bAdd_PMKID_Candidate (
void *hDeviceContext,
PBYTE pbyBSSID,
unsigned char *pbyBSSID,
PSRSNCapObject psRSNCapObj
);

View File

@ -112,7 +112,7 @@ WPA_ParseRSN (
{
PWLAN_IE_RSN_AUTH pIE_RSN_Auth = NULL;
int i, j, m, n = 0;
PBYTE pbyCaps;
unsigned char *pbyCaps;
WPA_ClearRSN(pBSSList);
@ -207,7 +207,7 @@ WPA_ParseRSN (
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4);
if(pRSN->len+2 >= 14+4+(m+n)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*n)+Cap(2)
pbyCaps = (PBYTE)pIE_RSN_Auth->AuthKSList[n].abyOUI;
pbyCaps = (unsigned char *)pIE_RSN_Auth->AuthKSList[n].abyOUI;
pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG;
pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS);
pBSSList->sRSNCapObj.bRSNCapExist = TRUE;

View File

@ -115,7 +115,7 @@ WPA2vParseRSN (
{
int i, j;
WORD m = 0, n = 0;
PBYTE pbyOUI;
unsigned char *pbyOUI;
BOOL bUseGK = FALSE;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len);
@ -268,7 +268,7 @@ WPA2uSetIEs(
)
{
PSMgmtObject pMgmt = (PSMgmtObject) pMgmtHandle;
PBYTE pbyBuffer = NULL;
unsigned char *pbyBuffer = NULL;
unsigned int ii = 0;
PWORD pwPMKID = NULL;
@ -279,7 +279,7 @@ WPA2uSetIEs(
(pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
(pMgmt->pCurrBSS != NULL)) {
/* WPA2 IE */
pbyBuffer = (PBYTE) pRSNIEs;
pbyBuffer = (unsigned char *) pRSNIEs;
pRSNIEs->byElementID = WLAN_EID_RSN;
pRSNIEs->len = 6; //Version(2)+GK(4)
pRSNIEs->wVersion = 1;

View File

@ -359,7 +359,7 @@ spin_lock_irq(&pDevice->lock);
dwKeyIndex,
param->u.wpa_key.key_len,
(PQWORD) &(KeyRSC),
(PBYTE)abyKey,
(unsigned char *)abyKey,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) &&
@ -367,7 +367,7 @@ spin_lock_irq(&pDevice->lock);
dwKeyIndex,
param->u.wpa_key.key_len,
(PQWORD) &(KeyRSC),
(PBYTE)abyKey,
(unsigned char *)abyKey,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) ) {
@ -400,7 +400,7 @@ spin_lock_irq(&pDevice->lock);
dwKeyIndex,
param->u.wpa_key.key_len,
(PQWORD) &(KeyRSC),
(PBYTE)abyKey,
(unsigned char *)abyKey,
byKeyDecMode,
pDevice->PortOffset,
pDevice->byLocalID) == TRUE) {
@ -613,13 +613,13 @@ static int wpa_get_scan(PSDevice pDevice,
PSMgmtObject pMgmt = pDevice->pMgmt;
PWLAN_IE_SSID pItemSSID;
PKnownBSS pBSS;
PBYTE pBuf;
unsigned char *pBuf;
int ret = 0;
u16 count = 0;
u16 ii, jj;
#if 1
PBYTE ptempBSS;
unsigned char *ptempBSS;
@ -713,7 +713,7 @@ static int wpa_get_scan(PSDevice pDevice,
scan_buf->rsn_ie_len = pBSS->wRSNLen;
memcpy(scan_buf->rsn_ie, pBSS->byRSNIE, pBSS->wRSNLen);
}
scan_buf = (struct viawget_scan_result *)((PBYTE)scan_buf + sizeof(struct viawget_scan_result));
scan_buf = (struct viawget_scan_result *)((unsigned char *)scan_buf + sizeof(struct viawget_scan_result));
jj ++;
}
}

View File

@ -65,7 +65,7 @@ static int msglevel =MSG_LEVEL_INFO;
* Return Value: TRUE if packet duplicate; otherwise FALSE
*
*/
BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex)
BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex)
{
PSMgmtObject pMgmt = pDevice->pMgmt;
PSTxDesc pHeadTD, pLastTD;
@ -77,7 +77,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, unsigned int uDataLen, uns
PSKeyItem pTransmitKey = NULL;
unsigned int cbHeaderSize;
unsigned int ii;
PBYTE pbyBSSID;
unsigned char *pbyBSSID;
@ -91,7 +91,7 @@ BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, unsigned int uDataLen, uns
pHeadTD->m_td1TD1.byTCR = (TCR_EDP|TCR_STP);
memcpy(pDevice->sTxEthHeader.abyDstAddr, (PBYTE)pbySkbData, ETH_HLEN);
memcpy(pDevice->sTxEthHeader.abyDstAddr, (unsigned char *)pbySkbData, ETH_HLEN);
cbFrameBodySize = uDataLen - ETH_HLEN;

View File

@ -39,7 +39,7 @@
/*--------------------- Export Functions --------------------------*/
BOOL ROUTEbRelay (PSDevice pDevice, PBYTE pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex);
BOOL ROUTEbRelay (PSDevice pDevice, unsigned char *pbySkbData, unsigned int uDataLen, unsigned int uNodeIndex);
#endif // __WROUTE_H__