1 /******************************************************************************* 2 **+--------------------------------------------------------------------------+** 3 **| |** 4 **| Copyright 1998-2008 Texas Instruments, Inc. - http://www.ti.com/ |** 5 **| |** 6 **| Licensed under the Apache License, Version 2.0 (the "License"); |** 7 **| you may not use this file except in compliance with the License. |** 8 **| You may obtain a copy of the License at |** 9 **| |** 10 **| http://www.apache.org/licenses/LICENSE-2.0 |** 11 **| |** 12 **| Unless required by applicable law or agreed to in writing, software |** 13 **| distributed under the License is distributed on an "AS IS" BASIS, |** 14 **| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |** 15 **| See the License for the specific language governing permissions and |** 16 **| limitations under the License. |** 17 **| |** 18 **+--------------------------------------------------------------------------+** 19 *******************************************************************************/ 20 21 /*--------------------------------------------------------------------------*/ 22 /* Module: TI_AdapterPM.h*/ 23 /**/ 24 /* Purpose: This API is responsible for the power management of the STA */ 25 /*--------------------------------------------------------------------------*/ 26 27 #ifndef TI_ADAPTER_PM_H 28 #define TI_ADAPTER_PM_H 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 /****************************************************************************** 34 35 Name: TI_SetPowerMode 36 Desc: Set the driver�s power save profile. 37 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 38 thePowerMgrProfile - one of: OS_POWER_MODE_AUTO, 39 OS_POWER_MODE_ACTIVE, 40 OS_POWER_MODE_SHORT_DOZE, 41 OS_POWER_MODE_LONG_DOZE 42 Return: TI_RESULT_OK on success. Any other value indicates an error. 43 44 ******************************************************************************/ 45 tiINT32 TI_SetPowerMode (TI_HANDLE hAdapter, 46 OS_802_11_POWER_PROFILE thePowerMgrProfile); 47 48 /****************************************************************************** 49 50 Name: TI_GetPowerMode 51 Desc: Get the driver�s power save profile (see Power Management 52 application notes). 53 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 54 thePowerMgrProfile - one of: OS_POWER_MODE_AUTO, 55 OS_POWER_MODE_ACTIVE, 56 OS_POWER_MODE_SHORT_DOZE, 57 OS_POWER_MODE_LONG_DOZE 58 Return: TI_RESULT_OK on success. Any other value indicates an error. 59 60 ******************************************************************************/ 61 tiINT32 TI_GetPowerMode (TI_HANDLE hAdapter, 62 OS_802_11_POWER_PROFILE* thePowerMgrProfile); 63 64 65 /****************************************************************************** 66 67 Name: TI_ConfigPowerManagement 68 Desc: Set the driver�s power management mode. 69 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 70 thePowerMgrProfile - Power management mode: 71 TI_POWER_MODE_ACTIVE: The driver keeps the WiLink� 4.0 in Active 72 state all the time. 73 TI_POWER_MODE_SHORT_DOZE: The WiLink� 4.0 wakes up the host on 74 every beacon passes the beacon to the driver 75 and returns to ELP Doze immediately. 76 TI_POWER_MODE_LONG_DOZE: The WiLink� 4.0 uses advanced algorithms 77 to provide advanced system Power Save. The 78 features used in WiLink� 4.0 are: 79 Wake on DTIM 80 Beacon Filtering 81 TI_POWER_MODE_AUTO: Uses the TI algorithm to decide the best power 82 profile (TNET_ACTIVE, SHORT_DOZE, LONG_DOZE) 83 to use. The feature used in WiLink� 4.0 is 84 set to ACTIVE in high Traffic and to return 85 to PS in low Traffic. 86 Return: TI_RESULT_OK on success. Any other value indicates an error. 87 88 ******************************************************************************/ 89 tiINT32 TI_ConfigPowerManagement (TI_HANDLE hAdapter, 90 OS_802_11_POWER_PROFILE thePowerMgrProfile ); 91 92 93 /****************************************************************************** 94 95 Name: TI_SetPowerLevelPS 96 Desc: This function sets the driver's power level mode. 97 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 98 pPowerLevel - Sets the power level mode to ELP, PD or AWAKE 99 Return: TI_RESULT_OK on success. Any other value indicates an error. 100 101 ******************************************************************************/ 102 tiINT32 TI_SetPowerLevelPS (TI_HANDLE hAdapter, 103 OS_802_11_POWER_LEVELS uPowerLevel ); 104 105 /****************************************************************************** 106 107 Name: TI_GetPowerLevelPS 108 Desc: This function retrieves the driver's power level mode. 109 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 110 uPowerLevel - A pointer to the OS_802_11_POWER_LEVELS enum type 111 (ELP, PD or AWAKE) 112 Return: TI_RESULT_OK on success. Any other value indicates an error. 113 114 ******************************************************************************/ 115 tiINT32 TI_GetPowerLevelPS (TI_HANDLE hAdapter, 116 OS_802_11_POWER_LEVELS* pPowerLevel ); 117 118 /****************************************************************************** 119 120 Name: TI_SetPowerLevelDefault 121 Desc: 122 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 123 uPowerLevel - 124 Return: TI_RESULT_OK on success. Any other value indicates an error. 125 126 ******************************************************************************/ 127 tiINT32 TI_SetPowerLevelDefault (TI_HANDLE hAdapter, 128 OS_802_11_POWER_LEVELS uPowerLevel ); 129 130 /****************************************************************************** 131 132 Name: TI_GetPowerLevelDefault 133 Desc: 134 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 135 pPowerLevel - 136 Return: TI_RESULT_OK on success. Any other value indicates an error. 137 138 ******************************************************************************/ 139 tiINT32 TI_GetPowerLevelDefault (TI_HANDLE hAdapter, 140 OS_802_11_POWER_LEVELS* pPowerLevel ); 141 142 /****************************************************************************** 143 144 Name: TI_SetPowerMode 145 Desc: Set the driver�s doze mode when the power level is in 146 Auto mode 147 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 148 thePowerMgrProfile - one of: OS_POWER_MODE_SHORT_DOZE, 149 OS_POWER_MODE_LONG_DOZE 150 Return: TI_RESULT_OK on success. Any other value indicates an error. 151 152 ******************************************************************************/ 153 tiINT32 TI_SetPowerLevelDozeMode (TI_HANDLE hAdapter, 154 OS_802_11_POWER_PROFILE thePowerMgrProfile); 155 156 /****************************************************************************** 157 158 Name: TI_GetPowerLevelDozeMode 159 Desc: Get the driver�s doze mode when the power level is in 160 Auto mode 161 Params: hAdapter - The Adapter handle returned by TI_AdapterInit(). 162 thePowerMgrProfile - one of: OS_POWER_MODE_SHORT_DOZE, 163 OS_POWER_MODE_LONG_DOZE 164 Return: TI_RESULT_OK on success. Any other value indicates an error. 165 166 ******************************************************************************/ 167 tiINT32 TI_GetPowerLevelDozeMode (TI_HANDLE hAdapter, 168 OS_802_11_POWER_PROFILE* thePowerMgrProfile); 169 170 #ifdef __cplusplus 171 } 172 #endif 173 174 #endif /* TI_ADAPTER_PM_H*/ 175