Home | History | Annotate | Download | only in Export_Inc
      1 /*
      2  * bssTypes.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 /** \file bssTypes.h
     35  *  \brief This file include public type definitions for Driver-wide BSS information
     36  *  \
     37  *  \date 05-April-2005
     38  */
     39 
     40 #ifndef __BSS_TYPES_API_H__
     41 #define __BSS_TYPES_API_H__
     42 
     43 #include "TWDriver.h"
     44 /*
     45  ***********************************************************************
     46  *	Constant definitions.
     47  ***********************************************************************
     48  */
     49 #define MAX_NUM_OF_NEIGHBOR_APS     30
     50 #define MAX_SIZE_OF_BSS_TRACK_LIST  16
     51 
     52 
     53 /*
     54  ***********************************************************************
     55  *	Enumeration definitions.
     56  ***********************************************************************
     57  */
     58  /** \enum resultFrameType_e
     59  * \brief Type of result frame
     60  *
     61  * \par Description
     62  * Enumerates the different types for a result frame
     63  *
     64  * \sa TMib
     65  */
     66 typedef enum
     67 {
     68 /*	0	*/	SCAN_RFT_BEACON,         	/**< Result frame is a beacon */
     69 /*	1	*/	SCAN_RFT_PROBE_RESPONSE    	/**< Result frame is a probe response */
     70 
     71 } resultFrameType_e;
     72 
     73 /*
     74  ***********************************************************************
     75  *	Structure definitions.
     76  ***********************************************************************
     77  */
     78 /** \struct bssEntry_t
     79  * \brief	BSS entry
     80  *
     81  * \par Description
     82  * This structure contains a single BSS entry.
     83  * E.g. it holds one AP of the BSS list.
     84  *
     85  * \sa	bssList_t
     86  */
     87 typedef struct
     88 {
     89 	/* values in beacon with fixed length */
     90     TMacAddr               BSSID;                  /**< BSSID of this entry */
     91     TI_UINT64              lastRxTSF;              /**< TSF of last received frame */
     92     TI_UINT16              beaconInterval;         /**< Beacon interval of this AP */
     93     TI_UINT16              capabilities;           /**< capabilities of this AP */
     94 
     95 	/* IE's in beacon */
     96     TI_UINT8               DTIMPeriod;             /**< DTIm period (in beacon interval quantas */
     97 	resultFrameType_e	   resultType;             /**< The type of frame in pBuffer */
     98     TI_UINT16              bufferLength;           /**< length of rest of beacon (or probe response) buffer */
     99     TI_UINT8*              pBuffer;                /**< rest of beacon (or probe response) buffer */
    100 
    101 	/* Information from other sources */
    102     ERadioBand             band;                   /**< band on which the AP transmits */
    103     TI_UINT8               channel;                /**< channel on which the AP transmits */
    104     TI_UINT8               rxRate;                 /**< Rate at which last frame was received */
    105     TI_UINT32              lastRxHostTimestamp;    /**<
    106 													* the host timestamp (in milliseconds) at which last frame
    107 													* was received
    108 													*/
    109     TI_INT8                RSSI;                   /**< average RSSI */
    110     TI_INT8                lastRSSI;               /** last given RSSI */
    111 	TI_BOOL                bNeighborAP;            /**< Indicates whether this is a neighbor AP */
    112 } bssEntry_t;
    113 
    114 /** \struct bssList_t
    115  * \brief BSS List
    116  *
    117  * \par Description
    118  * This structure holds the BSS list. E.g. it holds the AP ESS.
    119  * This list is filled by the scan manager and is used by the
    120  * Roaming Manager to select the best AP to roam to.
    121  *
    122  * \sa	bssEntry_t
    123  */
    124 typedef struct
    125 {
    126 	TI_UINT8 			   numOfEntries;                               /**< Number of entries in the BSS list */
    127 	bssEntry_t             BSSList[ MAX_SIZE_OF_BSS_TRACK_LIST ];      /**< Pointer to the first entry in the BSS list */
    128 } bssList_t;
    129 
    130 /** \struct neighborAP_t
    131  * \brief	Neighbor AP
    132  *
    133  * \par Description
    134  * This structure contains information on one Neighbor AP.	\n
    135  * A Neighbor AP is set by the Roaming Manager for the Scan Manager,
    136  * and the Scan Manager discovers and tracks the AP.
    137  * Neighbor APs have higher priority in the discovery process than the
    138  * Channel List configured in the Scan Policy
    139  *
    140  * \sa	neighborAPList_t
    141  */
    142 typedef struct
    143 {
    144 	TMacAddr	    	    BSSID;                          /**< The BSSID (MAC address) of this Neighbor AP */
    145 	TI_UINT8				channel;                        /**< Neighbor AP channel (on which the AP transmits) */
    146 	ERadioBand			    band;                           /**< Neighbor AP band (2.4/5 GHz) (the band used by the AP) */
    147 } neighborAP_t;
    148 
    149 /** \struct neighborAPList_t
    150  * \brief	list of Neighbor APs
    151  *
    152  * \par Description
    153  * This structure holds a list of all neighbor APs
    154  *
    155  * \sa	neighborAP_t
    156  */
    157 typedef struct
    158 {
    159 	TI_UINT8				numOfEntries;                           /**< Number of entries in Neighbor AP list */
    160 	neighborAP_t            APListPtr[ MAX_NUM_OF_NEIGHBOR_APS ];   /**< Pointer to Neighbor AP list */
    161 } neighborAPList_t;
    162 
    163 
    164 #endif
    165