Home | History | Annotate | Download | only in currBss
      1 /** \file currBss.h
      2  *  \brief Current BSS module API
      3  *
      4  *  \see currBss.c
      5  */
      6 /****************************************************************************
      7 **+-----------------------------------------------------------------------+**
      8 **|                                                                       |**
      9 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
     10 **| All rights reserved.                                                  |**
     11 **|                                                                       |**
     12 **| Redistribution and use in source and binary forms, with or without    |**
     13 **| modification, are permitted provided that the following conditions    |**
     14 **| are met:                                                              |**
     15 **|                                                                       |**
     16 **|  * Redistributions of source code must retain the above copyright     |**
     17 **|    notice, this list of conditions and the following disclaimer.      |**
     18 **|  * Redistributions in binary form must reproduce the above copyright  |**
     19 **|    notice, this list of conditions and the following disclaimer in    |**
     20 **|    the documentation and/or other materials provided with the         |**
     21 **|    distribution.                                                      |**
     22 **|  * Neither the name Texas Instruments nor the names of its            |**
     23 **|    contributors may be used to endorse or promote products derived    |**
     24 **|    from this software without specific prior written permission.      |**
     25 **|                                                                       |**
     26 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
     27 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
     28 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
     29 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
     30 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
     31 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
     32 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
     33 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
     34 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
     35 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
     36 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
     37 **|                                                                       |**
     38 **+-----------------------------------------------------------------------+**
     39 ****************************************************************************/
     40 
     41 /****************************************************************************
     42  *                                                                          *
     43  *   MODULE:  Current BSS                                               *
     44  *   PURPOSE: Current BSS Module API                                    *
     45  *                                                                          *
     46  ****************************************************************************/
     47 
     48 #ifndef _CURR_BSS_H_
     49 #define _CURR_BSS_H_
     50 
     51 #include "whalParams.h"
     52 #include "siteMgrApi.h"
     53 #include "roamingMngrTypes.h"
     54 
     55 /* Constants */
     56 
     57 /* Enumerations */
     58 
     59 /**
     60 * Current BSS module configurable parameters type
     61 */
     62 typedef enum
     63 {
     64     CURR_BSS_TYPE = 0,          /**< BSS or IBSS */
     65     CURR_BSS_CONNECTED_STATE,   /**< Connected or not connected, roaming enabled or not */
     66     CURR_BSS_LOW_RSSI_SCAN_COND,/**< Set by AP Connection when Roaming Manager configures low RSSI threshold for BG scan */
     67     CURR_BSS_HI_RSSI_SCAN_COND, /**< Set by AP Connection when Roaming Manager configures normal RSSI threshold for BG scan */
     68     CURR_BSS_QUALITY_THRESHOLD, /**< Set by AP Connection when Roaming Manager configures event of type 'Low RSSI' */
     69     CURR_BSS_NO_BSS_THRESHOLDS, /**< Set by AP Connection when Roaming Manager configures event of type 'BSS Loss' */
     70     CURR_BSS_NUM_OF_TEST_REPEAT,/**< Set by AP Connection when Roaming Manager configures event of type 'BSS Loss' */
     71     CURR_BSS_CONSEC_NACK,       /**< Set by AP Connection when Roaming Manager configures event of type 'Consecutive nack' */
     72     CURR_BSS_INFO               /**< Requested by AP Connection: includes quality and last beacon info */
     73 } currBSS_configParam_e;
     74 
     75 
     76 /* Structures */
     77 
     78 /* Typedefs */
     79 
     80 /* External data definitions */
     81 
     82 /* External functions definitions */
     83 
     84 /* Function prototypes */
     85 
     86 TI_HANDLE currBSS_create(TI_HANDLE hOs);
     87 TI_STATUS currBSS_init(TI_HANDLE hCurrBSS,
     88                        TI_HANDLE hMlme,
     89                        TI_HANDLE hPowerMgr,
     90                        TI_HANDLE hAPConnection,
     91                        TI_HANDLE hSME,
     92                        TI_HANDLE hHal,
     93                        TI_HANDLE hReport,
     94                        TI_HANDLE hMemMgr,
     95                        TI_HANDLE hTxData,
     96                        TI_HANDLE hSiteMngr,
     97                        TI_HANDLE hScanMngr,
     98                        TI_HANDLE hMacServices);
     99 TI_STATUS currBSS_unload(TI_HANDLE hCurrBSS);
    100 
    101 void currBSS_updateConnectedState(TI_HANDLE hCurrBSS, BOOLEAN isConnected, bssType_e type);
    102 TI_STATUS currBSS_updateRoamingTriggers(TI_HANDLE hCurrBSS,
    103                                         roamingMngrThresholdsConfig_t *params);
    104 void currBSS_SGconfigureBSSLoss(TI_HANDLE hCurrBSS,
    105                                         UINT32 SGcompensationPercent , BOOLEAN bUseSGParams);
    106 bssEntry_t *currBSS_getBssInfo(TI_HANDLE hCurrBSS);
    107 
    108 TI_STATUS currBSS_getRoamingParams(TI_HANDLE hCurrBSS,
    109                                    UINT8 * aNumExpectedTbttForBSSLoss,
    110                                    INT8 * aLowQualityForBackgroungScanCondition,
    111                                    INT8 * aNormalQualityForBackgroungScanCondition,
    112                                    UINT8 * rssiFilterWeight,
    113                                    UINT8 * snrFilterWeight);
    114 
    115 TI_STATUS currBSS_probRespReceivedCallb(TI_HANDLE hCurrBSS,
    116                                         Rx_attr_t *pRxAttr,
    117                                         macAddress_t *bssid,
    118                                         mlmeFrameInfo_t *pFrameInfo,
    119                                         char *dataBuffer,
    120                                         UINT16 bufLength);
    121 
    122 TI_STATUS currBSS_beaconReceivedCallb(TI_HANDLE hCurrBSS,
    123                                         Rx_attr_t *pRxAttr,
    124                                         macAddress_t *bssid,
    125                                         mlmeFrameInfo_t *pFrameInfo,
    126                                         char *dataBuffer,
    127                                         UINT16 bufLength);
    128 
    129 TI_STATUS currBSS_performRecovery(TI_HANDLE hCurrBSS);
    130 
    131 void currBSS_restartRssiCounting(TI_HANDLE hCurrBSS);
    132 TI_STATUS currBSS_Bss_Regain_CallB(TI_HANDLE hCurrBSS);
    133 
    134 void currBSS_updateRxSignal(TI_HANDLE hCurrBSS, UINT8 uSNR, INT8 iRSSI, BOOL bAveragedData);
    135 
    136 TI_STATUS currBSS_Bss_Reset_CallB(TI_HANDLE hCurrBSS);
    137 
    138 
    139 #endif /*  _CURR_BSS_H_*/
    140 
    141