Home | History | Annotate | Download | only in inc
      1 /*
      2  * WlanDrvCommon.h
      3  *
      4  * Copyright(c) 1998 - 2009 Texas Instruments. All rights reserved.
      5  * All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  *
     11  *  * Redistributions of source code must retain the above copyright
     12  *    notice, this list of conditions and the following disclaimer.
     13  *  * Redistributions in binary form must reproduce the above copyright
     14  *    notice, this list of conditions and the following disclaimer in
     15  *    the documentation and/or other materials provided with the
     16  *    distribution.
     17  *  * Neither the name Texas Instruments nor the names of its
     18  *    contributors may be used to endorse or promote products derived
     19  *    from this software without specific prior written permission.
     20  *
     21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
     24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
     25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
     26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
     27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
     31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  */
     33 
     34 
     35 
     36 /** \file   WlanDrvCommon.h
     37  *  \brief  Defines WlanDrvIf objects common to all OS types.
     38  *
     39  *  \see    WlanDrvIf.h
     40  */
     41 
     42 #ifndef __WLAN_DRV_COMMON_H__
     43 #define __WLAN_DRV_COMMON_H__
     44 
     45 
     46 #include "tidef.h"
     47 #include "TWDriver.h"
     48 
     49 #define DRV_ADDRESS_SIZE					(sizeof(TI_INT32))
     50 #define MAX_CHUNKS_IN_FILE					(1000)
     51 #define OS_SPECIFIC_RAM_ALLOC_LIMIT			(0xFFFFFFFF)	/* assume OS never reach that limit */
     52 
     53 /* Driver steady states - for driver external users */
     54 typedef enum
     55 {
     56     DRV_STATE_IDLE,
     57     DRV_STATE_RUNNING,
     58     DRV_STATE_STOPING,
     59     DRV_STATE_STOPPED,
     60     DRV_STATE_FAILED
     61 } EDriverSteadyState;
     62 
     63 
     64 /* The driver Start/Stop actions */
     65 typedef enum
     66 {
     67     ACTION_TYPE_NONE,
     68     ACTION_TYPE_START,
     69     ACTION_TYPE_STOP
     70 } EActionType;
     71 
     72 /* Initialization file info */
     73 typedef struct
     74 {
     75     void            *pImage;
     76     unsigned long    uSize;
     77 } TInitImageInfo;
     78 
     79 /* WlanDrvIf object common part (included by TWlanDrvIfObj from each OS abstraction layer) */
     80 typedef struct
     81 {
     82     /* Other modules handles */
     83     void               *hDrvMain;
     84     void               *hCmdHndlr;
     85     void               *hContext;
     86     void               *hTxDataQ;
     87     void               *hTxMgmtQ;
     88     void               *hTxCtrl;
     89     void               *hTWD;
     90     void               *hEvHandler;
     91     void               *hReport;
     92     void               *hCmdDispatch;
     93 
     94     /* Initialization files info */
     95     TInitImageInfo      tIniFile;
     96     TInitImageInfo      tNvsImage;
     97     TInitImageInfo      tFwImage;
     98 
     99     EDriverSteadyState  eDriverState;   /* The driver state as presented to the OS */
    100     TI_UINT32           uLinkSpeed;
    101 
    102 } TWlanDrvIfCommon;
    103 
    104 
    105 /* The loader files interface */
    106 typedef struct
    107 {
    108   TI_UINT32 uNvsFileLength;
    109   TI_UINT32 uFwFileLength;
    110   TI_UINT32 uIniFileLength;
    111   char data[1];
    112   /* eeprom image follows   */
    113   /* firmware image follows */
    114   /* init file follows      */
    115 } TLoaderFilesData;
    116 
    117 
    118 
    119 #endif /* __WLAN_DRV_COMMON_H__ */
    120