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 26 #ifndef __PHYDM_PMAC_TX_SETTING_H__ 27 #define __PHYDM_PMAC_TX_SETTING_H__ 28 29 /*2019.08.02 Modify pmac_tx echo cmd to prevent from hang*/ 30 #define PMAC_TX_SETTING_VERSION "2.0" 31 32 /* 1 ============================================================ 33 * 1 Definition 34 * 1 ============================================================ 35 */ 36 37 /* 1 ============================================================ 38 * 1 structure 39 * 1 ============================================================ 40 */ 41 struct phydm_pmac_info { 42 u8 en_pmac_tx:1; /*0: disable pmac 1: enable pmac */ 43 u8 mode:3; /*0: Packet TX 3:Continuous TX */ 44 u8 tx_rate; /*should be HW rate*/ 45 u8 tx_sc; 46 u8 is_short_preamble:1; 47 u8 ndp_sound:1; 48 u8 bw:3; /* 0:20 1:40 2:80Mhz */ 49 u8 m_stbc; /* bSTBC + 1 for WIN/CE, bSTBC for others*/ 50 u16 packet_period; 51 u32 packet_count; 52 u8 packet_pattern; 53 u16 sfd; 54 u8 signal_field; 55 u8 service_field; 56 u16 length; 57 u8 crc16[2]; 58 u8 lsig[3]; 59 u8 ht_sig[6]; 60 u8 vht_sig_a[6]; 61 u8 vht_sig_b[4]; 62 u8 vht_sig_b_crc; 63 u8 vht_delimiter[4]; 64 }; 65 66 struct phydm_pmac_tx { 67 boolean is_cck_rate; 68 boolean is_ofdm_rate; 69 boolean is_ht_rate; 70 boolean is_vht_rate; 71 boolean cck_cont_tx; 72 boolean ofdm_cont_tx; 73 u8 path; 74 }; 75 76 /* 1 ============================================================ 77 * 1 enumeration 78 * 1 ============================================================ 79 */ 80 81 enum phydm_pmac_mode { 82 NONE_TEST, 83 PKTS_TX, 84 PKTS_RX, 85 CONT_TX, 86 OFDM_SINGLE_TONE_TX, 87 CCK_CARRIER_SIPPRESSION_TX 88 }; 89 90 /* 1 ============================================================ 91 * 1 function prototype 92 * 1 ============================================================ 93 */ 94 void phydm_start_cck_cont_tx(void *dm_void, struct phydm_pmac_info *tx_info); 95 96 void phydm_stop_cck_cont_tx(void *dm_void); 97 98 void phydm_start_ofdm_cont_tx(void *dm_void); 99 100 void phydm_stop_ofdm_cont_tx(void *dm_void); 101 102 void phydm_set_pmac_tx(void *dm_void, struct phydm_pmac_info *tx_info, 103 enum rf_path mpt_rf_path); 104 105 void phydm_set_tmac_tx(void *dm_void); 106 107 void phydm_pmac_tx_dbg(void *dm_void, char input[][16], u32 *_used, 108 char *output, u32 *_out_len); 109 #endif 110