Home | History | Annotate | Download | only in Application
      1 /*
      2  * scanMngrTypes.h
      3  *
      4  * Copyright(c) 1998 - 2009 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 #ifndef __SCAN_MNGR_TYPES_API_H__
     36 #define __SCAN_MNGR_TYPES_API_H__
     37 
     38 
     39 /** \file scanMngrTypes.h
     40  * \brief Scan Manager Types	\n
     41  * This file include public type definitions for the scan manager application level module,	\n
     42  * to be included both by driver and user-mode.
     43  * \n\n
     44  */
     45 
     46 /* \author Ronen Kalish
     47  * \date 01-Mar-2005
     48  */
     49 
     50 /*
     51  ***********************************************************************
     52  *	Constant definitions.
     53  ***********************************************************************
     54  */
     55 
     56 /** \def MAX_BAND_POLICY_CHANNLES
     57  * \brief Maximal number of channels per band policy
     58  */
     59 #define MAX_BAND_POLICY_CHANNLES    30
     60 
     61 /*
     62  ***********************************************************************
     63  *	Enums.
     64  ***********************************************************************
     65  */
     66 
     67 /*
     68  ***********************************************************************
     69  *	Typedefs.
     70  ***********************************************************************
     71  */
     72 
     73 /*
     74  ***********************************************************************
     75  *	Structure definitions.
     76  ***********************************************************************
     77  */
     78 /** \struct TScanProbReqParams
     79  * \brief Scan Prob Request Parameters
     80  *
     81  * \par Description
     82  * This structure defines the probe request parameters used for active scan
     83  *
     84  * \sa
     85  */
     86 typedef struct
     87 {
     88 	TI_UINT8					numOfProbeReqs;	/**< Number of probe request frames to be transmitted on each channel	*/
     89 	TI_UINT8 					txPowerDbm;     /**< Tx Power level of the probe request frame (1: strong power; 5: weak power), at which to transmit	*/
     90 	ERateMask					bitrate;        /**< Probe request transmission bit rate	*/
     91 } TScanProbReqParams;
     92 
     93 /** \struct TScanBasicMethodParams
     94  * \brief Scan Basic Method Parameters
     95  *
     96  * \par Description
     97  * This structure defines the argument used for the basic scan operation.
     98  * The basic scan is a standard 802.11 scan, which can be active (sending a probe request frame on each channel)
     99  * or passive (without sending probe request frames). For a passive scan, the probe request parameters are ignored
    100  *
    101  * \sa
    102  */
    103 typedef struct
    104 {
    105 	TI_UINT32						maxChannelDwellTime;	/**< Maximum time to stay on the channel if some frames are received but the early termination limit is not reached (microseconds)	*/
    106 	TI_UINT32						minChannelDwellTime;    /**< Minimum time to stay on the channel if no activity at all was discovered (no frames are received) (microseconds)	*/
    107 	EScanEtCondition    			earlyTerminationEvent;  /**< The cause for early termination	*/
    108 	TI_UINT8						ETMaxNumberOfApFrames;  /**< Number of frames from the early termination frame types according to the early TerminationEvent setting, after which the scan is stopped on this channel	*/
    109 	TScanProbReqParams	       		probReqParams;          /**< Probe request transmission parameters: number of frames, TX rate, and TX power level	*/
    110 } TScanBasicMethodParams;
    111 
    112 /** \struct TScanTidTriggeredMethodParams
    113  * \brief Scan Tid Triggered Method Parameters
    114  *
    115  * \par Description
    116  * This structure defines the policy parameters for an AC triggered scan.
    117  * The Scan is passive or active, in which a single-channel scan is triggered by transmission on the serving channel
    118  *
    119  * \sa
    120  */
    121 typedef struct
    122 {
    123 	TScanBasicMethodParams			basicMethodParams;	/**< Parameters for the basic scan performed in the AC triggered scan process	*/
    124 	TI_UINT8						triggeringTid;		/**< Quality-of-service (QoS) AC that triggers the scans in the AC triggered scan process	*/
    125 } TScanTidTriggeredMethodParams;
    126 
    127 /** \struct TScanSPSMethodParams
    128  * \brief Scan SPS Method Parameters
    129  *
    130  * \par Description
    131  * This structure defines the policy parameters for an SPS.
    132  * SPS is a passive scan that is timed accurately to beacon transmissions.
    133  *
    134  * \sa
    135  */
    136 typedef struct
    137 {
    138 	EScanEtCondition    			earlyTerminationEvent;	/**< The cause for early termination */
    139 	TI_UINT8				      	ETMaxNumberOfApFrames;  /**< Number of frames from the early termination frame types according to the early Termination Event setting,
    140 															* after which the scan is stopped on this channel
    141 															*/
    142 	TI_UINT32					   	scanDuration;           /**< Time to spend on each channel (in usec) */
    143 } TScanSPSMethodParams;
    144 
    145 /** \struct TScanMethod
    146  * \brief Scan Method
    147  *
    148  * \par Description
    149  * This structure defines the policy parameters for a scan method, which can be any type of scan
    150  *
    151  * \sa
    152  */
    153 typedef struct
    154 {
    155 	EScanType					scanType;                           /**< Required scan type (active, passive, AC triggered, SPS)	*/
    156 	/* Scan policy parameters */
    157 	union
    158 	{
    159 		TScanBasicMethodParams 		    basicMethodParams;      	/**< scan parameters for normal scan 		*/
    160         TScanTidTriggeredMethodParams	TidTriggerdMethodParams; 	/**< scan parameters for Tid-Triggered scan */
    161         TScanSPSMethodParams			spsMethodParams;        	/**< scan parameters for SPS scan 			*/
    162 	} method;
    163 } TScanMethod;
    164 
    165 /** \struct TScanBandPolicy
    166  * \brief Scan Band Policy
    167  *
    168  * \par Description
    169  * This structure defines the parameters comprising a scan policy for a single band
    170  *
    171  * \sa
    172  */
    173 typedef struct
    174 {
    175 	ERadioBand 				band;	                            	/**< The band (2.4 / 5 GHz) 								*/
    176 	TScanMethod				discoveryMethod;                    	/**< Scan method used to discover new BSS'es 				*/
    177 	TScanMethod	    		trackingMethod;                     	/**< Scan method used to track previously discovered AP's	*/
    178 	TScanMethod		    	immediateScanMethod;                	/**< Scan method used for immediate scan 					*/
    179 	TI_INT8            		rxRSSIThreshold;                    	/**< Quality threshold for received frames 					*/
    180 	TI_UINT8				numOfChannlesForDiscovery;          	/**< Number of channels to scan at each discovery attempt	*/
    181 	TI_UINT8				numOfChannles;                      	/**< Number of channels to use on this band 				*/
    182 	TI_UINT8	           	channelList[ MAX_BAND_POLICY_CHANNLES ];/**< All possible channels 									*/
    183 
    184 } TScanBandPolicy;
    185 
    186 /** \struct TScanPolicy
    187  * \brief Scan Policy
    188  *
    189  * \par Description
    190  * This structure defines the parameters comprising scan policies on all bands
    191  *
    192  * \sa
    193  */
    194 typedef struct
    195 {
    196     TI_UINT32  				normalScanInterval;                     	/**< Time interval (im msec) at which to perform
    197 																		* continuous scan, when current BSS quality is
    198 																		* considered "normal".
    199 																		*/
    200     TI_UINT32	    		deterioratingScanInterval;              	/**< Time interval (in msec) at which to perform
    201 																		* continuous scab, when current BSS quality is
    202 																		* considered "deteriorating"
    203 																		*/
    204     TI_UINT8				maxTrackFailures;                       	/**< The max number of track failures to keep
    205 																		* an AP in the BSS list
    206 																		*/
    207     TI_UINT8				BSSListSize;                            	/**< The number of APs in the BSS list */
    208     TI_UINT8				BSSNumberToStartDiscovery;              	/**< The number of APs in the BSS list at which
    209 																		* discovery process is initiated
    210 																		*/
    211     TI_UINT8 		    	numOfBands;                             	/**< Number of bands to scan */
    212     TScanBandPolicy			bandScanPolicy[ RADIO_BAND_NUM_OF_BANDS ];	/**< Bands' policies */
    213 } TScanPolicy;
    214 
    215 /*
    216  ***********************************************************************
    217  *	External data definitions.
    218  ***********************************************************************
    219  */
    220 
    221 /*
    222  ***********************************************************************
    223  *	External functions definitions
    224  ***********************************************************************
    225  */
    226 
    227 
    228 #endif /* __SCAN_MNGR_TYPES_API_H__ */
    229 
    230