phydm_pmac_tx_setting.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2017 Realtek Corporation.
  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. * The full GNU General Public License is included in this distribution in the
  15. * file called LICENSE.
  16. *
  17. * Contact Information:
  18. * wlanfae <wlanfae@realtek.com>
  19. * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
  20. * Hsinchu 300, Taiwan.
  21. *
  22. * Larry Finger <Larry.Finger@lwfinger.net>
  23. *
  24. *****************************************************************************/
  25. #ifndef __PHYDM_PMAC_TX_SETTING_H__
  26. #define __PHYDM_PMAC_TX_SETTING_H__
  27. #define PMAC_TX_SETTING_VERSION "1.0"
  28. /* @1 ============================================================
  29. * 1 Definition
  30. * 1 ============================================================
  31. */
  32. #define RANDOM_BY_PN32 0x12
  33. /* @1 ============================================================
  34. * 1 structure
  35. * 1 ============================================================
  36. */
  37. struct phydm_pmac_info {
  38. u8 en_pmac_tx:1; /*@ disable pmac 1: enable pmac */
  39. u8 mode:3; /*@ 0: Packet TX 3:Continuous TX */
  40. /* @u8 Ntx:4; */
  41. u8 tx_rate; /* @should be HW rate*/
  42. /* @u8 TX_RATE_HEX; */
  43. u8 tx_sc;
  44. /* @u8 bSGI:1; */
  45. u8 is_short_preamble:1;
  46. /* @u8 bSTBC:1; */
  47. /* @u8 bLDPC:1; */
  48. u8 ndp_sound:1;
  49. u8 bw:3; /* @0:20 1:40 2:80Mhz */
  50. u8 m_stbc; /* @bSTBC + 1 */
  51. u16 packet_period;
  52. u32 packet_count;
  53. /* @u32 PacketLength; */
  54. u8 packet_pattern;
  55. u16 sfd;
  56. u8 signal_field;
  57. u8 service_field;
  58. u16 length;
  59. u8 crc16[2];
  60. u8 lsig[3];
  61. u8 ht_sig[6];
  62. u8 vht_sig_a[6];
  63. u8 vht_sig_b[4];
  64. u8 vht_sig_b_crc;
  65. u8 vht_delimiter[4];
  66. /* @u8 mac_addr[6]; */
  67. };
  68. struct phydm_pmac_tx {
  69. boolean is_cck_rate;
  70. boolean is_ofdm_rate;
  71. boolean is_ht_rate;
  72. boolean is_vht_rate;
  73. boolean cck_cont_tx;
  74. boolean ofdm_cont_tx;
  75. u8 path;
  76. u32 tx_scailing;
  77. };
  78. /* @1 ============================================================
  79. * 1 enumeration
  80. * 1 ============================================================
  81. */
  82. enum phydm_pmac_mode {
  83. NONE_TEST,
  84. PKTS_TX,
  85. PKTS_RX,
  86. CONT_TX,
  87. OFDM_SINGLE_TONE_TX,
  88. CCK_CARRIER_SIPPRESSION_TX
  89. };
  90. /* @1 ============================================================
  91. * 1 function prototype
  92. * 1 ============================================================
  93. */
  94. #ifdef PHYDM_IC_JGR3_SERIES_SUPPORT
  95. void phydm_start_cck_cont_tx_jgr3(void *dm_void,
  96. struct phydm_pmac_info *tx_info);
  97. void phydm_stop_cck_cont_tx_jgr3(void *dm_void);
  98. void phydm_start_ofdm_cont_tx_jgr3(void *dm_void);
  99. void phydm_stop_ofdm_cont_tx_jgr3(void *dm_void);
  100. void phydm_set_single_tone_jgr3(void *dm_void, boolean is_single_tone,
  101. boolean en_pmac_tx, u8 path);
  102. void phydm_stop_pmac_tx_jgr3(void *dm_void, struct phydm_pmac_info *tx_info);
  103. void phydm_set_mac_phy_txinfo_jgr3(void *dm_void,
  104. struct phydm_pmac_info *tx_info);
  105. void phydm_set_mac_hdr_jgr3(void *dm_void, struct phydm_pmac_info *tx_info);
  106. void phydm_set_sig_jgr3(void *dm_void, struct phydm_pmac_info *tx_info);
  107. void phydm_set_cck_preamble_hdr_jgr3(void *dm_void,
  108. struct phydm_pmac_info *tx_info);
  109. void phydm_set_mode_jgr3(void *dm_void, struct phydm_pmac_info *tx_info,
  110. enum phydm_pmac_mode mode);
  111. void phydm_set_pmac_txon_jgr3(void *dm_void, struct phydm_pmac_info *tx_info);
  112. void phydm_set_pmac_tx_jgr3(void *dm_void, struct phydm_pmac_info *tx_info,
  113. enum rf_path mpt_rf_path);
  114. #endif
  115. void phydm_start_cck_cont_tx(void *dm_void, struct phydm_pmac_info *tx_info);
  116. void phydm_stop_cck_cont_tx(void *dm_void);
  117. void phydm_start_ofdm_cont_tx(void *dm_void);
  118. void phydm_stop_ofdm_cont_tx(void *dm_void);
  119. void phydm_set_single_tone(void *dm_void, boolean is_single_tone,
  120. boolean en_pmac_tx, u8 path);
  121. void phydm_set_pmac_tx(void *dm_void, struct phydm_pmac_info *tx_info,
  122. enum rf_path mpt_rf_path);
  123. #endif