rtw_event.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of version 2 of the GNU General Public License as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful, but WITHOUT
  10. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  12. * more details.
  13. *
  14. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef _RTW_EVENT_H_
  21. #define _RTW_EVENT_H_
  22. #ifdef CONFIG_H2CLBK
  23. #include <h2clbk.h>
  24. #endif
  25. /*
  26. Used to report a bss has been scanned
  27. */
  28. struct survey_event {
  29. WLAN_BSSID_EX bss;
  30. };
  31. /*
  32. Used to report that the requested site survey has been done.
  33. bss_cnt indicates the number of bss that has been reported.
  34. */
  35. struct surveydone_event {
  36. unsigned int bss_cnt;
  37. };
  38. /*
  39. Used to report the link result of joinning the given bss
  40. join_res:
  41. -1: authentication fail
  42. -2: association fail
  43. > 0: TID
  44. */
  45. struct joinbss_event {
  46. struct wlan_network network;
  47. };
  48. /*
  49. Used to report a given STA has joinned the created BSS.
  50. It is used in AP/Ad-HoC(M) mode.
  51. */
  52. struct stassoc_event {
  53. unsigned char macaddr[6];
  54. unsigned char rsvd[2];
  55. int cam_id;
  56. };
  57. struct stadel_event {
  58. unsigned char macaddr[6];
  59. unsigned char rsvd[2]; //for reason
  60. int mac_id;
  61. };
  62. struct addba_event
  63. {
  64. unsigned int tid;
  65. };
  66. #ifdef CONFIG_H2CLBK
  67. struct c2hlbk_event{
  68. unsigned char mac[6];
  69. unsigned short s0;
  70. unsigned short s1;
  71. unsigned int w0;
  72. unsigned char b0;
  73. unsigned short s2;
  74. unsigned char b1;
  75. unsigned int w1;
  76. };
  77. #endif//CONFIG_H2CLBK
  78. #define GEN_EVT_CODE(event) event ## _EVT_
  79. struct fwevent {
  80. u32 parmsize;
  81. void (*event_callback)(_adapter *dev, u8 *pbuf);
  82. };
  83. #define C2HEVENT_SZ 32
  84. struct event_node{
  85. unsigned char *node;
  86. unsigned char evt_code;
  87. unsigned short evt_sz;
  88. volatile int *caller_ff_tail;
  89. int caller_ff_sz;
  90. };
  91. struct c2hevent_queue {
  92. volatile int head;
  93. volatile int tail;
  94. struct event_node nodes[C2HEVENT_SZ];
  95. unsigned char seq;
  96. };
  97. #define NETWORK_QUEUE_SZ 4
  98. struct network_queue {
  99. volatile int head;
  100. volatile int tail;
  101. WLAN_BSSID_EX networks[NETWORK_QUEUE_SZ];
  102. };
  103. #endif // _WLANEVENT_H_