Home | History | Annotate | Download | only in configMgr
      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 
     36 /** \file configMgr.c
     37  *  \brief Driver interface to OS abstraction layer
     38  *
     39  *  \see srcApi.h
     40  */
     41 
     42 #include "osTIType.h"
     43 #include "osApi.h"
     44 #include "paramOut.h"
     45 #include "paramIn.h"
     46 #include "srcApi.h"
     47 #include "report.h"
     48 #include "whalCtrl_api.h"
     49 #include "connApi.h"
     50 #include "siteMgrApi.h"
     51 #include "smeSmApi.h"
     52 #include "utils.h"
     53 #include "fsm.h"
     54 #include "configMgr.h"
     55 #include "DataCtrl_Api.h"
     56 #include "rsnApi.h"
     57 #include "scrApi.h"
     58 #include "MacServices_api.h"
     59 #include "ScanCncnApi.h"
     60 #include "scanMngrApi.h"
     61 #include "regulatoryDomainApi.h"
     62 #include "measurementMgrApi.h"
     63 #ifdef EXC_MODULE_INCLUDED
     64 #include "excMngr.h"
     65 #endif
     66 #include "SoftGeminiApi.h"
     67 #include "roamingMngrApi.h"
     68 #include "qosMngr_API.h"
     69 #include "whalCtrl.h"
     70 #include "TrafficMonitor.h"
     71 #include "PowerMgr_API.h"
     72 #include "EvHandler.h"
     73 #include "apConn.h"
     74 #include "currBss.h"
     75 #include "SwitchChannelApi.h"
     76 #include "ScanCncnAppApi.h"
     77 #include "healthMonitor.h"
     78 #include "wspVer.h"
     79 #include "Ethernet.h"
     80 #include "Core_AdaptTx.h"
     81 #include "TNETW_Driver_api.h"
     82 #include "rx.h"
     83 #include "Ctrl.h"
     84 
     85 #include "recoveryMgr_API.h"
     86 
     87 /****************************************************/
     88 /*      Local Functions                             */
     89 /****************************************************/
     90 static configMgr_t *createDriver(TI_HANDLE hOs,void *pWLAN_Images, initTable_t *pInitTable);
     91 
     92 static void configMgr_config (TI_HANDLE  hConfigManager);
     93 
     94 static int createCore(configMgr_t *pConfigManager, TI_HANDLE hOs, initTable_t *pInitTable);
     95 
     96 static  void configMgr_RetrieveFWInfo(configMgr_t *pConfigManager, initTable_t *pInitTable, whalCtrl_chip_t *pChip_Version);
     97 
     98 static TI_STATUS configCore(configMgr_t *pConfigManager, whalCtrl_chip_t *pChipVer);
     99 
    100 static void release_module(configMgr_t *pConfigManager);
    101 
    102 static void configParamsAccessTable(configMgr_t *pConfigManager);
    103 
    104 UINT32 configMgr_RegisterEvent(TI_HANDLE  hConfigMgr, PUCHAR pData, ULONG Length)
    105 {
    106     configMgr_t *pConfigManager= (configMgr_t *)hConfigMgr;
    107 
    108     return EvHandlerRegisterEvent(pConfigManager->hEvHandler,pData,Length);
    109 }
    110 
    111 UINT32 configMgr_UnRegisterEvent(TI_HANDLE hConfigMgr, TI_HANDLE uEventID)
    112 {
    113     configMgr_t *pConfigManager= (configMgr_t *)hConfigMgr;
    114 
    115     return EvHandlerUnRegisterEvent(pConfigManager->hEvHandler,uEventID);
    116 }
    117 
    118 UINT32 configMgr_GetEventData(TI_HANDLE hConfigMgr, PUCHAR pData, ULONG* pLength)
    119 {
    120    configMgr_t *pConfigManager= (configMgr_t *)hConfigMgr;
    121 
    122    return EvHandlerGetEventData(pConfigManager->hEvHandler,pData,pLength);
    123 }
    124 
    125 
    126 /****************************************************/
    127 /*      Interface Functions Implementation          */
    128 /****************************************************/
    129 
    130 /************************************************************************
    131  *                        configMgr_create                              *
    132  ************************************************************************
    133 DESCRIPTION: Driver creation & configuration function, called by the OS abstraction layer, performs the following:
    134                 -   Create the driver
    135                 -   Configure the driver
    136 
    137 INPUT:      hOs -           Handle to OS
    138             pInitTable -    Pointer to the init table as received from the OS abstraction layer
    139 
    140 OUTPUT:     pMac- MAC address of the device as read from the chip
    141 
    142 RETURN:     Handle to the driver
    143 
    144 ************************************************************************/
    145 TI_HANDLE configMgr_create (TI_HANDLE         hOs,
    146                             void             *pWLAN_Images,
    147                             initTable_t      *pInitTable,
    148                             macAddress_t     *pMac)
    149 {
    150     configMgr_t  *pConfigManager;
    151 
    152     /****************
    153     Create the Driver
    154     *****************/
    155     pConfigManager = createDriver(hOs, pWLAN_Images, pInitTable);
    156 
    157     if (pConfigManager == NULL)
    158     {
    159         WLAN_OS_REPORT(("\n.....Configuration manager creation failure \n"));
    160         return NULL;
    161     }
    162 
    163     WLAN_REPORT_INIT(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    164         ("CREATED DRIVER\n"));
    165 
    166     return (TI_HANDLE)pConfigManager;
    167 }
    168 
    169 
    170 /************************************************************************
    171  *                        configMgr_init                                *
    172  ************************************************************************
    173 DESCRIPTION: FW Code Download in partition
    174 
    175 INPUT:      hOs -           Handle to OS
    176             TI_HANDLE       hConfigManager
    177             pInitTable -    Pointer to the init table as received from the OS abstraction layer
    178 
    179 OUTPUT:     pMac- MAC address of the device as read from the chip
    180 
    181 RETURN:     Handle to the driver
    182 
    183 ************************************************************************/
    184 TI_HANDLE configMgr_init (TI_HANDLE     hOs,
    185                           TI_HANDLE     hConfigManager,
    186                           void         *pWLAN_Images,
    187                           initTable_t  *pInitTable,
    188                           macAddress_t *pMacAddr)
    189 {
    190     configMgr_t  *pConfigManager = (configMgr_t *)hConfigManager;
    191 
    192     pConfigManager->pInitTable = pInitTable;
    193     pConfigManager->pMacAddr = pMacAddr;
    194 
    195     /*
    196      * Init the module and Download the FW code in partition
    197      * At this stage it is very important that the pConfigManager has been created and linked to the HAL Ctrl
    198      * so that if the first DMA ends before the user returns to wait for the end of DMA
    199      * then the pConfigManager will have a valid value
    200      */
    201     if (TnetwDrv_Init (pConfigManager->hTnetwDrv,
    202                        pConfigManager->hReport,
    203                        pConfigManager->hMemMgr,
    204                        hConfigManager,
    205                        pWLAN_Images,
    206                        &pInitTable->TnetwDrv_InitParams,
    207                        configMgr_config) == TNETWIF_ERROR)
    208     {
    209         WLAN_OS_REPORT(("\n.....TNETW_Driver_Initialize: TNETW_Driver_Init failure \n"));
    210         return NULL;
    211     }
    212 
    213     return pConfigManager->hTnetwDrv;
    214 }
    215 
    216 
    217 /************************************************************************
    218 DESCRIPTION: Driver creation & configuration function, called by the OS abstraction layer, performs the following:
    219                 -   Create the driver
    220                 -   Configure the driver
    221 
    222 INPUT:      hOs -           Handle to OS
    223             pInitTable -    Pointer to the init table as received from the OS abstraction layer
    224 
    225 OUTPUT:     pMac- MAC address of the device as read from the chip
    226 
    227 RETURN:     Handle to the driver
    228 
    229 ************************************************************************/
    230 static void configMgr_config (TI_HANDLE  hConfigManager)
    231 {
    232     configMgr_t     *pConfigManager = (configMgr_t *)hConfigManager;
    233     whalCtrl_chip_t  chipVer;
    234     UINT8           *pMac;
    235 
    236     /****************
    237     Config the Driver
    238     *****************/
    239     WLAN_OS_REPORT(("Initializing Config Manager...\n"));
    240 
    241     if (configCore (pConfigManager, &chipVer) == NOK)
    242     {
    243         WLAN_OS_REPORT(("\n.....Configuration manager configuration failure\n"));
    244         release_module (pConfigManager);
    245         return;
    246     }
    247 
    248     pMac = (UINT8 *)chipVer.macAddress.addr;
    249 
    250     os_memoryCopy (pConfigManager->hOs,
    251                    pConfigManager->pMacAddr,
    252                    (void *)pConfigManager->pInitTable->ctrlDataInitParams.ctrlDataDeviceMacAddress.addr,
    253                    MAC_ADDR_LEN);
    254 
    255     pConfigManager->state = CFG_MGR_STATE_IDLE;
    256 
    257     /* Print the driver and firmware version and the mac address */
    258     WLAN_OS_REPORT(("\n"));
    259     WLAN_OS_REPORT(("--------------------------------------------------------------------\n"));
    260     WLAN_OS_REPORT(("Driver Version  : %s\n", SW_VERSION_STR));
    261     WLAN_OS_REPORT(("Firmware Version: %s\n", chipVer.fwVer));
    262     WLAN_OS_REPORT(("Station ID      : %02X-%02X-%02X-%02X-%02X-%02X\n",
    263                     pMac[0], pMac[1], pMac[2], pMac[3], pMac[4], pMac[5]));
    264     WLAN_OS_REPORT(("--------------------------------------------------------------------\n"));
    265     WLAN_OS_REPORT(("\n"));
    266 }
    267 
    268 
    269 /************************************************************************
    270  *                        configMgr_start                               *
    271  ************************************************************************
    272 DESCRIPTION: Driver start function, called by the OS abstraction layer in
    273             order to start the driver after creation.
    274             It enables the ISR and sends a start event to the driver's main state machine
    275             If the the driver was in IDLE state, it sends a 'WakeUp' command to the chip.
    276 
    277 INPUT:      hConfigMgr -    Handle to the driver
    278 
    279 OUTPUT:
    280 
    281 RETURN:     OK on success, NOK on failure
    282 
    283 ************************************************************************/
    284 TI_STATUS configMgr_start(TI_HANDLE hConfigMgr)
    285 {
    286     TI_STATUS  status = PARAM_VALUE_NOT_VALID;
    287 
    288     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    289 
    290     switch (pConfigManager->state)
    291    {
    292     case CFG_MGR_STATE_IDLE :
    293         pConfigManager->state = CFG_MGR_STATE_RUNNING;
    294         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    295                               ("<STATE_IDLE, EVENT_START> --> STATE_RUNNING\n\n"));
    296         status = smeSm_start(pConfigManager->hSmeSm);
    297 
    298 #ifdef SDIO_INTERRUPT_HANDLING_ON
    299         whalCtr_SlaveAckMaskNotification(pConfigManager->hHalCtrl);
    300 #endif
    301         break;
    302 
    303 
    304    case CFG_MGR_STATE_RUNNING :
    305         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    306                               ("Got start command while not in RUNNING, ignoring the command"));
    307         break;
    308 
    309 
    310    case CFG_MGR_STATE_STOPPED:
    311         pConfigManager->state = CFG_MGR_STATE_RUNNING;
    312         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    313                          ("<STATE_STOPPED, EVENT_START> --> STATE_RUNNING\n\n"));
    314         status = smeSm_start(pConfigManager->hSmeSm);
    315         break;
    316 
    317     }
    318 
    319     return status;
    320 }
    321 
    322 
    323 /************************************************************************
    324  *                        configMgr_stop                                *
    325  ************************************************************************
    326 DESCRIPTION: Driver stop function, called by the OS abstraction layer in
    327             order to stop the driver.
    328             It sends a stop event to the driver main state mmachine
    329             If the the driver was in RUNNING state, it sends a 'Sleep' command to the chip.
    330 
    331 INPUT:      hConfigMgr -    Handle to the driver
    332 
    333 OUTPUT:
    334 
    335 RETURN:     OK on success, NOK on failure
    336 
    337 ************************************************************************/
    338 TI_STATUS configMgr_stop(TI_HANDLE hConfigMgr)
    339 {
    340     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    341     TI_STATUS   status  = PARAM_VALUE_NOT_VALID;
    342 
    343 
    344    switch (pConfigManager->state)
    345     {
    346     case CFG_MGR_STATE_IDLE :
    347         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    348                          ("<STATE_IDLE, EVENT_STOP> --> STATE_IDLE\n\n"));
    349         status = STATION_IS_NOT_RUNNING;
    350         break;
    351 
    352    case CFG_MGR_STATE_RUNNING :
    353         pConfigManager->state = CFG_MGR_STATE_STOPPED;
    354         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    355                          ("<STATE_RUNNING, EVENT_STOP> --> STATE_STOPPED\n\n"));
    356         smeSm_stop(pConfigManager->hSmeSm);
    357         break;
    358 
    359    case CFG_MGR_STATE_STOPPED:
    360         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    361                          ("<STATE_STOPPED, EVENT_STOP> --> STATE_STOPPED\n\n"));
    362         status = STATION_IS_NOT_RUNNING;
    363         break;
    364 
    365     }
    366 
    367    return status;
    368 }
    369 
    370 /****************************************************************************************
    371  *                        configMgr_setParam                                            *
    372  ****************************************************************************************
    373 DESCRIPTION:    Called by the OS abstraction layer in order to set a parameter the driver.
    374                 If the parameter can not be set from outside the driver it returns a fialure status
    375                 The parameters is set to the module that uses as its father in the system
    376                 (refer to the file paramOut.h for more explanations)
    377                 If the father returns a RE_SCAN_NEEDED status, it restarts the main
    378                 state machine of the driver.
    379 
    380 
    381 INPUT:          hConfigMgr -    Handle to the driver
    382                 pParam  -       Pointer to the parameter
    383 
    384 OUTPUT:
    385 
    386 RETURN:         OK on success, NOK on failure
    387 
    388 ************************************************************************/
    389 TI_STATUS configMgr_setParam(TI_HANDLE hConfigMgr, paramInfo_t *pParam)
    390 {
    391     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    392     TI_STATUS    status;
    393     UINT32       moduleNumber;
    394 
    395     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    396     {
    397         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_SET_PARAM while in IDLE state \n\n"));
    398         return STATION_IS_NOT_RUNNING;
    399     }
    400 
    401     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    402                               ("<STATE_RUNNING, EVENT_SET_PARAM> --> STATE_RUNNING\n\n"));
    403 
    404 
    405     if (!EXTERNAL_SET_ENABLE(pParam->paramType))
    406         return EXTERNAL_SET_PARAM_DENIED;
    407 
    408     moduleNumber = GET_PARAM_MODULE_NUMBER(pParam->paramType);
    409 
    410     if  (moduleNumber > MAX_PARAM_MODULE_NUMBER)
    411         return PARAM_MODULE_NUMBER_INVALID;
    412 
    413     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    414                    ("ParamType=0x%x ModuleNumber=0x%x\n\n",pParam->paramType));
    415 
    416     status = pConfigManager->paramAccessTable[moduleNumber - 1].set(pConfigManager->paramAccessTable[moduleNumber - 1].handle, pParam);
    417 
    418     if(status == RE_SCAN_NEEDED)
    419         return smeSm_reselect(pConfigManager->hSmeSm);
    420     else
    421         return status;
    422 
    423 }
    424 
    425 /****************************************************************************************
    426  *                        configMgr_getParam                                            *
    427  ****************************************************************************************
    428 DESCRIPTION:    Called by the OS abstraction layer in order to get a parameter the driver.
    429                 If the parameter can not be get from outside the driver it returns a fialure status
    430                 The parameters is get from the module that uses as its father in the system
    431                 (refer to the file paramOut.h for more explanations)
    432 
    433 
    434 INPUT:          hConfigMgr -    Handle to the driver
    435                 pParam  -       Pointer to the parameter
    436 
    437 OUTPUT:
    438 
    439 RETURN:         OK on success, NOK on failure
    440 
    441 ************************************************************************/
    442 TI_STATUS configMgr_getParam (TI_HANDLE hConfigMgr, paramInfo_t *pParam)
    443 
    444 {
    445     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    446     UINT32       moduleNumber;
    447 
    448     /* This is a unique parameter, it checks the driver running status, therefore we handle it here. */
    449     if (pParam->paramType == DRIVER_STATUS_PARAM)
    450     {
    451         if (pConfigManager->state == CFG_MGR_STATE_RUNNING)
    452             pParam->content.driverStatus = DRIVER_STATUS_RUNNING;
    453         else
    454             pParam->content.driverStatus = DRIVER_STATUS_IDLE;
    455         return OK;
    456     }
    457 
    458     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    459     {
    460         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_GET_PARAM while in IDLE state \n\n"));
    461         return STATION_IS_NOT_RUNNING;
    462     }
    463 
    464     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    465                               ("<STATE_RUNNING, EVENT_GET_PARAM> --> STATE_RUNNING\n\n"));
    466 
    467     if (!EXTERNAL_GET_ENABLE(pParam->paramType))
    468         return EXTERNAL_GET_PARAM_DENIED;
    469 
    470     moduleNumber = GET_PARAM_MODULE_NUMBER(pParam->paramType);
    471 
    472     if  (moduleNumber > MAX_PARAM_MODULE_NUMBER)
    473         return PARAM_MODULE_NUMBER_INVALID;
    474 
    475     return pConfigManager->paramAccessTable[moduleNumber - 1].get(pConfigManager->paramAccessTable[moduleNumber - 1].handle, pParam);
    476 }
    477 
    478 
    479 /****************************************************************************************
    480  *                        configMgr_checkTxQueueSize                                            *
    481  ****************************************************************************************
    482 DESCRIPTION:    Check Tx queue size
    483 
    484 
    485 INPUT:          hConfigMgr  -   Handle to the driver
    486 
    487 OUTPUT:
    488 
    489 RETURN:         OK on success, NOK on queue full
    490 
    491 ************************************************************************/
    492 TI_STATUS configMgr_checkTxQueueSize(TI_HANDLE hConfigMgr,UINT8 qIndex)
    493 {
    494     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    495     return txData_checkQueueSize(pConfigManager->hTxData, qIndex);
    496 }
    497 
    498 
    499 /****************************************************************************************
    500  *                        configMgr_printTxQueues                                            *
    501  ****************************************************************************************
    502 DESCRIPTION:    Tx queues print
    503 
    504 
    505 INPUT:          hConfigMgr  -   Handle to the driver
    506 
    507 
    508 ************************************************************************/
    509 #ifdef TI_DBG
    510 void configMgr_printTxQueuesAndMemPolls(TI_HANDLE hConfigMgr)
    511 {
    512     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    513     txData_printTxQosCounters(pConfigManager->hTxData);
    514     txData_fullPrintDataMsduList(pConfigManager->hTxData);
    515     memMngrPrint(pConfigManager->hMemMgr);
    516 }
    517 #endif
    518 
    519 
    520 /****************************************************************************************
    521  *                        configMgr_sendMsdu                                            *
    522  ****************************************************************************************
    523 DESCRIPTION:    Called by the OS abstract in layer in order to send a MSDU to the wlan network.
    524 
    525 
    526 INPUT:          hConfigMgr  -   Handle to the driver
    527                 pMsdu       -   Pointer to the MSDU
    528                 packet_DTag -   NDIS packet user priority tag
    529 
    530 OUTPUT:
    531 
    532 RETURN:         OK on success, NOK on failure
    533 
    534 ************************************************************************/
    535 TI_STATUS configMgr_sendMsdu (TI_HANDLE      hConfigMgr,
    536                               mem_MSDU_T    *pMsdu,
    537                               UINT8          packet_DTag)
    538 {
    539     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    540     TI_STATUS  status = OK;
    541 
    542 #ifdef TI_DBG
    543     /* Add time stamp */
    544     wlan_memMngrAddTimeStamp (pConfigManager->hMemMgr, pMsdu);
    545 
    546     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    547     {
    548         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_SEND_MSDU while in IDLE state \n\n"));
    549         return STATION_IS_NOT_RUNNING;
    550     }
    551 
    552     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    553                               ("<STATE_RUNNING, EVENT_SEND_MSDU> --> STATE_RUNNING\n\n"));
    554 #endif
    555 
    556    WLAN_REPORT_DEBUG_TX(pConfigManager->hReport,("configMgr_sendMsdu Sending packet Lenght\n",pMsdu->dataLen));
    557    status =  txData_sendPktToWlan(pConfigManager->hTxData, pMsdu, packet_DTag);
    558    return status;
    559 }
    560 
    561 
    562 /****************************************************************************************
    563  *                        configMgr_PollApPackets                                           *
    564  ****************************************************************************************
    565 DESCRIPTION:    Called by the OS abstraction layer in order to send VAD frame.
    566                 Calls the txData module corresponding function.
    567 
    568 
    569 INPUT:          hConfigMgr  -   Handle to the driver
    570 
    571 OUTPUT:
    572 
    573 RETURN:         OK on success, NOK on failure
    574 
    575 ************************************************************************/
    576 TI_STATUS configMgr_PollApPackets(TI_HANDLE     hConfigMgr)
    577 {
    578     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    579 
    580     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    581     {
    582         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_SEND_MSDU while in IDLE state \n\n"));
    583         return STATION_IS_NOT_RUNNING;
    584     }
    585 
    586     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    587                               ("<STATE_RUNNING, EVENT_SEND_VAD_FRAME> --> STATE_RUNNING\n\n"));
    588 
    589     return txData_sendVadFrame(pConfigManager->hTxData, POLL_AP_PACKETS_FORCE_PS_POLL);
    590 }
    591 
    592 
    593 
    594 /****************************************************************************************
    595  *                        configMgr_HandleBusTxn_Complete                                    *
    596  ****************************************************************************************
    597 DESCRIPTION:    Called by the OS abstraction layer in order notify the driver that the DMA has finished
    598 
    599 
    600 INPUT:          hConfigMgr  -   Handle to the driver
    601 
    602 OUTPUT:
    603 
    604 RETURN:         OK on success, NOK on failure
    605 
    606 ************************************************************************/
    607 TI_STATUS configMgr_HandleBusTxn_Complete(TI_HANDLE hConfigMgr)
    608 {
    609     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    610 
    611     whalCtrl_HandleBusTxn_Complete(pConfigManager->hHalCtrl);
    612     return OK;
    613 }
    614 
    615 /****************************************************************************************
    616  *                        configMgr_handleInterrupts                                    *
    617  ****************************************************************************************
    618 DESCRIPTION:    Called by the OS abstraction layer in order notify the driver that a ISR arrived
    619 
    620 
    621 INPUT:          hConfigMgr  -   Handle to the driver
    622 
    623 OUTPUT:
    624 
    625 RETURN:         OK on success, NOK on failure
    626 
    627 ************************************************************************/
    628 TI_STATUS configMgr_handleInterrupts(TI_HANDLE hConfigMgr)
    629 {
    630     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    631 
    632     return (TI_STATUS)whalCtrl_HandleInterrupts(pConfigManager->hHalCtrl);
    633 }
    634 
    635 /****************************************************************************************
    636  *                        configMgr_enableInterrupts                                    *
    637  ****************************************************************************************
    638 DESCRIPTION:    Called by the OS abstraction layer in order to enable interrupts
    639 
    640 
    641 INPUT:          hConfigMgr  -   Handle to the driver
    642 
    643 OUTPUT:
    644 
    645 RETURN:         OK on success, NOK on failure
    646 
    647 ************************************************************************/
    648 TI_STATUS configMgr_enableInterrupts(TI_HANDLE hConfigMgr)
    649 {
    650     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    651 
    652     whalCtrl_EnableInterrupts(pConfigManager->hHalCtrl);
    653     return OK;
    654 }
    655 
    656 /****************************************************************************************
    657  *                        configMgr_disableInterrupts                                   *
    658  ****************************************************************************************
    659 DESCRIPTION:    Called by the OS abstraction layer in order to disable interrupts
    660 
    661 
    662 INPUT:          hConfigMgr  -   Handle to the driver
    663 
    664 OUTPUT:
    665 
    666 RETURN:         OK on success, NOK on failure
    667 
    668 ************************************************************************/
    669 TI_STATUS configMgr_disableInterrupts(TI_HANDLE hConfigMgr)
    670 {
    671     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    672 
    673     whalCtrl_DisableInterrupts(pConfigManager->hHalCtrl);
    674     return OK;
    675 }
    676 
    677 
    678 /****************************************************************************************
    679  *                        configMgr_disableRadio                                    *
    680  ****************************************************************************************
    681 DESCRIPTION:    Called by the OS abstraction layer in order to disable Radio
    682 
    683 
    684 INPUT:          hConfigMgr  -   Handle to the driver
    685 
    686 OUTPUT:
    687 
    688 RETURN:         OK on success, NOK on failure
    689 
    690 ************************************************************************/
    691 TI_STATUS configMgr_disableRadio(TI_HANDLE hConfigMgr)
    692 {
    693     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    694 
    695 
    696     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    697                               ("<STATE_RUNNING, EVENT_DISABLE_RADIO> --> STATE_RUNNING\n\n"));
    698 
    699     /* Disable radio command is no longer active, and should be directed to the SME module. */
    700     /* whalCtrl_DisableRadio(pConfigManager->hHalCtrl); */
    701     return OK;
    702 
    703 }
    704 
    705 
    706 /****************************************************************************************
    707  *                        configMgr_checkInterrupts                                     *
    708  ****************************************************************************************
    709 DESCRIPTION:    Called by the OS abstraction layer in order to let the driver check if
    710                 the receive interrupt is a driver's ISR.
    711 
    712 
    713 INPUT:          hConfigMgr  -   Handle to the driver
    714 
    715 OUTPUT:
    716 
    717 RETURN:         OK on success, NOK on failure
    718 
    719 ************************************************************************/
    720 UINT32 configMgr_checkInterrupts(TI_HANDLE hConfigMgr)
    721 {
    722     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    723 
    724     return whalCtrl_CheckInterrupts(pConfigManager->hHalCtrl);
    725 }
    726 
    727 
    728 /****************************************************************************************
    729  *                        configMgr_ReadMacRegister                                     *
    730  ****************************************************************************************
    731 DESCRIPTION:    API function for registers read/write
    732 
    733 
    734 INPUT:          hConfigMgr  -   Handle to the driver
    735 
    736 OUTPUT:
    737 
    738 RETURN:
    739 ************************************************************************/
    740 UINT32 configMgr_ReadMacRegister(TI_HANDLE hConfigMgr, UINT32   addr)
    741 {
    742     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    743 
    744     return whalCtrlReadMacReg(pConfigManager->hHalCtrl, addr);
    745 }
    746 
    747 void  configMgr_WriteMacRegister(TI_HANDLE hConfigMgr, UINT32   addr, UINT32    val)
    748 {
    749     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    750 
    751     whalCtrlWriteMacReg(pConfigManager->hHalCtrl, addr, val);
    752 }
    753 
    754 UINT32 configMgr_ReadPhyRegister(TI_HANDLE hConfigMgr, UINT32   addr)
    755 {
    756     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    757 
    758         return whalCtrlReadPhyReg(pConfigManager->hHalCtrl, addr);
    759 }
    760 
    761 void configMgr_WritePhyRegister(TI_HANDLE hConfigMgr, UINT32    addr, UINT32    val)
    762 {
    763     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    764 
    765     whalCtrlWritePhyReg(pConfigManager->hHalCtrl, addr, val);
    766 }
    767 
    768 /****************************************************************************************
    769  *                        configMgr_isCardExist                                         *
    770  ****************************************************************************************
    771 DESCRIPTION:    Called by the OS abstraction layer in order to check if the card is inserted.
    772 
    773 
    774 INPUT:          hConfigMgr  -   Handle to the driver
    775 
    776 OUTPUT:
    777 
    778 RETURN:         OK on success, NOK on failure
    779 
    780 ************************************************************************/
    781 BOOL configMgr_isCardExist(TI_HANDLE hConfigMgr)
    782 {
    783     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    784 
    785     if (whalCtrl_isCardIn(pConfigManager->hHalCtrl) == TRUE)
    786         return TRUE;
    787     else
    788     {
    789         wlan_memMngrFreeAllOsAlocatesBuffer(pConfigManager->hMemMgr);
    790         return FALSE;
    791     }
    792 }
    793 
    794 /****************************************************************************************
    795  *                        configMgr_areInputsFromOsDisabled                                         *
    796  ****************************************************************************************
    797 DESCRIPTION:    Called by the OS abstractin layer in order to
    798                 check if Inputs From OS are Disabled.
    799 
    800 
    801 INPUT:          hConfigMgr  -   Handle to the driver
    802 
    803 OUTPUT:
    804 
    805 RETURN:         TRUE  - recovery is in process,
    806                 FALSE - recovery is not in process
    807 
    808 ************************************************************************/
    809 BOOL configMgr_areInputsFromOsDisabled(TI_HANDLE hConfigMgr)
    810 {
    811     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    812 
    813     return (recoveryMgr_areInputsFromOsDisabled(pConfigManager->hRecoveryMgr));
    814 }
    815 
    816 /****************************************************************************************
    817  *                        configMgr_allocBDs                                            *
    818  ****************************************************************************************
    819 DESCRIPTION:    Called by the OS abstraction in order to allocate BDs from the memory manager pool.
    820                 Calls the memory manager corresponding function.
    821 
    822 
    823 
    824 INPUT:          hConfigMgr  -   Handle to the driver
    825                 bdNumber -      Number of BDs to allocate
    826 
    827 OUTPUT:         bdPtr    -      Pointer to return the link list of allocated BDs.
    828 
    829 RETURN:         OK on success, NOK on failure
    830 
    831 ************************************************************************/
    832 TI_STATUS configMgr_allocBDs(TI_HANDLE  hConfigMgr,
    833                              UINT32     bdNumber,
    834                              mem_BD_T** bdPtr)
    835 {
    836     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    837     TI_STATUS Status;
    838 
    839 #ifdef TI_DBG
    840     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    841     {
    842         WLAN_REPORT_ERROR(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_ALLOC_BDS while in IDLE state \n\n"));
    843         return STATION_IS_NOT_RUNNING;
    844     }
    845 
    846     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    847                               ("<STATE_RUNNING, EVENT_ALLOC_BDS> --> STATE_RUNNING\n\n"));
    848 #endif
    849 
    850     Status = wlan_memMngrAllocBDs(pConfigManager->hMemMgr, bdNumber, bdPtr);
    851     return Status;
    852 }
    853 
    854 /****************************************************************************************
    855  *                        configMgr_allocMSDU                                           *
    856  ****************************************************************************************
    857 DESCRIPTION:    Called by the OS abstraction layer in order to allocate a MSDU and its associated
    858                 BDs and data buffers.
    859                 Calls the memory manager corresponding function.
    860 
    861 INPUT:          hConfigMgr  -   Handle to the driver
    862                 len         -   the length of the required data buffer
    863                 module      -   The module that requests the allocation.
    864 
    865 OUTPUT:         MSDUPtr  -      Pointer to return he allocated MSDU.
    866 
    867 RETURN:         OK on success, NOK on failure
    868 
    869 ************************************************************************/
    870 TI_STATUS configMgr_allocMSDU(TI_HANDLE    hConfigMgr,
    871                               mem_MSDU_T** MSDUPtr,
    872                               UINT32       len,
    873                               allocatingModule_e module)
    874 {
    875     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    876 
    877 #ifdef TI_DBG
    878     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    879     {
    880         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_ALLOC_MSDU while in IDLE state \n\n"));
    881         return STATION_IS_NOT_RUNNING;
    882     }
    883 
    884     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    885                               ("<STATE_RUNNING, EVENT_ALLOC_MSDU> --> STATE_RUNNING\n\n"));
    886 #endif
    887 
    888     return wlan_memMngrAllocMSDU(pConfigManager->hMemMgr, MSDUPtr, len, OS_ABS_TX_MODULE);
    889 }
    890 
    891 /****************************************************************************************
    892  *                        configMgr_allocMSDUBufferOnly                                         *
    893  ****************************************************************************************
    894 DESCRIPTION:    Called by the OS abstraction layer in order to allocate a MSDU only.
    895                 Calls the memory manager corresponding function.
    896 
    897 
    898 INPUT:          hConfigMgr  -   Handle to the driver
    899                 module      -   The module that requests the allocation.
    900 
    901 OUTPUT:         MSDUPtr  -      Pointer to return he allocated MSDU.
    902 
    903 RETURN:         OK on success, NOK on failure
    904 
    905 ************************************************************************/
    906 TI_STATUS configMgr_allocMSDUBufferOnly(TI_HANDLE    hConfigMgr,
    907                                         mem_MSDU_T** MSDUPtr,
    908                                         allocatingModule_e module)
    909 {
    910     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    911 
    912 #ifdef TI_DBG
    913     if (pConfigManager->state != CFG_MGR_STATE_RUNNING)
    914     {
    915         WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,  ("State machine error, EVENT_ALLOC_MSDU_BUFFER_ONLY while in IDLE state \n\n"));
    916         return STATION_IS_NOT_RUNNING;
    917     }
    918 
    919     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    920                               ("<STATE_RUNNING, EVENT_ALLOC_MSDU_BUFFER_ONLY> --> STATE_RUNNING\n\n"));
    921 #endif
    922 
    923     return wlan_memMngrAllocMSDUBufferOnly(pConfigManager->hMemMgr, MSDUPtr, OS_ABS_TX_MODULE);
    924 }
    925 
    926 /****************************************************************************************
    927  *                        configMgr_memMngrFreeMSDU                                         *
    928  ****************************************************************************************
    929 DESCRIPTION:    Called by the OS abstraction layer in order to free a MSDU.
    930                 Calls the memory manager corresponding function.
    931 
    932 
    933 INPUT:          hConfigMgr  -   Handle to the driver
    934                 handle      -   handle of the MSDU.
    935 
    936 OUTPUT:
    937 
    938 RETURN:         OK on success, NOK on failure
    939 
    940 ************************************************************************/
    941 TI_STATUS configMgr_memMngrFreeMSDU(TI_HANDLE hConfigMgr, UINT32 handle)
    942 {
    943     configMgr_t *pConfigManager = (configMgr_t *)hConfigMgr;
    944 
    945 #ifdef TI_DBG
    946     WLAN_REPORT_SM(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
    947                               ("<STATE_RUNNING, EVENT_FREE_MSDU> --> STATE_RUNNING\n\n"));
    948 #endif
    949 
    950     wlan_memMngrFreeMSDU(pConfigManager->hMemMgr, handle);
    951     return OK;
    952 }
    953 
    954 /****************************************************************************************
    955  *                        configMgr_unLoad                                              *
    956  ****************************************************************************************
    957 DESCRIPTION:    Driver unload function
    958 
    959 
    960 INPUT:          hConfigMgr  -   Handle to the driver
    961 
    962 OUTPUT:
    963 
    964 RETURN:         OK on success, NOK on failure
    965 
    966 ************************************************************************/
    967 TI_STATUS configMgr_unLoad(TI_HANDLE hConfigMgr)
    968 {
    969     configMgr_t     *pConfigManager = (configMgr_t *)hConfigMgr;
    970 
    971     if (!pConfigManager)
    972         return NOK;
    973 
    974     whalCtrl_Stop(pConfigManager->hHalCtrl);
    975 
    976     WLAN_OS_REPORT(("\nCONFIG_MGR,  UNLOAD:   *****  DESTROYING THE DRIVER  *****\n\n\n"));
    977     release_module(pConfigManager);
    978 
    979     return OK;
    980 }
    981 
    982 
    983 /****************************************************************************************
    984  *                        configMgr_InitiateUnload                                              *
    985  ****************************************************************************************
    986 DESCRIPTION:    Driver unload function
    987 
    988 
    989 INPUT:          hConfigMgr  -   Handle to the driver
    990 
    991 OUTPUT:
    992 
    993 RETURN:         OK on success, NOK on failure
    994 
    995 ************************************************************************/
    996 TI_STATUS configMgr_InitiateUnload(TI_HANDLE hConfigMgr)
    997 {
    998     configMgr_t     *pConfigManager = (configMgr_t *)hConfigMgr;
    999 
   1000     if (!pConfigManager)
   1001         return NOK;
   1002 
   1003     smeSm_stopAndShutdown(pConfigManager->hSmeSm);
   1004 
   1005     WLAN_OS_REPORT(("\nCONFIG_MGR,  UNLOAD:   *****  DESTROYING THE DRIVER  *****\n\n\n"));
   1006 
   1007     return OK;
   1008 }
   1009 
   1010 
   1011 /****************************************************************************************
   1012  *                        configMgr_UnloadModules                                              *
   1013  ****************************************************************************************
   1014 DESCRIPTION:    Driver unload function
   1015 
   1016 
   1017 INPUT:          hConfigMgr  -   Handle to the driver
   1018 
   1019 OUTPUT:
   1020 
   1021 RETURN:         OK on success, NOK on failure
   1022 
   1023 ************************************************************************/
   1024 TI_STATUS configMgr_UnloadModules(TI_HANDLE hConfigMgr)
   1025 {
   1026     configMgr_t     *pConfigManager = (configMgr_t *)hConfigMgr;
   1027 
   1028     if (!pConfigManager)
   1029         return NOK;
   1030 
   1031     release_module(pConfigManager);
   1032 
   1033     return OK;
   1034 }
   1035 
   1036 /****************************************************************************************
   1037  *                        configMgr_DriverShutdownStatus                                              *
   1038  ****************************************************************************************
   1039 DESCRIPTION:    return status of driver shutdown process
   1040 
   1041 INPUT:          hConfigMgr  -   Handle to the driver
   1042 
   1043 OUTPUT:
   1044 
   1045 RETURN:         OK on success, NOK on failure
   1046 
   1047 ************************************************************************/
   1048 UINT8 configMgr_DriverShutdownStatus(TI_HANDLE hConfigMgr)
   1049 {
   1050    configMgr_t     *pConfigManager = (configMgr_t *)hConfigMgr;
   1051 
   1052    return smeSm_getDriverShutdownStatus(pConfigManager->hSmeSm);
   1053 }
   1054 
   1055 /****************************************************************************************
   1056  *                        configMgr_SlaveAckMaskNotification                                   *
   1057  ****************************************************************************************
   1058 DESCRIPTION:
   1059 
   1060 INPUT:          hConfigMgr  -   Handle to the driver
   1061 
   1062 OUTPUT:
   1063 
   1064 RETURN:         void
   1065 
   1066 ************************************************************************/
   1067 
   1068 void configMgr_SlaveAckMaskNotification(TI_HANDLE hConfigMgr)
   1069 {
   1070     configMgr_t     *pConfigManager = (configMgr_t *)hConfigMgr;
   1071     whalCtr_SlaveAckMaskNotification(pConfigManager->hHalCtrl);
   1072 }
   1073 
   1074 /****************************************************************************************
   1075  *                        configMgr_getPacketHeaderLength                                   *
   1076  ****************************************************************************************
   1077 DESCRIPTION:    Called by os to know reserved space for WLAN header.
   1078 
   1079 INPUT:          hConfigMgr  -   Handle to the driver
   1080                 data        -   pointer to packet
   1081                 txFlags     -   whether this frame is data or management
   1082 OUTPUT:
   1083 
   1084 RETURN:         void
   1085 
   1086 ************************************************************************/
   1087 
   1088 UINT32 configMgr_getPacketHeaderLength(TI_HANDLE      hConfigMgr,
   1089                                        void           *pData,
   1090                                        UINT32         txFlags)
   1091 {
   1092     configMgr_t          *pConfigManager = (configMgr_t *)hConfigMgr;
   1093 
   1094     /* returns TxDescriptor size + reserved place for the bus txn operation + actual header length */
   1095     return TX_TOTAL_OFFSET_BEFORE_DATA +
   1096         txData_GetWlanHeaderLength (pConfigManager->hTxData, pData, txFlags);
   1097 }
   1098 
   1099 
   1100 /****************************************************/
   1101 /*      Local Functions Implementations             */
   1102 /****************************************************/
   1103 /****************************************************************************************
   1104  *                        createDriver                                              *
   1105  ****************************************************************************************
   1106 DESCRIPTION:    Driver creation function. Performs the following:
   1107                 -   Calls the create function of each module.
   1108                 -   Each module returns a handle if successful and NULL otherwise.
   1109                 -   If the creation of all the modules succeeded, the driver main handle is configured with the
   1110                         modules handles. Then the driver main handle is returned to the caller.
   1111                 -   If one of the modules fails in creation, the function calls the release function of the driver
   1112                     and all the modules handles are free, including the driver main handle.
   1113                 -   Some of the modules are called with an init table as a parameter.
   1114                 -   The callbacks table is filled with the callbacks returned from the core, in the configuration phase,
   1115                     the HAL is configured with those callbacks.
   1116 
   1117 
   1118 INPUT:          hOs        -    Handle to the OS
   1119                 pInitTable -    Pointer to the init table as read from registry
   1120                 pCoreCallbacks   -  Table of core callbacks functions to filled by the CORE
   1121 
   1122 OUTPUT:         Main Handle to the driver.
   1123 
   1124 RETURN:         Handle to the driver on success, NOK on failure
   1125 
   1126 ************************************************************************/
   1127 static configMgr_t *createDriver(TI_HANDLE hOs, void *pWLAN_Images, initTable_t *pInitTable)
   1128 {
   1129     configMgr_t             *pConfigManager;
   1130 
   1131     /************************
   1132     Create the Config Manager
   1133     *************************/
   1134     pConfigManager = os_memoryAlloc(hOs, sizeof(configMgr_t));
   1135     if (pConfigManager == NULL)
   1136     {
   1137         return NULL;
   1138     }
   1139     os_memoryZero (hOs, pConfigManager, sizeof(configMgr_t));
   1140     pConfigManager->hOs = hOs;
   1141 
   1142     /**************************
   1143     Create all the CORE modules
   1144     ***************************/
   1145     if (createCore (pConfigManager ,hOs,  pInitTable) != OK)
   1146     {
   1147         WLAN_OS_REPORT(("\n createCore() Failed!!! \n"));
   1148         release_module(pConfigManager);
   1149         return NULL;
   1150     }
   1151 
   1152     WLAN_INIT_REPORT(("\n createDriver(): pConfigManager->hOs %x pConfigManager->hMemMgr %x!!! :\n\n",pConfigManager->hOs,pConfigManager->hMemMgr));
   1153 
   1154     /**************************
   1155     Configure the Report module
   1156     ***************************/
   1157     if (report_config(pConfigManager->hReport, hOs, &pInitTable->TnetwDrv_InitParams.reportParams) != OK)
   1158     {
   1159         WLAN_OS_REPORT(("\n Report configuration failure \n"));
   1160         release_module(pConfigManager);
   1161         return NULL;
   1162     }
   1163 
   1164     /**********************
   1165     Create the TNETW Driver
   1166     ***********************/
   1167     pConfigManager->hTnetwDrv = TnetwDrv_Create(hOs);
   1168 
   1169     if (pConfigManager->hTnetwDrv == NULL)
   1170     {
   1171         WLAN_OS_REPORT(("\n createDriver() !!! TnetwDrv_Create failed !!! \n"));
   1172         release_module(pConfigManager);
   1173         return NULL;
   1174     }
   1175 
   1176     WLAN_INIT_REPORT(("\n createDriver(): pConfigManager %x pConfigManager->hTnetwDrv %x!!! :\n\n",pConfigManager,pConfigManager->hTnetwDrv));
   1177 
   1178     /***************************************************************
   1179     TEMPORARY!!  -  get TNETW-Driver internal modules handles untill
   1180                     the new TNETW-Driver architecture is completed!!
   1181     ****************************************************************/
   1182     TnetwDrv_TEMP_GetHandles (pConfigManager->hTnetwDrv,
   1183                               &pConfigManager->hHalCtrl,
   1184                               &pConfigManager->hMacServices);
   1185 
   1186     WLAN_INIT_REPORT(("\nCONFIG_MGR,  INIT:       *****   CREATION SUCCESS    *****\n\n\n"));
   1187 
   1188     return pConfigManager;
   1189 }
   1190 
   1191 /****************************************************************************************
   1192  *                        createCore                                   *
   1193  ****************************************************************************************
   1194 DESCRIPTION:   Called by the CreateDriver to
   1195                         - Create the CORE modules
   1196                         - Create the CORE Adapter module
   1197                         - Config the CORE Adapter module by giving it CORE callbacks
   1198 
   1199 INPUT:          TI_HANDLE hOs  -   Handle to OS
   1200                 initTable_t *pInitTable - pointer to the Init table filled by the registry
   1201                 coreCallbacks_t *pCoreCallbacks  - pointer to the CORE callbacks to be used by each module to fll it (Scan,CtrlData ..)
   1202 
   1203 OUTPUT:         TI_STATUS - OK on success else NOK
   1204 
   1205 RETURN:         void
   1206 
   1207 ************************************************************************/
   1208 static int createCore(configMgr_t *pConfigManager, TI_HANDLE hOs, initTable_t *pInitTable)
   1209 {
   1210     /* Report module */
   1211     pConfigManager->hReport = report_create(hOs);
   1212     if (pConfigManager->hReport == NULL)
   1213     {
   1214         return NOK;
   1215     }
   1216 
   1217     /* SCR module */
   1218     pConfigManager->hSCR = scr_create(hOs);
   1219     if (pConfigManager->hSCR == NULL)
   1220     {
   1221         return NOK;
   1222     }
   1223 
   1224     /* Event Handler module */
   1225     pConfigManager->hEvHandler = EvHandlerInit(hOs);
   1226     if (pConfigManager->hEvHandler == NULL)
   1227     {
   1228         return NOK;
   1229     }
   1230 
   1231     /* Connection module */
   1232     pConfigManager->hConn = conn_create(hOs);
   1233     if (pConfigManager->hConn == NULL)
   1234     {
   1235         return NOK;
   1236     }
   1237 
   1238     /* Scan Concentrator module */
   1239     pConfigManager->hScanCncn = scanConcentrator_create(hOs);
   1240     if (pConfigManager->hScanCncn == NULL)
   1241     {
   1242         return NOK;
   1243     }
   1244 
   1245     /* SME state machine module */
   1246     pConfigManager->hSmeSm = smeSm_create(hOs);
   1247     if (pConfigManager->hSmeSm == NULL)
   1248     {
   1249         return NOK;
   1250     }
   1251 
   1252     /* Site manager module */
   1253     pConfigManager->hSiteMgr = siteMgr_create(hOs);
   1254     if (pConfigManager->hSiteMgr == NULL)
   1255     {
   1256         return NOK;
   1257     }
   1258 
   1259     /* MLME SM module */
   1260     pConfigManager->hMlmeSm = mlme_create(hOs);
   1261     if (pConfigManager->hMlmeSm == NULL)
   1262     {
   1263         return NOK;
   1264     }
   1265 
   1266     /* AUTH module */
   1267     pConfigManager->hAuth = auth_create(hOs);
   1268     if (pConfigManager->hAuth == NULL)
   1269     {
   1270         return NOK;
   1271     }
   1272 
   1273     /* ASSOC module */
   1274     pConfigManager->hAssoc = assoc_create(hOs);
   1275     if (pConfigManager->hAssoc == NULL)
   1276     {
   1277         return NOK;
   1278     }
   1279 
   1280     /* Rx data module */
   1281     pConfigManager->hRxData = rxData_create(hOs);
   1282     if (pConfigManager->hRxData == NULL)
   1283     {
   1284         return NOK;
   1285     }
   1286 
   1287     /* Tx data module */
   1288     pConfigManager->hTxData = txData_create (&pInitTable->txDataInitParams, hOs);
   1289     if (pConfigManager->hTxData == NULL)
   1290     {
   1291         return NOK;
   1292     }
   1293 
   1294     /* Ctrl data module */
   1295     pConfigManager->hCtrlData = ctrlData_create(hOs);
   1296     if (pConfigManager->hCtrlData == NULL)
   1297     {
   1298         return NOK;
   1299     }
   1300 
   1301     /* Traffic Monitor  */
   1302     pConfigManager->hTrafficMon = TrafficMonitor_create(hOs);
   1303     if (pConfigManager->hTrafficMon == NULL)
   1304     {
   1305         return NOK;
   1306     }
   1307 
   1308     /* Memory Manager */
   1309     pConfigManager->hMemMgr = wlan_memMngrInit(hOs);
   1310     if (pConfigManager->hMemMgr == NULL)
   1311     {
   1312         return NOK;
   1313     }
   1314 
   1315     /* RSN create code */
   1316     pConfigManager->hRsn = rsn_create(hOs);
   1317     if (pConfigManager->hRsn == NULL)
   1318     {
   1319         return NOK;
   1320     }
   1321 
   1322     /* Regulatory Domain module */
   1323     pConfigManager->hRegulatoryDomain = regulatoryDomain_create(hOs);
   1324     if (pConfigManager->hRegulatoryDomain == NULL)
   1325     {
   1326         return NOK;
   1327     }
   1328 
   1329     /* MeasurementMgr module */
   1330     pConfigManager->hMeasurementMgr = measurementMgr_create(hOs);
   1331     if (pConfigManager->hMeasurementMgr == NULL)
   1332     {
   1333         return NOK;
   1334     }
   1335 
   1336     /* Soft Gemini module */
   1337     pConfigManager->hSoftGemini = SoftGemini_create(hOs);
   1338     if (pConfigManager->hSoftGemini == NULL)
   1339     {
   1340         return NOK;
   1341     }
   1342 
   1343 
   1344 #ifdef EXC_MODULE_INCLUDED
   1345     pConfigManager->hExcMngr = excMngr_create(hOs);
   1346     if (pConfigManager->hExcMngr == NULL)
   1347     {
   1348         return NOK;
   1349     }
   1350 #else
   1351     pConfigManager->hExcMngr = NULL;
   1352 #endif
   1353 
   1354     pConfigManager->hRoamingMngr = roamingMngr_create(hOs);
   1355     if (pConfigManager->hRoamingMngr == NULL)
   1356     {
   1357         return NOK;
   1358     }
   1359 
   1360     pConfigManager->hAPConnection = apConn_create(hOs);
   1361     if (pConfigManager->hAPConnection == NULL)
   1362     {
   1363         return NOK;
   1364     }
   1365 
   1366     pConfigManager->hCurrBss = currBSS_create(hOs);
   1367     if (pConfigManager->hCurrBss == NULL)
   1368     {
   1369         return NOK;
   1370     }
   1371 
   1372     pConfigManager->hQosMngr = qosMngr_create(hOs);
   1373     if (pConfigManager->hQosMngr == NULL)
   1374     {
   1375         return NOK;
   1376     }
   1377 
   1378     pConfigManager->hPowerMgr = PowerMgr_create(hOs);
   1379     if (pConfigManager->hPowerMgr == NULL)
   1380     {
   1381         return NOK;
   1382     }
   1383 
   1384     pConfigManager->hSwitchChannel = switchChannel_create(hOs);
   1385     if (pConfigManager->hSwitchChannel == NULL)
   1386     {
   1387         return NOK;
   1388     }
   1389 
   1390     pConfigManager->hScanMngr = scanMngr_create(hOs);
   1391     if (NULL == pConfigManager->hScanMngr)
   1392     {
   1393         return NOK;
   1394     }
   1395 
   1396     pConfigManager->hHealthMonitor = healthMonitor_create(hOs);
   1397     if (NULL == pConfigManager->hHealthMonitor)
   1398     {
   1399         return NOK;
   1400     }
   1401 
   1402     /* CORE ADAPTER CREATION */
   1403 
   1404     /* ADD CORE ADAPTER Tx CREATION */
   1405     CORE_AdaptTx_handle = CORE_AdaptTx_Create(hOs);
   1406     if (CORE_AdaptTx_handle == NULL)
   1407     {
   1408         return NOK;
   1409     }
   1410 
   1411     pConfigManager->hRecoveryMgr = recoveryMgr_create(hOs);
   1412 #ifdef USE_RECOVERY
   1413     if (NULL == pConfigManager->hRecoveryMgr)
   1414     {
   1415         return NOK;
   1416     }
   1417 #endif
   1418     WLAN_INIT_REPORT(("\nCONFIG_MGR,  INIT:       *****   CORE CREATION SUCCESS    *****\n\n\n"));
   1419 
   1420     return OK;
   1421 }
   1422 
   1423 
   1424 /****************************************************************************************
   1425  *                        configCore                                              *
   1426  ****************************************************************************************
   1427 DESCRIPTION:    Core configuration function. Performs the following:
   1428                 -   Calls the config Params Access function.
   1429                 -   Calls the config function of each module.
   1430                 -   Each module is configured with the following parameters:
   1431                     -   List of handles to other modules that supply him services
   1432                     -   Init table (optional).
   1433                     -   Callbacks to be used (in the HAL cases)
   1434                 -   In addition, the following parameters are read from the chip by the HAL and forwarded to the CORE:
   1435                     -   Chip MAC Address
   1436                     -   Chip regulatory domain
   1437                     -   Chip preamble
   1438                     -   Chip FW version and EEPROM version
   1439                     -   Radio type
   1440 
   1441 INPUT:          pConfigManager     -    Driver main handle
   1442                 pInitTable          -   Pointer to the init table as read from registry
   1443 
   1444 OUTPUT:
   1445 
   1446 RETURN:         OK on success, NOK on failure
   1447 
   1448 ************************************************************************/
   1449 static TI_STATUS configCore (configMgr_t *pConfigManager, whalCtrl_chip_t *pChipVer)
   1450 {
   1451     /************************/
   1452     /*      CONFIGURATION   */
   1453     /************************/
   1454     /*radioDisableParams_t    radioDisableParams;*/
   1455     Core_AdaptTx_config_t   Core_AdaptTx_config;
   1456 
   1457     /* we first initialize the setParamTable & getParamTable based on the moduleParam_e */
   1458     configParamsAccessTable (pConfigManager);
   1459 
   1460     /*
   1461      * Retrieve FW information from HAL
   1462      */
   1463     configMgr_RetrieveFWInfo (pConfigManager, pConfigManager->pInitTable, pChipVer);
   1464 
   1465     /* CORE Adapter configuration is setting callback to each module */
   1466 
   1467     /* CORE ADAPTER TX module */
   1468     Core_AdaptTx_config.hMemMgr = pConfigManager->hMemMgr;
   1469     Core_AdaptTx_config.hReport = pConfigManager->hReport;
   1470     Core_AdaptTx_config.hTnetwDrv = pConfigManager->hTnetwDrv;
   1471     Core_AdaptTx_config.hTxData = pConfigManager->hTxData;
   1472     Core_AdaptTx_config.hCtrlData = pConfigManager->hCtrlData;
   1473 
   1474     /* sendPacketComplete event callback */
   1475     /*Core_AdaptTx_config.TxCmplt_CB = pCoreCallbacks->ctrlData_TxCompleteStatusCB;*/
   1476     /*Core_AdaptTx_config.TxCmplt_CB_handle = pConfigManager->hCtrlData;*/
   1477 
   1478     /* sendPacketTransfer event callback */
   1479     /*Core_AdaptTx_config.PacketTranfer_CB = pCoreCallbacks->txData_SendPacketTranferCB;*/
   1480     /*Core_AdaptTx_config.PacketTranfer_CB_handle = pConfigManager->hTxData;*/
   1481 
   1482     /* queueFreeEvent event callback */
   1483     /*Core_AdaptTx_config.QueueFreeEvent_CB = pCoreCallbacks->txData_QueueFreeEventCB;*/
   1484     /*Core_AdaptTx_config.QueueFreeEvent_CB_handle = pConfigManager->hTxData;*/
   1485     WLAN_OS_REPORT(("Initializing Core Adapter Tx...\n"));
   1486     if (CORE_AdaptTx_Config (CORE_AdaptTx_handle,
   1487                              &Core_AdaptTx_config,
   1488                              &pConfigManager->pInitTable->txDataInitParams) != OK)
   1489     {
   1490         WLAN_OS_REPORT(("\n.....CORE ADAPTER TX configuration failure \n"));
   1491             return NOK;
   1492     }
   1493 
   1494     /* SCR module */
   1495     WLAN_OS_REPORT(("Initializing SCR...\n"));
   1496     scr_init (pConfigManager->hSCR, pConfigManager->hReport);
   1497 
   1498     /* connection module */
   1499     WLAN_OS_REPORT(("Initializing Conn...\n"));
   1500     if (conn_config (pConfigManager->hConn,
   1501                      pConfigManager->hSiteMgr,
   1502                      pConfigManager->hSmeSm,
   1503                      pConfigManager->hMlmeSm,
   1504                      pConfigManager->hRsn,
   1505                      pConfigManager->hRxData,
   1506                      pConfigManager->hTxData,
   1507                      pConfigManager->hReport,
   1508                      pConfigManager->hOs,
   1509                      pConfigManager->hPowerMgr,
   1510                      pConfigManager->hCtrlData,
   1511                      pConfigManager->hMeasurementMgr,
   1512                      pConfigManager->hTrafficMon,
   1513                      pConfigManager->hSCR,
   1514                      pConfigManager->hExcMngr,
   1515                      pConfigManager->hQosMngr,
   1516                      pConfigManager->hHalCtrl,
   1517                      pConfigManager->hScanCncn,
   1518                      pConfigManager->hCurrBss,
   1519                      pConfigManager->hSwitchChannel,
   1520                      pConfigManager->hEvHandler,
   1521                      pConfigManager->hHealthMonitor,
   1522                      pConfigManager->hMacServices,
   1523                      pConfigManager->hRegulatoryDomain,
   1524                      pConfigManager->hSoftGemini,
   1525                      &pConfigManager->pInitTable->connInitParams) != OK)
   1526     {
   1527         WLAN_OS_REPORT(("\n.....Conn configuration failure \n"));
   1528         return NOK;
   1529     }
   1530 
   1531     /* Ctrl data module */
   1532     WLAN_OS_REPORT(("Initializing Ctrl Data...\n"));
   1533     if (ctrlData_config (pConfigManager->hCtrlData,
   1534                          pConfigManager->hHalCtrl,
   1535                          pConfigManager->hSiteMgr,
   1536                          pConfigManager->hTxData,
   1537                          pConfigManager->hRxData,
   1538                          pConfigManager->hOs,
   1539                          pConfigManager->hReport,
   1540                          pConfigManager->hMemMgr,
   1541                          pConfigManager->hEvHandler,
   1542                          pConfigManager->hAPConnection,
   1543                          pConfigManager->hTrafficMon,
   1544                          conn_disConnFrameSentCBFunc,
   1545                          pConfigManager->hConn,
   1546                          &pConfigManager->pInitTable->ctrlDataInitParams) != OK)
   1547     {
   1548         WLAN_OS_REPORT(("\n.....CTRL DATA configuration failure \n"));
   1549         return NOK;
   1550     }
   1551 
   1552     /* Site manager module */
   1553     WLAN_OS_REPORT(("Initializing Site Manager...\n"));
   1554     if (siteMgr_config (pConfigManager->hSiteMgr,
   1555                         pConfigManager->hConn,
   1556                         pConfigManager->hSmeSm,
   1557                         pConfigManager->hCtrlData,
   1558                         pConfigManager->hRxData,
   1559                         pConfigManager->hTxData,
   1560                         pConfigManager->hRsn,
   1561                         pConfigManager->hAuth,
   1562                         pConfigManager->hAssoc,
   1563                         pConfigManager->hHalCtrl,
   1564                         pConfigManager->hMlmeSm,
   1565                         pConfigManager->hRegulatoryDomain,
   1566                         pConfigManager->hMeasurementMgr,
   1567                         pConfigManager->hAPConnection,
   1568                         pConfigManager->hCurrBss,
   1569                         pConfigManager->hReport,
   1570                         pConfigManager->hOs,
   1571                         pConfigManager->hExcMngr,
   1572                         pConfigManager->hQosMngr,
   1573                         pConfigManager->hPowerMgr,
   1574                         pConfigManager->hSCR,
   1575                         pConfigManager->hEvHandler,
   1576                         pConfigManager->hMacServices,
   1577                         &pConfigManager->pInitTable->siteMgrInitParams) != OK)
   1578     {
   1579         WLAN_OS_REPORT(("\n.....Site manager configuration failure \n"));
   1580         return NOK;
   1581     }
   1582 
   1583     /* Note: must be configured after Site Manager object coonfiguration */
   1584     /* regulatory Domain module */
   1585     WLAN_OS_REPORT(("Initializing Regulatory Domain...\n"));
   1586     if (regulatoryDomain_config (pConfigManager->hRegulatoryDomain,
   1587                                  pConfigManager->hSiteMgr,
   1588                                  pConfigManager->hHalCtrl,
   1589                                  pConfigManager->hReport,
   1590                                  pConfigManager->hOs,
   1591                                  pConfigManager->hSwitchChannel,
   1592                                  &pConfigManager->pInitTable->regulatoryDomainInitParams) != OK)
   1593     {
   1594         WLAN_OS_REPORT(("\n.....Regulatory Domain configuration failure \n"));
   1595         return NOK;
   1596     }
   1597 
   1598     /* scan concentrator module */
   1599     /* Note: must be configured after RegulatoryDomain object coonfiguration */
   1600     WLAN_OS_REPORT(("Initializing Scan Concentrator...\n"));
   1601     scanConcentrator_init (pConfigManager->hScanCncn,
   1602                            pConfigManager->hHalCtrl,
   1603                            pConfigManager->hReport,
   1604                            pConfigManager->hRegulatoryDomain,
   1605                            pConfigManager->hSiteMgr,
   1606                            pConfigManager->hSCR,
   1607                            pConfigManager->hMacServices,
   1608                            pConfigManager->hAPConnection,
   1609                            pConfigManager->hEvHandler,
   1610                            pConfigManager->hMlmeSm,
   1611                            pConfigManager->hCtrlData,
   1612                            pConfigManager->hHealthMonitor,
   1613                            &pConfigManager->pInitTable->scanConcentratorInitParams);
   1614 
   1615     /* AUTH module */
   1616     WLAN_OS_REPORT(("Initializing Auth...\n"));
   1617     if (auth_config (pConfigManager->hAuth,
   1618                      pConfigManager->hMlmeSm,
   1619                      pConfigManager->hRsn,
   1620                      pConfigManager->hReport,
   1621                      pConfigManager->hOs,
   1622                      &pConfigManager->pInitTable->authInitParams) != OK)
   1623     {
   1624         WLAN_OS_REPORT(("\n.....AUTH configuration failure \n"));
   1625         return NOK;
   1626     }
   1627 
   1628     /* MLME SM module */
   1629     WLAN_OS_REPORT(("Initializing MLME...\n"));
   1630     if (mlme_config (pConfigManager->hMlmeSm,
   1631                      pConfigManager->hAuth,
   1632                      pConfigManager->hAssoc,
   1633                      pConfigManager->hSiteMgr,
   1634                      pConfigManager->hCtrlData,
   1635                      pConfigManager->hConn,
   1636                      pConfigManager->hTxData,
   1637                      pConfigManager->hHalCtrl,
   1638                      pConfigManager->hMemMgr,
   1639                      pConfigManager->hMeasurementMgr,
   1640                      pConfigManager->hSwitchChannel,
   1641                      pConfigManager->hRegulatoryDomain,
   1642                      pConfigManager->hReport,
   1643                      pConfigManager->hOs,
   1644                      pConfigManager->hCurrBss,
   1645                      pConfigManager->hAPConnection,
   1646                      pConfigManager->hScanCncn,
   1647                      pConfigManager->hQosMngr,
   1648                      (TI_HANDLE)pConfigManager) != OK)
   1649     {
   1650         WLAN_OS_REPORT(("\n.....MLME SM configuration failure \n"));
   1651         return NOK;
   1652     }
   1653 
   1654     /* ASSOC module */
   1655     WLAN_OS_REPORT(("Initializing Assoc...\n"));
   1656     if (assoc_config (pConfigManager->hAssoc,
   1657                       pConfigManager->hMlmeSm,
   1658                       pConfigManager->hRegulatoryDomain,
   1659                       pConfigManager->hSiteMgr,
   1660                       pConfigManager->hCtrlData,
   1661                       pConfigManager->hTxData,
   1662                       pConfigManager->hHalCtrl,
   1663                       pConfigManager->hRsn,
   1664                       pConfigManager->hReport,
   1665                       pConfigManager->hOs,
   1666                       pConfigManager->hExcMngr,
   1667                       pConfigManager->hQosMngr,
   1668                       pConfigManager->hMeasurementMgr,
   1669                       pConfigManager->hAPConnection,
   1670                       &pConfigManager->pInitTable->assocInitParams) != OK)
   1671     {
   1672         WLAN_OS_REPORT(("\n.....ASSOC configuration failure \n"));
   1673         return NOK;
   1674     }
   1675 
   1676     /* Rx data module */
   1677     WLAN_OS_REPORT(("Initializing Rx Data...\n"));
   1678     if (rxData_config (pConfigManager->hRxData,
   1679                        pConfigManager->hCtrlData,
   1680                        pConfigManager->hTxData,
   1681                        pConfigManager->hTnetwDrv,
   1682                        pConfigManager->hHalCtrl,
   1683                        pConfigManager->hMlmeSm,
   1684                        pConfigManager->hRsn,
   1685                        pConfigManager->hSiteMgr,
   1686                        pConfigManager->hExcMngr,
   1687                        pConfigManager->hOs,
   1688                        pConfigManager->hReport,
   1689                        pConfigManager->hMemMgr,
   1690                        pConfigManager->hEvHandler,
   1691                        &pConfigManager->pInitTable->rxDataInitParams) != OK)
   1692     {
   1693         WLAN_OS_REPORT(("\n.....RX DATA configuration failure \n"));
   1694         return NOK;
   1695     }
   1696 
   1697     /* Tx data module */
   1698     WLAN_OS_REPORT(("Initializing Tx Data...\n"));
   1699     if (txData_config (pConfigManager->hTxData,
   1700                        pConfigManager->hCtrlData,
   1701                        pConfigManager->hTnetwDrv,
   1702                        pConfigManager->hHalCtrl,
   1703                        pConfigManager->hOs,
   1704                        pConfigManager->hReport,
   1705                        pConfigManager->hMemMgr,
   1706                        pConfigManager->hSiteMgr,
   1707                        pConfigManager->hEvHandler,
   1708                        pConfigManager->hQosMngr,
   1709                        pConfigManager->hPowerMgr) != OK)
   1710     {
   1711         WLAN_OS_REPORT(("\n.....TX DATA configuration failure \n"));
   1712         return NOK;
   1713     }
   1714 
   1715     /* Traffic data module */
   1716     WLAN_OS_REPORT(("Initializing Traffic Monitor...\n"));
   1717     if (TrafficMonitor_Init(pConfigManager->hTrafficMon,
   1718                             pConfigManager->hRxData,
   1719                             pConfigManager->hTxData) != OK)
   1720     {
   1721         WLAN_OS_REPORT(("\n..... TRAFFIC MONITOR  configuration failure \n"));
   1722         return NOK;
   1723     }
   1724 
   1725     /* Memory Manager module */
   1726     WLAN_OS_REPORT(("Initializing Memory Manager...\n"));
   1727     if (wlan_memMngrConfigure (pConfigManager->hMemMgr, pConfigManager->hOs, pConfigManager->hReport) != OK)
   1728     {
   1729         WLAN_OS_REPORT(("\n.....MEM MNGR configuration failure \n"));
   1730         return NOK;
   1731     }
   1732 
   1733     /* sme state machine module */
   1734     WLAN_OS_REPORT(("Initializing SME...\n"));
   1735     if (smeSm_config (pConfigManager->hSmeSm,
   1736                       pConfigManager->hConn,
   1737                       pConfigManager->hScanCncn,
   1738                       pConfigManager->hSiteMgr,
   1739                       pConfigManager->hHalCtrl,
   1740                       pConfigManager->hReport,
   1741                       pConfigManager->hOs,
   1742                       pConfigManager->hEvHandler,
   1743                       pConfigManager->hSCR,
   1744                       pConfigManager->hAPConnection,
   1745                       pConfigManager->hCurrBss,
   1746                       pConfigManager->hPowerMgr,
   1747                       pConfigManager->hRegulatoryDomain,
   1748                       &pConfigManager->pInitTable->smeInitParams) != OK)
   1749     {
   1750         WLAN_OS_REPORT(("\n.....Sme state machine configuration failure \n"));
   1751         return NOK;
   1752     }
   1753 
   1754     /* Rsn module */
   1755     WLAN_OS_REPORT(("Initializing RSN...\n"));
   1756     if (rsn_config (pConfigManager->hRsn,
   1757                     pConfigManager->hTxData,
   1758                     pConfigManager->hRxData,
   1759                     pConfigManager->hConn,
   1760                     pConfigManager->hMlmeSm,
   1761                     pConfigManager->hCtrlData,
   1762                     pConfigManager->hHalCtrl,
   1763                     pConfigManager->hMemMgr,
   1764                     pConfigManager->hSiteMgr,
   1765                     pConfigManager->hReport,
   1766                     pConfigManager->hOs,
   1767                     pConfigManager->hExcMngr,
   1768                     pConfigManager->hPowerMgr,
   1769                     pConfigManager->hEvHandler,
   1770                     pConfigManager->hSmeSm,
   1771                     pConfigManager->hAPConnection,
   1772                     &pConfigManager->pInitTable->rsnInitParams) != OK)
   1773     {
   1774         WLAN_OS_REPORT(("\n.....RSN configuration failure \n"));
   1775         return NOK;
   1776     }
   1777 
   1778     /* MeasurementMgr module */
   1779     /* Note: must be configured after RegulatoryDomain object coonfiguration */
   1780     WLAN_OS_REPORT(("Initializing Measurement Manager...\n"));
   1781     if (measurementMgr_config (pConfigManager->hMeasurementMgr,
   1782                                pConfigManager->hMacServices,
   1783                                pConfigManager->hRegulatoryDomain,
   1784                                pConfigManager->hExcMngr,
   1785                                pConfigManager->hSiteMgr,
   1786                                pConfigManager->hHalCtrl,
   1787                                pConfigManager->hMlmeSm,
   1788                                pConfigManager->hTrafficMon,
   1789                                pConfigManager->hReport,
   1790                                pConfigManager->hOs,
   1791                                pConfigManager->hSCR,
   1792                                pConfigManager->hHealthMonitor,
   1793                                pConfigManager->hAPConnection,
   1794                                pConfigManager->hTxData,
   1795                                &pConfigManager->pInitTable->measurementInitParams) != OK)
   1796     {
   1797         WLAN_OS_REPORT(("\n.....MeasurementMgr configuration failure \n"));
   1798         return NOK;
   1799     }
   1800 
   1801 #ifdef EXC_MODULE_INCLUDED
   1802 
   1803     WLAN_OS_REPORT(("Initializing EXC Manager...\n"));
   1804     if (excMngr_config (pConfigManager->hExcMngr,
   1805                         pConfigManager->hReport,
   1806                         pConfigManager->hOs,
   1807                         pConfigManager->hRsn,
   1808                         pConfigManager->hMemMgr,
   1809                         pConfigManager->hCtrlData,
   1810                         pConfigManager->hTxData,
   1811                         pConfigManager->hSiteMgr,
   1812                         pConfigManager->hAPConnection,
   1813                         pConfigManager->hEvHandler,
   1814                         (TI_HANDLE)pConfigManager,
   1815                         pConfigManager->hMeasurementMgr,
   1816                         pConfigManager->hQosMngr,
   1817                         &pConfigManager->pInitTable->excMngrParams) != OK)
   1818     {
   1819         WLAN_OS_REPORT(("\n.....excMngr_config configuration failure \n"));
   1820         return NOK;
   1821     }
   1822 
   1823 #endif
   1824     /* Scan manager */
   1825     WLAN_OS_REPORT(("Initializing Scan Manager...\n"));
   1826     scanMngr_init (pConfigManager->hScanMngr,
   1827                    pConfigManager->hReport,
   1828                    pConfigManager->hRegulatoryDomain,
   1829                    pConfigManager->hScanCncn,
   1830                    pConfigManager->hRoamingMngr,
   1831                    pConfigManager->hSiteMgr,
   1832                    pConfigManager->hHalCtrl);
   1833 
   1834 
   1835 
   1836     WLAN_OS_REPORT(("Initializing CurrBSS...\n"));
   1837     if (currBSS_init (pConfigManager->hCurrBss,
   1838                       pConfigManager->hMlmeSm,
   1839                       pConfigManager->hPowerMgr,
   1840                       pConfigManager->hAPConnection,
   1841                       pConfigManager->hSmeSm,
   1842                       pConfigManager->hHalCtrl,
   1843                       pConfigManager->hReport,
   1844                       pConfigManager->hMemMgr,
   1845                       pConfigManager->hTxData,
   1846                       pConfigManager->hSiteMgr,
   1847                       pConfigManager->hScanMngr,
   1848                       pConfigManager->hMacServices) != OK)
   1849     {
   1850         WLAN_OS_REPORT(("\n.....currBSS_init configuration failure \n"));
   1851         return NOK;
   1852     }
   1853 
   1854     WLAN_OS_REPORT(("Initializing AP Conn...\n"));
   1855     if (apConn_config (pConfigManager->hAPConnection,
   1856                        pConfigManager->hReport,
   1857                        pConfigManager->hCurrBss,
   1858                        pConfigManager->hRoamingMngr,
   1859                        pConfigManager->hSmeSm,
   1860                        pConfigManager->hSiteMgr,
   1861                        pConfigManager->hExcMngr,
   1862                        pConfigManager->hConn,
   1863                        pConfigManager->hRsn,
   1864                        pConfigManager->hQosMngr,
   1865                        pConfigManager->hCtrlData,
   1866                        pConfigManager->hEvHandler,
   1867                        pConfigManager->hSCR,
   1868                        pConfigManager->hAssoc,
   1869                        pConfigManager->hRegulatoryDomain,
   1870                        &pConfigManager->pInitTable->apConnParams) != OK)
   1871     {
   1872         WLAN_OS_REPORT(("\n.....apConn_config configuration failure \n"));
   1873         return NOK;
   1874     }
   1875 
   1876     WLAN_OS_REPORT(("Initializing Roaming Manager...\n"));
   1877     if (roamingMngr_init (pConfigManager->hRoamingMngr,
   1878                           pConfigManager->hReport,
   1879                           pConfigManager->hScanMngr,
   1880                           pConfigManager->hAPConnection) != OK)
   1881     {
   1882         WLAN_OS_REPORT(("\n.....roamingMngr_config configuration failure \n"));
   1883         return NOK;
   1884     }
   1885 
   1886     /* NOTE: must be after siteMgr & whalCtrl configurations !!!! */
   1887     WLAN_OS_REPORT(("Initializing QoS Manager...\n"));
   1888     if (qosMngr_config (pConfigManager->hQosMngr,
   1889                         pConfigManager->hHalCtrl,
   1890                         pConfigManager->hSiteMgr,
   1891                         pConfigManager->hReport,
   1892                         pConfigManager->hOs,
   1893                         pConfigManager->hTxData,
   1894                         pConfigManager->hMeasurementMgr,
   1895                         pConfigManager->hSmeSm,
   1896                         pConfigManager->hMemMgr,
   1897                         pConfigManager->hCtrlData,
   1898                         pConfigManager->hEvHandler,
   1899                         pConfigManager->hExcMngr,
   1900                         &pConfigManager->pInitTable->qosMngrInitParams) != OK)
   1901     {
   1902         WLAN_OS_REPORT(("\n.....Qos Mngr configuration failure \n"));
   1903         return NOK;
   1904     }
   1905 
   1906     WLAN_OS_REPORT(("Initializing Switch Channel...\n"));
   1907     if (switchChannel_config (pConfigManager->hSwitchChannel,
   1908                               pConfigManager->hHalCtrl,
   1909                               pConfigManager->hSiteMgr,
   1910                               pConfigManager->hSCR,
   1911                               pConfigManager->hRegulatoryDomain,
   1912                               pConfigManager->hAPConnection,
   1913                               pConfigManager->hReport,
   1914                               pConfigManager->hOs,
   1915                               pConfigManager->hHealthMonitor,
   1916                               &pConfigManager->pInitTable->SwitchChannelInitParams) != OK)
   1917     {
   1918         WLAN_OS_REPORT(("\n.....SwitchChannel_config configuration failure \n"));
   1919         return NOK;
   1920     }
   1921 
   1922     WLAN_OS_REPORT(("Initializing Health Monitor...\n"));
   1923     if (healthMonitor_config (pConfigManager->hHealthMonitor,
   1924                               pConfigManager->hReport,
   1925                               pConfigManager->hHalCtrl,
   1926                               pConfigManager->hSiteMgr,
   1927                               pConfigManager->hSCR,
   1928                               pConfigManager->hSoftGemini,
   1929                               pConfigManager->hTnetwDrv,
   1930                               pConfigManager->hMemMgr,
   1931                               (TI_HANDLE)pConfigManager,
   1932                               pConfigManager->hTxData,
   1933                               pConfigManager->hCurrBss,
   1934                               pConfigManager->hRsn,
   1935                               &pConfigManager->pInitTable->healthMonitorInitParams,
   1936                               pConfigManager->hRecoveryMgr) != OK)
   1937     {
   1938         WLAN_OS_REPORT(("\n.....healthMonitor_config configuration failure \n"));
   1939         return NOK;
   1940     }
   1941 
   1942     WLAN_OS_REPORT(("Initializing Power Manager...\n"));
   1943     if (PowerMgr_init (pConfigManager->hPowerMgr,
   1944                        pConfigManager->hMacServices,
   1945                        pConfigManager->hReport,
   1946                        pConfigManager->hSiteMgr,
   1947                        pConfigManager->hHalCtrl,
   1948                        pConfigManager->hTrafficMon,
   1949                        pConfigManager->hSoftGemini,
   1950                        &pConfigManager->pInitTable->PowerMgrInitParams) != OK)
   1951     {
   1952         WLAN_OS_REPORT(("\n.....PowerMgr_init configuration failure \n"));
   1953         return NOK;
   1954     }
   1955 
   1956     WLAN_OS_REPORT(("Initializing Recovery Mgr...\n"));
   1957     if (recoveryMgr_config(pConfigManager->hRecoveryMgr,
   1958                            pConfigManager->hReport,
   1959                            pConfigManager->hTxData,
   1960                            pConfigManager->hTnetwDrv,
   1961                            pConfigManager->hSCR,
   1962                            pConfigManager->hCurrBss,
   1963                            pConfigManager->hPowerMgr,
   1964                            pConfigManager->hHealthMonitor,
   1965 						   pConfigManager->hSoftGemini) != OK)
   1966     {
   1967         WLAN_OS_REPORT(("\n.....RecoveryMgr configuration failure \n"));
   1968         return NOK;
   1969     }
   1970 
   1971 	/* This must be called before calling SoftGemini_config, as the SG may trigger events from FW
   1972 		which are enabled in this fucntion */
   1973 	whalCtrl_exitFromInitModePart1(pConfigManager->hHalCtrl);
   1974 
   1975     /* Soft Gemini module , should be configured after all the modules it uses */
   1976     WLAN_OS_REPORT(("Initializing Soft Gemini...\n"));
   1977     if (SoftGemini_config (pConfigManager->hSoftGemini,
   1978                            pConfigManager->hCtrlData,
   1979                            pConfigManager->hHalCtrl,
   1980                            pConfigManager->hReport,
   1981                            pConfigManager->hSCR,
   1982                            pConfigManager->hPowerMgr,
   1983                            (TI_HANDLE)pConfigManager,
   1984                            pConfigManager->hScanCncn,
   1985                            pConfigManager->hCurrBss,
   1986                            pConfigManager->hEvHandler,
   1987                            &pConfigManager->pInitTable->SoftGeminiInitParams) != OK)
   1988     {
   1989         WLAN_OS_REPORT(("\n.....SoftGemini configuration failure \n"));
   1990         return NOK;
   1991     }
   1992 
   1993     /* Notify the power authorization so the first min power level will be sent to the FW */
   1994        /* This will update the FW Power Level according to the defaultPowerLevel configured in Registry */
   1995     MacServices_powerAutho_ExitFromInit(pConfigManager->hMacServices);
   1996 
   1997     /*
   1998     *  Exit from init mode should be before smeSM starts. this enable us to send
   1999     *  command to the MboxQueue(that store the command) while the interrupts are masked.
   2000     *  the interrupt would be enable at the end of the init process.
   2001     */
   2002 	whalCtrl_exitFromInitModePart2(pConfigManager->hHalCtrl);
   2003 
   2004     WLAN_OS_REPORT(("Finished initializing modules.\n"));
   2005 
   2006     WLAN_REPORT_INIT(pConfigManager->hReport, CONFIG_MGR_MODULE_LOG,
   2007         ("EXIT FROM INIT\n"));
   2008 
   2009     return OK;
   2010 }
   2011 
   2012 
   2013 /*
   2014  * configMgr_RetrieveFWInfo:
   2015  * Retrieve FW information from HAL which the SNWSASettings returned
   2016  * by GWSI_Configure does not contained
   2017  */
   2018 static  void configMgr_RetrieveFWInfo(configMgr_t *pConfigManager, initTable_t *pInitTable, whalCtrl_chip_t *pChip_Version)
   2019 {
   2020     /*
   2021      * Retrieve FW information from HAL
   2022      */
   2023     whalCtrl_GetFWInfo(pConfigManager->hHalCtrl, pChip_Version);
   2024 
   2025     /*
   2026      * Update complete the init table update
   2027      * with the chip information received from the HAL
   2028      */
   2029     os_memoryCopy(pConfigManager->hOs, (void *)pInitTable->ctrlDataInitParams.ctrlDataDeviceMacAddress.addr, (void *)pChip_Version->macAddress.addr, MAC_ADDR_LEN);
   2030     os_memoryCopy(pConfigManager->hOs, pInitTable->siteMgrInitParams.siteMgrFwVersion, pChip_Version->fwVer, FW_VERSION_LEN);
   2031     os_memoryCopy(pConfigManager->hOs, &(pInitTable->siteMgrInitParams.siteMgrEEpromVersion), &(pChip_Version->e2Ver), sizeof(e2Version_t));
   2032     pInitTable->siteMgrInitParams.siteMgrRadioValues.siteMgr_radioType = pChip_Version->radioType;
   2033 }
   2034 
   2035 
   2036 /****************************************************************************************
   2037  *                        configMgr_GetInitParams                                                *
   2038  ****************************************************************************************
   2039 DESCRIPTION:    Retreive init table
   2040 
   2041 INPUT:          pConfigManager     - driver main handle
   2042 
   2043 OUTPUT:         ioBuffer           - init table
   2044                 outBufLen          - init table length
   2045 
   2046 RETURN:         none
   2047 
   2048 ************************************************************************/
   2049 void configMgr_GetInitParams (TI_HANDLE hConfigManager, UINT8* ioBuffer, UINT16 *outBufLen)
   2050 {
   2051     configMgr_t *pConfigManager = (configMgr_t *)hConfigManager;
   2052 
   2053     TnetwDrv_GetInitParams (pConfigManager->hTnetwDrv, ioBuffer, outBufLen);
   2054 }
   2055 
   2056 
   2057 /****************************************************************************************
   2058  *                        release_module                                                *
   2059  ****************************************************************************************
   2060 DESCRIPTION:    Driver free function. Performs the following:
   2061                 -   Go over the vector, for each bit that is set, release the corresponding module.
   2062 
   2063 INPUT:          pConfigManager     -    Driver main handle
   2064                 initVec         -       Vector that contains the bits of the modules which have to be free
   2065 
   2066 
   2067 OUTPUT:
   2068 
   2069 RETURN:         OK on success, NOK on failure
   2070 
   2071 ************************************************************************/
   2072 static void release_module(configMgr_t *pConfigManager)
   2073 {
   2074     if (pConfigManager->hScanMngr != NULL)
   2075     {
   2076         scanMngr_unload( pConfigManager->hScanMngr);
   2077     }
   2078 
   2079     if (pConfigManager->hSiteMgr != NULL)
   2080     {
   2081         siteMgr_unLoad(pConfigManager->hSiteMgr);
   2082     }
   2083 
   2084     if (pConfigManager->hSmeSm != NULL)
   2085     {
   2086         smeSm_unLoad(pConfigManager->hSmeSm);
   2087     }
   2088 
   2089     if (pConfigManager->hConn != NULL)
   2090     {
   2091         conn_unLoad(pConfigManager->hConn);
   2092     }
   2093 
   2094     if (pConfigManager->hTnetwDrv != NULL)
   2095     {
   2096         TnetwDrv_Destroy(pConfigManager->hTnetwDrv);
   2097     }
   2098 
   2099     if (pConfigManager->hScanCncn != NULL)
   2100     {
   2101         scanConcentrator_release(pConfigManager->hScanCncn);
   2102     }
   2103 
   2104     if (pConfigManager->hTrafficMon != NULL)
   2105     {
   2106         TrafficMonitor_Destroy(pConfigManager->hTrafficMon);
   2107     }
   2108 
   2109     if (pConfigManager->hCtrlData != NULL)
   2110     {
   2111         ctrlData_unLoad(pConfigManager->hCtrlData);
   2112     }
   2113 
   2114     if (pConfigManager->hTxData != NULL)
   2115     {
   2116         txData_unLoad(pConfigManager->hTxData);
   2117     }
   2118 
   2119     if (pConfigManager->hRxData != NULL)
   2120     {
   2121         rxData_unLoad(pConfigManager->hRxData);
   2122     }
   2123 
   2124     if (pConfigManager->hAssoc != NULL)
   2125     {
   2126         assoc_unload(pConfigManager->hAssoc);
   2127     }
   2128 
   2129     if (pConfigManager->hAuth != NULL)
   2130     {
   2131         auth_unload(pConfigManager->hAuth);
   2132     }
   2133 
   2134     if (pConfigManager->hMlmeSm != NULL)
   2135     {
   2136         mlme_unload(pConfigManager->hMlmeSm);
   2137     }
   2138 
   2139     if (pConfigManager->hSCR != NULL)
   2140     {
   2141         scr_release(pConfigManager->hSCR);
   2142     }
   2143 
   2144     if (pConfigManager->hEvHandler != NULL)
   2145     {
   2146          EvHandlerUnload(pConfigManager->hEvHandler);
   2147     }
   2148 
   2149     if (pConfigManager->hMemMgr != NULL)
   2150     {
   2151         wlan_memMngrDestroy(pConfigManager->hMemMgr);
   2152     }
   2153 
   2154     if (pConfigManager->hRsn != NULL)
   2155     {
   2156         rsn_unload(pConfigManager->hRsn);
   2157     }
   2158 
   2159     if (pConfigManager->hRegulatoryDomain != NULL)
   2160     {
   2161         regulatoryDomain_destroy(pConfigManager->hRegulatoryDomain);
   2162     }
   2163 
   2164     if (pConfigManager->hMeasurementMgr != NULL)
   2165     {
   2166         measurementMgr_destroy(pConfigManager->hMeasurementMgr);
   2167     }
   2168 
   2169     if (pConfigManager->hSoftGemini != NULL)
   2170     {
   2171         SoftGemini_destroy(pConfigManager->hSoftGemini);
   2172     }
   2173 
   2174 #ifdef EXC_MODULE_INCLUDED
   2175     if (pConfigManager->hExcMngr != NULL)
   2176     {
   2177         excMngr_unload(pConfigManager->hExcMngr);
   2178     }
   2179 #endif
   2180 
   2181     if (pConfigManager->hRoamingMngr != NULL)
   2182     {
   2183         roamingMngr_unload(pConfigManager->hRoamingMngr);
   2184     }
   2185 
   2186     if (pConfigManager->hQosMngr != NULL)
   2187     {
   2188         qosMngr_destroy(pConfigManager->hQosMngr);
   2189     }
   2190 
   2191     if (pConfigManager->hPowerMgr != NULL)
   2192     {
   2193         PowerMgr_destroy(pConfigManager->hPowerMgr);
   2194     }
   2195 
   2196     if (pConfigManager->hAPConnection != NULL)
   2197     {
   2198         apConn_unload(pConfigManager->hAPConnection);
   2199     }
   2200 
   2201     if (pConfigManager->hCurrBss != NULL)
   2202     {
   2203         currBSS_unload(pConfigManager->hCurrBss);
   2204     }
   2205 
   2206     if (pConfigManager->hSwitchChannel != NULL)
   2207     {
   2208         switchChannel_unload(pConfigManager->hSwitchChannel);
   2209     }
   2210 
   2211     if (pConfigManager->hHealthMonitor != NULL)
   2212     {
   2213         healthMonitor_unload(pConfigManager->hHealthMonitor);
   2214     }
   2215 
   2216     if (pConfigManager->hRecoveryMgr != NULL)
   2217     {
   2218         recoveryMgr_destroy(pConfigManager->hRecoveryMgr);
   2219     }
   2220 
   2221     if (pConfigManager->hReport != NULL)
   2222     {
   2223         report_unLoad(pConfigManager->hReport);
   2224     }
   2225 
   2226     /***************************************************************
   2227     This is the config manager, it should be always the last module
   2228     to release
   2229     ****************************************************************/
   2230 
   2231     utils_nullMemoryFree(pConfigManager->hOs, pConfigManager, sizeof(configMgr_t));
   2232 }
   2233 
   2234 /****************************************************************************************
   2235  *                        configParamsAccessTable                                       *
   2236  ****************************************************************************************
   2237 DESCRIPTION:    Called in the configuration phase by the driver, performs the following:
   2238                 -   For each module that supply a Get/Set services to his parameters, fill the corresponding entry
   2239                     in the params access table with the following:
   2240                         -   Get function
   2241                         -   Set function
   2242                         -   Handle to the module
   2243                 This table is used when Getting/Setting a parameter from the OS abstraction layer.
   2244 
   2245 INPUT:          pConfigManager     -    Driver main handle
   2246 
   2247 OUTPUT:
   2248 
   2249 RETURN:         OK on success, NOK on failure
   2250 
   2251 ************************************************************************/
   2252 static void configParamsAccessTable(configMgr_t *pConfigManager)
   2253 {
   2254     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(AUTH_MODULE_PARAM) - 1].set = auth_setParam;
   2255     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(AUTH_MODULE_PARAM) - 1].get = auth_getParam;
   2256     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(AUTH_MODULE_PARAM) - 1].handle = pConfigManager->hAuth;
   2257 
   2258     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(ASSOC_MODULE_PARAM) - 1].set = assoc_setParam;
   2259     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(ASSOC_MODULE_PARAM) - 1].get = assoc_getParam;
   2260     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(ASSOC_MODULE_PARAM) - 1].handle = pConfigManager->hAssoc;
   2261 
   2262     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(RX_DATA_MODULE_PARAM) - 1].set = rxData_setParam;
   2263     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(RX_DATA_MODULE_PARAM) - 1].get = rxData_getParam;
   2264     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(RX_DATA_MODULE_PARAM) - 1].handle = pConfigManager->hRxData;
   2265 
   2266     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(TX_DATA_MODULE_PARAM) - 1].set = txData_setParam;
   2267     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(TX_DATA_MODULE_PARAM) - 1].get = txData_getParam;
   2268     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(TX_DATA_MODULE_PARAM) - 1].handle = pConfigManager->hTxData;
   2269 
   2270     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(CTRL_DATA_MODULE_PARAM) - 1].set = ctrlData_setParam;
   2271     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(CTRL_DATA_MODULE_PARAM) - 1].get = ctrlData_getParam;
   2272     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(CTRL_DATA_MODULE_PARAM) - 1].handle = pConfigManager->hCtrlData;
   2273 
   2274     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SITE_MGR_MODULE_PARAM) - 1].set = siteMgr_setParam;
   2275     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SITE_MGR_MODULE_PARAM) - 1].get = siteMgr_getParam;
   2276     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SITE_MGR_MODULE_PARAM) - 1].handle = pConfigManager->hSiteMgr;
   2277 
   2278     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(CONN_MODULE_PARAM) - 1].set = conn_setParam;
   2279     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(CONN_MODULE_PARAM) - 1].get = conn_getParam;
   2280     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(CONN_MODULE_PARAM) - 1].handle = pConfigManager->hConn;
   2281 
   2282     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(RSN_MODULE_PARAM) - 1].set = rsn_setParam;
   2283     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(RSN_MODULE_PARAM) - 1].get = rsn_getParam;
   2284     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(RSN_MODULE_PARAM) - 1].handle= pConfigManager->hRsn;
   2285 
   2286     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(HAL_CTRL_MODULE_PARAM) - 1].set = (paramFunc_t)whalCtrl_SetParam;
   2287     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(HAL_CTRL_MODULE_PARAM) - 1].get = (paramFunc_t)whalCtrl_GetParam;
   2288     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(HAL_CTRL_MODULE_PARAM) - 1].handle = pConfigManager->hHalCtrl;
   2289 
   2290     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(REPORT_MODULE_PARAM) - 1].set = (paramFunc_t)report_setParam;
   2291     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(REPORT_MODULE_PARAM) - 1].get = (paramFunc_t)report_getParam;
   2292     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(REPORT_MODULE_PARAM) - 1].handle = pConfigManager->hReport;
   2293 
   2294     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SME_SM_MODULE_PARAM) - 1].set = smeSm_setParam;
   2295     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SME_SM_MODULE_PARAM) - 1].get = smeSm_getParam;
   2296     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SME_SM_MODULE_PARAM) - 1].handle = pConfigManager->hSmeSm;
   2297 
   2298     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_CNCN_PARAM) - 1].set = scanConcentrator_setParam;
   2299     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_CNCN_PARAM) - 1].get = scanConcentrator_getParam;
   2300     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_CNCN_PARAM) - 1].handle = pConfigManager->hScanCncn;
   2301 
   2302     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_MNGR_PARAM) - 1].set = scanMngr_setParam;
   2303     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_MNGR_PARAM) - 1].get = scanMngr_getParam;
   2304     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SCAN_MNGR_PARAM) - 1].handle = pConfigManager->hScanMngr;
   2305 
   2306     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(MLME_SM_MODULE_PARAM) - 1].set = mlme_setParam;
   2307     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(MLME_SM_MODULE_PARAM) - 1].get = mlme_getParam;
   2308     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(MLME_SM_MODULE_PARAM) - 1].handle = pConfigManager->hMlmeSm;
   2309 
   2310     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(REGULATORY_DOMAIN_MODULE_PARAM) - 1].set = regulatoryDomain_setParam;
   2311     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(REGULATORY_DOMAIN_MODULE_PARAM) - 1].get = regulatoryDomain_getParam;
   2312     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(REGULATORY_DOMAIN_MODULE_PARAM) - 1].handle = pConfigManager->hRegulatoryDomain;
   2313 
   2314     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(MEASUREMENT_MODULE_PARAM) - 1].set = measurementMgr_setParam;
   2315     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(MEASUREMENT_MODULE_PARAM) - 1].get = measurementMgr_getParam;
   2316     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(MEASUREMENT_MODULE_PARAM) - 1].handle = pConfigManager->hMeasurementMgr;
   2317 
   2318 #ifdef EXC_MODULE_INCLUDED
   2319     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(EXC_MANAGER_MODULE_PARAM) - 1].set = excMngr_setParam;
   2320     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(EXC_MANAGER_MODULE_PARAM) - 1].get = excMngr_getParam;
   2321     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(EXC_MANAGER_MODULE_PARAM) - 1].handle = pConfigManager->hExcMngr;
   2322 #endif
   2323 
   2324     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(ROAMING_MANAGER_MODULE_PARAM) - 1].set = roamingMngr_setParam;
   2325     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(ROAMING_MANAGER_MODULE_PARAM) - 1].get = roamingMngr_getParam;
   2326     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(ROAMING_MANAGER_MODULE_PARAM) - 1].handle = pConfigManager->hRoamingMngr;
   2327 
   2328     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SOFT_GEMINI_PARAM) - 1].set = SoftGemini_setParam;
   2329     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SOFT_GEMINI_PARAM) - 1].get = SoftGemini_getParam;
   2330     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(SOFT_GEMINI_PARAM) - 1].handle = pConfigManager->hSoftGemini;
   2331 
   2332     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(QOS_MANAGER_PARAM) - 1].set = qosMngr_setParams;
   2333     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(QOS_MANAGER_PARAM) - 1].get = qosMngr_getParams;
   2334     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(QOS_MANAGER_PARAM) - 1].handle = pConfigManager->hQosMngr;
   2335 
   2336     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(POWER_MANAGER_PARAM) - 1].set = powerMgr_setParam;
   2337     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(POWER_MANAGER_PARAM) - 1].get = powerMgr_getParam;
   2338     pConfigManager->paramAccessTable[GET_PARAM_MODULE_NUMBER(POWER_MANAGER_PARAM) - 1].handle = pConfigManager->hPowerMgr;
   2339 }
   2340 
   2341