Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
csr_wifi_vif_utils.h
Go to the documentation of this file.
1 /*****************************************************************************
2 
3  (c) Cambridge Silicon Radio Limited 2011
4  All rights reserved and confidential information of CSR
5 
6  Refer to LICENSE.txt included with this source for details
7  on the license terms.
8 
9 *****************************************************************************/
10 
11 #ifndef CSR_WIFI_VIF_UTILS_H
12 #define CSR_WIFI_VIF_UTILS_H
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 /* STANDARD INCLUDES ********************************************************/
19 
20 /* PROJECT INCLUDES *********************************************************/
21 /* including this file for CsrWifiInterfaceMode*/
23 
24 /* MACROS *******************************************************************/
25 
26 /* Common macros for NME and SME to be used temporarily until SoftMAC changes are made */
27 #define CSR_WIFI_NUM_INTERFACES (u8)0x1
28 #define CSR_WIFI_INTERFACE_IN_USE (u16)0x0
29 
30 /* This is used at places where interface Id isn't available*/
31 #define CSR_WIFI_INTERFACE_ZERO 0
32 #define CSR_WIFI_INTERFACE_STA 0
33 #define CSR_WIFI_INTERFACE_AMP 0
34 
35 
36 #define CSR_WIFI_VIF_UTILS_UNDEFINED_TAG 0xFFFF
37 
38 /* Extract the Interface Id from the event */
39 #define CsrWifiVifUtilsGetVifTagFromEvent(msg) \
40  ((u16) * ((u16 *) ((u8 *) (msg) + sizeof(CsrWifiFsmEvent))))
41 
42 /* The HPI Vif combines the type and the interface id */
43 #define CsrWifiVifUtilsGetVifTagFromHipEvent(msg) \
44  ((msg)->virtualInterfaceIdentifier & 0x00FF)
45 
46 #define CsrWifiVifUtilsPackHipEventVif(type, interfaceId) \
47  ((u16)((interfaceId) | ((type) << 8)))
48 
49 
50 /* TYPES DEFINITIONS ********************************************************/
51 
52 /* GLOBAL VARIABLE DECLARATIONS *********************************************/
53 
54 /* PUBLIC FUNCTION PROTOTYPES ***********************************************/
55 
69 extern u8 CsrWifiVifUtilsCheckCompatibility(u8 interfaceCapability,
70  u8 *currentInterfaceModes,
71  u16 interfaceTag,
73 
85 extern u8 CsrWifiVifUtilsIsSupported(u16 interfaceTag);
86 
87 #ifdef CSR_LOG_ENABLE
88 
99 #else
100 #define CsrWifiVifUtilsLogTextRegister()
101 #endif
102 
103 #ifdef __cplusplus
104 }
105 #endif
106 
107 #endif /* CSR_WIFI_VIF_UTILS_H */
108