PageRenderTime 2275ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 1ms

/drivers/net/wireless/tiwlan1251/common/src/hal/FirmwareApi/public_radio.h

http://github.com/CyanogenMod/cm-kernel
C Header | 173 lines | 66 code | 23 blank | 84 comment | 0 complexity | 28310a1c5ce3caf67111667ea2082b40 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /****************************************************************************
  2. **+-----------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |**
  5. **| All rights reserved. |**
  6. **| |**
  7. **| Redistribution and use in source and binary forms, with or without |**
  8. **| modification, are permitted provided that the following conditions |**
  9. **| are met: |**
  10. **| |**
  11. **| * Redistributions of source code must retain the above copyright |**
  12. **| notice, this list of conditions and the following disclaimer. |**
  13. **| * Redistributions in binary form must reproduce the above copyright |**
  14. **| notice, this list of conditions and the following disclaimer in |**
  15. **| the documentation and/or other materials provided with the |**
  16. **| distribution. |**
  17. **| * Neither the name Texas Instruments nor the names of its |**
  18. **| contributors may be used to endorse or promote products derived |**
  19. **| from this software without specific prior written permission. |**
  20. **| |**
  21. **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |**
  22. **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |**
  23. **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
  24. **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |**
  25. **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
  26. **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |**
  27. **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
  28. **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
  29. **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |**
  30. **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
  31. **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
  32. **| |**
  33. **+-----------------------------------------------------------------------+**
  34. ****************************************************************************/
  35. /** \file public_radio.h
  36. * \brief Contains information element defines/structures used by the TNETxxxx and host and Radio Module.
  37. *
  38. */
  39. /*
  40. =======================================================================================================================
  41. R E V I S I O N H I S T O R Y
  42. 04/29/05 BRK 1. retrieved from ClearCase and added this rev. history
  43. 2. added two new entries to RadioParamType_e enum
  44. 3. increased MAX_RADIO_PARAM_POWER_TABLE (from 20 to 56)
  45. - this is sort of a kludge, struct RadioParam_t should have used an
  46. array pointer instead of an actual data block
  47. 06/10/05 BRK changed MAX_RADIO_PARAM_POWER_TABLE for 1251 support (sort of a KLUDGE)
  48. 07/15/05 BRK added RADIO_PABIAS_TABLE entry to RadioParamType_e enum
  49. 04/12/06 MH Added new run-time calibration state: RFPLL_CALIBRATION_NEEDED
  50. Note: This code should only be edited with TAB stops set at 4
  51. =======================================================================================================================
  52. */
  53. #ifndef PUBLIC_RADIO
  54. #define PUBLIC_RADIO
  55. // radio parameter to set
  56. #ifdef TNETW1251
  57. #define MAX_RADIO_PARAM_POWER_TABLE 4*48 // cPowLmtTbl[] max size for ABG radios
  58. #else
  59. #define MAX_RADIO_PARAM_POWER_TABLE 56 // cPowLmtTbl[] max size for BG radios
  60. #endif
  61. #define MAX_RADIO_PARAM_LEN MAX_RADIO_PARAM_POWER_TABLE
  62. #define RADIO_PARAM_POWER_TABLE_ENABLE 0x01 // mask for RADIO_PARAM_POWER_ENABLES usage
  63. #define RADIO_PARAM_POWER_LIMIT_TABLE_ENABLE 0x02 // mask for RADIO_PARAM_POWER_ENABLES usage
  64. #define RADIO_PARAM_POWER_ADJ_TABLE_ENABLE 0x04 // mask for RADIO_PARAM_POWER_ENABLES usage
  65. #define NUM_OF_SUB_BANDS 5
  66. #define NUM_OF_POWER_LEVEL 4
  67. #ifndef HOST_IF_ENUMS_DISABLED
  68. typedef enum RadioParamType_e
  69. {
  70. RADIO_PARAM_POWER_TABLE = 1,
  71. RADIO_PARAM_POWER_LIMIT_TABLE,
  72. RADIO_PARAM_POWER_ADJ_TABLE,
  73. RADIO_PARAM_POWER_ENABLES,
  74. RADIO_PABIAS_TABLE,
  75. RADIO_PARAM_POWER_LEVELS,
  76. MAX_RADIO_PARAM_TYPE = 0x7FFFFFFF /* force this enum to be uint32 */
  77. } RadioParamType_e;
  78. #else
  79. typedef uint32 RadioParamType_e;
  80. #endif
  81. typedef struct RadioParam_t
  82. {
  83. RadioParamType_e parameterType;
  84. int8 parameter[MAX_RADIO_PARAM_LEN];
  85. } RadioParam_t;
  86. /******************************************************************************
  87. Name: ACX_CAL_ASSESSMENT
  88. Type: Configuration
  89. Access: Write Only
  90. Length: 4
  91. Note: OBSOLETE !!! (DO_CALIBRATION_IN_DRIVER is not defined)
  92. ******************************************************************************/
  93. typedef enum
  94. {
  95. RUNTIME_CALIBRATION_NOT_NEEDED = 1,
  96. RUNTIME_CALIBRATION_NEEDED = 2,
  97. RFPLL_CALIBRATION_NEEDED = 3,
  98. MAX_RUNTIME_CALIBRATION_OPTIONS = 0x7FFFFFFF // force this enum to be uint32
  99. } RadioRuntimeCalState_enum;
  100. #ifdef HOST_COMPILE
  101. typedef uint32 RadioRuntimeCalState_e;
  102. #else
  103. typedef RadioRuntimeCalState_enum RadioRuntimeCalState_e;
  104. #endif
  105. /************************************************************************/
  106. /* */
  107. /* Commands section */
  108. /* */
  109. /************************************************************************/
  110. /******************************************************************************
  111. Name: ACX_PLT_NVS_BUFFER_UPDATE
  112. TestCmdId: TEST_CMD_PLT_GET_NVS_UPDATE_BUFFER
  113. Description: This PLT function provides the all information required by
  114. the upper driver in order to update the NVS image.
  115. It received a parameter defining the type of update
  116. information required and provides an array of elements defining
  117. the data bytes to be written to the NVS image and the byte
  118. offset in which they should be written.
  119. Type: PLT
  120. Access: Read Only
  121. Length: 420
  122. ******************************************************************************/
  123. #define NVS_RESULTS_MAX_NUM_OF_TABLES 4
  124. #define NVS_RESULTS_MAX_UPDATE_TABLE_SIZE 100
  125. typedef struct resultsBuffer_t
  126. {
  127. uint16 size; /* size of table*/
  128. uint16 offset; /* offset in the binary image of the NVS file*/
  129. uint8 data[NVS_RESULTS_MAX_UPDATE_TABLE_SIZE];/* the actual table data */
  130. }resultsBuffer_t;
  131. typedef struct PltNvsResultsBuffer_t
  132. {
  133. resultsBuffer_t tables[NVS_RESULTS_MAX_NUM_OF_TABLES]; /* array of structures of type containing the tables*/
  134. uint8 numOfTables; /* number of tables needed to be updated*/
  135. uint8 padding[3];
  136. }PltNvsResultsBuffer_t;
  137. typedef struct PltGainGet_t
  138. {
  139. uint8 TxGain; //Total TX chain gain according to the current setting
  140. uint8 TxUpperBound; //the max gain setting allowed
  141. uint8 TxLowerBound; //the min gain setting allowed
  142. uint8 padding; /* padding to 32 bit */
  143. }PltGainGet_t;
  144. #endif