rxtx.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. /*
  2. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  3. * All rights reserved.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with this program; if not, write to the Free Software Foundation, Inc.,
  17. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  18. *
  19. * File: rxtx.h
  20. *
  21. * Purpose:
  22. *
  23. * Author: Jerry Chen
  24. *
  25. * Date: Jun. 27, 2002
  26. *
  27. */
  28. #ifndef __RXTX_H__
  29. #define __RXTX_H__
  30. #include "device.h"
  31. #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */
  32. #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */
  33. /*--------------------- Export Definitions -------------------------*/
  34. /*--------------------- Export Variables --------------------------*/
  35. /*--------------------- Export Functions --------------------------*/
  36. /* MIC HDR data header */
  37. struct vnt_mic_hdr {
  38. u8 id;
  39. u8 tx_priority;
  40. u8 mic_addr2[ETH_ALEN];
  41. u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
  42. __be16 payload_len;
  43. __be16 hlen;
  44. __le16 frame_control;
  45. u8 addr1[ETH_ALEN];
  46. u8 addr2[ETH_ALEN];
  47. u8 addr3[ETH_ALEN];
  48. __le16 seq_ctrl;
  49. u8 addr4[ETH_ALEN];
  50. u16 packing; /* packing to 48 bytes */
  51. } __packed;
  52. /* RsvTime buffer header */
  53. struct vnt_rrv_time_rts {
  54. __le16 rts_rrv_time_ba;
  55. __le16 rts_rrv_time_aa;
  56. __le16 rts_rrv_time_bb;
  57. u16 reserved;
  58. __le16 rrv_time_b;
  59. __le16 rrv_time_a;
  60. } __packed;
  61. struct vnt_rrv_time_cts {
  62. __le16 cts_rrv_time_ba;
  63. u16 reserved;
  64. __le16 rrv_time_b;
  65. __le16 rrv_time_a;
  66. } __packed;
  67. struct vnt_rrv_time_ab {
  68. __le16 rts_rrv_time;
  69. __le16 rrv_time;
  70. } __packed;
  71. /* TX data header */
  72. struct vnt_tx_datahead_g {
  73. struct vnt_phy_field b;
  74. struct vnt_phy_field a;
  75. __le16 duration_b;
  76. __le16 duration_a;
  77. __le16 time_stamp_off_b;
  78. __le16 time_stamp_off_a;
  79. } __packed;
  80. struct vnt_tx_datahead_g_fb {
  81. struct vnt_phy_field b;
  82. struct vnt_phy_field a;
  83. __le16 duration_b;
  84. __le16 duration_a;
  85. __le16 duration_a_f0;
  86. __le16 duration_a_f1;
  87. __le16 time_stamp_off_b;
  88. __le16 time_stamp_off_a;
  89. } __packed;
  90. struct vnt_tx_datahead_ab {
  91. struct vnt_phy_field ab;
  92. __le16 duration;
  93. __le16 time_stamp_off;
  94. } __packed;
  95. struct vnt_tx_datahead_a_fb {
  96. struct vnt_phy_field a;
  97. __le16 duration;
  98. __le16 time_stamp_off;
  99. __le16 duration_f0;
  100. __le16 duration_f1;
  101. } __packed;
  102. /* RTS buffer header */
  103. struct vnt_rts_g {
  104. struct vnt_phy_field b;
  105. struct vnt_phy_field a;
  106. __le16 duration_ba;
  107. __le16 duration_aa;
  108. __le16 duration_bb;
  109. u16 reserved;
  110. struct ieee80211_rts data;
  111. } __packed;
  112. struct vnt_rts_g_fb {
  113. struct vnt_phy_field b;
  114. struct vnt_phy_field a;
  115. __le16 duration_ba;
  116. __le16 duration_aa;
  117. __le16 duration_bb;
  118. u16 wReserved;
  119. __le16 rts_duration_ba_f0;
  120. __le16 rts_duration_aa_f0;
  121. __le16 rts_duration_ba_f1;
  122. __le16 rts_duration_aa_f1;
  123. struct ieee80211_rts data;
  124. } __packed;
  125. struct vnt_rts_ab {
  126. struct vnt_phy_field ab;
  127. __le16 duration;
  128. u16 reserved;
  129. struct ieee80211_rts data;
  130. } __packed;
  131. struct vnt_rts_a_fb {
  132. struct vnt_phy_field a;
  133. __le16 duration;
  134. u16 reserved;
  135. __le16 rts_duration_f0;
  136. __le16 rts_duration_f1;
  137. struct ieee80211_rts data;
  138. } __packed;
  139. /* CTS buffer header */
  140. struct vnt_cts {
  141. struct vnt_phy_field b;
  142. __le16 duration_ba;
  143. u16 reserved;
  144. struct ieee80211_cts data;
  145. u16 reserved2;
  146. } __packed;
  147. struct vnt_cts_fb {
  148. struct vnt_phy_field b;
  149. __le16 duration_ba;
  150. u16 reserved;
  151. __le16 cts_duration_ba_f0;
  152. __le16 cts_duration_ba_f1;
  153. struct ieee80211_cts data;
  154. u16 reserved2;
  155. } __packed;
  156. struct vnt_tx_fifo_head {
  157. u8 tx_key[WLAN_KEY_LEN_CCMP];
  158. __le16 fifo_ctl;
  159. __le16 time_stamp;
  160. __le16 frag_ctl;
  161. __le16 current_rate;
  162. } __packed;
  163. struct vnt_tx_short_buf_head {
  164. __le16 fifo_ctl;
  165. u16 time_stamp;
  166. struct vnt_phy_field ab;
  167. __le16 duration;
  168. __le16 time_stamp_off;
  169. } __packed;
  170. int vnt_generate_fifo_header(struct vnt_private *, u32,
  171. struct vnt_tx_desc *head_td, struct sk_buff *);
  172. int vnt_beacon_make(struct vnt_private *, struct ieee80211_vif *);
  173. int vnt_beacon_enable(struct vnt_private *, struct ieee80211_vif *,
  174. struct ieee80211_bss_conf *);
  175. #endif /* __RXTX_H__ */