rtw_event.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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. };
  55. struct stadel_event {
  56. unsigned char macaddr[6];
  57. unsigned char rsvd[2]; /* for reason */
  58. unsigned char locally_generated;
  59. int mac_id;
  60. };
  61. struct addba_event {
  62. unsigned int tid;
  63. };
  64. struct wmm_event {
  65. unsigned char wmm;
  66. };
  67. #ifdef CONFIG_H2CLBK
  68. struct c2hlbk_event {
  69. unsigned char mac[6];
  70. unsigned short s0;
  71. unsigned short s1;
  72. unsigned int w0;
  73. unsigned char b0;
  74. unsigned short s2;
  75. unsigned char b1;
  76. unsigned int w1;
  77. };
  78. #endif/* CONFIG_H2CLBK */
  79. #define GEN_EVT_CODE(event) event ## _EVT_
  80. struct fwevent {
  81. u32 parmsize;
  82. void (*event_callback)(_adapter *dev, u8 *pbuf);
  83. };
  84. #define C2HEVENT_SZ 32
  85. struct event_node {
  86. unsigned char *node;
  87. unsigned char evt_code;
  88. unsigned short evt_sz;
  89. volatile int *caller_ff_tail;
  90. int caller_ff_sz;
  91. };
  92. struct c2hevent_queue {
  93. volatile int head;
  94. volatile int tail;
  95. struct event_node nodes[C2HEVENT_SZ];
  96. unsigned char seq;
  97. };
  98. #define NETWORK_QUEUE_SZ 4
  99. struct network_queue {
  100. volatile int head;
  101. volatile int tail;
  102. WLAN_BSSID_EX networks[NETWORK_QUEUE_SZ];
  103. };
  104. #endif /* _WLANEVENT_H_ */