PageRenderTime 40ms CodeModel.GetById 15ms RepoModel.GetById 1ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/inc/scanMngrTypes.h

http://github.com/CyanogenMod/cm-kernel
C Header | 209 lines | 61 code | 20 blank | 128 comment | 0 complexity | b10e14d669b1dbe8e3994d6bde84b733 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 scanMngrTypes.h
  36. * \brief This file include public type definitions for the scan manager application level module,
  37. * \brief to be included both by driver and user-mode.
  38. * \author Ronen Kalish
  39. * \date 01-Mar-2005
  40. */
  41. #ifndef __SCAN_MNGR_TYPES_API_H__
  42. #define __SCAN_MNGR_TYPES_API_H__
  43. #include "scanTypes.h"
  44. /*
  45. ***********************************************************************
  46. * Constant definitions.
  47. ***********************************************************************
  48. */
  49. /* AMximal number of channels per band policy */
  50. #define MAX_BAND_POLICY_CHANNLES 30
  51. /*
  52. ***********************************************************************
  53. * Enums.
  54. ***********************************************************************
  55. */
  56. /*
  57. ***********************************************************************
  58. * Typedefs.
  59. ***********************************************************************
  60. */
  61. /*
  62. ***********************************************************************
  63. * Structure definitions.
  64. ***********************************************************************
  65. */
  66. /** \struct scan_probReqParams_t
  67. * \brief This structure contains all information needed for probe request transmission.
  68. */
  69. typedef struct
  70. {
  71. UINT8 numOfProbeReqs; /**< number of probe requests to send */
  72. UINT8 txPowerDbm; /**< TX power at which to transmit */
  73. rateMask_e bitrate; /**< Bit rate at which to transmit */
  74. } scan_probReqParams_t;
  75. /** \struct scan_basicMethodParams_t
  76. * \brief This structure contains parameters for basic scan operation
  77. */
  78. typedef struct
  79. {
  80. UINT32 maxChannelDwellTime; /**< Maximum time to spend on each channel */
  81. UINT32 minChannelDwellTime; /**<
  82. * Minimum time to spend on each channel
  83. * (if no activity at all was discovered
  84. */
  85. scan_ETCondition_e earlyTerminationEvent; /**< The cause for early termination */
  86. UINT8 ETMaxNumberOfApFrames; /**<
  87. * Number of frames from the above type after which
  88. * scan is early terminated.
  89. */
  90. scan_probReqParams_t probReqParams; /**< Parameters for probe request transmission */
  91. } scan_basicMethodParams_t;
  92. /** \struct scan_TidTriggeredMethodParams_t
  93. * \brief This structure contains parameters for Tid-Triggered scan operation
  94. */
  95. typedef struct
  96. {
  97. scan_basicMethodParams_t basicMethodParams; /**< Basic scan parameters */
  98. UINT8 triggeringTid; /**<
  99. * Tid triggering the basic scan,
  100. * one channel at a time.
  101. */
  102. } scan_TidTriggeredMethodParams_t;
  103. /** \struct scan_SPSMethodParams_t
  104. * \brief This structure contains parameters for SPS scan operation
  105. */
  106. typedef struct
  107. {
  108. scan_ETCondition_e earlyTerminationEvent; /**< The cause for early termination */
  109. UINT8 ETMaxNumberOfApFrames; /**<
  110. * Number of frames from the above type after which
  111. * scan is early terminated.
  112. */
  113. UINT32 scanDuration; /**< Time to spend on each channel (in usec) */
  114. } scan_SPSMethodParams_t;
  115. /** \struct scan_Method_t
  116. * \brief This structure contains scan type, and accompanying parameters
  117. */
  118. typedef struct
  119. {
  120. scan_Type_e scanType; /**<
  121. * scan type (normal - active or passive),
  122. * Tid-Triggered (active or passive), or SPS
  123. */
  124. union
  125. {
  126. scan_basicMethodParams_t basicMethodParams; /**< scan parameters for normal scan */
  127. scan_TidTriggeredMethodParams_t TidTriggerdMethodParams; /**< scan parameters for Tid-Triggered scan */
  128. scan_SPSMethodParams_t spsMethodParams; /**< scan parameters for SPS scan */
  129. } method;
  130. } scan_Method_t;
  131. /** \struct scan_bandPolicy_t
  132. * \brief This structure contains parameters comprising a scan policy for a single band
  133. */
  134. typedef struct
  135. {
  136. radioBand_e band; /**< the band (2.4 / 5 GHz) */
  137. scan_Method_t discoveryMethod; /**< scan method used to discover new BSS'es */
  138. scan_Method_t trackingMethod; /**<
  139. * scan method used to track previously
  140. * discovered AP's
  141. */
  142. scan_Method_t immediateScanMethod; /**< scan method used for immediate scan */
  143. INT8 rxRSSIThreshold; /**< quality threshold for received frames */
  144. UINT8 numOfChannlesForDiscovery; /**<
  145. * number of channels to scan at each discovery
  146. * attempt
  147. */
  148. UINT8 numOfChannles; /**< number of channels to use on this band */
  149. UINT8 channelList[ MAX_BAND_POLICY_CHANNLES ];
  150. /**< all possible channels */
  151. } scan_bandPolicy_t;
  152. /** \struct scan_Policy_t
  153. * \brief This structure contains parameters comprising scan policies on all bands
  154. */
  155. typedef struct
  156. {
  157. UINT32 normalScanInterval; /**<
  158. * time interval (im msec) at which to perform
  159. * continuous scan, when current BSS quality is
  160. * considered "normal".
  161. */
  162. UINT32 deterioratingScanInterval; /**<
  163. * time interval (in msec) at which to perform
  164. * continuous scab, when current BSS quality is
  165. * considered "deteriorating"
  166. */
  167. UINT8 maxTrackFailures; /**<
  168. * the max number of track failures to keep
  169. * an AP in the BSS list
  170. */
  171. UINT8 BSSListSize; /**< the number of APs in the BSS list */
  172. UINT8 BSSNumberToStartDiscovery; /**<
  173. * the number of APs in the BSS list at which
  174. * discovery process is initiated
  175. */
  176. UINT8 numOfBands; /**< number of bands to scan */
  177. scan_bandPolicy_t bandScanPolicy[ RADIO_BAND_NUM_OF_BANDS ];/**< bands' policies */
  178. } scan_Policy_t;
  179. /*
  180. ***********************************************************************
  181. * External data definitions.
  182. ***********************************************************************
  183. */
  184. /*
  185. ***********************************************************************
  186. * External functions definitions
  187. ***********************************************************************
  188. */
  189. #endif /* __SCAN_MNGR_TYPES_API_H__ */