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

staging: vt6656: code cleanup, removed HANDLE definition in ttype.h

Checkpatch warnings about using externs in .c files were not resolved,
neither some long lines on deeply nested code.
Signed-off-by: default avatarAndres More <more.andres@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 3afc7cc3
...@@ -1513,7 +1513,9 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3) ...@@ -1513,7 +1513,9 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3)
if ( pDevice->byTMax == 0 ) if ( pDevice->byTMax == 0 )
return; return;
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL); bScheduleCommand((void *) pDevice,
WLAN_CMD_CHANGE_ANTENNA,
NULL);
pDevice->byAntennaState = 1; pDevice->byAntennaState = 1;
...@@ -1543,7 +1545,9 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3) ...@@ -1543,7 +1545,9 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3)
((pDevice->ulSQ3_State1 != 0) && (pDevice->ulSQ3_State0 != 0) && (pDevice->ulSQ3_State0 < pDevice->ulSQ3_State1)) ((pDevice->ulSQ3_State1 != 0) && (pDevice->ulSQ3_State0 != 0) && (pDevice->ulSQ3_State0 < pDevice->ulSQ3_State1))
) { ) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL); bScheduleCommand((void *) pDevice,
WLAN_CMD_CHANGE_ANTENNA,
NULL);
pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ); pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ);
pDevice->TimerSQ3Tmax2.expires = RUN_AT(pDevice->byTMax2 * HZ); pDevice->TimerSQ3Tmax2.expires = RUN_AT(pDevice->byTMax2 * HZ);
...@@ -1576,17 +1580,14 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3) ...@@ -1576,17 +1580,14 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3)
* *
-*/ -*/
void void TimerSQ3CallBack(void *hDeviceContext)
TimerSQ3CallBack (
HANDLE hDeviceContext
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack..."); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack...");
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
pDevice->byAntennaState = 0; pDevice->byAntennaState = 0;
s_vClearSQ3Value(pDevice); s_vClearSQ3Value(pDevice);
pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ); pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ);
...@@ -1618,10 +1619,7 @@ TimerSQ3CallBack ( ...@@ -1618,10 +1619,7 @@ TimerSQ3CallBack (
* *
-*/ -*/
void void TimerSQ3Tmax3CallBack(void *hDeviceContext)
TimerSQ3Tmax3CallBack (
HANDLE hDeviceContext
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
...@@ -1639,7 +1637,7 @@ TimerSQ3Tmax3CallBack ( ...@@ -1639,7 +1637,7 @@ TimerSQ3Tmax3CallBack (
return; return;
} }
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
pDevice->byAntennaState = 1; pDevice->byAntennaState = 1;
del_timer(&pDevice->TimerSQ3Tmax3); del_timer(&pDevice->TimerSQ3Tmax3);
del_timer(&pDevice->TimerSQ3Tmax2); del_timer(&pDevice->TimerSQ3Tmax2);
......
...@@ -117,15 +117,8 @@ BBvCaculateParameter ( ...@@ -117,15 +117,8 @@ BBvCaculateParameter (
// timer for antenna diversity // timer for antenna diversity
void void TimerSQ3CallBack(void *hDeviceContext);
TimerSQ3CallBack ( void TimerSQ3Tmax3CallBack(void *hDeviceContext);
HANDLE hDeviceContext
);
void
TimerSQ3Tmax3CallBack (
HANDLE hDeviceContext
);
void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3); void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3);
void BBvLoopbackOn(PSDevice pDevice); void BBvLoopbackOn(PSDevice pDevice);
......
This diff is collapsed.
...@@ -226,134 +226,82 @@ typedef struct tagKnownNodeDB { ...@@ -226,134 +226,82 @@ typedef struct tagKnownNodeDB {
} KnownNodeDB, *PKnownNodeDB; } KnownNodeDB, *PKnownNodeDB;
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
PKnownBSS BSSpSearchBSSList(void *hDeviceContext,
PBYTE pbyDesireBSSID,
PKnownBSS PBYTE pbyDesireSSID,
BSSpSearchBSSList( CARD_PHY_TYPE ePhyType);
HANDLE hDeviceContext,
PBYTE pbyDesireBSSID, PKnownBSS BSSpAddrIsInBSSList(void *hDeviceContext,
PBYTE pbyDesireSSID, PBYTE abyBSSID,
CARD_PHY_TYPE ePhyType PWLAN_IE_SSID pSSID);
);
void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID);
PKnownBSS
BSSpAddrIsInBSSList( BOOL BSSbInsertToBSSList(void *hDeviceContext,
HANDLE hDeviceContext, PBYTE abyBSSIDAddr,
PBYTE abyBSSID, QWORD qwTimestamp,
PWLAN_IE_SSID pSSID WORD wBeaconInterval,
); WORD wCapInfo,
BYTE byCurrChannel,
void PWLAN_IE_SSID pSSID,
BSSvClearBSSList( PWLAN_IE_SUPP_RATES pSuppRates,
HANDLE hDeviceContext, PWLAN_IE_SUPP_RATES pExtSuppRates,
BOOL bKeepCurrBSSID PERPObject psERP,
); PWLAN_IE_RSN pRSN,
PWLAN_IE_RSN_EXT pRSNWPA,
BOOL PWLAN_IE_COUNTRY pIE_Country,
BSSbInsertToBSSList( PWLAN_IE_QUIET pIE_Quiet,
HANDLE hDeviceContext, UINT uIELength,
PBYTE abyBSSIDAddr, PBYTE pbyIEs,
QWORD qwTimestamp, void *pRxPacketContext);
WORD wBeaconInterval,
WORD wCapInfo, BOOL BSSbUpdateToBSSList(void *hDeviceContext,
BYTE byCurrChannel, QWORD qwTimestamp,
PWLAN_IE_SSID pSSID, WORD wBeaconInterval,
PWLAN_IE_SUPP_RATES pSuppRates, WORD wCapInfo,
PWLAN_IE_SUPP_RATES pExtSuppRates, BYTE byCurrChannel,
PERPObject psERP, BOOL bChannelHit,
PWLAN_IE_RSN pRSN, PWLAN_IE_SSID pSSID,
PWLAN_IE_RSN_EXT pRSNWPA, PWLAN_IE_SUPP_RATES pSuppRates,
PWLAN_IE_COUNTRY pIE_Country, PWLAN_IE_SUPP_RATES pExtSuppRates,
PWLAN_IE_QUIET pIE_Quiet, PERPObject psERP,
UINT uIELength, PWLAN_IE_RSN pRSN,
PBYTE pbyIEs, PWLAN_IE_RSN_EXT pRSNWPA,
HANDLE pRxPacketContext PWLAN_IE_COUNTRY pIE_Country,
); PWLAN_IE_QUIET pIE_Quiet,
PKnownBSS pBSSList,
UINT uIELength,
BOOL PBYTE pbyIEs,
BSSbUpdateToBSSList( void *pRxPacketContext);
HANDLE hDeviceContext,
QWORD qwTimestamp, BOOL BSSbIsSTAInNodeDB(void *hDeviceContext,
WORD wBeaconInterval, PBYTE abyDstAddr,
WORD wCapInfo, PUINT puNodeIndex);
BYTE byCurrChannel,
BOOL bChannelHit, void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex);
PWLAN_IE_SSID pSSID,
PWLAN_IE_SUPP_RATES pSuppRates, void BSSvUpdateAPNode(void *hDeviceContext,
PWLAN_IE_SUPP_RATES pExtSuppRates, PWORD pwCapInfo,
PERPObject psERP, PWLAN_IE_SUPP_RATES pItemRates,
PWLAN_IE_RSN pRSN, PWLAN_IE_SUPP_RATES pExtSuppRates);
PWLAN_IE_RSN_EXT pRSNWPA,
PWLAN_IE_COUNTRY pIE_Country, void BSSvSecondCallBack(void *hDeviceContext);
PWLAN_IE_QUIET pIE_Quiet,
PKnownBSS pBSSList, void BSSvUpdateNodeTxCounter(void *hDeviceContext,
UINT uIELength, PSStatCounter pStatistic,
PBYTE pbyIEs, BYTE byTSR,
HANDLE pRxPacketContext BYTE byPktNO);
);
void BSSvRemoveOneNode(void *hDeviceContext,
UINT uNodeIndex);
BOOL
BSSbIsSTAInNodeDB( void BSSvAddMulticastNode(void *hDeviceContext);
HANDLE hDeviceContext,
PBYTE abyDstAddr, void BSSvClearNodeDBTable(void *hDeviceContext,
PUINT puNodeIndex UINT uStartIndex);
);
void BSSvClearAnyBSSJoinRecord(void *hDeviceContext);
void
BSSvCreateOneNode(
HANDLE hDeviceContext,
PUINT puNodeIndex
);
void
BSSvUpdateAPNode(
HANDLE hDeviceContext,
PWORD pwCapInfo,
PWLAN_IE_SUPP_RATES pItemRates,
PWLAN_IE_SUPP_RATES pExtSuppRates
);
void
BSSvSecondCallBack(
HANDLE hDeviceContext
);
void
BSSvUpdateNodeTxCounter(
HANDLE hDeviceContext,
PSStatCounter pStatistic,
BYTE byTSR,
BYTE byPktNO
);
void
BSSvRemoveOneNode(
HANDLE hDeviceContext,
UINT uNodeIndex
);
void
BSSvAddMulticastNode(
HANDLE hDeviceContext
);
void
BSSvClearNodeDBTable(
HANDLE hDeviceContext,
UINT uStartIndex
);
void
BSSvClearAnyBSSJoinRecord(
HANDLE hDeviceContext
);
#endif /* __BSSDB_H__ */ #endif /* __BSSDB_H__ */
...@@ -1069,7 +1069,9 @@ static BOOL s_bAPModeRxCtl ( ...@@ -1069,7 +1069,9 @@ static BOOL s_bAPModeRxCtl (
// delcare received ps-poll event // delcare received ps-poll event
if (IS_CTL_PSPOLL(pbyFrame)) { if (IS_CTL_PSPOLL(pbyFrame)) {
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; 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"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 1\n");
} }
else { else {
...@@ -1078,7 +1080,9 @@ static BOOL s_bAPModeRxCtl ( ...@@ -1078,7 +1080,9 @@ static BOOL s_bAPModeRxCtl (
if (!IS_FC_POWERMGT(pbyFrame)) { if (!IS_FC_POWERMGT(pbyFrame)) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE;
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; 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"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 2\n");
} }
} }
...@@ -1094,7 +1098,9 @@ static BOOL s_bAPModeRxCtl ( ...@@ -1094,7 +1098,9 @@ static BOOL s_bAPModeRxCtl (
if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) { if (pMgmt->sNodeDBTable[iSANodeIndex].wEnQueueCnt > 0) {
pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE; pMgmt->sNodeDBTable[iSANodeIndex].bPSEnable = FALSE;
pMgmt->sNodeDBTable[iSANodeIndex].bRxPSPoll = TRUE; 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"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dpc: WLAN_CMD_RX_PSPOLL 3\n");
} }
...@@ -1596,7 +1602,7 @@ void RXvMngWorkItem(void *Context) ...@@ -1596,7 +1602,7 @@ void RXvMngWorkItem(void *Context)
} }
ASSERT(pRCB);// cannot be NULL ASSERT(pRCB);// cannot be NULL
pRxPacket = &(pRCB->sMngPacket); pRxPacket = &(pRCB->sMngPacket);
vMgrRxManagePacket((HANDLE)pDevice, &(pDevice->sMgmtObj), pRxPacket); vMgrRxManagePacket((void *) pDevice, &(pDevice->sMgmtObj), pRxPacket);
pRCB->Ref--; pRCB->Ref--;
if(pRCB->Ref == 0) { if(pRCB->Ref == 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList);
......
...@@ -160,11 +160,11 @@ INTnsProcessData(PSDevice pDevice) ...@@ -160,11 +160,11 @@ INTnsProcessData(PSDevice pDevice)
pMgmt->byDTIMPeriod-1; pMgmt->byDTIMPeriod-1;
pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE; pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE;
if (pMgmt->sNodeDBTable[0].bPSEnable) if (pMgmt->sNodeDBTable[0].bPSEnable)
bScheduleCommand((HANDLE)pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_RX_PSPOLL, WLAN_CMD_RX_PSPOLL,
NULL); NULL);
} }
bScheduleCommand((HANDLE)pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_BECON_SEND, WLAN_CMD_BECON_SEND,
NULL); NULL);
} /* if (pDevice->eOPMode == OP_MODE_AP) */ } /* if (pDevice->eOPMode == OP_MODE_AP) */
...@@ -174,13 +174,13 @@ INTnsProcessData(PSDevice pDevice) ...@@ -174,13 +174,13 @@ INTnsProcessData(PSDevice pDevice)
} }
if (pINTData->byISR0 & ISR_TBTT) { if (pINTData->byISR0 & ISR_TBTT) {
if (pDevice->bEnablePSMode) if (pDevice->bEnablePSMode)
bScheduleCommand((HANDLE) pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_TBTT_WAKEUP, WLAN_CMD_TBTT_WAKEUP,
NULL); NULL);
if (pDevice->bChannelSwitch) { if (pDevice->bChannelSwitch) {
pDevice->byChannelSwitchCount--; pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0) if (pDevice->byChannelSwitchCount == 0)
bScheduleCommand((HANDLE) pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_11H_CHSW, WLAN_CMD_11H_CHSW,
NULL); NULL);
} }
...@@ -207,7 +207,7 @@ INTnsProcessData(PSDevice pDevice) ...@@ -207,7 +207,7 @@ INTnsProcessData(PSDevice pDevice)
if (pINTData->byISR1 != 0) if (pINTData->byISR1 != 0)
if (pINTData->byISR1 & ISR_GPIO3) if (pINTData->byISR1 & ISR_GPIO3)
bScheduleCommand((HANDLE) pDevice, bScheduleCommand((void *) pDevice,
WLAN_CMD_RADIO, WLAN_CMD_RADIO,
NULL); NULL);
pDevice->intBuf.uDataLen = 0; pDevice->intBuf.uDataLen = 0;
......
...@@ -100,16 +100,21 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -100,16 +100,21 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN); memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN);
} }
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
if (memcmp(pMgmt->abyCurrBSSID, &abyNullAddr[0], 6) == 0)
BSSvClearBSSList((HANDLE)pDevice, FALSE);
else
BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin \n");
if (pItemSSID->len != 0) if (memcmp(pMgmt->abyCurrBSSID, &abyNullAddr[0], 6) == 0)
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID); BSSvClearBSSList((void *) pDevice, FALSE);
else else
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin\n");
if (pItemSSID->len != 0)
bScheduleCommand((void *) pDevice,
WLAN_CMD_BSSID_SCAN,
abyScanSSID);
else
bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
break; break;
...@@ -207,8 +212,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -207,8 +212,10 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrState = WMAC_STATE_IDLE;
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice,
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
break; break;
...@@ -576,7 +583,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) { ...@@ -576,7 +583,7 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
spin_lock_irq(&pDevice->lock); 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); spin_unlock_irq(&pDevice->lock);
break; break;
......
...@@ -209,9 +209,9 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! ...@@ -209,9 +209,9 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
#ifdef update_BssList #ifdef update_BssList
BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
#endif #endif
//mike add: active scan OR passive scan OR desire_ssid scan //mike add: active scan OR passive scan OR desire_ssid scan
if(wrq->length == sizeof(struct iw_scan_req)) { if(wrq->length == sizeof(struct iw_scan_req)) {
...@@ -229,7 +229,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! ...@@ -229,7 +229,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!
pMgmt->eScanType = WMAC_SCAN_PASSIVE; pMgmt->eScanType = WMAC_SCAN_PASSIVE;
PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID, PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n",((PWLAN_IE_SSID)abyScanSSID)->abySSID,
((PWLAN_IE_SSID)abyScanSSID)->len); ((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); spin_unlock_irq(&pDevice->lock);
return 0; return 0;
...@@ -244,7 +244,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating! ...@@ -244,7 +244,7 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!
pMgmt->eScanType = WMAC_SCAN_PASSIVE; pMgmt->eScanType = WMAC_SCAN_PASSIVE;
//printk("SIOCSIWSCAN:WLAN_CMD_BSSID_SCAN\n"); //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); spin_unlock_irq(&pDevice->lock);
return 0; return 0;
...@@ -944,10 +944,14 @@ int iwctl_siwessid(struct net_device *dev, ...@@ -944,10 +944,14 @@ int iwctl_siwessid(struct net_device *dev,
if (pCurr == NULL){ if (pCurr == NULL){
PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n"); PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n");
vResetCommandTimer((HANDLE) pDevice); vResetCommandTimer((void *) pDevice);
pMgmt->eScanType = WMAC_SCAN_ACTIVE; pMgmt->eScanType = WMAC_SCAN_ACTIVE;
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice,
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); 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 , 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 ? // by means of judging if there are two same BSSID exist in list ?
...@@ -959,10 +963,14 @@ int iwctl_siwessid(struct net_device *dev, ...@@ -959,10 +963,14 @@ int iwctl_siwessid(struct net_device *dev,
} }
if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!! if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!!
PRINT_K("SIOCSIWESSID:hidden ssid directly associate.......\n"); PRINT_K("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! pMgmt->eScanType = WMAC_SCAN_PASSIVE; //this scan type,you'll submit scan result!
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice,
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, pMgmt->abyDesireSSID); WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice,
WLAN_CMD_SSID,
pMgmt->abyDesireSSID);
} }
} }
} }
...@@ -1554,11 +1562,11 @@ int iwctl_siwpower(struct net_device *dev, ...@@ -1554,11 +1562,11 @@ int iwctl_siwpower(struct net_device *dev,
} }
if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) { if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
pDevice->ePSMode = WMAC_POWER_FAST; 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) { } else if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
pDevice->ePSMode = WMAC_POWER_FAST; pDevice->ePSMode = WMAC_POWER_FAST;
PSvEnablePowerSaving((HANDLE)pDevice, pMgmt->wListenInterval); PSvEnablePowerSaving((void *) pDevice, pMgmt->wListenInterval);
} }
switch (wrq->flags & IW_POWER_MODE) { switch (wrq->flags & IW_POWER_MODE) {
case IW_POWER_UNICAST_R: case IW_POWER_UNICAST_R:
...@@ -2007,12 +2015,16 @@ int iwctl_siwmlme(struct net_device *dev, ...@@ -2007,12 +2015,16 @@ int iwctl_siwmlme(struct net_device *dev,
case IW_MLME_DEAUTH: case IW_MLME_DEAUTH:
//this command seems to be not complete,please test it --einsnliu //this command seems to be not complete,please test it --einsnliu
//printk("iwctl_siwmlme--->send DEAUTH\n"); //printk("iwctl_siwmlme--->send DEAUTH\n");
//bScheduleCommand((HANDLE) pDevice, WLAN_CMD_DEAUTH, (PBYTE)&reason); /* bScheduleCommand((void *) pDevice,
WLAN_CMD_DEAUTH,
(PBYTE)&reason); */
//break; //break;
case IW_MLME_DISASSOC: case IW_MLME_DISASSOC:
if(pDevice->bLinkPass == TRUE){ if(pDevice->bLinkPass == TRUE){
PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n"); PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL); bScheduleCommand((void *) pDevice,
WLAN_CMD_DISASSOCIATE,
NULL);
} }
break; break;
default: default:
......
...@@ -1158,12 +1158,12 @@ static int device_open(struct net_device *dev) { ...@@ -1158,12 +1158,12 @@ static int device_open(struct net_device *dev) {
} }
if (pDevice->sMgmtObj.eConfigMode == WMAC_CONFIG_AP) { if (pDevice->sMgmtObj.eConfigMode == WMAC_CONFIG_AP) {
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
} }
else { else {
//mike:mark@2008-11-10 //mike:mark@2008-11-10
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_BSSID_SCAN, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
//bScheduleCommand((HANDLE)pDevice, WLAN_CMD_SSID, NULL); /* bScheduleCommand((void *) pDevice, WLAN_CMD_SSID, NULL); */
} }
...@@ -1220,7 +1220,7 @@ static int device_close(struct net_device *dev) { ...@@ -1220,7 +1220,7 @@ static int device_close(struct net_device *dev) {
//2007-1121-02<Add>by EinsnLiu //2007-1121-02<Add>by EinsnLiu
if (pDevice->bLinkPass) { if (pDevice->bLinkPass) {
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL);
mdelay(30); mdelay(30);
} }
//End Add //End Add
...@@ -2101,16 +2101,16 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -2101,16 +2101,16 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
if (pMgmt->eConfigMode == WMAC_CONFIG_AP) { if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
spin_lock_irq(&pDevice->lock); 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); spin_unlock_irq(&pDevice->lock);
} }
else { else {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n"); DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n");
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
//2007-1121-01<Modify>by EinsnLiu //2007-1121-01<Modify>by EinsnLiu
if (pDevice->bLinkPass&& if (pDevice->bLinkPass &&
memcmp(pMgmt->abyCurrSSID,pMgmt->abyDesireSSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN)) { memcmp(pMgmt->abyCurrSSID,pMgmt->abyDesireSSID,WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN)) {
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL);
} else { } else {
pDevice->bLinkPass = FALSE; pDevice->bLinkPass = FALSE;
pMgmt->eCurrState = WMAC_STATE_IDLE; pMgmt->eCurrState = WMAC_STATE_IDLE;
...@@ -2121,10 +2121,14 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { ...@@ -2121,10 +2121,14 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
netif_stop_queue(pDevice->dev); netif_stop_queue(pDevice->dev);
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
pMgmt->eScanType = WMAC_SCAN_ACTIVE; pMgmt->eScanType = WMAC_SCAN_ACTIVE;
if(pDevice->bWPASuppWextEnabled !=TRUE) if (!pDevice->bWPASuppWextEnabled)
#endif #endif
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice,
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SSID, NULL); WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
bScheduleCommand((void *) pDevice,
WLAN_CMD_SSID,
NULL);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
} }
pDevice->bCommit = FALSE; pDevice->bCommit = FALSE;
......
...@@ -50,19 +50,14 @@ ...@@ -50,19 +50,14 @@
/*--------------------- Static Definitions -------------------------*/ /*--------------------- Static Definitions -------------------------*/
/*--------------------- Static Classes ----------------------------*/ /*--------------------- Static Classes ----------------------------*/
/*--------------------- Static Variables --------------------------*/ /*--------------------- Static Variables --------------------------*/
static int msglevel =MSG_LEVEL_INFO; static int msglevel =MSG_LEVEL_INFO;
/*--------------------- Static Functions --------------------------*/ /*--------------------- Static Functions --------------------------*/
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
/*+ /*+
...@@ -75,12 +70,8 @@ static int msglevel =MSG_LEVEL_INFO; ...@@ -75,12 +70,8 @@ static int msglevel =MSG_LEVEL_INFO;
* *
-*/ -*/
void PSvEnablePowerSaving(void *hDeviceContext,
void WORD wListenInterval)
PSvEnablePowerSaving(
HANDLE hDeviceContext,
WORD wListenInterval
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
...@@ -128,7 +119,7 @@ PSvEnablePowerSaving( ...@@ -128,7 +119,7 @@ PSvEnablePowerSaving(
pDevice->bEnablePSMode = TRUE; pDevice->bEnablePSMode = TRUE;
if (pDevice->eOPMode == OP_MODE_ADHOC) { if (pDevice->eOPMode == OP_MODE_ADHOC) {
// bMgrPrepareBeaconToSend((HANDLE)pDevice, pMgmt); /* bMgrPrepareBeaconToSend((void *) pDevice, pMgmt); */
} }
// We don't send null pkt in ad hoc mode since beacon will handle this. // We don't send null pkt in ad hoc mode since beacon will handle this.
else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) { else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) {
...@@ -139,11 +130,6 @@ PSvEnablePowerSaving( ...@@ -139,11 +130,6 @@ PSvEnablePowerSaving(
return; return;
} }
/*+ /*+
* *
* Routine Description: * Routine Description:
...@@ -154,10 +140,7 @@ PSvEnablePowerSaving( ...@@ -154,10 +140,7 @@ PSvEnablePowerSaving(
* *
-*/ -*/
void void PSvDisablePowerSaving(void *hDeviceContext)
PSvDisablePowerSaving(
HANDLE hDeviceContext
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
// PSMgmtObject pMgmt = &(pDevice->sMgmtObj); // PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
...@@ -187,7 +170,6 @@ PSvDisablePowerSaving( ...@@ -187,7 +170,6 @@ PSvDisablePowerSaving(
return; return;
} }
/*+ /*+
* *
* Routine Description: * Routine Description:
...@@ -198,13 +180,9 @@ PSvDisablePowerSaving( ...@@ -198,13 +180,9 @@ PSvDisablePowerSaving(
* FALSE, if fail * FALSE, if fail
-*/ -*/
BOOL PSbConsiderPowerDown(void *hDeviceContext,
BOOL BOOL bCheckRxDMA,
PSbConsiderPowerDown( BOOL bCheckCountToWakeUp)
HANDLE hDeviceContext,
BOOL bCheckRxDMA,
BOOL bCheckCountToWakeUp
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
...@@ -248,8 +226,6 @@ PSbConsiderPowerDown( ...@@ -248,8 +226,6 @@ PSbConsiderPowerDown(
return TRUE; return TRUE;
} }
/*+ /*+
* *
* Routine Description: * Routine Description:
...@@ -260,12 +236,7 @@ PSbConsiderPowerDown( ...@@ -260,12 +236,7 @@ PSbConsiderPowerDown(
* *
-*/ -*/
void PSvSendPSPOLL(void *hDeviceContext)
void
PSvSendPSPOLL(
HANDLE hDeviceContext
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj); PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
...@@ -297,8 +268,6 @@ PSvSendPSPOLL( ...@@ -297,8 +268,6 @@ PSvSendPSPOLL(
return; return;
} }
/*+ /*+
* *
* Routine Description: * Routine Description:
...@@ -308,10 +277,8 @@ PSvSendPSPOLL( ...@@ -308,10 +277,8 @@ PSvSendPSPOLL(
* None. * None.
* *
-*/ -*/
BOOL
PSbSendNullPacket( BOOL PSbSendNullPacket(void *hDeviceContext)
HANDLE hDeviceContext
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
PSTxMgmtPacket pTxPacket = NULL; PSTxMgmtPacket pTxPacket = NULL;
...@@ -388,10 +355,7 @@ PSbSendNullPacket( ...@@ -388,10 +355,7 @@ PSbSendNullPacket(
* *
-*/ -*/
BOOL BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext)
PSbIsNextTBTTWakeUp(
HANDLE hDeviceContext
)
{ {
PSDevice pDevice = (PSDevice)hDeviceContext; PSDevice pDevice = (PSDevice)hDeviceContext;
......
...@@ -48,37 +48,14 @@ ...@@ -48,37 +48,14 @@
/* PSDevice pDevice */ /* PSDevice pDevice */
/* PSDevice hDeviceContext */ /* PSDevice hDeviceContext */
BOOL BOOL PSbConsiderPowerDown(void *hDeviceContext,
PSbConsiderPowerDown( BOOL bCheckRxDMA,
HANDLE hDeviceContext, BOOL bCheckCountToWakeUp);
BOOL bCheckRxDMA,
BOOL bCheckCountToWakeUp void PSvDisablePowerSaving(void *hDeviceContext);
); void PSvEnablePowerSaving(void *hDeviceContext, WORD wListenInterval);
void PSvSendPSPOLL(void *hDeviceContext);
void BOOL PSbSendNullPacket(void *hDeviceContext);
PSvDisablePowerSaving( BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext);
HANDLE hDeviceContext
);
void
PSvEnablePowerSaving(
HANDLE hDeviceContext,
WORD wListenInterval
);
void
PSvSendPSPOLL(
HANDLE hDeviceContext
);
BOOL
PSbSendNullPacket(
HANDLE hDeviceContext
);
BOOL
PSbIsNextTBTTWakeUp(
HANDLE hDeviceContext
);
#endif /* __POWER_H__ */ #endif /* __POWER_H__ */
...@@ -3032,10 +3032,12 @@ nsDMA_tx_packet( ...@@ -3032,10 +3032,12 @@ nsDMA_tx_packet(
} }
} }
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "dma_tx: pDevice->wCurrentRate = %d \n", pDevice->wCurrentRate); DBG_PRT(MSG_LEVEL_DEBUG,
KERN_INFO "dma_tx: pDevice->wCurrentRate = %d\n",
pDevice->wCurrentRate);
if (wKeepRate != pDevice->wCurrentRate) { if (wKeepRate != pDevice->wCurrentRate) {
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_SETPOWER, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_SETPOWER, NULL);
} }
if (pDevice->wCurrentRate <= RATE_11M) { if (pDevice->wCurrentRate <= RATE_11M) {
...@@ -3118,7 +3120,9 @@ nsDMA_tx_packet( ...@@ -3118,7 +3120,9 @@ nsDMA_tx_packet(
if ( pDevice->bEnablePSMode == TRUE ) { if ( pDevice->bEnablePSMode == TRUE ) {
if ( !pDevice->bPSModeTxBurst ) { if ( !pDevice->bPSModeTxBurst ) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_MAC_DISPOWERSAVING, NULL); bScheduleCommand((void *) pDevice,
WLAN_CMD_MAC_DISPOWERSAVING,
NULL);
pDevice->bPSModeTxBurst = TRUE; pDevice->bPSModeTxBurst = TRUE;
} }
} }
...@@ -3138,7 +3142,7 @@ nsDMA_tx_packet( ...@@ -3138,7 +3142,7 @@ nsDMA_tx_packet(
if (bNeedDeAuth == TRUE) { if (bNeedDeAuth == TRUE) {
WORD wReason = WLAN_MGMT_REASON_MIC_FAILURE; WORD wReason = WLAN_MGMT_REASON_MIC_FAILURE;
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_DEAUTH, (PBYTE)&wReason); bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (PBYTE) &wReason);
} }
if(status!=STATUS_PENDING) { if(status!=STATUS_PENDING) {
...@@ -3258,9 +3262,8 @@ bRelayPacketSend ( ...@@ -3258,9 +3262,8 @@ bRelayPacketSend (
pDevice->wCurrentRate = pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate; pDevice->wCurrentRate = pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate;
} }
if (wKeepRate != pDevice->wCurrentRate) { if (wKeepRate != pDevice->wCurrentRate) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SETPOWER, NULL); bScheduleCommand((void *) pDevice, WLAN_CMD_SETPOWER, NULL);
} }
if (pDevice->wCurrentRate <= RATE_11M) if (pDevice->wCurrentRate <= RATE_11M)
......
...@@ -133,11 +133,4 @@ typedef DWORD * PDWORD; ...@@ -133,11 +133,4 @@ typedef DWORD * PDWORD;
typedef QWORD * PQWORD; typedef QWORD * PQWORD;
// handle declaration
#ifdef STRICT
typedef void *HANDLE;
#else
typedef void *HANDLE;
#endif
#endif /* __TTYPE_H__ */ #endif /* __TTYPE_H__ */
This diff is collapsed.
...@@ -105,33 +105,22 @@ typedef enum tagCMD_STATE { ...@@ -105,33 +105,22 @@ typedef enum tagCMD_STATE {
WLAN_CMD_IDLE WLAN_CMD_IDLE
} CMD_STATE, *PCMD_STATE; } CMD_STATE, *PCMD_STATE;
/*--------------------- Export Classes ----------------------------*/ /*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/ /*--------------------- Export Variables --------------------------*/
/*--------------------- Export Types ------------------------------*/ /*--------------------- Export Types ------------------------------*/
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
void
vResetCommandTimer(
HANDLE hDeviceContext
);
BOOL void vResetCommandTimer(void *hDeviceContext);
bScheduleCommand(
HANDLE hDeviceContext, BOOL bScheduleCommand(void *hDeviceContext,
CMD_CODE eCommand, CMD_CODE eCommand,
PBYTE pbyItem0 PBYTE pbyItem0);
);
void vRunCommand(void *hDeviceContext);
void
vRunCommand(
HANDLE hDeviceContext
);
/* /*
void void
WCMDvCommandThread( WCMDvCommandThread(
...@@ -141,10 +130,7 @@ WCMDvCommandThread( ...@@ -141,10 +130,7 @@ WCMDvCommandThread(
//2007-0115-09<Add>by MikeLiu //2007-0115-09<Add>by MikeLiu
#ifdef TxInSleep #ifdef TxInSleep
void void BSSvSecondTxData(void *hDeviceContext);
BSSvSecondTxData(
HANDLE hDeviceContext
);
#endif #endif
#endif /* __WCMD_H__ */ #endif /* __WCMD_H__ */
This diff is collapsed.
...@@ -400,102 +400,61 @@ typedef struct tagSMgmtObject ...@@ -400,102 +400,61 @@ typedef struct tagSMgmtObject
} SMgmtObject, *PSMgmtObject; } SMgmtObject, *PSMgmtObject;
/*--------------------- Export Macros ------------------------------*/ /*--------------------- Export Macros ------------------------------*/
/*--------------------- Export Functions --------------------------*/ /*--------------------- Export Functions --------------------------*/
void vMgrObjectInit(void *hDeviceContext);
void void vMgrAssocBeginSta(void *hDeviceContext,
vMgrObjectInit( PSMgmtObject pMgmt,
HANDLE hDeviceContext PCMD_STATUS pStatus);
);
void vMgrReAssocBeginSta(void *hDeviceContext,
PSMgmtObject pMgmt,
PCMD_STATUS pStatus);
void void vMgrDisassocBeginSta(void *hDeviceContext,
vMgrAssocBeginSta( PSMgmtObject pMgmt,
HANDLE hDeviceContext, PBYTE abyDestAddress,
PSMgmtObject pMgmt, WORD wReason,
PCMD_STATUS pStatus PCMD_STATUS pStatus);
);
void void vMgrAuthenBeginSta(void *hDeviceContext,
vMgrReAssocBeginSta( PSMgmtObject pMgmt,
HANDLE hDeviceContext, PCMD_STATUS pStatus);
PSMgmtObject pMgmt,
PCMD_STATUS pStatus
);
void
vMgrDisassocBeginSta(
HANDLE hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
);
void
vMgrAuthenBeginSta(
HANDLE hDeviceContext,
PSMgmtObject pMgmt,
PCMD_STATUS pStatus
);
void void vMgrCreateOwnIBSS(void *hDeviceContext,
vMgrCreateOwnIBSS( PCMD_STATUS pStatus);
HANDLE hDeviceContext,
PCMD_STATUS pStatus
);
void void vMgrJoinBSSBegin(void *hDeviceContext,
vMgrJoinBSSBegin( PCMD_STATUS pStatus);
HANDLE hDeviceContext,
PCMD_STATUS pStatus
);
void void vMgrRxManagePacket(void *hDeviceContext,
vMgrRxManagePacket( PSMgmtObject pMgmt,
HANDLE hDeviceContext, PSRxMgmtPacket pRxPacket);
PSMgmtObject pMgmt,
PSRxMgmtPacket pRxPacket
);
/* /*
void void
vMgrScanBegin( vMgrScanBegin(
HANDLE hDeviceContext, void *hDeviceContext,
PCMD_STATUS pStatus PCMD_STATUS pStatus
); );
*/ */
void void vMgrDeAuthenBeginSta(void *hDeviceContext,
vMgrDeAuthenBeginSta( PSMgmtObject pMgmt,
HANDLE hDeviceContext, PBYTE abyDestAddress,
PSMgmtObject pMgmt, WORD wReason,
PBYTE abyDestAddress, PCMD_STATUS pStatus);
WORD wReason,
PCMD_STATUS pStatus
);
BOOL
bMgrPrepareBeaconToSend(
HANDLE hDeviceContext,
PSMgmtObject pMgmt
);
BOOL bMgrPrepareBeaconToSend(void *hDeviceContext,
PSMgmtObject pMgmt);
BOOL BOOL bAdd_PMKID_Candidate(void *hDeviceContext,
bAdd_PMKID_Candidate ( PBYTE pbyBSSID,
HANDLE hDeviceContext, PSRSNCapObject psRSNCapObj);
PBYTE pbyBSSID,
PSRSNCapObject psRSNCapObj
);
void void vFlush_PMKID_Candidate(void *hDeviceContext);
vFlush_PMKID_Candidate (
HANDLE hDeviceContext
);
#endif /* __WMGR_H__ */ #endif /* __WMGR_H__ */
...@@ -489,7 +489,7 @@ static int wpa_set_disassociate(PSDevice pDevice, ...@@ -489,7 +489,7 @@ static int wpa_set_disassociate(PSDevice pDevice,
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
if (pDevice->bLinkPass) { if (pDevice->bLinkPass) {
if (!memcmp(param->addr, pMgmt->abyCurrBSSID, 6)) 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); spin_unlock_irq(&pDevice->lock);
...@@ -513,7 +513,7 @@ static int wpa_set_disassociate(PSDevice pDevice, ...@@ -513,7 +513,7 @@ static int wpa_set_disassociate(PSDevice pDevice,
*/ */
static int wpa_set_scan(PSDevice pDevice, static int wpa_set_scan(PSDevice pDevice,
struct viawget_wpa_param *param) struct viawget_wpa_param *param)
{ {
int ret = 0; int ret = 0;
...@@ -531,9 +531,11 @@ memcpy(pItemSSID->abySSID, param->u.scan_req.ssid, param->u.scan_req.ssid_len); ...@@ -531,9 +531,11 @@ memcpy(pItemSSID->abySSID, param->u.scan_req.ssid, param->u.scan_req.ssid_len);
pItemSSID->len = param->u.scan_req.ssid_len; pItemSSID->len = param->u.scan_req.ssid_len;
spin_lock_irq(&pDevice->lock); spin_lock_irq(&pDevice->lock);
BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass); BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
// bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL); /* bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); */
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID); bScheduleCommand((void *) pDevice,
WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
spin_unlock_irq(&pDevice->lock); spin_unlock_irq(&pDevice->lock);
return ret; return ret;
...@@ -886,12 +888,14 @@ static int wpa_set_associate(PSDevice pDevice, ...@@ -886,12 +888,14 @@ static int wpa_set_associate(PSDevice pDevice,
if (pCurr == NULL){ if (pCurr == NULL){
printk("wpa_set_associate---->hidden mode site survey before associate.......\n"); 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); spin_unlock_irq(&pDevice->lock);
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment