rxtx.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. // SPDX-License-Identifier: GPL-2.0+
  2. /*
  3. * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
  4. * All rights reserved.
  5. *
  6. * File: rxtx.h
  7. *
  8. * Purpose:
  9. *
  10. * Author: Jerry Chen
  11. *
  12. * Date: Jun. 27, 2002
  13. *
  14. */
  15. #ifndef __RXTX_H__
  16. #define __RXTX_H__
  17. #include "device.h"
  18. #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */
  19. #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */
  20. /*--------------------- Export Definitions -------------------------*/
  21. /*--------------------- Export Variables --------------------------*/
  22. /*--------------------- Export Functions --------------------------*/
  23. /* MIC HDR data header */
  24. struct vnt_mic_hdr {
  25. u8 id;
  26. u8 tx_priority;
  27. u8 mic_addr2[ETH_ALEN];
  28. u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
  29. __be16 payload_len;
  30. __be16 hlen;
  31. __le16 frame_control;
  32. u8 addr1[ETH_ALEN];
  33. u8 addr2[ETH_ALEN];
  34. u8 addr3[ETH_ALEN];
  35. __le16 seq_ctrl;
  36. u8 addr4[ETH_ALEN];
  37. u16 packing; /* packing to 48 bytes */
  38. } __packed;
  39. /* RsvTime buffer header */
  40. struct vnt_rrv_time_rts {
  41. __le16 rts_rrv_time_ba;
  42. __le16 rts_rrv_time_aa;
  43. __le16 rts_rrv_time_bb;
  44. u16 reserved;
  45. __le16 rrv_time_b;
  46. __le16 rrv_time_a;
  47. } __packed;
  48. struct vnt_rrv_time_cts {
  49. __le16 cts_rrv_time_ba;
  50. u16 reserved;
  51. __le16 rrv_time_b;
  52. __le16 rrv_time_a;
  53. } __packed;
  54. struct vnt_rrv_time_ab {
  55. __le16 rts_rrv_time;
  56. __le16 rrv_time;
  57. } __packed;
  58. /* TX data header */
  59. struct vnt_tx_datahead_g {
  60. struct vnt_phy_field b;
  61. struct vnt_phy_field a;
  62. __le16 duration_b;
  63. __le16 duration_a;
  64. __le16 time_stamp_off_b;
  65. __le16 time_stamp_off_a;
  66. } __packed;
  67. struct vnt_tx_datahead_g_fb {
  68. struct vnt_phy_field b;
  69. struct vnt_phy_field a;
  70. __le16 duration_b;
  71. __le16 duration_a;
  72. __le16 duration_a_f0;
  73. __le16 duration_a_f1;
  74. __le16 time_stamp_off_b;
  75. __le16 time_stamp_off_a;
  76. } __packed;
  77. struct vnt_tx_datahead_ab {
  78. struct vnt_phy_field ab;
  79. __le16 duration;
  80. __le16 time_stamp_off;
  81. } __packed;
  82. struct vnt_tx_datahead_a_fb {
  83. struct vnt_phy_field a;
  84. __le16 duration;
  85. __le16 time_stamp_off;
  86. __le16 duration_f0;
  87. __le16 duration_f1;
  88. } __packed;
  89. /* RTS buffer header */
  90. struct vnt_rts_g {
  91. struct vnt_phy_field b;
  92. struct vnt_phy_field a;
  93. __le16 duration_ba;
  94. __le16 duration_aa;
  95. __le16 duration_bb;
  96. u16 reserved;
  97. struct ieee80211_rts data;
  98. } __packed;
  99. struct vnt_rts_g_fb {
  100. struct vnt_phy_field b;
  101. struct vnt_phy_field a;
  102. __le16 duration_ba;
  103. __le16 duration_aa;
  104. __le16 duration_bb;
  105. u16 wReserved;
  106. __le16 rts_duration_ba_f0;
  107. __le16 rts_duration_aa_f0;
  108. __le16 rts_duration_ba_f1;
  109. __le16 rts_duration_aa_f1;
  110. struct ieee80211_rts data;
  111. } __packed;
  112. struct vnt_rts_ab {
  113. struct vnt_phy_field ab;
  114. __le16 duration;
  115. u16 reserved;
  116. struct ieee80211_rts data;
  117. } __packed;
  118. struct vnt_rts_a_fb {
  119. struct vnt_phy_field a;
  120. __le16 duration;
  121. u16 reserved;
  122. __le16 rts_duration_f0;
  123. __le16 rts_duration_f1;
  124. struct ieee80211_rts data;
  125. } __packed;
  126. /* CTS buffer header */
  127. struct vnt_cts {
  128. struct vnt_phy_field b;
  129. __le16 duration_ba;
  130. u16 reserved;
  131. struct ieee80211_cts data;
  132. u16 reserved2;
  133. } __packed;
  134. struct vnt_cts_fb {
  135. struct vnt_phy_field b;
  136. __le16 duration_ba;
  137. u16 reserved;
  138. __le16 cts_duration_ba_f0;
  139. __le16 cts_duration_ba_f1;
  140. struct ieee80211_cts data;
  141. u16 reserved2;
  142. } __packed;
  143. struct vnt_tx_fifo_head {
  144. u8 tx_key[WLAN_KEY_LEN_CCMP];
  145. __le16 fifo_ctl;
  146. __le16 time_stamp;
  147. __le16 frag_ctl;
  148. __le16 current_rate;
  149. } __packed;
  150. struct vnt_tx_short_buf_head {
  151. __le16 fifo_ctl;
  152. u16 time_stamp;
  153. struct vnt_phy_field ab;
  154. __le16 duration;
  155. __le16 time_stamp_off;
  156. } __packed;
  157. int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,
  158. struct vnt_tx_desc *head_td, struct sk_buff *skb);
  159. int vnt_beacon_make(struct vnt_private *priv, struct ieee80211_vif *vif);
  160. int vnt_beacon_enable(struct vnt_private *priv, struct ieee80211_vif *vif,
  161. struct ieee80211_bss_conf *conf);
  162. #endif /* __RXTX_H__ */