diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2014-06-25 21:19:58 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-06-26 20:23:32 -0400 |
commit | 6d07a7e376c7b61805224f924988c72aabef9c99 (patch) | |
tree | b7fbe003c26ab9f4fed69a030ef810cee9f960b4 /drivers/staging/vt6656/power.c | |
parent | 4adc5a946a7d9afcdd8cd4efd3faaed5c02dbc04 (diff) |
staging: vt6656: remove dead code from power.c/h
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/vt6656/power.c')
-rw-r--r-- | drivers/staging/vt6656/power.c | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/drivers/staging/vt6656/power.c b/drivers/staging/vt6656/power.c index 1bdbefcee2bd..dbda3034d1e6 100644 --- a/drivers/staging/vt6656/power.c +++ b/drivers/staging/vt6656/power.c @@ -28,9 +28,6 @@ * Functions: * vnt_enable_power_saving - Enable Power Saving Mode * PSvDiasblePowerSaving - Disable Power Saving Mode - * PSbConsiderPowerDown - Decide if we can Power Down - * PSvSendPSPOLL - Send PS-POLL packet - * PSbSendNullPacket - Send Null packet * vnt_next_tbtt_wakeup - Decide if we need to wake up at next Beacon * * Revision History: @@ -39,7 +36,6 @@ #include "mac.h" #include "device.h" -#include "wmgr.h" #include "power.h" #include "wcmd.h" #include "rxtx.h" @@ -127,155 +123,6 @@ void vnt_disable_power_saving(struct vnt_private *priv) /* * * Routine Description: - * Consider to power down when no more packets to tx or rx. - * - * Return Value: - * true, if power down success - * false, if fail - */ - -int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA, - int bCheckCountToWakeUp) -{ - struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - u8 byData; - - /* check if already in Doze mode */ - vnt_control_in_u8(pDevice, MESSAGE_REQUEST_MACREG, - MAC_REG_PSCTL, &byData); - - if ((byData & PSCTL_PS) != 0) - return true; - - if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { - /* check if in TIM wake period */ - if (pMgmt->bInTIMWake) - return false; - } - - /* check scan state */ - if (pDevice->bCmdRunning) - return false; - - /* Tx Burst */ - if (pDevice->bPSModeTxBurst) - return false; - - /* Froce PSEN on */ - vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_PSEN); - - if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) { - if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0 - || pMgmt->wCountToWakeUp == 1)) { - return false; - } - } - - pDevice->bPSRxBeacon = true; - - /* no Tx, no Rx isr, now go to Doze */ - vnt_mac_reg_bits_on(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE); - DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n"); - return true; -} - -/* - * - * Routine Description: - * Send PS-POLL packet - * - * Return Value: - * None. - * - */ - -void PSvSendPSPOLL(struct vnt_private *pDevice) -{ - struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - struct vnt_tx_mgmt *pTxPacket = NULL; - - memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt) - + WLAN_HDR_ADDR2_LEN); - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool; - pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket - + sizeof(struct vnt_tx_mgmt)); - - pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16( - ( - WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) | - WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PSPOLL) | - WLAN_SET_FC_PWRMGT(0) - )); - - pTxPacket->p80211Header->sA2.wDurationID = - pMgmt->wCurrAID | BIT14 | BIT15; - memcpy(pTxPacket->p80211Header->sA2.abyAddr1, pMgmt->abyCurrBSSID, - WLAN_ADDR_LEN); - memcpy(pTxPacket->p80211Header->sA2.abyAddr2, pMgmt->abyMACAddr, - WLAN_ADDR_LEN); - pTxPacket->cbMPDULen = WLAN_HDR_ADDR2_LEN; - pTxPacket->cbPayloadLen = 0; - - /* log failure if sending failed */ -} - -/* - * - * Routine Description: - * Send NULL packet to AP for notification power state of STA - * - * Return Value: - * None. - * - */ - -int PSbSendNullPacket(struct vnt_private *pDevice) -{ - struct vnt_tx_mgmt *pTxPacket = NULL; - struct vnt_manager *pMgmt = &pDevice->vnt_mgmt; - u16 flags = 0; - - if (pDevice->bLinkPass == false) - return false; - - if (pDevice->bEnablePSMode == false && pDevice->tx_trigger == false) - return false; - - memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt) - + WLAN_NULLDATA_FR_MAXLEN); - pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool; - pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket - + sizeof(struct vnt_tx_mgmt)); - - flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) | - WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL); - - if (pDevice->bEnablePSMode) - flags |= WLAN_SET_FC_PWRMGT(1); - else - flags |= WLAN_SET_FC_PWRMGT(0); - - pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags); - - if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) - pTxPacket->p80211Header->sA3.wFrameCtl |= - cpu_to_le16((u16)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); - memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID, - WLAN_BSSID_LEN); - pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN; - pTxPacket->cbPayloadLen = 0; - /* log error if sending failed */ - return true; -} - -/* - * - * Routine Description: * Check if Next TBTT must wake up * * Return Value: |