blob: 72f673e94c87c80557c1aaa36edda251559a79e5 [file] [log] [blame]
Jeff Johnson295189b2012-06-20 16:38:30 -07001/*
Kiet Lamaa8e15a2014-02-11 23:30:06 -08002 * Copyright (c) 2012-2013 Qualcomm Atheros, Inc.
3 * All Rights Reserved.
4 * Qualcomm Atheros Confidential and Proprietary.
Gopichand Nakkala92f07d82013-01-08 21:16:34 -08005 */
Jeff Johnson295189b2012-06-20 16:38:30 -07006#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
39typedef 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 Khanna698ba2a2012-12-04 15:08:18 -080052#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 Nakkala79ff85d2013-05-27 17:05:29 +053058 eSmeCommandTdlsLinkEstablish,
Mohit Khanna698ba2a2012-12-04 15:08:18 -080059#ifdef FEATURE_WLAN_TDLS_INTERNAL
60 eSmeCommandTdlsDiscovery,
61 eSmeCommandTdlsLinkSetup,
62 eSmeCommandTdlsLinkTear,
63 eSmeCommandTdlsEnterUapsd,
64 eSmeCommandTdlsExitUapsd,
65#endif
66#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070067 //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 Johnsone7245742012-09-05 17:12:55 -070082#ifdef FEATURE_OEM_DATA_SUPPORT
83 eSmeCommandOemDataReq = 0x80000, //To identify the oem data commands
84#endif
Jeff Johnson295189b2012-06-20 16:38:30 -070085 eSmeCommandRemainOnChannel,
86 eSmeCommandNoAUpdate,
Jeff Johnson295189b2012-06-20 16:38:30 -070087} eSmeCommandType;
88
89
90typedef enum eSmeState
91{
92 SME_STATE_STOP,
93 SME_STATE_START,
94 SME_STATE_READY,
95} eSmeState;
96
Jeff Johnson295189b2012-06-20 16:38:30 -070097#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
101typedef 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 Lokere0ad5cd32013-06-25 11:26:22 -0700112 tVOS_CON_MODE currDeviceMode;
Leo Chang9056f462013-08-01 19:21:11 -0700113#ifdef FEATURE_WLAN_LPHB
Leo Changd9df8aa2013-09-26 13:32:26 -0700114 void (*pLphbIndCb) (void *pAdapter, void *indParam);
Leo Chang9056f462013-08-01 19:21:11 -0700115#endif /* FEATURE_WLAN_LPHB */
Madan Mohan Koyyalamudie1a64b42013-06-19 16:34:44 +0530116 //pending scan command list
117 tDblLinkList smeScanCmdPendingList;
118 //active scan command list
119 tDblLinkList smeScanCmdActiveList;
Leo Chang0b0e45a2013-12-15 15:18:55 -0800120#ifdef FEATURE_WLAN_CH_AVOID
121 void (*pChAvoidNotificationCb) (void *pAdapter, void *indParam);
122#endif /* FEATURE_WLAN_CH_AVOID */
Jeff Johnson295189b2012-06-20 16:38:30 -0700123} tSmeStruct, *tpSmeStruct;
124
125
126#endif //#if !defined( __SMEINTERNAL_H )