Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 1 | /* |
Kiet Lam | aa8e15a | 2014-02-11 23:30:06 -0800 | [diff] [blame^] | 2 | * Copyright (c) 2012-2013 Qualcomm Atheros, Inc. |
| 3 | * All Rights Reserved. |
| 4 | * Qualcomm Atheros Confidential and Proprietary. |
Gopichand Nakkala | 92f07d8 | 2013-01-08 21:16:34 -0800 | [diff] [blame] | 5 | */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 6 | #if !defined( __SMEINTERNAL_H ) |
| 7 | #define __SMEINTERNAL_H |
| 8 | |
| 9 | |
| 10 | /**========================================================================= |
| 11 | |
| 12 | \file smeInternal.h |
| 13 | |
| 14 | \brief prototype for SME internal structures and APIs used for SME and MAC |
| 15 | |
| 16 | Copyright 2008 (c) Qualcomm, Incorporated. All Rights Reserved. |
| 17 | |
| 18 | Qualcomm Confidential and Proprietary. |
| 19 | |
| 20 | ========================================================================*/ |
| 21 | |
| 22 | /* $Header$ */ |
| 23 | |
| 24 | /*-------------------------------------------------------------------------- |
| 25 | Include Files |
| 26 | ------------------------------------------------------------------------*/ |
| 27 | #include "vos_status.h" |
| 28 | #include "vos_lock.h" |
| 29 | #include "vos_trace.h" |
| 30 | #include "vos_memory.h" |
| 31 | #include "vos_types.h" |
| 32 | #include "csrLinkList.h" |
| 33 | |
| 34 | /*-------------------------------------------------------------------------- |
| 35 | Type declarations |
| 36 | ------------------------------------------------------------------------*/ |
| 37 | |
| 38 | // Mask can be only have one bit set |
| 39 | typedef enum eSmeCommandType |
| 40 | { |
| 41 | eSmeNoCommand = 0, |
| 42 | eSmeDropCommand, |
| 43 | //CSR |
| 44 | eSmeCsrCommandMask = 0x10000, //this is not a command, it is to identify this is a CSR command |
| 45 | eSmeCommandScan, |
| 46 | eSmeCommandRoam, |
| 47 | eSmeCommandWmStatusChange, |
| 48 | eSmeCommandSetKey, |
| 49 | eSmeCommandRemoveKey, |
| 50 | eSmeCommandAddStaSession, |
| 51 | eSmeCommandDelStaSession, |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 52 | #ifdef FEATURE_WLAN_TDLS |
| 53 | //eSmeTdlsCommandMask = 0x80000, //To identify TDLS commands <TODO> |
| 54 | //These can be considered as csr commands. |
| 55 | eSmeCommandTdlsSendMgmt, |
| 56 | eSmeCommandTdlsAddPeer, |
| 57 | eSmeCommandTdlsDelPeer, |
Gopichand Nakkala | 79ff85d | 2013-05-27 17:05:29 +0530 | [diff] [blame] | 58 | eSmeCommandTdlsLinkEstablish, |
Mohit Khanna | 698ba2a | 2012-12-04 15:08:18 -0800 | [diff] [blame] | 59 | #ifdef FEATURE_WLAN_TDLS_INTERNAL |
| 60 | eSmeCommandTdlsDiscovery, |
| 61 | eSmeCommandTdlsLinkSetup, |
| 62 | eSmeCommandTdlsLinkTear, |
| 63 | eSmeCommandTdlsEnterUapsd, |
| 64 | eSmeCommandTdlsExitUapsd, |
| 65 | #endif |
| 66 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 67 | //PMC |
| 68 | eSmePmcCommandMask = 0x20000, //To identify PMC commands |
| 69 | eSmeCommandEnterImps, |
| 70 | eSmeCommandExitImps, |
| 71 | eSmeCommandEnterBmps, |
| 72 | eSmeCommandExitBmps, |
| 73 | eSmeCommandEnterUapsd, |
| 74 | eSmeCommandExitUapsd, |
| 75 | eSmeCommandEnterWowl, |
| 76 | eSmeCommandExitWowl, |
| 77 | eSmeCommandEnterStandby, |
| 78 | //QOS |
| 79 | eSmeQosCommandMask = 0x40000, //To identify Qos commands |
| 80 | eSmeCommandAddTs, |
| 81 | eSmeCommandDelTs, |
Jeff Johnson | e724574 | 2012-09-05 17:12:55 -0700 | [diff] [blame] | 82 | #ifdef FEATURE_OEM_DATA_SUPPORT |
| 83 | eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands |
| 84 | #endif |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 85 | eSmeCommandRemainOnChannel, |
| 86 | eSmeCommandNoAUpdate, |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 87 | } eSmeCommandType; |
| 88 | |
| 89 | |
| 90 | typedef enum eSmeState |
| 91 | { |
| 92 | SME_STATE_STOP, |
| 93 | SME_STATE_START, |
| 94 | SME_STATE_READY, |
| 95 | } eSmeState; |
| 96 | |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 97 | #define SME_IS_START(pMac) (SME_STATE_STOP != (pMac)->sme.state) |
| 98 | #define SME_IS_READY(pMac) (SME_STATE_READY == (pMac)->sme.state) |
| 99 | |
| 100 | |
| 101 | typedef struct tagSmeStruct |
| 102 | { |
| 103 | eSmeState state; |
| 104 | vos_lock_t lkSmeGlobalLock; |
| 105 | tANI_U32 totalSmeCmd; |
| 106 | void *pSmeCmdBufAddr; |
| 107 | tDblLinkList smeCmdActiveList; |
| 108 | tDblLinkList smeCmdPendingList; |
| 109 | tDblLinkList smeCmdFreeList; //preallocated roam cmd list |
| 110 | void (*pTxPerHitCallback) (void *pCallbackContext); /* callback for Tx PER hit to HDD */ |
| 111 | void *pTxPerHitCbContext; |
Kiran Kumar Lokere | 0ad5cd3 | 2013-06-25 11:26:22 -0700 | [diff] [blame] | 112 | tVOS_CON_MODE currDeviceMode; |
Leo Chang | 9056f46 | 2013-08-01 19:21:11 -0700 | [diff] [blame] | 113 | #ifdef FEATURE_WLAN_LPHB |
Leo Chang | d9df8aa | 2013-09-26 13:32:26 -0700 | [diff] [blame] | 114 | void (*pLphbIndCb) (void *pAdapter, void *indParam); |
Leo Chang | 9056f46 | 2013-08-01 19:21:11 -0700 | [diff] [blame] | 115 | #endif /* FEATURE_WLAN_LPHB */ |
Madan Mohan Koyyalamudi | e1a64b4 | 2013-06-19 16:34:44 +0530 | [diff] [blame] | 116 | //pending scan command list |
| 117 | tDblLinkList smeScanCmdPendingList; |
| 118 | //active scan command list |
| 119 | tDblLinkList smeScanCmdActiveList; |
Leo Chang | 0b0e45a | 2013-12-15 15:18:55 -0800 | [diff] [blame] | 120 | #ifdef FEATURE_WLAN_CH_AVOID |
| 121 | void (*pChAvoidNotificationCb) (void *pAdapter, void *indParam); |
| 122 | #endif /* FEATURE_WLAN_CH_AVOID */ |
Jeff Johnson | 295189b | 2012-06-20 16:38:30 -0700 | [diff] [blame] | 123 | } tSmeStruct, *tpSmeStruct; |
| 124 | |
| 125 | |
| 126 | #endif //#if !defined( __SMEINTERNAL_H ) |