hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/******************************************************************************
 *
 * Copyright(c) 2019 Realtek Corporation.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 *****************************************************************************/
#ifndef _PHL_TRX_DEF_PCIE_H_
#define _PHL_TRX_DEF_PCIE_H_
 
#ifdef RTW_WKARD_WD0_SER
#define MAX_WD_PAGE_NUM (256*2)
#else
#define MAX_WD_PAGE_NUM 256
#endif
 
#define WP_TID_INDIC_RESERVED_BIT BIT(14)
#define WP_BAND_INDIC_RESERVED_BIT BIT(14)
 
#define WP_RESERVED_SEQ 0xFFF
#define WP_MAX_SEQ_NUMBER WP_RESERVED_SEQ
 
struct tx_base_desc {
   u8 *vir_addr;
   u32 phy_addr_l;
   u32 phy_addr_h;
   u32 buf_len;
   void *os_rsvd[1];
   u8 cache;
   u16 host_idx;
   u16 avail_num;
   _os_lock txbd_lock;
};
 
struct rtw_wd_page {
   _os_list list;
   u8 *vir_addr;
   u32 phy_addr_l;
   u32 phy_addr_h;
   u32 buf_len;
   void *os_rsvd[1];
   u8 ls;
   u8 cache;
   u16 wp_seq;
   u16 host_idx;
};
 
struct rtw_rx_buf {
   _os_list list;
   u8 *vir_addr;
   u32 phy_addr_l;
   u32 phy_addr_h;
   u32 buf_len;
   u8 cache;
   u8 dynamic;
#ifdef CONFIG_DYNAMIC_RX_BUF
   bool reuse;
#endif
   void *os_priv;
};
 
struct rx_base_desc {
   u8 *vir_addr;
   u32 phy_addr_l;
   u32 phy_addr_h;
   u32 buf_len;
   void *os_rsvd[1];
   u8 cache;
   u16 host_idx;
   u16 hw_idx;
};
#endif    /* _PHL_TRX_DEF_PCIE_H_ */