Resolved findigs in checkpatch Signed-off-by: Rafael Garabato <rafael.garabato@xxxxxxxxx> --- drivers/staging/vt6656/power.c | 46 +++++++++++++--------------------------- 1 files changed, 15 insertions(+), 31 deletions(-) diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index 4d7d4e0..b583b36 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -83,10 +83,10 @@ void PSvEnablePowerSaving(void *hDeviceContext, if (pDevice->eOPMode != OP_MODE_ADHOC) { // set AID MACvWriteWord(pDevice, MAC_REG_AIDATIM, wAID); - } else { - // set ATIM Window - //MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow); - } + } /*else { + set ATIM Window + MACvWriteATIMW(pDevice->PortOffset, pMgmt->wCurrATIMWindow); + }*/ //Warren:06-18-2004,the sequence must follow PSEN->AUTOSLEEP->GO2DOZE // enable power saving hw function @@ -122,11 +122,10 @@ void PSvEnablePowerSaving(void *hDeviceContext, /* 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) { + else if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) PSbSendNullPacket(pDevice); - } pDevice->bPWBitOn = TRUE; - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable... \n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable...\n"); return; } @@ -163,9 +162,8 @@ void PSvDisablePowerSaving(void *hDeviceContext) pDevice->bEnablePSMode = FALSE; - if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) { + if (pDevice->eOPMode == OP_MODE_INFRASTRUCTURE) PSbSendNullPacket(pDevice); - } pDevice->bPWBitOn = FALSE; return; } @@ -213,9 +211,8 @@ BOOL PSbConsiderPowerDown(void *hDeviceContext, if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { if (bCheckCountToWakeUp && - (pMgmt->wCountToWakeUp == 0 || pMgmt->wCountToWakeUp == 1)) { - return FALSE; - } + (pMgmt->wCountToWakeUp == 0 || pMgmt->wCountToWakeUp == 1)) + return FALSE; } pDevice->bPSRxBeacon = TRUE; @@ -259,12 +256,8 @@ void PSvSendPSPOLL(void *hDeviceContext) pTxPacket->cbPayloadLen = 0; // send the frame if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) { - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet failed..\n"); + DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet failed..\n"); } - else { -// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send PS-Poll packet success..\n"); - }; - return; } @@ -286,14 +279,12 @@ BOOL PSbSendNullPacket(void *hDeviceContext) - if (pDevice->bLinkPass == FALSE) { + if (pDevice->bLinkPass == FALSE) return FALSE; - } if ((pDevice->bEnablePSMode == FALSE) && - (pDevice->fTxDataInSleep == FALSE)){ + (pDevice->fTxDataInSleep == FALSE)) return FALSE; - } memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN); pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool; @@ -317,9 +308,8 @@ BOOL PSbSendNullPacket(void *hDeviceContext) )); } - if(pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { + if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1)); - } memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN); memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN); @@ -331,10 +321,6 @@ BOOL PSbSendNullPacket(void *hDeviceContext) DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n"); return FALSE; } - else { -// DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet success....\n"); - } - return TRUE ; } @@ -357,9 +343,8 @@ BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext) BOOL bWakeUp = FALSE; if (pMgmt->wListenInterval >= 2) { - if (pMgmt->wCountToWakeUp == 0) { + if (pMgmt->wCountToWakeUp == 0) pMgmt->wCountToWakeUp = pMgmt->wListenInterval; - } pMgmt->wCountToWakeUp --; @@ -370,10 +355,9 @@ BOOL PSbIsNextTBTTWakeUp(void *hDeviceContext) pDevice->bPSRxBeacon = FALSE; bWakeUp = TRUE; - } else if ( !pDevice->bPSRxBeacon ) { + } else if (!pDevice->bPSRxBeacon) //Listen until RxBeacon MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN); - } } -- 1.7.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel