PageRenderTime 39ms CodeModel.GetById 14ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/TNETW_Driver/FW_Transfer/Rx_Xfer/RxXfer.h

http://github.com/CyanogenMod/cm-kernel
C Header | 109 lines | 51 code | 15 blank | 43 comment | 0 complexity | 5d34bbd112041ae95bf230c79f432446 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. /****************************************************************************
  36. *
  37. * MODULE: rxXfer.h
  38. *
  39. * PURPOSE: Rx Xfer module header file.
  40. *
  41. ****************************************************************************/
  42. #ifndef _RX_XFER_H
  43. #define _RX_XFER_H
  44. #include "rxXfer_api.h"
  45. #include "whalBus_Defs.h"
  46. #include "TNETWIF.h"
  47. #include "public_descriptors.h"
  48. #define RX_DESCRIPTOR_SIZE (sizeof(RxIfDescriptor_t))
  49. typedef struct
  50. {
  51. UINT32 numPacketsRead;
  52. UINT32 numBytesRead;
  53. UINT32 numPacketsDroppedNoMem;
  54. UINT32 numPacketsDroppedPacketIDMismatch;
  55. UINT32 numIrq0;
  56. UINT32 numIrq1;
  57. UINT32 numAck0;
  58. UINT32 numAck1;
  59. } RxXferStats_T;
  60. typedef enum
  61. {
  62. RX_XFER_STATE_IDLE,
  63. RX_XFER_STATE_READING_HDR,
  64. RX_XFER_STATE_READING_PKT,
  65. RX_XFER_STATE_EXITING /* Sending Ack to the FW at the end of the packet read */
  66. } RxXferState_e;
  67. typedef struct
  68. {
  69. TI_HANDLE hOs;
  70. TI_HANDLE hReport;
  71. TI_HANDLE hTNETWIF;
  72. TI_HANDLE hFwEvent;
  73. TI_HANDLE hMemMgr;
  74. RxXferState_e state;
  75. TI_STATUS returnValue;
  76. /* address of the 2 buffers in the Double Buffer */
  77. UINT32 doubleBuffer[2];
  78. UINT32 currBuffer;
  79. UINT32 lastPacketId;
  80. UINT32 rxPathStatus;
  81. /* use a struct to read buffers from the bus - used for extra bytes reserving */
  82. PADDING (RxIfDescriptor_t rxDescriptor)
  83. void *pPacketBuffer;
  84. packetReceiveCB_t ReceivePacketCB;
  85. TI_HANDLE ReceivePacketCB_handle;
  86. requestForBufferCB_t RequestForBufferCB;
  87. TI_HANDLE RequestForBufferCB_handle;
  88. BOOL bSync; /* indicate if we are in Synch bus or not */
  89. TI_STATUS packetStatus; /* OK unless an error occurred ... */
  90. #ifdef TI_DBG
  91. RxXferStats_T DbgStats;
  92. #endif /* TI_DBG */
  93. } RxXfer_t;
  94. #endif /* _RX_XFER_H */