rtl871x_event.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2010 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. * Modifications for inclusion into the Linux staging tree are
  19. * Copyright(c) 2010 Larry Finger. All rights reserved.
  20. *
  21. * Contact information:
  22. * WLAN FAE <wlanfae@realtek.com>
  23. * Larry Finger <Larry.Finger@lwfinger.net>
  24. *
  25. ******************************************************************************/
  26. #ifndef _RTL871x_EVENT_H_
  27. #define _RTL871x_EVENT_H_
  28. #include "osdep_service.h"
  29. #include "wlan_bssdef.h"
  30. #include <linux/semaphore.h>
  31. #include <linux/sem.h>
  32. /*
  33. * Used to report a bss has been scanned
  34. */
  35. struct survey_event {
  36. struct wlan_bssid_ex bss;
  37. };
  38. /*
  39. * Used to report that the requested site survey has been done.
  40. * bss_cnt indicates the number of bss that has been reported.
  41. */
  42. struct surveydone_event {
  43. unsigned int bss_cnt;
  44. };
  45. /*
  46. * Used to report the link result of joinning the given bss
  47. * join_res:
  48. * -1: authentication fail
  49. * -2: association fail
  50. * > 0: TID
  51. */
  52. struct joinbss_event {
  53. struct wlan_network network;
  54. };
  55. /*
  56. * Used to report a given STA has joinned the created BSS.
  57. * It is used in AP/Ad-HoC(M) mode.
  58. */
  59. struct stassoc_event {
  60. unsigned char macaddr[6];
  61. unsigned char rsvd[2];
  62. int cam_id;
  63. };
  64. struct stadel_event {
  65. unsigned char macaddr[6];
  66. unsigned char rsvd[2];
  67. };
  68. struct addba_event {
  69. unsigned int tid;
  70. };
  71. #define GEN_EVT_CODE(event) event ## _EVT_
  72. struct fwevent {
  73. u32 parmsize;
  74. void (*event_callback)(struct _adapter *dev, u8 *pbuf);
  75. };
  76. #define C2HEVENT_SZ 32
  77. struct event_node {
  78. unsigned char *node;
  79. unsigned char evt_code;
  80. unsigned short evt_sz;
  81. /*volatile*/ int *caller_ff_tail;
  82. int caller_ff_sz;
  83. };
  84. struct c2hevent_queue {
  85. /*volatile*/ int head;
  86. /*volatile*/ int tail;
  87. struct event_node nodes[C2HEVENT_SZ];
  88. unsigned char seq;
  89. };
  90. #define NETWORK_QUEUE_SZ 4
  91. struct network_queue {
  92. /*volatile*/ int head;
  93. /*volatile*/ int tail;
  94. struct wlan_bssid_ex networks[NETWORK_QUEUE_SZ];
  95. };
  96. struct ADDBA_Req_Report_parm {
  97. unsigned char MacAddress[ETH_ALEN];
  98. unsigned short StartSeqNum;
  99. unsigned char tid;
  100. };
  101. #include "rtl8712_event.h"
  102. #endif /* _WLANEVENT_H_ */