staging: vt6656: remove dead code from power.c/h
authorMalcolm Priestley <tvboxspy@gmail.com>
Wed, 25 Jun 2014 20:19:58 +0000 (21:19 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:23:32 +0000 (20:23 -0400)
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/power.c
drivers/staging/vt6656/power.h

index 1bdbefcee2bd1d680c7987f86e5901c5f43d59ed..dbda3034d1e6927f237d52424d96cf99e0548a51 100644 (file)
@@ -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"
@@ -124,155 +120,6 @@ void vnt_disable_power_saving(struct vnt_private *priv)
        vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
 }
 
-/*
- *
- * 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:
index 313f077434f4b95a99f4d961e44eec43c810aa8f..bd9de776acedae1ce5c20291f96791d3016dc99f 100644 (file)
 #define     PS_FAST_INTERVAL         1         // Fast power saving listen interval
 #define     PS_MAX_INTERVAL          4         // MAX power saving listen interval
 
-/*  PSDevice pDevice */
-/*  PSDevice hDeviceContext */
-
-int PSbConsiderPowerDown(struct vnt_private *, int bCheckRxDMA,
-       int bCheckCountToWakeUp);
 void vnt_disable_power_saving(struct vnt_private *);
 void vnt_enable_power_saving(struct vnt_private *, u16);
-void PSvSendPSPOLL(struct vnt_private *);
-int PSbSendNullPacket(struct vnt_private *);
 int vnt_next_tbtt_wakeup(struct vnt_private *);
 
 #endif /* __POWER_H__ */