1 /****************************************************************************** 2 * 3 * Copyright(c) 2019 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 *****************************************************************************/ 15 #ifndef _PHL_TRX_DEF_PCIE_H_ 16 #define _PHL_TRX_DEF_PCIE_H_ 17 18 #ifdef RTW_WKARD_WD0_SER 19 #define MAX_WD_PAGE_NUM (256*2) 20 #else 21 #define MAX_WD_PAGE_NUM 256 22 #endif 23 24 #define WP_TID_INDIC_RESERVED_BIT BIT(14) 25 #define WP_RESERVED_SEQ 0xFFF 26 #define WP_MAX_SEQ_NUMBER WP_RESERVED_SEQ 27 28 29 struct tx_base_desc { 30 u8 *vir_addr; 31 u32 phy_addr_l; 32 u32 phy_addr_h; 33 u32 buf_len; 34 void *os_rsvd[1]; 35 u8 cache; 36 u16 host_idx; 37 u16 avail_num; 38 _os_lock txbd_lock; 39 }; 40 41 struct rtw_wd_page { 42 _os_list list; 43 u8 *vir_addr; 44 u32 phy_addr_l; 45 u32 phy_addr_h; 46 u32 buf_len; 47 void *os_rsvd[1]; 48 u8 ls; 49 u8 cache; 50 u16 wp_seq; 51 u16 host_idx; 52 }; 53 54 struct rtw_rx_buf { 55 _os_list list; 56 u8 *vir_addr; 57 u32 phy_addr_l; 58 u32 phy_addr_h; 59 u32 buf_len; 60 u16 hw_write_size; 61 u8 cache; 62 u8 dynamic; 63 #ifdef CONFIG_DYNAMIC_RX_BUF 64 bool reuse; 65 #endif 66 void *os_priv; 67 }; 68 69 struct rx_base_desc { 70 u8 *vir_addr; 71 u32 phy_addr_l; 72 u32 phy_addr_h; 73 u32 buf_len; 74 void *os_rsvd[1]; 75 u8 cache; 76 u16 host_idx; 77 u16 hw_idx; 78 }; 79 #endif /* _PHL_TRX_DEF_PCIE_H_ */ 80