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)
if ( pDevice->byTMax == 0 )
return;
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
bScheduleCommand((void *) pDevice,
WLAN_CMD_CHANGE_ANTENNA,
NULL);
pDevice->byAntennaState = 1;
......@@ -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))
) {
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->TimerSQ3Tmax2.expires = RUN_AT(pDevice->byTMax2 * HZ);
......@@ -1576,17 +1580,14 @@ BBvAntennaDiversity (PSDevice pDevice, BYTE byRxRate, BYTE bySQ3)
*
-*/
void
TimerSQ3CallBack (
HANDLE hDeviceContext
)
void TimerSQ3CallBack(void *hDeviceContext)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TimerSQ3CallBack...");
spin_lock_irq(&pDevice->lock);
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
bScheduleCommand((void *) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
pDevice->byAntennaState = 0;
s_vClearSQ3Value(pDevice);
pDevice->TimerSQ3Tmax3.expires = RUN_AT(pDevice->byTMax3 * HZ);
......@@ -1618,10 +1619,7 @@ TimerSQ3CallBack (
*
-*/
void
TimerSQ3Tmax3CallBack (
HANDLE hDeviceContext
)
void TimerSQ3Tmax3CallBack(void *hDeviceContext)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
......@@ -1639,7 +1637,7 @@ TimerSQ3Tmax3CallBack (
return;
}
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
bScheduleCommand((void *) pDevice, WLAN_CMD_CHANGE_ANTENNA, NULL);
pDevice->byAntennaState = 1;
del_timer(&pDevice->TimerSQ3Tmax3);
del_timer(&pDevice->TimerSQ3Tmax2);
......
......@@ -117,15 +117,8 @@ BBvCaculateParameter (
// timer for antenna diversity
void
TimerSQ3CallBack (
HANDLE hDeviceContext
);
void
TimerSQ3Tmax3CallBack (
HANDLE hDeviceContext
);
void TimerSQ3CallBack(void *hDeviceContext);
void TimerSQ3Tmax3CallBack(void *hDeviceContext);
void BBvAntennaDiversity(PSDevice pDevice, BYTE byRxRate, BYTE bySQ3);
void BBvLoopbackOn(PSDevice pDevice);
......
This diff is collapsed.
......@@ -226,35 +226,20 @@ typedef struct tagKnownNodeDB {
} KnownNodeDB, *PKnownNodeDB;
/*--------------------- Export Functions --------------------------*/
PKnownBSS
BSSpSearchBSSList(
HANDLE hDeviceContext,
PKnownBSS BSSpSearchBSSList(void *hDeviceContext,
PBYTE pbyDesireBSSID,
PBYTE pbyDesireSSID,
CARD_PHY_TYPE ePhyType
);
CARD_PHY_TYPE ePhyType);
PKnownBSS
BSSpAddrIsInBSSList(
HANDLE hDeviceContext,
PKnownBSS BSSpAddrIsInBSSList(void *hDeviceContext,
PBYTE abyBSSID,
PWLAN_IE_SSID pSSID
);
void
BSSvClearBSSList(
HANDLE hDeviceContext,
BOOL bKeepCurrBSSID
);
BOOL
BSSbInsertToBSSList(
HANDLE hDeviceContext,
PWLAN_IE_SSID pSSID);
void BSSvClearBSSList(void *hDeviceContext, BOOL bKeepCurrBSSID);
BOOL BSSbInsertToBSSList(void *hDeviceContext,
PBYTE abyBSSIDAddr,
QWORD qwTimestamp,
WORD wBeaconInterval,
......@@ -270,13 +255,9 @@ BSSbInsertToBSSList(
PWLAN_IE_QUIET pIE_Quiet,
UINT uIELength,
PBYTE pbyIEs,
HANDLE pRxPacketContext
);
void *pRxPacketContext);
BOOL
BSSbUpdateToBSSList(
HANDLE hDeviceContext,
BOOL BSSbUpdateToBSSList(void *hDeviceContext,
QWORD qwTimestamp,
WORD wBeaconInterval,
WORD wCapInfo,
......@@ -293,67 +274,34 @@ BSSbUpdateToBSSList(
PKnownBSS pBSSList,
UINT uIELength,
PBYTE pbyIEs,
HANDLE pRxPacketContext
);
void *pRxPacketContext);
BOOL
BSSbIsSTAInNodeDB(
HANDLE hDeviceContext,
BOOL BSSbIsSTAInNodeDB(void *hDeviceContext,
PBYTE abyDstAddr,
PUINT puNodeIndex
);
void
BSSvCreateOneNode(
HANDLE hDeviceContext,
PUINT puNodeIndex
);
void
BSSvUpdateAPNode(
HANDLE hDeviceContext,
PWORD pwCapInfo,
PWLAN_IE_SUPP_RATES pItemRates,
PWLAN_IE_SUPP_RATES pExtSuppRates
);
PUINT puNodeIndex);
void BSSvCreateOneNode(void *hDeviceContext, PUINT puNodeIndex);
void
BSSvSecondCallBack(
HANDLE hDeviceContext
);
void BSSvUpdateAPNode(void *hDeviceContext,
PWORD pwCapInfo,
PWLAN_IE_SUPP_RATES pItemRates,
PWLAN_IE_SUPP_RATES pExtSuppRates);
void BSSvSecondCallBack(void *hDeviceContext);
void
BSSvUpdateNodeTxCounter(
HANDLE hDeviceContext,
void BSSvUpdateNodeTxCounter(void *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
);
BYTE byPktNO);
void BSSvRemoveOneNode(void *hDeviceContext,
UINT uNodeIndex);
void BSSvAddMulticastNode(void *hDeviceContext);
void BSSvClearNodeDBTable(void *hDeviceContext,
UINT uStartIndex);
void BSSvClearAnyBSSJoinRecord(void *hDeviceContext);
#endif /* __BSSDB_H__ */
......@@ -1069,7 +1069,9 @@ 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 {
......@@ -1078,7 +1080,9 @@ 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");
}
}
......@@ -1094,7 +1098,9 @@ 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");
}
......@@ -1596,7 +1602,7 @@ void RXvMngWorkItem(void *Context)
}
ASSERT(pRCB);// cannot be NULL
pRxPacket = &(pRCB->sMngPacket);
vMgrRxManagePacket((HANDLE)pDevice, &(pDevice->sMgmtObj), pRxPacket);
vMgrRxManagePacket((void *) pDevice, &(pDevice->sMgmtObj), pRxPacket);
pRCB->Ref--;
if(pRCB->Ref == 0) {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",pDevice->NumRecvFreeList, pDevice->NumRecvMngList);
......
......@@ -160,11 +160,11 @@ INTnsProcessData(PSDevice pDevice)
pMgmt->byDTIMPeriod-1;
pMgmt->sNodeDBTable[0].bRxPSPoll = TRUE;
if (pMgmt->sNodeDBTable[0].bPSEnable)
bScheduleCommand((HANDLE)pDevice,
bScheduleCommand((void *) pDevice,
WLAN_CMD_RX_PSPOLL,
NULL);
}
bScheduleCommand((HANDLE)pDevice,
bScheduleCommand((void *) pDevice,
WLAN_CMD_BECON_SEND,
NULL);
} /* if (pDevice->eOPMode == OP_MODE_AP) */
......@@ -174,13 +174,13 @@ INTnsProcessData(PSDevice pDevice)
}
if (pINTData->byISR0 & ISR_TBTT) {
if (pDevice->bEnablePSMode)
bScheduleCommand((HANDLE) pDevice,
bScheduleCommand((void *) pDevice,
WLAN_CMD_TBTT_WAKEUP,
NULL);
if (pDevice->bChannelSwitch) {
pDevice->byChannelSwitchCount--;
if (pDevice->byChannelSwitchCount == 0)
bScheduleCommand((HANDLE) pDevice,
bScheduleCommand((void *) pDevice,
WLAN_CMD_11H_CHSW,
NULL);
}
......@@ -207,7 +207,7 @@ INTnsProcessData(PSDevice pDevice)
if (pINTData->byISR1 != 0)
if (pINTData->byISR1 & ISR_GPIO3)
bScheduleCommand((HANDLE) pDevice,
bScheduleCommand((void *) pDevice,
WLAN_CMD_RADIO,
NULL);
pDevice->intBuf.uDataLen = 0;
......
......@@ -100,16 +100,21 @@ int private_ioctl(PSDevice pDevice, struct ifreq *rq) {
memcpy(abyScanSSID, pItemSSID, pItemSSID->len + WLAN_IEHDR_LEN);
}
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);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin \n");
BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "WLAN_CMD_BSS_SCAN..begin\n");
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;
......@@ -207,8 +212,10 @@ 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;
......@@ -576,7 +583,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;
......
......@@ -209,9 +209,9 @@ if(pDevice->byReAssocCount > 0) { //reject scan when re-associating!
spin_lock_irq(&pDevice->lock);
#ifdef update_BssList
BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass);
#endif
#ifdef update_BssList
BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
#endif
//mike add: active scan OR passive scan OR desire_ssid scan
if(wrq->length == sizeof(struct iw_scan_req)) {
......@@ -229,7 +229,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;
......@@ -244,7 +244,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;
......@@ -944,10 +944,14 @@ int iwctl_siwessid(struct net_device *dev,
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 ?
......@@ -959,10 +963,14 @@ int iwctl_siwessid(struct net_device *dev,
}
if(uSameBssidNum >= 2) { //hit: desired AP is in hidden ssid mode!!!
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!
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);
}
}
}
......@@ -1554,11 +1562,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:
......@@ -2007,12 +2015,16 @@ int iwctl_siwmlme(struct net_device *dev,
case IW_MLME_DEAUTH:
//this command seems to be not complete,please test it --einsnliu
//printk("iwctl_siwmlme--->send DEAUTH\n");
//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){
PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_DISASSOCIATE, NULL);
bScheduleCommand((void *) pDevice,
WLAN_CMD_DISASSOCIATE,
NULL);
}
break;
default:
......
......@@ -1158,12 +1158,12 @@ static int device_open(struct net_device *dev) {
}
if (pDevice->sMgmtObj.eConfigMode == WMAC_CONFIG_AP) {
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_RUN_AP, NULL);
bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
}
else {
//mike:mark@2008-11-10
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); */
}
......@@ -1220,7 +1220,7 @@ static int device_close(struct net_device *dev) {
//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);
}
//End Add
......@@ -2101,16 +2101,16 @@ 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 {
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Commit the settings\n");
spin_lock_irq(&pDevice->lock);
//2007-1121-01<Modify>by EinsnLiu
if (pDevice->bLinkPass&&
if (pDevice->bLinkPass &&
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 {
pDevice->bLinkPass = FALSE;
pMgmt->eCurrState = WMAC_STATE_IDLE;
......@@ -2121,10 +2121,14 @@ static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
netif_stop_queue(pDevice->dev);
#ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
pMgmt->eScanType = WMAC_SCAN_ACTIVE;
if(pDevice->bWPASuppWextEnabled !=TRUE)
if (!pDevice->bWPASuppWextEnabled)
#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;
......
......@@ -50,19 +50,14 @@
/*--------------------- Static Definitions -------------------------*/
/*--------------------- Static Classes ----------------------------*/
/*--------------------- Static Variables --------------------------*/
static int msglevel =MSG_LEVEL_INFO;
/*--------------------- Static Functions --------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Functions --------------------------*/
/*+
......@@ -75,12 +70,8 @@ static int msglevel =MSG_LEVEL_INFO;
*
-*/
void
PSvEnablePowerSaving(
HANDLE hDeviceContext,
WORD wListenInterval
)
void PSvEnablePowerSaving(void *hDeviceContext,
WORD wListenInterval)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
......@@ -128,7 +119,7 @@ PSvEnablePowerSaving(
pDevice->bEnablePSMode = TRUE;
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.
else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) {
......@@ -139,11 +130,6 @@ PSvEnablePowerSaving(
return;
}
/*+
*
* Routine Description:
......@@ -154,10 +140,7 @@ PSvEnablePowerSaving(
*
-*/
void
PSvDisablePowerSaving(
HANDLE hDeviceContext
)
void PSvDisablePowerSaving(void *hDeviceContext)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
// PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
......@@ -187,7 +170,6 @@ PSvDisablePowerSaving(
return;
}
/*+
*
* Routine Description:
......@@ -198,13 +180,9 @@ PSvDisablePowerSaving(
* FALSE, if fail
-*/
BOOL
PSbConsiderPowerDown(
HANDLE hDeviceContext,
BOOL PSbConsiderPowerDown(void *hDeviceContext,
BOOL bCheckRxDMA,
BOOL bCheckCountToWakeUp
)
BOOL bCheckCountToWakeUp)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
......@@ -248,8 +226,6 @@ PSbConsiderPowerDown(
return TRUE;
}
/*+
*
* Routine Description:
......@@ -260,12 +236,7 @@ PSbConsiderPowerDown(
*
-*/
void
PSvSendPSPOLL(
HANDLE hDeviceContext
)
void PSvSendPSPOLL(void *hDeviceContext)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
......@@ -297,8 +268,6 @@ PSvSendPSPOLL(
return;
}
/*+
*
* Routine Description:
......@@ -308,10 +277,8 @@ PSvSendPSPOLL(
* None.
*
-*/
BOOL
PSbSendNullPacket(
HANDLE hDeviceContext
)
BOOL PSbSendNullPacket(void *hDeviceContext)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
PSTxMgmtPacket pTxPacket = NULL;
......@@ -388,10 +355,7 @@ PSbSendNullPacket(
*
-*/
BOOL
PSbIsNextTBTTWakeUp(
HANDLE hDeviceContext
)
BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext)
{
PSDevice pDevice = (PSDevice)hDeviceContext;
......
......@@ -48,37 +48,14 @@
/* PSDevice pDevice */
/* PSDevice hDeviceContext */
BOOL
PSbConsiderPowerDown(
HANDLE hDeviceContext,
BOOL PSbConsiderPowerDown(void *hDeviceContext,
BOOL bCheckRxDMA,
BOOL bCheckCountToWakeUp
);
BOOL bCheckCountToWakeUp);
void
PSvDisablePowerSaving(
HANDLE hDeviceContext
);
void
PSvEnablePowerSaving(
HANDLE hDeviceContext,
WORD wListenInterval
);
void
PSvSendPSPOLL(
HANDLE hDeviceContext
);
BOOL
PSbSendNullPacket(
HANDLE hDeviceContext
);
BOOL
PSbIsNextTBTTWakeUp(
HANDLE hDeviceContext
);
void PSvDisablePowerSaving(void *hDeviceContext);
void PSvEnablePowerSaving(void *hDeviceContext, WORD wListenInterval);
void PSvSendPSPOLL(void *hDeviceContext);
BOOL PSbSendNullPacket(void *hDeviceContext);
BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext);
#endif /* __POWER_H__ */
......@@ -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) {
bScheduleCommand((HANDLE)pDevice, WLAN_CMD_SETPOWER, NULL);
bScheduleCommand((void *) pDevice, WLAN_CMD_SETPOWER, NULL);
}
if (pDevice->wCurrentRate <= RATE_11M) {
......@@ -3118,7 +3120,9 @@ nsDMA_tx_packet(
if ( pDevice->bEnablePSMode == TRUE ) {
if ( !pDevice->bPSModeTxBurst ) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_MAC_DISPOWERSAVING, NULL);
bScheduleCommand((void *) pDevice,
WLAN_CMD_MAC_DISPOWERSAVING,
NULL);
pDevice->bPSModeTxBurst = TRUE;
}
}
......@@ -3138,7 +3142,7 @@ nsDMA_tx_packet(
if (bNeedDeAuth == TRUE) {
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) {
......@@ -3258,9 +3262,8 @@ bRelayPacketSend (
pDevice->wCurrentRate = pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate;
}
if (wKeepRate != pDevice->wCurrentRate) {
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_SETPOWER, NULL);
bScheduleCommand((void *) pDevice, WLAN_CMD_SETPOWER, NULL);
}
if (pDevice->wCurrentRate <= RATE_11M)
......
......@@ -133,11 +133,4 @@ typedef DWORD * PDWORD;
typedef QWORD * PQWORD;
// handle declaration
#ifdef STRICT
typedef void *HANDLE;
#else
typedef void *HANDLE;
#endif
#endif /* __TTYPE_H__ */
This diff is collapsed.
......@@ -105,33 +105,22 @@ typedef enum tagCMD_STATE {
WLAN_CMD_IDLE
} CMD_STATE, *PCMD_STATE;
/*--------------------- Export Classes ----------------------------*/
/*--------------------- Export Variables --------------------------*/
/*--------------------- Export Types ------------------------------*/
/*--------------------- Export Functions --------------------------*/
void
vResetCommandTimer(
HANDLE hDeviceContext
);
BOOL
bScheduleCommand(
HANDLE hDeviceContext,
void vResetCommandTimer(void *hDeviceContext);
BOOL bScheduleCommand(void *hDeviceContext,
CMD_CODE eCommand,
PBYTE pbyItem0
);
PBYTE pbyItem0);
void vRunCommand(void *hDeviceContext);
void
vRunCommand(
HANDLE hDeviceContext
);
/*
void
WCMDvCommandThread(
......@@ -141,10 +130,7 @@ WCMDvCommandThread(
//2007-0115-09<Add>by MikeLiu
#ifdef TxInSleep
void
BSSvSecondTxData(
HANDLE hDeviceContext
);
void BSSvSecondTxData(void *hDeviceContext);
#endif
#endif /* __WCMD_H__ */
This diff is collapsed.
......@@ -400,102 +400,61 @@ typedef struct tagSMgmtObject
} SMgmtObject, *PSMgmtObject;
/*--------------------- Export Macros ------------------------------*/
/*--------------------- Export Functions --------------------------*/
void vMgrObjectInit(void *hDeviceContext);
void
vMgrObjectInit(
HANDLE hDeviceContext
);
void
vMgrAssocBeginSta(
HANDLE hDeviceContext,
void vMgrAssocBeginSta(void *hDeviceContext,
PSMgmtObject pMgmt,
PCMD_STATUS pStatus
);
PCMD_STATUS pStatus);
void
vMgrReAssocBeginSta(
HANDLE hDeviceContext,
void vMgrReAssocBeginSta(void *hDeviceContext,
PSMgmtObject pMgmt,
PCMD_STATUS pStatus
);
PCMD_STATUS pStatus);
void
vMgrDisassocBeginSta(
HANDLE hDeviceContext,
void vMgrDisassocBeginSta(void *hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
);
PCMD_STATUS pStatus);
void
vMgrAuthenBeginSta(
HANDLE hDeviceContext,
void vMgrAuthenBeginSta(void *hDeviceContext,
PSMgmtObject pMgmt,
PCMD_STATUS pStatus
);
PCMD_STATUS pStatus);
void
vMgrCreateOwnIBSS(
HANDLE hDeviceContext,
PCMD_STATUS pStatus
);
void vMgrCreateOwnIBSS(void *hDeviceContext,
PCMD_STATUS pStatus);
void
vMgrJoinBSSBegin(
HANDLE hDeviceContext,
PCMD_STATUS pStatus
);
void vMgrJoinBSSBegin(void *hDeviceContext,
PCMD_STATUS pStatus);
void
vMgrRxManagePacket(
HANDLE hDeviceContext,
void vMgrRxManagePacket(void *hDeviceContext,
PSMgmtObject pMgmt,
PSRxMgmtPacket pRxPacket
);
PSRxMgmtPacket pRxPacket);
/*
void
vMgrScanBegin(
HANDLE hDeviceContext,
void *hDeviceContext,
PCMD_STATUS pStatus
);
*/
void
vMgrDeAuthenBeginSta(
HANDLE hDeviceContext,
void vMgrDeAuthenBeginSta(void *hDeviceContext,
PSMgmtObject pMgmt,
PBYTE abyDestAddress,
WORD wReason,
PCMD_STATUS pStatus
);
BOOL
bMgrPrepareBeaconToSend(
HANDLE hDeviceContext,
PSMgmtObject pMgmt
);
PCMD_STATUS pStatus);
BOOL bMgrPrepareBeaconToSend(void *hDeviceContext,
PSMgmtObject pMgmt);
BOOL
bAdd_PMKID_Candidate (
HANDLE hDeviceContext,
BOOL bAdd_PMKID_Candidate(void *hDeviceContext,
PBYTE pbyBSSID,
PSRSNCapObject psRSNCapObj
);
PSRSNCapObject psRSNCapObj);
void
vFlush_PMKID_Candidate (
HANDLE hDeviceContext
);
void vFlush_PMKID_Candidate(void *hDeviceContext);
#endif /* __WMGR_H__ */
......@@ -489,7 +489,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);
......@@ -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;
spin_lock_irq(&pDevice->lock);
BSSvClearBSSList((HANDLE)pDevice, pDevice->bLinkPass);
// bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
bScheduleCommand((HANDLE) pDevice, WLAN_CMD_BSSID_SCAN, pMgmt->abyDesireSSID);
BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass);
/* bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL); */
bScheduleCommand((void *) pDevice,
WLAN_CMD_BSSID_SCAN,
pMgmt->abyDesireSSID);
spin_unlock_irq(&pDevice->lock);
return ret;
......@@ -886,12 +888,14 @@ static int wpa_set_associate(PSDevice pDevice,
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;
......
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