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