PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/inc/TI_IPC_Api.h

http://github.com/CyanogenMod/cm-kernel
C Header | 155 lines | 82 code | 28 blank | 45 comment | 0 complexity | 9360d685c7e2c577ead150abd0de1e0e MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /****************************************************************************
  2. **+-----------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright(c) 1998 - 2008 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. #ifndef _TI_IPC_API_H
  36. #define _TI_IPC_API_H
  37. #include "osTIType.h"
  38. #include "TI_Results.h"
  39. #define MAX_REGISTERED_MODULES 5
  40. #define MAX_EVENT_DATA_SIZE 2048
  41. #define MAX_SEND_EVENTS 4
  42. #ifdef _WINDOWS
  43. #endif
  44. #ifdef __cplusplus
  45. extern "C" {
  46. #endif
  47. /*******************Defines*********************/
  48. /* WARNING! DON'T CHANGE THE ORDER OF EVENTS! */
  49. /* OS EVENTS MUST COME FIRST!*/
  50. enum
  51. {
  52. IPC_EVENT_ASSOCIATED = 0,
  53. IPC_EVENT_DISASSOCIATED,
  54. IPC_EVENT_LINK_SPEED,
  55. IPC_EVENT_AUTH_SUCC,
  56. IPC_EVENT_SCAN_COMPLETE,
  57. IPC_EVENT_TIMEOUT,
  58. IPC_EVENT_CCKM_START,
  59. IPC_EVENT_MEDIA_SPECIFIC,
  60. IPC_EVENT_MAX_OS_EVENT = IPC_EVENT_MEDIA_SPECIFIC,
  61. IPC_EVENT_EAPOL,
  62. IPC_EVENT_BOUND,
  63. IPC_EVENT_UNBOUND,
  64. IPC_EVENT_PREAUTH_EAPOL,
  65. IPC_EVENT_RESERVED2,
  66. IPC_EVENT_LOW_SNR,
  67. IPC_EVENT_LOW_RSSI,
  68. IPC_EVENT_TSPEC_STATUS,
  69. IPC_EVENT_TSPEC_RATE_STATUS,
  70. IPC_EVENT_MEDIUM_TIME_CROSS,
  71. IPC_EVENT_ROAMING_COMPLETE,
  72. IPC_EVENT_EAP_AUTH_FAILURE,
  73. IPC_EVENT_WPA2_PREAUTHENTICATION,
  74. IPC_EVENT_TRAFFIC_INTENSITY_THRESHOLD_CROSSED,
  75. IPC_EVENT_GWSI,
  76. IPC_EVENT_BT_COEX_MODE,
  77. IPC_EVENT_MAX
  78. };
  79. enum
  80. {
  81. DELIVERY_PUSH =0,
  82. DELIVERY_GET_DATA
  83. };
  84. /************************* IOCTLs Functions *******************************/
  85. TI_HANDLE IPC_Init(void);
  86. tiINT32 IPC_DeInit(void);
  87. TI_HANDLE IPC_DeviceOpen(tiVOID* AdapterName); /* get hDevice Handle*/
  88. tiINT32 IPC_DeviceClose(TI_HANDLE hDevice);
  89. tiINT32 IPC_DeviceIoControl(TI_HANDLE hDevice,
  90. tiUINT32 IoControlCode,
  91. tiVOID* pInBuffer,
  92. tiUINT32 InBufferSize,
  93. tiVOID* pOutBuffer,
  94. tiUINT32 pOutBufferSize,
  95. tiUINT32* pBytesReturned);
  96. /************************* Events Functions *******************************/
  97. typedef struct _IPC_EV_DATA * PIPC_EV_DATA;
  98. typedef tiINT32 (*TI_EVENT_CALLBACK) (PIPC_EV_DATA pData);
  99. typedef struct _IPC_EVENT_PARAMS
  100. {
  101. tiUINT32 uEventType;
  102. TI_HANDLE uEventID;
  103. tiUINT32 uProcessID;
  104. tiUINT32 uDeliveryType;
  105. TI_HANDLE hUserParam; /* Handle to back reference*/
  106. TI_EVENT_CALLBACK pfEventCallback;
  107. }IPC_EVENT_PARAMS;
  108. /* EvParams are assumed to be the first field. Any addtions shoild be made
  109. afterwards
  110. */
  111. typedef struct _IPC_EV_DATA
  112. {
  113. IPC_EVENT_PARAMS EvParams;
  114. tiUINT32 uBufferSize;
  115. tiUINT8 uBuffer[MAX_EVENT_DATA_SIZE];
  116. }IPC_EV_DATA;
  117. /*this function will also enable event and pass all the parameters about it*/
  118. /* returns unique ID of registered event, to be passed later for unregister*/
  119. tiINT32 IPC_RegisterEvent(TI_HANDLE hDevice, /* Driver Handle*/
  120. IPC_EVENT_PARAMS* pEvParams); /* size of the structure + size of the params*/
  121. tiINT32 IPC_UnRegisterEvent(TI_HANDLE hDevice,
  122. IPC_EVENT_PARAMS* pEvParams); /* returned by IPC_RegisterEvent*/
  123. /***************************************************************************/
  124. #ifdef __cplusplus
  125. }
  126. #endif
  127. #endif /*_IPC_UTIL_H*/