Signed-off-by: Charles Clément <caratorn@xxxxxxxxx> --- drivers/staging/vt6655/baseband.c | 4 +- drivers/staging/vt6655/baseband.h | 4 +- drivers/staging/vt6655/bssdb.c | 72 +++++++++++++++++----------------- drivers/staging/vt6655/bssdb.h | 32 +++++++------- drivers/staging/vt6655/device_main.c | 24 ++++++------ drivers/staging/vt6655/dpc.c | 10 ++-- drivers/staging/vt6655/ioctl.c | 14 +++--- drivers/staging/vt6655/iwctl.c | 26 ++++++------ drivers/staging/vt6655/power.c | 12 +++--- drivers/staging/vt6655/power.h | 12 +++--- drivers/staging/vt6655/ttype.h | 2 - drivers/staging/vt6655/wcmd.c | 58 ++++++++++++++-------------- drivers/staging/vt6655/wcmd.h | 12 +++--- drivers/staging/vt6655/wmgr.c | 70 ++++++++++++++++---------------- drivers/staging/vt6655/wmgr.h | 30 +++++++------- drivers/staging/vt6655/wpactl.c | 12 +++--- 16 files changed, 196 insertions(+), 198 deletions(-) diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c index 16d7db3..7a69490 100644 --- a/drivers/staging/vt6655/baseband.c +++ b/drivers/staging/vt6655/baseband.c @@ -2878,7 +2878,7 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3) void TimerSQ3CallBack ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -2926,7 +2926,7 @@ TimerSQ3CallBack ( void TimerState1CallBack ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; diff --git a/drivers/staging/vt6655/baseband.h b/drivers/staging/vt6655/baseband.h index de9b84a..23f7ad1 100644 --- a/drivers/staging/vt6655/baseband.h +++ b/drivers/staging/vt6655/baseband.h @@ -162,12 +162,12 @@ void BBvExitDeepSleep(DWORD_PTR dwIoBase, BYTE byLocalID); void TimerSQ3CallBack ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void TimerState1CallBack( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3); diff --git a/drivers/staging/vt6655/bssdb.c b/drivers/staging/vt6655/bssdb.c index e7bbc56..3af0ccb 100644 --- a/drivers/staging/vt6655/bssdb.c +++ b/drivers/staging/vt6655/bssdb.c @@ -91,18 +91,18 @@ const WORD awHWRetry1[5][5] = { /*--------------------- Static Functions --------------------------*/ void s_vCheckSensitivity( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); #ifdef Calcu_LinkQual void s_uCalculateLinkQual( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); #endif void s_vCheckPreEDThreshold( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); /*--------------------- Export Variables --------------------------*/ @@ -125,7 +125,7 @@ void s_vCheckPreEDThreshold( PKnownBSS BSSpSearchBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE pbyDesireBSSID, IN PBYTE pbyDesireSSID, IN CARD_PHY_TYPE ePhyType @@ -282,7 +282,7 @@ if(pDevice->bLinkPass==FALSE) pCurrBSS->bSelected = FALSE; void BSSvClearBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN BOOL bKeepCurrBSSID ) { @@ -325,7 +325,7 @@ BSSvClearBSSList( -*/ PKnownBSS BSSpAddrIsInBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE abyBSSID, IN PWLAN_IE_SSID pSSID ) @@ -368,7 +368,7 @@ BSSpAddrIsInBSSList( BOOL BSSbInsertToBSSList ( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE abyBSSIDAddr, IN QWORD qwTimestamp, IN WORD wBeaconInterval, @@ -384,7 +384,7 @@ BSSbInsertToBSSList ( IN PWLAN_IE_QUIET pIE_Quiet, IN UINT uIELength, IN PBYTE pbyIEs, - IN HANDLE pRxPacketContext + IN void *pRxPacketContext ) { @@ -502,7 +502,7 @@ BSSbInsertToBSSList ( if ((bIs802_1x == TRUE) && (pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len) && ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySSID, pSSID->len))) { - bAdd_PMKID_Candidate((HANDLE)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj); + bAdd_PMKID_Candidate((void *)pDevice, pBSSList->abyBSSID, &pBSSList->sRSNCapObj); if ((pDevice->bLinkPass == TRUE) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) { if ((KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBSSID, PAIRWISE_KEY, &pTransmitKey) == TRUE) || @@ -585,7 +585,7 @@ BSSbInsertToBSSList ( BOOL BSSbUpdateToBSSList ( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN QWORD qwTimestamp, IN WORD wBeaconInterval, IN WORD wCapInfo, @@ -602,7 +602,7 @@ BSSbUpdateToBSSList ( IN PKnownBSS pBSSList, IN UINT uIELength, IN PBYTE pbyIEs, - IN HANDLE pRxPacketContext + IN void *pRxPacketContext ) { int ii; @@ -799,7 +799,7 @@ BSSDBbIsSTAInNodeDB( -*/ void BSSvCreateOneNode( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PUINT puNodeIndex ) { @@ -864,7 +864,7 @@ BSSvCreateOneNode( -*/ void BSSvRemoveOneNode( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN UINT uNodeIndex ) { @@ -897,7 +897,7 @@ BSSvRemoveOneNode( void BSSvUpdateAPNode( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PWORD pwCapInfo, IN PWLAN_IE_SUPP_RATES pSuppRates, IN PWLAN_IE_SUPP_RATES pExtSuppRates @@ -960,7 +960,7 @@ BSSvUpdateAPNode( void BSSvAddMulticastNode( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1013,7 +1013,7 @@ UINT status; #endif void BSSvSecondCallBack( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1111,7 +1111,7 @@ start: } #ifdef Calcu_LinkQual - s_uCalculateLinkQual((HANDLE)pDevice); + s_uCalculateLinkQual((void *)pDevice); #endif for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) { @@ -1261,18 +1261,18 @@ start: if (pMgmt->sNodeDBTable[0].bActive) { // Assoc with BSS // DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Callback inactive Count = [%d]\n", pMgmt->sNodeDBTable[0].uInActiveCount); //if (pDevice->bUpdateBBVGA) { - // s_vCheckSensitivity((HANDLE) pDevice); + // s_vCheckSensitivity((void *) pDevice); //} if (pDevice->bUpdateBBVGA) { - // s_vCheckSensitivity((HANDLE) pDevice); - s_vCheckPreEDThreshold((HANDLE)pDevice); + // s_vCheckSensitivity((void *) pDevice); + s_vCheckPreEDThreshold((void *)pDevice); } if ((pMgmt->sNodeDBTable[0].uInActiveCount >= (LOST_BEACON_COUNT/2)) && (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) ) { pDevice->byBBVGANew = pDevice->abyBBVGA[0]; - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_BBSENSITIVITY, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_CHANGE_BBSENSITIVITY, NULL); } if (pMgmt->sNodeDBTable[0].uInActiveCount >= LOST_BEACON_COUNT) { @@ -1324,10 +1324,10 @@ start: pDevice->eEncryptionStatus = pDevice->eOldEncryptionStatus; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Roaming ...\n"); - BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); + BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass); pMgmt->eScanType = WMAC_SCAN_ACTIVE; - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); pDevice->uAutoReConnectTime = 0; } } @@ -1342,16 +1342,16 @@ start: else { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Adhoc re-scaning ...\n"); pMgmt->eScanType = WMAC_SCAN_ACTIVE; - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); pDevice->uAutoReConnectTime = 0; }; } if (pMgmt->eCurrState == WMAC_STATE_JOINTED) { if (pDevice->bUpdateBBVGA) { - //s_vCheckSensitivity((HANDLE) pDevice); - s_vCheckPreEDThreshold((HANDLE)pDevice); + //s_vCheckSensitivity((void *) pDevice); + s_vCheckPreEDThreshold((void *)pDevice); } if (pMgmt->sNodeDBTable[0].uInActiveCount >=ADHOC_LOST_BEACON_COUNT) { DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Lost other STA beacon [%d] sec, started !\n", pMgmt->sNodeDBTable[0].uInActiveCount); @@ -1390,7 +1390,7 @@ start: void BSSvUpdateNodeTxCounter( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN BYTE byTsr0, IN BYTE byTsr1, IN PBYTE pbyBuffer, @@ -1503,7 +1503,7 @@ BSSvUpdateNodeTxCounter( pMACHeader = (PS802_11Header)(pbyBuffer + uFIFOHeaderSize); - if (BSSDBbIsSTAInNodeDB((HANDLE)pMgmt, &(pMACHeader->abyAddr1[0]), &uNodeIndex)){ + if (BSSDBbIsSTAInNodeDB((void *)pMgmt, &(pMACHeader->abyAddr1[0]), &uNodeIndex)){ pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1; if ((byTsr1 & TSR1_TERR) == 0) { // transmit success, TxAttempts at least plus one @@ -1583,7 +1583,7 @@ BSSvUpdateNodeTxCounter( void BSSvClearNodeDBTable( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN UINT uStartIndex ) @@ -1611,7 +1611,7 @@ BSSvClearNodeDBTable( void s_vCheckSensitivity( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1649,7 +1649,7 @@ void s_vCheckSensitivity( if (pDevice->byBBVGANew != pDevice->byBBVGACurrent) { pDevice->uBBVGADiffCount++; if (pDevice->uBBVGADiffCount >= BB_VGA_CHANGE_THRESHOLD) - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_BBSENSITIVITY, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_CHANGE_BBSENSITIVITY, NULL); } else { pDevice->uBBVGADiffCount = 0; } @@ -1661,7 +1661,7 @@ void s_vCheckSensitivity( void BSSvClearAnyBSSJoinRecord ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1676,7 +1676,7 @@ BSSvClearAnyBSSJoinRecord ( #ifdef Calcu_LinkQual void s_uCalculateLinkQual( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1724,7 +1724,7 @@ else #endif void s_vCheckPreEDThreshold( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; diff --git a/drivers/staging/vt6655/bssdb.h b/drivers/staging/vt6655/bssdb.h index 86a1f67..a66e14f 100644 --- a/drivers/staging/vt6655/bssdb.h +++ b/drivers/staging/vt6655/bssdb.h @@ -244,7 +244,7 @@ typedef struct tagKnownNodeDB { PKnownBSS BSSpSearchBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE pbyDesireBSSID, IN PBYTE pbyDesireSSID, IN CARD_PHY_TYPE ePhyType @@ -252,20 +252,20 @@ BSSpSearchBSSList( PKnownBSS BSSpAddrIsInBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE abyBSSID, IN PWLAN_IE_SSID pSSID ); void BSSvClearBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN BOOL bKeepCurrBSSID ); BOOL BSSbInsertToBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE abyBSSIDAddr, IN QWORD qwTimestamp, IN WORD wBeaconInterval, @@ -281,13 +281,13 @@ BSSbInsertToBSSList( IN PWLAN_IE_QUIET pIE_Quiet, IN UINT uIELength, IN PBYTE pbyIEs, - IN HANDLE pRxPacketContext + IN void *pRxPacketContext ); BOOL BSSbUpdateToBSSList( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN QWORD qwTimestamp, IN WORD wBeaconInterval, IN WORD wCapInfo, @@ -304,26 +304,26 @@ BSSbUpdateToBSSList( IN PKnownBSS pBSSList, IN UINT uIELength, IN PBYTE pbyIEs, - IN HANDLE pRxPacketContext + IN void *pRxPacketContext ); BOOL BSSDBbIsSTAInNodeDB( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE abyDstAddr, OUT PUINT puNodeIndex ); void BSSvCreateOneNode( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PUINT puNodeIndex ); void BSSvUpdateAPNode( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PWORD pwCapInfo, IN PWLAN_IE_SUPP_RATES pItemRates, IN PWLAN_IE_SUPP_RATES pExtSuppRates @@ -332,13 +332,13 @@ BSSvUpdateAPNode( void BSSvSecondCallBack( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void BSSvUpdateNodeTxCounter( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN BYTE byTsr0, IN BYTE byTsr1, IN PBYTE pbyBuffer, @@ -347,25 +347,25 @@ BSSvUpdateNodeTxCounter( void BSSvRemoveOneNode( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN UINT uNodeIndex ); void BSSvAddMulticastNode( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void BSSvClearNodeDBTable( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN UINT uStartIndex ); void BSSvClearAnyBSSJoinRecord( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); #endif //__BSSDB_H__ diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c index ea22f8c..9fc830f 100644 --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -2011,11 +2011,11 @@ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "call MACvIntEnable\n"); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); if (pDevice->pMgmt->eConfigMode == WMAC_CONFIG_AP) { - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RUN_AP, NULL); } else { - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_BSSID_SCAN, NULL); - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_SSID, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_SSID, NULL); } pDevice->flags |=DEVICE_FLAGS_OPENED; @@ -2034,7 +2034,7 @@ static int device_close(struct net_device *dev) { //PLICE_DEBUG<- //2007-1121-02<Add>by EinsnLiu if (pDevice->bLinkPass) { - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE, NULL); mdelay(30); } #ifdef TxInSleep @@ -2860,7 +2860,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { pDevice->bBeaconSent = FALSE; if (pDevice->bEnablePSMode) { - PSbIsNextTBTTWakeUp((HANDLE)pDevice); + PSbIsNextTBTTWakeUp((void *)pDevice); }; if ((pDevice->eOPMode == OP_MODE_AP) || @@ -2893,7 +2893,7 @@ static irqreturn_t device_intr(int irq, void *dev_instance) { // check if mutltcast tx bufferring pMgmt->byDTIMCount = pMgmt->byDTIMPeriod - 1; pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); } } } @@ -3549,7 +3549,7 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { if (pMgmt->eConfigMode == WMAC_CONFIG_AP) { netif_stop_queue(pDevice->dev); spin_lock_irq(&pDevice->lock); - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RUN_AP, NULL); spin_unlock_irq(&pDevice->lock); } else { @@ -3563,8 +3563,8 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { pMgmt->eScanType = WMAC_SCAN_ACTIVE; if(pDevice->bWPASuppWextEnabled !=TRUE) #endif - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); spin_unlock_irq(&pDevice->lock); } pDevice->bCommit = FALSE; @@ -3719,9 +3719,9 @@ viawget_resume(struct pci_dev *pcid) init_timer(&pMgmt->sTimerSecondCallback); init_timer(&pDevice->sTimerCommand); MACvIntEnable(pDevice->PortOffset, IMR_MASK_VALUE); - BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); + BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); spin_unlock_irq(&pDevice->lock); } return 0; diff --git a/drivers/staging/vt6655/dpc.c b/drivers/staging/vt6655/dpc.c index ab13bdf..d90104a 100644 --- a/drivers/staging/vt6655/dpc.c +++ b/drivers/staging/vt6655/dpc.c @@ -631,13 +631,13 @@ device_receive_frame ( tasklet_schedule(&pDevice->RxMngWorkItem); #else //printk("RxMan\n"); - vMgrRxManagePacket((HANDLE)pDevice, pDevice->pMgmt, pRxPacket); + vMgrRxManagePacket((void *)pDevice, pDevice->pMgmt, pRxPacket); //tasklet_schedule(&pDevice->RxMngWorkItem); #endif #endif //PLICE_DEBUG<- - //vMgrRxManagePacket((HANDLE)pDevice, pDevice->pMgmt, pRxPacket); + //vMgrRxManagePacket((void *)pDevice, pDevice->pMgmt, pRxPacket); // hostap Deamon handle 802.11 management if (pDevice->bEnableHostapd) { skb->dev = pDevice->apdev; @@ -1087,7 +1087,7 @@ static BOOL s_bAPModeRxCtl ( // delcare received ps-poll event if (IS_CTL_PSPOLL(pbyFrame)) { pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n"); } else { @@ -1096,7 +1096,7 @@ static BOOL s_bAPModeRxCtl ( if (!IS_FC_POWERMGT(pbyFrame)) { pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n"); } } @@ -1112,7 +1112,7 @@ static BOOL s_bAPModeRxCtl ( if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) { pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RX_PSPOLL, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RX_PSPOLL, NULL); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n"); } diff --git a/drivers/staging/vt6655/ioctl.c b/drivers/staging/vt6655/ioctl.c index 86439bb..1bd8199 100644 --- a/drivers/staging/vt6655/ioctl.c +++ b/drivers/staging/vt6655/ioctl.c @@ -109,14 +109,14 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { } spin_lock_irq(&pDevice->lock); if (memcmp(pMgmt->abyCurrBSSID, &abyNullAddr[0], 6) == 0) - BSSvClearBSSList((HANDLE)pDevice, FALSE); + BSSvClearBSSList((void *)pDevice, FALSE); else - BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); + BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass); if (pItemSSID->len != 0) - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); else - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); spin_unlock_irq(&pDevice->lock); break; @@ -223,8 +223,8 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { netif_stop_queue(pDevice->dev); spin_lock_irq(&pDevice->lock); pMgmt->eCurrState = WMAC_STATE_IDLE; - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); spin_unlock_irq(&pDevice->lock); break; @@ -593,7 +593,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { netif_stop_queue(pDevice->dev); spin_lock_irq(&pDevice->lock); - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_RUN_AP, NULL); spin_unlock_irq(&pDevice->lock); break; diff --git a/drivers/staging/vt6655/iwctl.c b/drivers/staging/vt6655/iwctl.c index 7fa5842..cf69034 100644 --- a/drivers/staging/vt6655/iwctl.c +++ b/drivers/staging/vt6655/iwctl.c @@ -190,7 +190,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! } spin_lock_irq(&pDevice->lock); - BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); + BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass); //mike add: active scan OR passive scan OR desire_ssid scan if(wrq->length == sizeof(struct iw_scan_req)) { @@ -208,7 +208,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! pMgmt->eScanType = WMAC_SCAN_PASSIVE; PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID, ((PWLAN_IE_SSID)abyScanSSID)->len); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); spin_unlock_irq(&pDevice->lock); return 0; @@ -223,7 +223,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! pMgmt->eScanType = WMAC_SCAN_PASSIVE; //printk("SIOCSIWSCAN:WLAN_CMD_BSSID_SCAN\n"); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); spin_unlock_irq(&pDevice->lock); return 0; @@ -897,10 +897,10 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { if (pCurr == NULL){ PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n"); - vResetCommandTimer((HANDLE) pDevice); + vResetCommandTimer((void *) pDevice); pMgmt->eScanType = WMAC_SCAN_ACTIVE; - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); } else { //mike:to find out if that desired SSID is a hidden-ssid AP , // by means of judging if there are two same BSSID exist in list ? @@ -912,10 +912,10 @@ if (pMgmt->eScanState == WMAC_IS_SCANNING) { } if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!! printk("SIOCSIWESSID:hidden ssid directly associate.......\n"); - vResetCommandTimer((HANDLE) pDevice); + vResetCommandTimer((void *) pDevice); pMgmt->eScanType = WMAC_SCAN_PASSIVE; //this scan type,you'll submit scan result! - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); } } } @@ -1660,11 +1660,11 @@ int iwctl_siwpower(struct net_device *dev, } if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) { pDevice->ePSMode = WMAC_POWER_FAST; - PSvEnablePowerSaving((HANDLE)pDevice, pMgmt->wListenInterval); + PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval); } else if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) { pDevice->ePSMode = WMAC_POWER_FAST; - PSvEnablePowerSaving((HANDLE)pDevice, pMgmt->wListenInterval); + PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval); } switch (wrq->flags & IW_POWER_MODE) { case IW_POWER_UNICAST_R: @@ -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((HANDLE) pDevice, WLAN_CMD_DEAUTH, (PBYTE)&reason); + //bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (PBYTE)&reason); break; case IW_MLME_DISASSOC: if(pDevice->bLinkPass == TRUE){ @@ -2104,7 +2104,7 @@ int iwctl_siwmlme(struct net_device *dev, //clear related flags memset(pMgmt->abyDesireBSSID, 0xFF,6); KeyvInitTable(&pDevice->sKey, pDevice->PortOffset); - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE, NULL); } break; default: diff --git a/drivers/staging/vt6655/power.c b/drivers/staging/vt6655/power.c index a28d037..166e7fb 100644 --- a/drivers/staging/vt6655/power.c +++ b/drivers/staging/vt6655/power.c @@ -76,7 +76,7 @@ static int msglevel =MSG_LEVEL_INFO; void PSvEnablePowerSaving( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN WORD wListenInterval ) { @@ -146,7 +146,7 @@ PSvEnablePowerSaving( void PSvDisablePowerSaving( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -184,7 +184,7 @@ PSvDisablePowerSaving( BOOL PSbConsiderPowerDown( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN BOOL bCheckRxDMA, IN BOOL bCheckCountToWakeUp ) @@ -252,7 +252,7 @@ PSbConsiderPowerDown( void PSvSendPSPOLL( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -298,7 +298,7 @@ PSvSendPSPOLL( -*/ BOOL PSbSendNullPacket( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -384,7 +384,7 @@ PSbSendNullPacket( BOOL PSbIsNextTBTTWakeUp( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { diff --git a/drivers/staging/vt6655/power.h b/drivers/staging/vt6655/power.h index bac8b20..769e0d1 100644 --- a/drivers/staging/vt6655/power.h +++ b/drivers/staging/vt6655/power.h @@ -50,35 +50,35 @@ BOOL PSbConsiderPowerDown( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN BOOL bCheckRxDMA, IN BOOL bCheckCountToWakeUp ); void PSvDisablePowerSaving( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void PSvEnablePowerSaving( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN WORD wListenInterval ); void PSvSendPSPOLL( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); BOOL PSbSendNullPacket( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); BOOL PSbIsNextTBTTWakeUp( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); #endif //__POWER_H__ diff --git a/drivers/staging/vt6655/ttype.h b/drivers/staging/vt6655/ttype.h index b71fe59..b2dff3a 100644 --- a/drivers/staging/vt6655/ttype.h +++ b/drivers/staging/vt6655/ttype.h @@ -132,6 +132,4 @@ typedef DWORD * PDWORD; typedef QWORD * PQWORD; -typedef void *HANDLE; - #endif // __TTYPE_H__ diff --git a/drivers/staging/vt6655/wcmd.c b/drivers/staging/vt6655/wcmd.c index ec1036e..6e46040 100644 --- a/drivers/staging/vt6655/wcmd.c +++ b/drivers/staging/vt6655/wcmd.c @@ -319,7 +319,7 @@ s_MgrMakeProbeRequest( void vCommandTimerWait( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN UINT MSecond ) { @@ -339,7 +339,7 @@ vCommandTimerWait( void vCommandTimer ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -382,7 +382,7 @@ vCommandTimer ( // wait all Data TD complete if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){ spin_unlock_irq(&pDevice->lock); - vCommandTimerWait((HANDLE)pDevice, 10); + vCommandTimerWait((void *)pDevice, 10); return; }; @@ -424,7 +424,7 @@ vCommandTimer ( pMgmt->abyScanBSSID[5] = 0xFF; pItemSSID->byElementID = WLAN_EID_SSID; // clear bssid list - // BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); + // BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass); pMgmt->eScanState = WMAC_IS_SCANNING; } @@ -453,11 +453,11 @@ vCommandTimer ( (pMgmt->uScanChannel < CB_MAX_CHANNEL_24G)) { s_vProbeChannel(pDevice); spin_unlock_irq(&pDevice->lock); - vCommandTimerWait((HANDLE)pDevice, WCMD_ACTIVE_SCAN_TIME); + vCommandTimerWait((void *)pDevice, WCMD_ACTIVE_SCAN_TIME); return; } else { spin_unlock_irq(&pDevice->lock); - vCommandTimerWait((HANDLE)pDevice, WCMD_PASSIVE_SCAN_TIME); + vCommandTimerWait((void *)pDevice, WCMD_PASSIVE_SCAN_TIME); return; } @@ -501,7 +501,7 @@ vCommandTimer ( } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n"); // reason = 8 : disassoc because sta has left - vMgrDisassocBeginSta((HANDLE)pDevice, pMgmt, pMgmt->abyCurrBSSID, (8), &Status); + vMgrDisassocBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (8), &Status); pDevice->bLinkPass = FALSE; // unlock command busy pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; @@ -515,7 +515,7 @@ vCommandTimer ( pDevice->eCommandState = WLAN_DISASSOCIATE_WAIT; // wait all Control TD complete if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){ - vCommandTimerWait((HANDLE)pDevice, 10); + vCommandTimerWait((void *)pDevice, 10); spin_unlock_irq(&pDevice->lock); return; }; @@ -528,7 +528,7 @@ vCommandTimer ( case WLAN_DISASSOCIATE_WAIT : // wait all Control TD complete if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){ - vCommandTimerWait((HANDLE)pDevice, 10); + vCommandTimerWait((void *)pDevice, 10); spin_unlock_irq(&pDevice->lock); return; }; @@ -578,24 +578,24 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS // set initial state pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrMode = WMAC_MODE_STANDBY; - PSvDisablePowerSaving((HANDLE)pDevice); + PSvDisablePowerSaving((void *)pDevice); BSSvClearNodeDBTable(pDevice, 0); - vMgrJoinBSSBegin((HANDLE)pDevice, &Status); + vMgrJoinBSSBegin((void *)pDevice, &Status); // if Infra mode if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) { // Call mgr to begin the deauthentication // reason = (3) beacuse sta has left ESS if (pMgmt->eCurrState>= WMAC_STATE_AUTH) { - vMgrDeAuthenBeginSta((HANDLE)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status); + vMgrDeAuthenBeginSta((void *)pDevice, pMgmt, pMgmt->abyCurrBSSID, (3), &Status); } // Call mgr to begin the authentication - vMgrAuthenBeginSta((HANDLE)pDevice, pMgmt, &Status); + vMgrAuthenBeginSta((void *)pDevice, pMgmt, &Status); if (Status == CMD_STATUS_SUCCESS) { pDevice->byLinkWaitCount = 0; pDevice->eCommandState = WLAN_AUTHENTICATE_WAIT; - vCommandTimerWait((HANDLE)pDevice, AUTHENTICATE_TIMEOUT); + vCommandTimerWait((void *)pDevice, AUTHENTICATE_TIMEOUT); spin_unlock_irq(&pDevice->lock); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Set eCommandState = WLAN_AUTHENTICATE_WAIT\n"); return; @@ -615,7 +615,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS } else { // start own IBSS - vMgrCreateOwnIBSS((HANDLE)pDevice, &Status); + vMgrCreateOwnIBSS((void *)pDevice, &Status); if (Status != CMD_STATUS_SUCCESS){ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " WLAN_CMD_IBSS_CREATE fail ! \n"); }; @@ -627,7 +627,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA || pMgmt->eConfigMode == WMAC_CONFIG_AUTO) { // start own IBSS - vMgrCreateOwnIBSS((HANDLE)pDevice, &Status); + vMgrCreateOwnIBSS((void *)pDevice, &Status); if (Status != CMD_STATUS_SUCCESS){ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_IBSS_CREATE fail ! \n"); }; @@ -661,12 +661,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS // Call mgr to begin the association pDevice->byLinkWaitCount = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_AUTH\n"); - vMgrAssocBeginSta((HANDLE)pDevice, pMgmt, &Status); + vMgrAssocBeginSta((void *)pDevice, pMgmt, &Status); if (Status == CMD_STATUS_SUCCESS) { pDevice->byLinkWaitCount = 0; DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState = WLAN_ASSOCIATE_WAIT\n"); pDevice->eCommandState = WLAN_ASSOCIATE_WAIT; - vCommandTimerWait((HANDLE)pDevice, ASSOCIATE_TIMEOUT); + vCommandTimerWait((void *)pDevice, ASSOCIATE_TIMEOUT); spin_unlock_irq(&pDevice->lock); return; } @@ -679,7 +679,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->byLinkWaitCount ++; printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n",pDevice->byLinkWaitCount); spin_unlock_irq(&pDevice->lock); - vCommandTimerWait((HANDLE)pDevice, AUTHENTICATE_TIMEOUT/2); + vCommandTimerWait((void *)pDevice, AUTHENTICATE_TIMEOUT/2); return; } pDevice->byLinkWaitCount = 0; @@ -702,7 +702,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS if (pMgmt->eCurrState == WMAC_STATE_ASSOC) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n"); if (pDevice->ePSMode != WMAC_POWER_CAM) { - PSvEnablePowerSaving((HANDLE)pDevice, pMgmt->wListenInterval); + PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval); } if (pMgmt->eAuthenMode >= WMAC_AUTH_WPA) { KeybRemoveAllKey(&(pDevice->sKey), pDevice->abyBSSID, pDevice->PortOffset); @@ -743,7 +743,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pDevice->byLinkWaitCount ++; printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n",pDevice->byLinkWaitCount); spin_unlock_irq(&pDevice->lock); - vCommandTimerWait((HANDLE)pDevice, ASSOCIATE_TIMEOUT/2); + vCommandTimerWait((void *)pDevice, ASSOCIATE_TIMEOUT/2); return; } pDevice->byLinkWaitCount = 0; @@ -779,7 +779,7 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS pMgmt->eCurrState = WMAC_STATE_IDLE; pDevice->bFixRate = FALSE; - vMgrCreateOwnIBSS((HANDLE)pDevice, &Status); + vMgrCreateOwnIBSS((void *)pDevice, &Status); if (Status != CMD_STATUS_SUCCESS){ DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " vMgrCreateOwnIBSS fail ! \n"); }; @@ -869,12 +869,12 @@ printk("chester-abyDesireSSID=%s\n",((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->abySS //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_CHECK_BBSENSITIVITY_START\n"); // wait all TD complete if (pDevice->iTDUsed[TYPE_AC0DMA] != 0){ - vCommandTimerWait((HANDLE)pDevice, 10); + vCommandTimerWait((void *)pDevice, 10); spin_unlock_irq(&pDevice->lock); return; } if (pDevice->iTDUsed[TYPE_TXDMA0] != 0){ - vCommandTimerWait((HANDLE)pDevice, 10); + vCommandTimerWait((void *)pDevice, 10); spin_unlock_irq(&pDevice->lock); return; } @@ -971,7 +971,7 @@ s_bCommandComplete ( } - vCommandTimerWait((HANDLE)pDevice, 0); + vCommandTimerWait((void *)pDevice, 0); } return TRUE; @@ -980,7 +980,7 @@ s_bCommandComplete ( BOOL bScheduleCommand ( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN CMD_CODE eCommand, IN PBYTE pbyItem0 ) @@ -1061,7 +1061,7 @@ BOOL bScheduleCommand ( * */ BOOL bClearBSSID_SCAN ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1083,7 +1083,7 @@ BOOL bClearBSSID_SCAN ( //mike add:reset command timer void vResetCommandTimer( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -1107,7 +1107,7 @@ vResetCommandTimer( #ifdef TxInSleep void BSSvSecondTxData( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; diff --git a/drivers/staging/vt6655/wcmd.h b/drivers/staging/vt6655/wcmd.h index 1e81669..67b08f6 100644 --- a/drivers/staging/vt6655/wcmd.h +++ b/drivers/staging/vt6655/wcmd.h @@ -111,34 +111,34 @@ typedef enum tagCMD_STATE { /*--------------------- Export Functions --------------------------*/ void vResetCommandTimer( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void vCommandTimer ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); BOOL bClearBSSID_SCAN( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); BOOL bScheduleCommand( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN CMD_CODE eCommand, IN PBYTE pbyItem0 ); void vCommandTimerWait( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN UINT MSecond ); #ifdef TxInSleep void BSSvSecondTxData( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); #endif diff --git a/drivers/staging/vt6655/wmgr.c b/drivers/staging/vt6655/wmgr.c index ed5342b..614850a 100644 --- a/drivers/staging/vt6655/wmgr.c +++ b/drivers/staging/vt6655/wmgr.c @@ -349,7 +349,7 @@ s_bCipherMatch ( void vMgrObjectInit( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -368,7 +368,7 @@ vMgrObjectInit( pMgmt->byCSSPK = KEY_CTL_NONE; pMgmt->byCSSGK = KEY_CTL_NONE; pMgmt->wIBSSBeaconPeriod = DEFAULT_IBSS_BI; - BSSvClearBSSList((HANDLE)pDevice, FALSE); + BSSvClearBSSList((void *)pDevice, FALSE); return; } @@ -385,7 +385,7 @@ vMgrObjectInit( void vMgrTimerInit( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -433,7 +433,7 @@ vMgrTimerInit( void vMgrObjectReset( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; @@ -462,7 +462,7 @@ vMgrObjectReset( void vMgrAssocBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, OUT PCMD_STATUS pStatus ) @@ -538,7 +538,7 @@ vMgrAssocBeginSta( void vMgrReAssocBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, OUT PCMD_STATUS pStatus ) @@ -617,7 +617,7 @@ vMgrReAssocBeginSta( void vMgrDisassocBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, IN PBYTE abyDestAddress, IN WORD wReason, @@ -1041,7 +1041,7 @@ s_vMgrRxAssocResponse( }; DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15)); pMgmt->eCurrState = WMAC_STATE_ASSOC; - BSSvUpdateAPNode((HANDLE)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); + BSSvUpdateAPNode((void *)pDevice, sFrame.pwCapInfo, sFrame.pSuppRates, sFrame.pExtSuppRates); pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID; DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID); pDevice->bLinkPass = TRUE; @@ -1152,7 +1152,7 @@ if(pMgmt->eCurrState == WMAC_STATE_ASSOC) void vMgrAuthenBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, OUT PCMD_STATUS pStatus ) @@ -1210,7 +1210,7 @@ vMgrAuthenBeginSta( void vMgrDeAuthenBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, IN PBYTE abyDestAddress, IN WORD wReason, @@ -1455,7 +1455,7 @@ s_vMgrRxAuthenSequence_2( } if (pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT ) { // spin_unlock_irq(&pDevice->lock); -// vCommandTimerWait((HANDLE)pDevice, 0); +// vCommandTimerWait((void *)pDevice, 0); // spin_lock_irq(&pDevice->lock); } @@ -1502,7 +1502,7 @@ s_vMgrRxAuthenSequence_2( DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:rx Auth_reply sequence_2 status error ...\n"); if ( pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT ) { // spin_unlock_irq(&pDevice->lock); -// vCommandTimerWait((HANDLE)pDevice, 0); +// vCommandTimerWait((void *)pDevice, 0); // spin_lock_irq(&pDevice->lock); } s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus)))); @@ -1640,7 +1640,7 @@ s_vMgrRxAuthenSequence_4( if ( pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT ) { // spin_unlock_irq(&pDevice->lock); -// vCommandTimerWait((HANDLE)pDevice, 0); +// vCommandTimerWait((void *)pDevice, 0); // spin_lock_irq(&pDevice->lock); } @@ -1943,10 +1943,10 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) sERP.byERP = 0; } - pBSSList = BSSpAddrIsInBSSList((HANDLE)pDevice, sFrame.pHdr->sA3.abyAddr3, sFrame.pSSID); + pBSSList = BSSpAddrIsInBSSList((void *)pDevice, sFrame.pHdr->sA3.abyAddr3, sFrame.pSSID); if (pBSSList == NULL) { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon/insert: RxChannel = : %d\n", byCurrChannel); - BSSbInsertToBSSList((HANDLE)pDevice, + BSSbInsertToBSSList((void *)pDevice, sFrame.pHdr->sA3.abyAddr3, *sFrame.pqwTimestamp, *sFrame.pwBeaconInterval, @@ -1962,12 +1962,12 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) sFrame.pIE_Quiet, sFrame.len - WLAN_HDR_ADDR3_LEN, sFrame.pHdr->sA4.abyAddr4, // payload of beacon - (HANDLE)pRxPacket + (void *)pRxPacket ); } else { // DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"update bcn: RxChannel = : %d\n", byCurrChannel); - BSSbUpdateToBSSList((HANDLE)pDevice, + BSSbUpdateToBSSList((void *)pDevice, *sFrame.pqwTimestamp, *sFrame.pwBeaconInterval, *sFrame.pwCapInfo, @@ -1984,7 +1984,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) pBSSList, sFrame.len - WLAN_HDR_ADDR3_LEN, sFrame.pHdr->sA4.abyAddr4, // payload of probresponse - (HANDLE)pRxPacket + (void *)pRxPacket ); } @@ -2353,7 +2353,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // set highest basic rate // s_vSetHighestBasicRate(pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates); // Prepare beacon frame - bMgrPrepareBeaconToSend((HANDLE)pDevice, pMgmt); + bMgrPrepareBeaconToSend((void *)pDevice, pMgmt); // } }; } @@ -2386,7 +2386,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) -*/ void vMgrCreateOwnIBSS( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PCMD_STATUS pStatus ) { @@ -2629,7 +2629,7 @@ vMgrCreateOwnIBSS( pMgmt->eCurrState = WMAC_STATE_STARTED; // Prepare beacon to send - if (bMgrPrepareBeaconToSend((HANDLE)pDevice, pMgmt)) { + if (bMgrPrepareBeaconToSend((void *)pDevice, pMgmt)) { *pStatus = CMD_STATUS_SUCCESS; } @@ -2653,7 +2653,7 @@ vMgrCreateOwnIBSS( void vMgrJoinBSSBegin( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PCMD_STATUS pStatus ) { @@ -2802,12 +2802,12 @@ vMgrJoinBSSBegin( // Add current BSS to Candidate list // This should only works for WPA2 BSS, and WPA2 BSS check must be done before. if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) { - BOOL bResult = bAdd_PMKID_Candidate((HANDLE)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); + BOOL bResult = bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult); if (bResult == FALSE) { - vFlush_PMKID_Candidate((HANDLE)pDevice); + vFlush_PMKID_Candidate((void *)pDevice); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"vFlush_PMKID_Candidate: 4\n"); - bAdd_PMKID_Candidate((HANDLE)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); + bAdd_PMKID_Candidate((void *)pDevice, pMgmt->abyCurrBSSID, &pCurr->sRSNCapObj); } } @@ -2898,7 +2898,7 @@ vMgrJoinBSSBegin( // and if registry setting is short preamble we can turn on too. // Prepare beacon - bMgrPrepareBeaconToSend((HANDLE)pDevice, pMgmt); + bMgrPrepareBeaconToSend((void *)pDevice, pMgmt); } else { pMgmt->eCurrState = WMAC_STATE_IDLE; @@ -4378,9 +4378,9 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) // update or insert the bss - pBSSList = BSSpAddrIsInBSSList((HANDLE)pDevice, sFrame.pHdr->sA3.abyAddr3, sFrame.pSSID); + pBSSList = BSSpAddrIsInBSSList((void *)pDevice, sFrame.pHdr->sA3.abyAddr3, sFrame.pSSID); if (pBSSList) { - BSSbUpdateToBSSList((HANDLE)pDevice, + BSSbUpdateToBSSList((void *)pDevice, *sFrame.pqwTimestamp, *sFrame.pwBeaconInterval, *sFrame.pwCapInfo, @@ -4397,12 +4397,12 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) pBSSList, sFrame.len - WLAN_HDR_ADDR3_LEN, sFrame.pHdr->sA4.abyAddr4, // payload of probresponse - (HANDLE)pRxPacket + (void *)pRxPacket ); } else { DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Probe resp/insert: RxChannel = : %d\n", byCurrChannel); - BSSbInsertToBSSList((HANDLE)pDevice, + BSSbInsertToBSSList((void *)pDevice, sFrame.pHdr->sA3.abyAddr3, *sFrame.pqwTimestamp, *sFrame.pwBeaconInterval, @@ -4418,7 +4418,7 @@ if(ChannelExceedZoneType(pDevice,byCurrChannel)==TRUE) sFrame.pIE_Quiet, sFrame.len - WLAN_HDR_ADDR3_LEN, sFrame.pHdr->sA4.abyAddr4, // payload of beacon - (HANDLE)pRxPacket + (void *)pRxPacket ); } return; @@ -4536,7 +4536,7 @@ s_vMgrRxProbeRequest( void vMgrRxManagePacket( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, IN PSRxMgmtPacket pRxPacket ) @@ -4685,7 +4685,7 @@ vMgrRxManagePacket( -*/ BOOL bMgrPrepareBeaconToSend( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt ) { @@ -4809,7 +4809,7 @@ s_vMgrLogStatus( -*/ BOOL bAdd_PMKID_Candidate ( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE pbyBSSID, IN PSRSNCapObject psRSNCapObj ) @@ -4870,7 +4870,7 @@ bAdd_PMKID_Candidate ( -*/ void vFlush_PMKID_Candidate ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ) { PSDevice pDevice = (PSDevice)hDeviceContext; diff --git a/drivers/staging/vt6655/wmgr.h b/drivers/staging/vt6655/wmgr.h index 5eabc19..cee8602 100644 --- a/drivers/staging/vt6655/wmgr.h +++ b/drivers/staging/vt6655/wmgr.h @@ -401,36 +401,36 @@ typedef struct tagSMgmtObject void vMgrObjectInit( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void vMgrTimerInit( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void vMgrObjectReset( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); void vMgrAssocBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, OUT PCMD_STATUS pStatus ); void vMgrReAssocBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, OUT PCMD_STATUS pStatus ); void vMgrDisassocBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, IN PBYTE abyDestAddress, IN WORD wReason, @@ -439,26 +439,26 @@ vMgrDisassocBeginSta( void vMgrAuthenBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, OUT PCMD_STATUS pStatus ); void vMgrCreateOwnIBSS( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PCMD_STATUS pStatus ); void vMgrJoinBSSBegin( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PCMD_STATUS pStatus ); void vMgrRxManagePacket( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, IN PSRxMgmtPacket pRxPacket ); @@ -466,14 +466,14 @@ vMgrRxManagePacket( /* void vMgrScanBegin( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, OUT PCMD_STATUS pStatus ); */ void vMgrDeAuthenBeginSta( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt, IN PBYTE abyDestAddress, IN WORD wReason, @@ -482,21 +482,21 @@ vMgrDeAuthenBeginSta( BOOL bMgrPrepareBeaconToSend( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PSMgmtObject pMgmt ); BOOL bAdd_PMKID_Candidate ( - IN HANDLE hDeviceContext, + IN void *hDeviceContext, IN PBYTE pbyBSSID, IN PSRSNCapObject psRSNCapObj ); void vFlush_PMKID_Candidate ( - IN HANDLE hDeviceContext + IN void *hDeviceContext ); #endif // __WMGR_H__ diff --git a/drivers/staging/vt6655/wpactl.c b/drivers/staging/vt6655/wpactl.c index 4e886c1..e5e618e 100644 --- a/drivers/staging/vt6655/wpactl.c +++ b/drivers/staging/vt6655/wpactl.c @@ -496,7 +496,7 @@ static int wpa_set_disassociate(PSDevice pDevice, spin_lock_irq(&pDevice->lock); if (pDevice->bLinkPass) { if (!memcmp(param->addr, pMgmt->abyCurrBSSID, 6)) - bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL); + bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE, NULL); } spin_unlock_irq(&pDevice->lock); @@ -525,8 +525,8 @@ static int wpa_set_scan(PSDevice pDevice, int ret = 0; spin_lock_irq(&pDevice->lock); - BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); + BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); spin_unlock_irq(&pDevice->lock); return ret; @@ -786,7 +786,7 @@ static int wpa_set_associate(PSDevice pDevice, memcpy(pMgmt->abyDesireBSSID, param->u.wpa_associate.bssid, 6); else { - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pItemSSID->abySSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pItemSSID->abySSID); } if (param->u.wpa_associate.wpa_ie_len == 0) { @@ -870,11 +870,11 @@ if (!((pMgmt->eAuthenMode == WMAC_AUTH_SHAREKEY) || if (pCurr == NULL){ printk("wpa_set_associate---->hidden mode site survey before associate.......\n"); - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); + bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); }; } /****************************************************************/ - bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); + bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); spin_unlock_irq(&pDevice->lock); return ret; -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel