PageRenderTime 340ms CodeModel.GetById 28ms RepoModel.GetById 0ms app.codeStats 1ms

/drivers/net/wireless/tiwlan1251/CUDK/Inc/TI_AdapterPM.h

http://github.com/CyanogenMod/cm-kernel
C Header | 174 lines | 27 code | 15 blank | 132 comment | 0 complexity | 246a49032d279d6600c1c848a749d6e5 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  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. /* Module: TI_AdapterPM.h*/
  22. /**/
  23. /* Purpose: This API is responsible for the power management of the STA */
  24. /*--------------------------------------------------------------------------*/
  25. #ifndef TI_ADAPTER_PM_H
  26. #define TI_ADAPTER_PM_H
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. /******************************************************************************
  31. Name: TI_SetPowerMode
  32. Desc: Set the driver’s power save profile.
  33. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  34. thePowerMgrProfile - one of: OS_POWER_MODE_AUTO,
  35. OS_POWER_MODE_ACTIVE,
  36. OS_POWER_MODE_SHORT_DOZE,
  37. OS_POWER_MODE_LONG_DOZE
  38. Return: TI_RESULT_OK on success. Any other value indicates an error.
  39. ******************************************************************************/
  40. tiINT32 TI_SetPowerMode (TI_HANDLE hAdapter,
  41. OS_802_11_POWER_PROFILE thePowerMgrProfile);
  42. /******************************************************************************
  43. Name: TI_GetPowerMode
  44. Desc: Get the driver’s power save profile (see Power Management
  45. application notes).
  46. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  47. thePowerMgrProfile - one of: OS_POWER_MODE_AUTO,
  48. OS_POWER_MODE_ACTIVE,
  49. OS_POWER_MODE_SHORT_DOZE,
  50. OS_POWER_MODE_LONG_DOZE
  51. Return: TI_RESULT_OK on success. Any other value indicates an error.
  52. ******************************************************************************/
  53. tiINT32 TI_GetPowerMode (TI_HANDLE hAdapter,
  54. OS_802_11_POWER_PROFILE* thePowerMgrProfile);
  55. /******************************************************************************
  56. Name: TI_ConfigPowerManagement
  57. Desc: Set the driver’s power management mode.
  58. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  59. thePowerMgrProfile - Power management mode:
  60. TI_POWER_MODE_ACTIVE: The driver keeps the WiLink™ 4.0 in Active
  61. state all the time.
  62. TI_POWER_MODE_SHORT_DOZE: The WiLink™ 4.0 wakes up the host on
  63. every beacon passes the beacon to the driver
  64. and returns to ELP Doze immediately.
  65. TI_POWER_MODE_LONG_DOZE: The WiLink™ 4.0 uses advanced algorithms
  66. to provide advanced system Power Save. The
  67. features used in WiLink™ 4.0 are:
  68. Wake on DTIM
  69. Beacon Filtering
  70. TI_POWER_MODE_AUTO: Uses the TI algorithm to decide the best power
  71. profile (TNET_ACTIVE, SHORT_DOZE, LONG_DOZE)
  72. to use. The feature used in WiLink™ 4.0 is
  73. set to ACTIVE in high Traffic and to return
  74. to PS in low Traffic.
  75. Return: TI_RESULT_OK on success. Any other value indicates an error.
  76. ******************************************************************************/
  77. tiINT32 TI_ConfigPowerManagement (TI_HANDLE hAdapter,
  78. OS_802_11_POWER_PROFILE thePowerMgrProfile );
  79. /******************************************************************************
  80. Name: TI_SetPowerLevelPS
  81. Desc: This function sets the driver's power level mode.
  82. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  83. pPowerLevel - Sets the power level mode to ELP, PD or AWAKE
  84. Return: TI_RESULT_OK on success. Any other value indicates an error.
  85. ******************************************************************************/
  86. tiINT32 TI_SetPowerLevelPS (TI_HANDLE hAdapter,
  87. OS_802_11_POWER_LEVELS uPowerLevel );
  88. /******************************************************************************
  89. Name: TI_GetPowerLevelPS
  90. Desc: This function retrieves the driver's power level mode.
  91. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  92. uPowerLevel - A pointer to the OS_802_11_POWER_LEVELS enum type
  93. (ELP, PD or AWAKE)
  94. Return: TI_RESULT_OK on success. Any other value indicates an error.
  95. ******************************************************************************/
  96. tiINT32 TI_GetPowerLevelPS (TI_HANDLE hAdapter,
  97. OS_802_11_POWER_LEVELS* pPowerLevel );
  98. /******************************************************************************
  99. Name: TI_SetPowerLevelDefault
  100. Desc:
  101. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  102. uPowerLevel -
  103. Return: TI_RESULT_OK on success. Any other value indicates an error.
  104. ******************************************************************************/
  105. tiINT32 TI_SetPowerLevelDefault (TI_HANDLE hAdapter,
  106. OS_802_11_POWER_LEVELS uPowerLevel );
  107. /******************************************************************************
  108. Name: TI_GetPowerLevelDefault
  109. Desc:
  110. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  111. pPowerLevel -
  112. Return: TI_RESULT_OK on success. Any other value indicates an error.
  113. ******************************************************************************/
  114. tiINT32 TI_GetPowerLevelDefault (TI_HANDLE hAdapter,
  115. OS_802_11_POWER_LEVELS* pPowerLevel );
  116. /******************************************************************************
  117. Name: TI_SetPowerMode
  118. Desc: Set the driver’s doze mode when the power level is in
  119. Auto mode
  120. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  121. thePowerMgrProfile - one of: OS_POWER_MODE_SHORT_DOZE,
  122. OS_POWER_MODE_LONG_DOZE
  123. Return: TI_RESULT_OK on success. Any other value indicates an error.
  124. ******************************************************************************/
  125. tiINT32 TI_SetPowerLevelDozeMode (TI_HANDLE hAdapter,
  126. OS_802_11_POWER_PROFILE thePowerMgrProfile);
  127. /******************************************************************************
  128. Name: TI_GetPowerLevelDozeMode
  129. Desc: Get the driver’s doze mode when the power level is in
  130. Auto mode
  131. Params: hAdapter - The Adapter handle returned by TI_AdapterInit().
  132. thePowerMgrProfile - one of: OS_POWER_MODE_SHORT_DOZE,
  133. OS_POWER_MODE_LONG_DOZE
  134. Return: TI_RESULT_OK on success. Any other value indicates an error.
  135. ******************************************************************************/
  136. tiINT32 TI_GetPowerLevelDozeMode (TI_HANDLE hAdapter,
  137. OS_802_11_POWER_PROFILE* thePowerMgrProfile);
  138. #ifdef __cplusplus
  139. }
  140. #endif
  141. #endif /* TI_ADAPTER_PM_H*/