diff options
author | Larry Finger <Larry.Finger@lwfinger.net> | 2014-09-26 17:40:24 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-09-30 13:17:14 -0400 |
commit | 0529c6b8176135bcae1ab66bed6c1288456fbdec (patch) | |
tree | fdb423ef6b4bab975df2de0f25e1ea5ffa413763 /drivers/net/wireless/rtlwifi/rtl8723ae/trx.h | |
parent | b1a3bfc97cd95681c511515534b84843998f3ea0 (diff) |
rtlwifi: rtl8723ae: Update driver to match 06/28/14 Realtek version
Not only does this patch update the driver to match the latest Realtek release,
it is an important step in getting the internal code source at Realtek to match
the code in the kernel. The primary reason for this is to make it easier for
Realtek to maintain the kernel source without requiring an intermediate like me.
In this process of merging the two source repositories, there are a lot
of changes in both, and this commit is rather large.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8723ae/trx.h')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8723ae/trx.h | 325 |
1 files changed, 163 insertions, 162 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.h b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.h index 4380b7d3a91a..017da7e194d8 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.h +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.h | |||
@@ -11,10 +11,6 @@ | |||
11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
12 | * more details. | 12 | * more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License along with | ||
15 | * this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA | ||
17 | * | ||
18 | * The full GNU General Public License is included in this distribution in the | 14 | * The full GNU General Public License is included in this distribution in the |
19 | * file called LICENSE. | 15 | * file called LICENSE. |
20 | * | 16 | * |
@@ -30,77 +26,77 @@ | |||
30 | #ifndef __RTL8723E_TRX_H__ | 26 | #ifndef __RTL8723E_TRX_H__ |
31 | #define __RTL8723E_TRX_H__ | 27 | #define __RTL8723E_TRX_H__ |
32 | 28 | ||
33 | #define TX_DESC_SIZE 64 | 29 | #define TX_DESC_SIZE 64 |
34 | #define TX_DESC_AGGR_SUBFRAME_SIZE 32 | 30 | #define TX_DESC_AGGR_SUBFRAME_SIZE 32 |
35 | 31 | ||
36 | #define RX_DESC_SIZE 32 | 32 | #define RX_DESC_SIZE 32 |
37 | #define RX_DRV_INFO_SIZE_UNIT 8 | 33 | #define RX_DRV_INFO_SIZE_UNIT 8 |
38 | 34 | ||
39 | #define TX_DESC_NEXT_DESC_OFFSET 40 | 35 | #define TX_DESC_NEXT_DESC_OFFSET 40 |
40 | #define USB_HWDESC_HEADER_LEN 32 | 36 | #define USB_HWDESC_HEADER_LEN 32 |
41 | #define CRCLENGTH 4 | 37 | #define CRCLENGTH 4 |
42 | 38 | ||
43 | #define SET_TX_DESC_PKT_SIZE(__pdesc, __val) \ | 39 | #define SET_TX_DESC_PKT_SIZE(__pdesc, __val) \ |
44 | SET_BITS_TO_LE_4BYTE(__pdesc, 0, 16, __val) | 40 | SET_BITS_TO_LE_4BYTE(__pdesc, 0, 16, __val) |
45 | #define SET_TX_DESC_OFFSET(__pdesc, __val) \ | 41 | #define SET_TX_DESC_OFFSET(__pdesc, __val) \ |
46 | SET_BITS_TO_LE_4BYTE(__pdesc, 16, 8, __val) | 42 | SET_BITS_TO_LE_4BYTE(__pdesc, 16, 8, __val) |
47 | #define SET_TX_DESC_BMC(__pdesc, __val) \ | 43 | #define SET_TX_DESC_BMC(__pdesc, __val) \ |
48 | SET_BITS_TO_LE_4BYTE(__pdesc, 24, 1, __val) | 44 | SET_BITS_TO_LE_4BYTE(__pdesc, 24, 1, __val) |
49 | #define SET_TX_DESC_HTC(__pdesc, __val) \ | 45 | #define SET_TX_DESC_HTC(__pdesc, __val) \ |
50 | SET_BITS_TO_LE_4BYTE(__pdesc, 25, 1, __val) | 46 | SET_BITS_TO_LE_4BYTE(__pdesc, 25, 1, __val) |
51 | #define SET_TX_DESC_LAST_SEG(__pdesc, __val) \ | 47 | #define SET_TX_DESC_LAST_SEG(__pdesc, __val) \ |
52 | SET_BITS_TO_LE_4BYTE(__pdesc, 26, 1, __val) | 48 | SET_BITS_TO_LE_4BYTE(__pdesc, 26, 1, __val) |
53 | #define SET_TX_DESC_FIRST_SEG(__pdesc, __val) \ | 49 | #define SET_TX_DESC_FIRST_SEG(__pdesc, __val) \ |
54 | SET_BITS_TO_LE_4BYTE(__pdesc, 27, 1, __val) | 50 | SET_BITS_TO_LE_4BYTE(__pdesc, 27, 1, __val) |
55 | #define SET_TX_DESC_LINIP(__pdesc, __val) \ | 51 | #define SET_TX_DESC_LINIP(__pdesc, __val) \ |
56 | SET_BITS_TO_LE_4BYTE(__pdesc, 28, 1, __val) | 52 | SET_BITS_TO_LE_4BYTE(__pdesc, 28, 1, __val) |
57 | #define SET_TX_DESC_NO_ACM(__pdesc, __val) \ | 53 | #define SET_TX_DESC_NO_ACM(__pdesc, __val) \ |
58 | SET_BITS_TO_LE_4BYTE(__pdesc, 29, 1, __val) | 54 | SET_BITS_TO_LE_4BYTE(__pdesc, 29, 1, __val) |
59 | #define SET_TX_DESC_GF(__pdesc, __val) \ | 55 | #define SET_TX_DESC_GF(__pdesc, __val) \ |
60 | SET_BITS_TO_LE_4BYTE(__pdesc, 30, 1, __val) | 56 | SET_BITS_TO_LE_4BYTE(__pdesc, 30, 1, __val) |
61 | #define SET_TX_DESC_OWN(__pdesc, __val) \ | 57 | #define SET_TX_DESC_OWN(__pdesc, __val) \ |
62 | SET_BITS_TO_LE_4BYTE(__pdesc, 31, 1, __val) | 58 | SET_BITS_TO_LE_4BYTE(__pdesc, 31, 1, __val) |
63 | 59 | ||
64 | #define GET_TX_DESC_PKT_SIZE(__pdesc) \ | 60 | #define GET_TX_DESC_PKT_SIZE(__pdesc) \ |
65 | LE_BITS_TO_4BYTE(__pdesc, 0, 16) | 61 | LE_BITS_TO_4BYTE(__pdesc, 0, 16) |
66 | #define GET_TX_DESC_OFFSET(__pdesc) \ | 62 | #define GET_TX_DESC_OFFSET(__pdesc) \ |
67 | LE_BITS_TO_4BYTE(__pdesc, 16, 8) | 63 | LE_BITS_TO_4BYTE(__pdesc, 16, 8) |
68 | #define GET_TX_DESC_BMC(__pdesc) \ | 64 | #define GET_TX_DESC_BMC(__pdesc) \ |
69 | LE_BITS_TO_4BYTE(__pdesc, 24, 1) | 65 | LE_BITS_TO_4BYTE(__pdesc, 24, 1) |
70 | #define GET_TX_DESC_HTC(__pdesc) \ | 66 | #define GET_TX_DESC_HTC(__pdesc) \ |
71 | LE_BITS_TO_4BYTE(__pdesc, 25, 1) | 67 | LE_BITS_TO_4BYTE(__pdesc, 25, 1) |
72 | #define GET_TX_DESC_LAST_SEG(__pdesc) \ | 68 | #define GET_TX_DESC_LAST_SEG(__pdesc) \ |
73 | LE_BITS_TO_4BYTE(__pdesc, 26, 1) | 69 | LE_BITS_TO_4BYTE(__pdesc, 26, 1) |
74 | #define GET_TX_DESC_FIRST_SEG(__pdesc) \ | 70 | #define GET_TX_DESC_FIRST_SEG(__pdesc) \ |
75 | LE_BITS_TO_4BYTE(__pdesc, 27, 1) | 71 | LE_BITS_TO_4BYTE(__pdesc, 27, 1) |
76 | #define GET_TX_DESC_LINIP(__pdesc) \ | 72 | #define GET_TX_DESC_LINIP(__pdesc) \ |
77 | LE_BITS_TO_4BYTE(__pdesc, 28, 1) | 73 | LE_BITS_TO_4BYTE(__pdesc, 28, 1) |
78 | #define GET_TX_DESC_NO_ACM(__pdesc) \ | 74 | #define GET_TX_DESC_NO_ACM(__pdesc) \ |
79 | LE_BITS_TO_4BYTE(__pdesc, 29, 1) | 75 | LE_BITS_TO_4BYTE(__pdesc, 29, 1) |
80 | #define GET_TX_DESC_GF(__pdesc) \ | 76 | #define GET_TX_DESC_GF(__pdesc) \ |
81 | LE_BITS_TO_4BYTE(__pdesc, 30, 1) | 77 | LE_BITS_TO_4BYTE(__pdesc, 30, 1) |
82 | #define GET_TX_DESC_OWN(__pdesc) \ | 78 | #define GET_TX_DESC_OWN(__pdesc) \ |
83 | LE_BITS_TO_4BYTE(__pdesc, 31, 1) | 79 | LE_BITS_TO_4BYTE(__pdesc, 31, 1) |
84 | 80 | ||
85 | #define SET_TX_DESC_MACID(__pdesc, __val) \ | 81 | #define SET_TX_DESC_MACID(__pdesc, __val) \ |
86 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 0, 5, __val) | 82 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 0, 5, __val) |
87 | #define SET_TX_DESC_AGG_BREAK(__pdesc, __val) \ | 83 | #define SET_TX_DESC_AGG_BREAK(__pdesc, __val) \ |
88 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 5, 1, __val) | 84 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 5, 1, __val) |
89 | #define SET_TX_DESC_BK(__pdesc, __val) \ | 85 | #define SET_TX_DESC_BK(__pdesc, __val) \ |
90 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 6, 1, __val) | 86 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 6, 1, __val) |
91 | #define SET_TX_DESC_RDG_ENABLE(__pdesc, __val) \ | 87 | #define SET_TX_DESC_RDG_ENABLE(__pdesc, __val) \ |
92 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 7, 1, __val) | 88 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 7, 1, __val) |
93 | #define SET_TX_DESC_QUEUE_SEL(__pdesc, __val) \ | 89 | #define SET_TX_DESC_QUEUE_SEL(__pdesc, __val) \ |
94 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 8, 5, __val) | 90 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 8, 5, __val) |
95 | #define SET_TX_DESC_RDG_NAV_EXT(__pdesc, __val) \ | 91 | #define SET_TX_DESC_RDG_NAV_EXT(__pdesc, __val) \ |
96 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 13, 1, __val) | 92 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 13, 1, __val) |
97 | #define SET_TX_DESC_LSIG_TXOP_EN(__pdesc, __val) \ | 93 | #define SET_TX_DESC_LSIG_TXOP_EN(__pdesc, __val) \ |
98 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 14, 1, __val) | 94 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 14, 1, __val) |
99 | #define SET_TX_DESC_PIFS(__pdesc, __val) \ | 95 | #define SET_TX_DESC_PIFS(__pdesc, __val) \ |
100 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 15, 1, __val) | 96 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 15, 1, __val) |
101 | #define SET_TX_DESC_RATE_ID(__pdesc, __val) \ | 97 | #define SET_TX_DESC_RATE_ID(__pdesc, __val) \ |
102 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 16, 4, __val) | 98 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 16, 4, __val) |
103 | #define SET_TX_DESC_NAV_USE_HDR(__pdesc, __val) \ | 99 | #define SET_TX_DESC_NAV_USE_HDR(__pdesc, __val) \ |
104 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 20, 1, __val) | 100 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 20, 1, __val) |
105 | #define SET_TX_DESC_EN_DESC_ID(__pdesc, __val) \ | 101 | #define SET_TX_DESC_EN_DESC_ID(__pdesc, __val) \ |
106 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 21, 1, __val) | 102 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 21, 1, __val) |
@@ -109,34 +105,34 @@ | |||
109 | #define SET_TX_DESC_PKT_OFFSET(__pdesc, __val) \ | 105 | #define SET_TX_DESC_PKT_OFFSET(__pdesc, __val) \ |
110 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 24, 8, __val) | 106 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 24, 8, __val) |
111 | 107 | ||
112 | #define GET_TX_DESC_MACID(__pdesc) \ | 108 | #define GET_TX_DESC_MACID(__pdesc) \ |
113 | LE_BITS_TO_4BYTE(__pdesc+4, 0, 5) | 109 | LE_BITS_TO_4BYTE(__pdesc+4, 0, 5) |
114 | #define GET_TX_DESC_AGG_ENABLE(__pdesc) \ | 110 | #define GET_TX_DESC_AGG_ENABLE(__pdesc) \ |
115 | LE_BITS_TO_4BYTE(__pdesc+4, 5, 1) | 111 | LE_BITS_TO_4BYTE(__pdesc+4, 5, 1) |
116 | #define GET_TX_DESC_AGG_BREAK(__pdesc) \ | 112 | #define GET_TX_DESC_AGG_BREAK(__pdesc) \ |
117 | LE_BITS_TO_4BYTE(__pdesc+4, 6, 1) | 113 | LE_BITS_TO_4BYTE(__pdesc+4, 6, 1) |
118 | #define GET_TX_DESC_RDG_ENABLE(__pdesc) \ | 114 | #define GET_TX_DESC_RDG_ENABLE(__pdesc) \ |
119 | LE_BITS_TO_4BYTE(__pdesc+4, 7, 1) | 115 | LE_BITS_TO_4BYTE(__pdesc+4, 7, 1) |
120 | #define GET_TX_DESC_QUEUE_SEL(__pdesc) \ | 116 | #define GET_TX_DESC_QUEUE_SEL(__pdesc) \ |
121 | LE_BITS_TO_4BYTE(__pdesc+4, 8, 5) | 117 | LE_BITS_TO_4BYTE(__pdesc+4, 8, 5) |
122 | #define GET_TX_DESC_RDG_NAV_EXT(__pdesc) \ | 118 | #define GET_TX_DESC_RDG_NAV_EXT(__pdesc) \ |
123 | LE_BITS_TO_4BYTE(__pdesc+4, 13, 1) | 119 | LE_BITS_TO_4BYTE(__pdesc+4, 13, 1) |
124 | #define GET_TX_DESC_LSIG_TXOP_EN(__pdesc) \ | 120 | #define GET_TX_DESC_LSIG_TXOP_EN(__pdesc) \ |
125 | LE_BITS_TO_4BYTE(__pdesc+4, 14, 1) | 121 | LE_BITS_TO_4BYTE(__pdesc+4, 14, 1) |
126 | #define GET_TX_DESC_PIFS(__pdesc) \ | 122 | #define GET_TX_DESC_PIFS(__pdesc) \ |
127 | LE_BITS_TO_4BYTE(__pdesc+4, 15, 1) | 123 | LE_BITS_TO_4BYTE(__pdesc+4, 15, 1) |
128 | #define GET_TX_DESC_RATE_ID(__pdesc) \ | 124 | #define GET_TX_DESC_RATE_ID(__pdesc) \ |
129 | LE_BITS_TO_4BYTE(__pdesc+4, 16, 4) | 125 | LE_BITS_TO_4BYTE(__pdesc+4, 16, 4) |
130 | #define GET_TX_DESC_NAV_USE_HDR(__pdesc) \ | 126 | #define GET_TX_DESC_NAV_USE_HDR(__pdesc) \ |
131 | LE_BITS_TO_4BYTE(__pdesc+4, 20, 1) | 127 | LE_BITS_TO_4BYTE(__pdesc+4, 20, 1) |
132 | #define GET_TX_DESC_EN_DESC_ID(__pdesc) \ | 128 | #define GET_TX_DESC_EN_DESC_ID(__pdesc) \ |
133 | LE_BITS_TO_4BYTE(__pdesc+4, 21, 1) | 129 | LE_BITS_TO_4BYTE(__pdesc+4, 21, 1) |
134 | #define GET_TX_DESC_SEC_TYPE(__pdesc) \ | 130 | #define GET_TX_DESC_SEC_TYPE(__pdesc) \ |
135 | LE_BITS_TO_4BYTE(__pdesc+4, 22, 2) | 131 | LE_BITS_TO_4BYTE(__pdesc+4, 22, 2) |
136 | #define GET_TX_DESC_PKT_OFFSET(__pdesc) \ | 132 | #define GET_TX_DESC_PKT_OFFSET(__pdesc) \ |
137 | LE_BITS_TO_4BYTE(__pdesc+4, 24, 8) | 133 | LE_BITS_TO_4BYTE(__pdesc+4, 24, 8) |
138 | 134 | ||
139 | #define SET_TX_DESC_RTS_RC(__pdesc, __val) \ | 135 | #define SET_TX_DESC_RTS_RC(__pdesc, __val) \ |
140 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 0, 6, __val) | 136 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 0, 6, __val) |
141 | #define SET_TX_DESC_DATA_RC(__pdesc, __val) \ | 137 | #define SET_TX_DESC_DATA_RC(__pdesc, __val) \ |
142 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 6, 6, __val) | 138 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 6, 6, __val) |
@@ -144,9 +140,9 @@ | |||
144 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 14, 2, __val) | 140 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 14, 2, __val) |
145 | #define SET_TX_DESC_MORE_FRAG(__pdesc, __val) \ | 141 | #define SET_TX_DESC_MORE_FRAG(__pdesc, __val) \ |
146 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 17, 1, __val) | 142 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 17, 1, __val) |
147 | #define SET_TX_DESC_RAW(__pdesc, __val) \ | 143 | #define SET_TX_DESC_RAW(__pdesc, __val) \ |
148 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 18, 1, __val) | 144 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 18, 1, __val) |
149 | #define SET_TX_DESC_CCX(__pdesc, __val) \ | 145 | #define SET_TX_DESC_CCX(__pdesc, __val) \ |
150 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 19, 1, __val) | 146 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 19, 1, __val) |
151 | #define SET_TX_DESC_AMPDU_DENSITY(__pdesc, __val) \ | 147 | #define SET_TX_DESC_AMPDU_DENSITY(__pdesc, __val) \ |
152 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 20, 3, __val) | 148 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 20, 3, __val) |
@@ -161,62 +157,62 @@ | |||
161 | #define SET_TX_DESC_TX_ANT_HT(__pdesc, __val) \ | 157 | #define SET_TX_DESC_TX_ANT_HT(__pdesc, __val) \ |
162 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 30, 2, __val) | 158 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 30, 2, __val) |
163 | 159 | ||
164 | #define GET_TX_DESC_RTS_RC(__pdesc) \ | 160 | #define GET_TX_DESC_RTS_RC(__pdesc) \ |
165 | LE_BITS_TO_4BYTE(__pdesc+8, 0, 6) | 161 | LE_BITS_TO_4BYTE(__pdesc+8, 0, 6) |
166 | #define GET_TX_DESC_DATA_RC(__pdesc) \ | 162 | #define GET_TX_DESC_DATA_RC(__pdesc) \ |
167 | LE_BITS_TO_4BYTE(__pdesc+8, 6, 6) | 163 | LE_BITS_TO_4BYTE(__pdesc+8, 6, 6) |
168 | #define GET_TX_DESC_BAR_RTY_TH(__pdesc) \ | 164 | #define GET_TX_DESC_BAR_RTY_TH(__pdesc) \ |
169 | LE_BITS_TO_4BYTE(__pdesc+8, 14, 2) | 165 | LE_BITS_TO_4BYTE(__pdesc+8, 14, 2) |
170 | #define GET_TX_DESC_MORE_FRAG(__pdesc) \ | 166 | #define GET_TX_DESC_MORE_FRAG(__pdesc) \ |
171 | LE_BITS_TO_4BYTE(__pdesc+8, 17, 1) | 167 | LE_BITS_TO_4BYTE(__pdesc+8, 17, 1) |
172 | #define GET_TX_DESC_RAW(__pdesc) \ | 168 | #define GET_TX_DESC_RAW(__pdesc) \ |
173 | LE_BITS_TO_4BYTE(__pdesc+8, 18, 1) | 169 | LE_BITS_TO_4BYTE(__pdesc+8, 18, 1) |
174 | #define GET_TX_DESC_CCX(__pdesc) \ | 170 | #define GET_TX_DESC_CCX(__pdesc) \ |
175 | LE_BITS_TO_4BYTE(__pdesc+8, 19, 1) | 171 | LE_BITS_TO_4BYTE(__pdesc+8, 19, 1) |
176 | #define GET_TX_DESC_AMPDU_DENSITY(__pdesc) \ | 172 | #define GET_TX_DESC_AMPDU_DENSITY(__pdesc) \ |
177 | LE_BITS_TO_4BYTE(__pdesc+8, 20, 3) | 173 | LE_BITS_TO_4BYTE(__pdesc+8, 20, 3) |
178 | #define GET_TX_DESC_ANTSEL_A(__pdesc) \ | 174 | #define GET_TX_DESC_ANTSEL_A(__pdesc) \ |
179 | LE_BITS_TO_4BYTE(__pdesc+8, 24, 1) | 175 | LE_BITS_TO_4BYTE(__pdesc+8, 24, 1) |
180 | #define GET_TX_DESC_ANTSEL_B(__pdesc) \ | 176 | #define GET_TX_DESC_ANTSEL_B(__pdesc) \ |
181 | LE_BITS_TO_4BYTE(__pdesc+8, 25, 1) | 177 | LE_BITS_TO_4BYTE(__pdesc+8, 25, 1) |
182 | #define GET_TX_DESC_TX_ANT_CCK(__pdesc) \ | 178 | #define GET_TX_DESC_TX_ANT_CCK(__pdesc) \ |
183 | LE_BITS_TO_4BYTE(__pdesc+8, 26, 2) | 179 | LE_BITS_TO_4BYTE(__pdesc+8, 26, 2) |
184 | #define GET_TX_DESC_TX_ANTL(__pdesc) \ | 180 | #define GET_TX_DESC_TX_ANTL(__pdesc) \ |
185 | LE_BITS_TO_4BYTE(__pdesc+8, 28, 2) | 181 | LE_BITS_TO_4BYTE(__pdesc+8, 28, 2) |
186 | #define GET_TX_DESC_TX_ANT_HT(__pdesc) \ | 182 | #define GET_TX_DESC_TX_ANT_HT(__pdesc) \ |
187 | LE_BITS_TO_4BYTE(__pdesc+8, 30, 2) | 183 | LE_BITS_TO_4BYTE(__pdesc+8, 30, 2) |
188 | 184 | ||
189 | #define SET_TX_DESC_NEXT_HEAP_PAGE(__pdesc, __val) \ | 185 | #define SET_TX_DESC_NEXT_HEAP_PAGE(__pdesc, __val) \ |
190 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 0, 8, __val) | 186 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 0, 8, __val) |
191 | #define SET_TX_DESC_TAIL_PAGE(__pdesc, __val) \ | 187 | #define SET_TX_DESC_TAIL_PAGE(__pdesc, __val) \ |
192 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 8, 8, __val) | 188 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 8, 8, __val) |
193 | #define SET_TX_DESC_SEQ(__pdesc, __val) \ | 189 | #define SET_TX_DESC_SEQ(__pdesc, __val) \ |
194 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 16, 12, __val) | 190 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 16, 12, __val) |
195 | #define SET_TX_DESC_PKT_ID(__pdesc, __val) \ | 191 | #define SET_TX_DESC_PKT_ID(__pdesc, __val) \ |
196 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 28, 4, __val) | 192 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 28, 4, __val) |
197 | 193 | ||
198 | #define GET_TX_DESC_NEXT_HEAP_PAGE(__pdesc) \ | 194 | #define GET_TX_DESC_NEXT_HEAP_PAGE(__pdesc) \ |
199 | LE_BITS_TO_4BYTE(__pdesc+12, 0, 8) | 195 | LE_BITS_TO_4BYTE(__pdesc+12, 0, 8) |
200 | #define GET_TX_DESC_TAIL_PAGE(__pdesc) \ | 196 | #define GET_TX_DESC_TAIL_PAGE(__pdesc) \ |
201 | LE_BITS_TO_4BYTE(__pdesc+12, 8, 8) | 197 | LE_BITS_TO_4BYTE(__pdesc+12, 8, 8) |
202 | #define GET_TX_DESC_SEQ(__pdesc) \ | 198 | #define GET_TX_DESC_SEQ(__pdesc) \ |
203 | LE_BITS_TO_4BYTE(__pdesc+12, 16, 12) | 199 | LE_BITS_TO_4BYTE(__pdesc+12, 16, 12) |
204 | #define GET_TX_DESC_PKT_ID(__pdesc) \ | 200 | #define GET_TX_DESC_PKT_ID(__pdesc) \ |
205 | LE_BITS_TO_4BYTE(__pdesc+12, 28, 4) | 201 | LE_BITS_TO_4BYTE(__pdesc+12, 28, 4) |
206 | 202 | ||
207 | /* For RTL8723 */ | 203 | /* For RTL8723 */ |
208 | #define SET_TX_DESC_TRIGGER_INT(__pdesc, __val) \ | 204 | #define SET_TX_DESC_TRIGGER_INT(__pdesc, __val) \ |
209 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 30, 1, __val) | 205 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 30, 1, __val) |
210 | #define SET_TX_DESC_HWSEQ_EN_8723(__pdesc, __val) \ | 206 | #define SET_TX_DESC_HWSEQ_EN_8723(__pdesc, __val) \ |
211 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 31, 1, __val) | 207 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 31, 1, __val) |
212 | #define SET_TX_DESC_HWSEQ_SEL_8723(__pTxDesc, __Value) \ | 208 | #define SET_TX_DESC_HWSEQ_SEL_8723(__txdesc, __value) \ |
213 | SET_BITS_TO_LE_4BYTE(__pTxDesc+16, 6, 2, __Value) | 209 | SET_BITS_TO_LE_4BYTE(__txdesc+16, 6, 2, __value) |
214 | 210 | ||
215 | #define SET_TX_DESC_RTS_RATE(__pdesc, __val) \ | 211 | #define SET_TX_DESC_RTS_RATE(__pdesc, __val) \ |
216 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 0, 5, __val) | 212 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 0, 5, __val) |
217 | #define SET_TX_DESC_AP_DCFE(__pdesc, __val) \ | 213 | #define SET_TX_DESC_AP_DCFE(__pdesc, __val) \ |
218 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 5, 1, __val) | 214 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 5, 1, __val) |
219 | #define SET_TX_DESC_QOS(__pdesc, __val) \ | 215 | #define SET_TX_DESC_QOS(__pdesc, __val) \ |
220 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 6, 1, __val) | 216 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 6, 1, __val) |
221 | #define SET_TX_DESC_HWSEQ_EN(__pdesc, __val) \ | 217 | #define SET_TX_DESC_HWSEQ_EN(__pdesc, __val) \ |
222 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 7, 1, __val) | 218 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 7, 1, __val) |
@@ -248,54 +244,54 @@ | |||
248 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 25, 1, __val) | 244 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 25, 1, __val) |
249 | #define SET_TX_DESC_RTS_SHORT(__pdesc, __val) \ | 245 | #define SET_TX_DESC_RTS_SHORT(__pdesc, __val) \ |
250 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 26, 1, __val) | 246 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 26, 1, __val) |
251 | #define SET_TX_DESC_RTS_BW(__pdesc, __val) \ | 247 | #define SET_TX_DESC_RTS_BW(__pdesc, __val) \ |
252 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 27, 1, __val) | 248 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 27, 1, __val) |
253 | #define SET_TX_DESC_RTS_SC(__pdesc, __val) \ | 249 | #define SET_TX_DESC_RTS_SC(__pdesc, __val) \ |
254 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 28, 2, __val) | 250 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 28, 2, __val) |
255 | #define SET_TX_DESC_RTS_STBC(__pdesc, __val) \ | 251 | #define SET_TX_DESC_RTS_STBC(__pdesc, __val) \ |
256 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 30, 2, __val) | 252 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 30, 2, __val) |
257 | 253 | ||
258 | #define GET_TX_DESC_RTS_RATE(__pdesc) \ | 254 | #define GET_TX_DESC_RTS_RATE(__pdesc) \ |
259 | LE_BITS_TO_4BYTE(__pdesc+16, 0, 5) | 255 | LE_BITS_TO_4BYTE(__pdesc+16, 0, 5) |
260 | #define GET_TX_DESC_AP_DCFE(__pdesc) \ | 256 | #define GET_TX_DESC_AP_DCFE(__pdesc) \ |
261 | LE_BITS_TO_4BYTE(__pdesc+16, 5, 1) | 257 | LE_BITS_TO_4BYTE(__pdesc+16, 5, 1) |
262 | #define GET_TX_DESC_QOS(__pdesc) \ | 258 | #define GET_TX_DESC_QOS(__pdesc) \ |
263 | LE_BITS_TO_4BYTE(__pdesc+16, 6, 1) | 259 | LE_BITS_TO_4BYTE(__pdesc+16, 6, 1) |
264 | #define GET_TX_DESC_HWSEQ_EN(__pdesc) \ | 260 | #define GET_TX_DESC_HWSEQ_EN(__pdesc) \ |
265 | LE_BITS_TO_4BYTE(__pdesc+16, 7, 1) | 261 | LE_BITS_TO_4BYTE(__pdesc+16, 7, 1) |
266 | #define GET_TX_DESC_USE_RATE(__pdesc) \ | 262 | #define GET_TX_DESC_USE_RATE(__pdesc) \ |
267 | LE_BITS_TO_4BYTE(__pdesc+16, 8, 1) | 263 | LE_BITS_TO_4BYTE(__pdesc+16, 8, 1) |
268 | #define GET_TX_DESC_DISABLE_RTS_FB(__pdesc) \ | 264 | #define GET_TX_DESC_DISABLE_RTS_FB(__pdesc) \ |
269 | LE_BITS_TO_4BYTE(__pdesc+16, 9, 1) | 265 | LE_BITS_TO_4BYTE(__pdesc+16, 9, 1) |
270 | #define GET_TX_DESC_DISABLE_FB(__pdesc) \ | 266 | #define GET_TX_DESC_DISABLE_FB(__pdesc) \ |
271 | LE_BITS_TO_4BYTE(__pdesc+16, 10, 1) | 267 | LE_BITS_TO_4BYTE(__pdesc+16, 10, 1) |
272 | #define GET_TX_DESC_CTS2SELF(__pdesc) \ | 268 | #define GET_TX_DESC_CTS2SELF(__pdesc) \ |
273 | LE_BITS_TO_4BYTE(__pdesc+16, 11, 1) | 269 | LE_BITS_TO_4BYTE(__pdesc+16, 11, 1) |
274 | #define GET_TX_DESC_RTS_ENABLE(__pdesc) \ | 270 | #define GET_TX_DESC_RTS_ENABLE(__pdesc) \ |
275 | LE_BITS_TO_4BYTE(__pdesc+16, 12, 1) | 271 | LE_BITS_TO_4BYTE(__pdesc+16, 12, 1) |
276 | #define GET_TX_DESC_HW_RTS_ENABLE(__pdesc) \ | 272 | #define GET_TX_DESC_HW_RTS_ENABLE(__pdesc) \ |
277 | LE_BITS_TO_4BYTE(__pdesc+16, 13, 1) | 273 | LE_BITS_TO_4BYTE(__pdesc+16, 13, 1) |
278 | #define GET_TX_DESC_PORT_ID(__pdesc) \ | 274 | #define GET_TX_DESC_PORT_ID(__pdesc) \ |
279 | LE_BITS_TO_4BYTE(__pdesc+16, 14, 1) | 275 | LE_BITS_TO_4BYTE(__pdesc+16, 14, 1) |
280 | #define GET_TX_DESC_WAIT_DCTS(__pdesc) \ | 276 | #define GET_TX_DESC_WAIT_DCTS(__pdesc) \ |
281 | LE_BITS_TO_4BYTE(__pdesc+16, 18, 1) | 277 | LE_BITS_TO_4BYTE(__pdesc+16, 18, 1) |
282 | #define GET_TX_DESC_CTS2AP_EN(__pdesc) \ | 278 | #define GET_TX_DESC_CTS2AP_EN(__pdesc) \ |
283 | LE_BITS_TO_4BYTE(__pdesc+16, 19, 1) | 279 | LE_BITS_TO_4BYTE(__pdesc+16, 19, 1) |
284 | #define GET_TX_DESC_TX_SUB_CARRIER(__pdesc) \ | 280 | #define GET_TX_DESC_TX_SUB_CARRIER(__pdesc) \ |
285 | LE_BITS_TO_4BYTE(__pdesc+16, 20, 2) | 281 | LE_BITS_TO_4BYTE(__pdesc+16, 20, 2) |
286 | #define GET_TX_DESC_TX_STBC(__pdesc) \ | 282 | #define GET_TX_DESC_TX_STBC(__pdesc) \ |
287 | LE_BITS_TO_4BYTE(__pdesc+16, 22, 2) | 283 | LE_BITS_TO_4BYTE(__pdesc+16, 22, 2) |
288 | #define GET_TX_DESC_DATA_SHORT(__pdesc) \ | 284 | #define GET_TX_DESC_DATA_SHORT(__pdesc) \ |
289 | LE_BITS_TO_4BYTE(__pdesc+16, 24, 1) | 285 | LE_BITS_TO_4BYTE(__pdesc+16, 24, 1) |
290 | #define GET_TX_DESC_DATA_BW(__pdesc) \ | 286 | #define GET_TX_DESC_DATA_BW(__pdesc) \ |
291 | LE_BITS_TO_4BYTE(__pdesc+16, 25, 1) | 287 | LE_BITS_TO_4BYTE(__pdesc+16, 25, 1) |
292 | #define GET_TX_DESC_RTS_SHORT(__pdesc) \ | 288 | #define GET_TX_DESC_RTS_SHORT(__pdesc) \ |
293 | LE_BITS_TO_4BYTE(__pdesc+16, 26, 1) | 289 | LE_BITS_TO_4BYTE(__pdesc+16, 26, 1) |
294 | #define GET_TX_DESC_RTS_BW(__pdesc) \ | 290 | #define GET_TX_DESC_RTS_BW(__pdesc) \ |
295 | LE_BITS_TO_4BYTE(__pdesc+16, 27, 1) | 291 | LE_BITS_TO_4BYTE(__pdesc+16, 27, 1) |
296 | #define GET_TX_DESC_RTS_SC(__pdesc) \ | 292 | #define GET_TX_DESC_RTS_SC(__pdesc) \ |
297 | LE_BITS_TO_4BYTE(__pdesc+16, 28, 2) | 293 | LE_BITS_TO_4BYTE(__pdesc+16, 28, 2) |
298 | #define GET_TX_DESC_RTS_STBC(__pdesc) \ | 294 | #define GET_TX_DESC_RTS_STBC(__pdesc) \ |
299 | LE_BITS_TO_4BYTE(__pdesc+16, 30, 2) | 295 | LE_BITS_TO_4BYTE(__pdesc+16, 30, 2) |
300 | 296 | ||
301 | #define SET_TX_DESC_TX_RATE(__pdesc, __val) \ | 297 | #define SET_TX_DESC_TX_RATE(__pdesc, __val) \ |
@@ -315,17 +311,17 @@ | |||
315 | #define SET_TX_DESC_USB_TXAGG_NUM(__pdesc, __val) \ | 311 | #define SET_TX_DESC_USB_TXAGG_NUM(__pdesc, __val) \ |
316 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 24, 8, __val) | 312 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 24, 8, __val) |
317 | 313 | ||
318 | #define GET_TX_DESC_TX_RATE(__pdesc) \ | 314 | #define GET_TX_DESC_TX_RATE(__pdesc) \ |
319 | LE_BITS_TO_4BYTE(__pdesc+20, 0, 6) | 315 | LE_BITS_TO_4BYTE(__pdesc+20, 0, 6) |
320 | #define GET_TX_DESC_DATA_SHORTGI(__pdesc) \ | 316 | #define GET_TX_DESC_DATA_SHORTGI(__pdesc) \ |
321 | LE_BITS_TO_4BYTE(__pdesc+20, 6, 1) | 317 | LE_BITS_TO_4BYTE(__pdesc+20, 6, 1) |
322 | #define GET_TX_DESC_CCX_TAG(__pdesc) \ | 318 | #define GET_TX_DESC_CCX_TAG(__pdesc) \ |
323 | LE_BITS_TO_4BYTE(__pdesc+20, 7, 1) | 319 | LE_BITS_TO_4BYTE(__pdesc+20, 7, 1) |
324 | #define GET_TX_DESC_DATA_RATE_FB_LIMIT(__pdesc) \ | 320 | #define GET_TX_DESC_DATA_RATE_FB_LIMIT(__pdesc) \ |
325 | LE_BITS_TO_4BYTE(__pdesc+20, 8, 5) | 321 | LE_BITS_TO_4BYTE(__pdesc+20, 8, 5) |
326 | #define GET_TX_DESC_RTS_RATE_FB_LIMIT(__pdesc) \ | 322 | #define GET_TX_DESC_RTS_RATE_FB_LIMIT(__pdesc) \ |
327 | LE_BITS_TO_4BYTE(__pdesc+20, 13, 4) | 323 | LE_BITS_TO_4BYTE(__pdesc+20, 13, 4) |
328 | #define GET_TX_DESC_RETRY_LIMIT_ENABLE(__pdesc) \ | 324 | #define GET_TX_DESC_RETRY_LIMIT_ENABLE(__pdesc) \ |
329 | LE_BITS_TO_4BYTE(__pdesc+20, 17, 1) | 325 | LE_BITS_TO_4BYTE(__pdesc+20, 17, 1) |
330 | #define GET_TX_DESC_DATA_RETRY_LIMIT(__pdesc) \ | 326 | #define GET_TX_DESC_DATA_RETRY_LIMIT(__pdesc) \ |
331 | LE_BITS_TO_4BYTE(__pdesc+20, 18, 6) | 327 | LE_BITS_TO_4BYTE(__pdesc+20, 18, 6) |
@@ -336,9 +332,9 @@ | |||
336 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 0, 5, __val) | 332 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 0, 5, __val) |
337 | #define SET_TX_DESC_TXAGC_B(__pdesc, __val) \ | 333 | #define SET_TX_DESC_TXAGC_B(__pdesc, __val) \ |
338 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 5, 5, __val) | 334 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 5, 5, __val) |
339 | #define SET_TX_DESC_USE_MAX_LEN(__pdesc, __val) \ | 335 | #define SET_TX_DESC_USE_MAX_LEN(__pdesc, __val) \ |
340 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 10, 1, __val) | 336 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 10, 1, __val) |
341 | #define SET_TX_DESC_MAX_AGG_NUM(__pdesc, __val) \ | 337 | #define SET_TX_DESC_MAX_AGG_NUM(__pdesc, __val) \ |
342 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 11, 5, __val) | 338 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 11, 5, __val) |
343 | #define SET_TX_DESC_MCSG1_MAX_LEN(__pdesc, __val) \ | 339 | #define SET_TX_DESC_MCSG1_MAX_LEN(__pdesc, __val) \ |
344 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 16, 4, __val) | 340 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 16, 4, __val) |
@@ -349,19 +345,19 @@ | |||
349 | #define SET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc, __val)\ | 345 | #define SET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc, __val)\ |
350 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 28, 4, __val) | 346 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 28, 4, __val) |
351 | 347 | ||
352 | #define GET_TX_DESC_TXAGC_A(__pdesc) \ | 348 | #define GET_TX_DESC_TXAGC_A(__pdesc) \ |
353 | LE_BITS_TO_4BYTE(__pdesc+24, 0, 5) | 349 | LE_BITS_TO_4BYTE(__pdesc+24, 0, 5) |
354 | #define GET_TX_DESC_TXAGC_B(__pdesc) \ | 350 | #define GET_TX_DESC_TXAGC_B(__pdesc) \ |
355 | LE_BITS_TO_4BYTE(__pdesc+24, 5, 5) | 351 | LE_BITS_TO_4BYTE(__pdesc+24, 5, 5) |
356 | #define GET_TX_DESC_USE_MAX_LEN(__pdesc) \ | 352 | #define GET_TX_DESC_USE_MAX_LEN(__pdesc) \ |
357 | LE_BITS_TO_4BYTE(__pdesc+24, 10, 1) | 353 | LE_BITS_TO_4BYTE(__pdesc+24, 10, 1) |
358 | #define GET_TX_DESC_MAX_AGG_NUM(__pdesc) \ | 354 | #define GET_TX_DESC_MAX_AGG_NUM(__pdesc) \ |
359 | LE_BITS_TO_4BYTE(__pdesc+24, 11, 5) | 355 | LE_BITS_TO_4BYTE(__pdesc+24, 11, 5) |
360 | #define GET_TX_DESC_MCSG1_MAX_LEN(__pdesc) \ | 356 | #define GET_TX_DESC_MCSG1_MAX_LEN(__pdesc) \ |
361 | LE_BITS_TO_4BYTE(__pdesc+24, 16, 4) | 357 | LE_BITS_TO_4BYTE(__pdesc+24, 16, 4) |
362 | #define GET_TX_DESC_MCSG2_MAX_LEN(__pdesc) \ | 358 | #define GET_TX_DESC_MCSG2_MAX_LEN(__pdesc) \ |
363 | LE_BITS_TO_4BYTE(__pdesc+24, 20, 4) | 359 | LE_BITS_TO_4BYTE(__pdesc+24, 20, 4) |
364 | #define GET_TX_DESC_MCSG3_MAX_LEN(__pdesc) \ | 360 | #define GET_TX_DESC_MCSG3_MAX_LEN(__pdesc) \ |
365 | LE_BITS_TO_4BYTE(__pdesc+24, 24, 4) | 361 | LE_BITS_TO_4BYTE(__pdesc+24, 24, 4) |
366 | #define GET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc) \ | 362 | #define GET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc) \ |
367 | LE_BITS_TO_4BYTE(__pdesc+24, 28, 4) | 363 | LE_BITS_TO_4BYTE(__pdesc+24, 28, 4) |
@@ -379,11 +375,11 @@ | |||
379 | 375 | ||
380 | #define GET_TX_DESC_TX_BUFFER_SIZE(__pdesc) \ | 376 | #define GET_TX_DESC_TX_BUFFER_SIZE(__pdesc) \ |
381 | LE_BITS_TO_4BYTE(__pdesc+28, 0, 16) | 377 | LE_BITS_TO_4BYTE(__pdesc+28, 0, 16) |
382 | #define GET_TX_DESC_MCSG4_MAX_LEN(__pdesc) \ | 378 | #define GET_TX_DESC_MCSG4_MAX_LEN(__pdesc) \ |
383 | LE_BITS_TO_4BYTE(__pdesc+28, 16, 4) | 379 | LE_BITS_TO_4BYTE(__pdesc+28, 16, 4) |
384 | #define GET_TX_DESC_MCSG5_MAX_LEN(__pdesc) \ | 380 | #define GET_TX_DESC_MCSG5_MAX_LEN(__pdesc) \ |
385 | LE_BITS_TO_4BYTE(__pdesc+28, 20, 4) | 381 | LE_BITS_TO_4BYTE(__pdesc+28, 20, 4) |
386 | #define GET_TX_DESC_MCSG6_MAX_LEN(__pdesc) \ | 382 | #define GET_TX_DESC_MCSG6_MAX_LEN(__pdesc) \ |
387 | LE_BITS_TO_4BYTE(__pdesc+28, 24, 4) | 383 | LE_BITS_TO_4BYTE(__pdesc+28, 24, 4) |
388 | #define GET_TX_DESC_MCS15_SGI_MAX_LEN(__pdesc) \ | 384 | #define GET_TX_DESC_MCS15_SGI_MAX_LEN(__pdesc) \ |
389 | LE_BITS_TO_4BYTE(__pdesc+28, 28, 4) | 385 | LE_BITS_TO_4BYTE(__pdesc+28, 28, 4) |
@@ -395,7 +391,7 @@ | |||
395 | 391 | ||
396 | #define GET_TX_DESC_TX_BUFFER_ADDRESS(__pdesc) \ | 392 | #define GET_TX_DESC_TX_BUFFER_ADDRESS(__pdesc) \ |
397 | LE_BITS_TO_4BYTE(__pdesc+32, 0, 32) | 393 | LE_BITS_TO_4BYTE(__pdesc+32, 0, 32) |
398 | #define GET_TX_DESC_TX_BUFFER_ADDRESS64(__pdesc) \ | 394 | #define GET_TX_DESC_TX_BUFFER_ADDRESS64(__pdesc) \ |
399 | LE_BITS_TO_4BYTE(__pdesc+36, 0, 32) | 395 | LE_BITS_TO_4BYTE(__pdesc+36, 0, 32) |
400 | 396 | ||
401 | #define SET_TX_DESC_NEXT_DESC_ADDRESS(__pdesc, __val) \ | 397 | #define SET_TX_DESC_NEXT_DESC_ADDRESS(__pdesc, __val) \ |
@@ -410,97 +406,97 @@ | |||
410 | 406 | ||
411 | #define GET_RX_DESC_PKT_LEN(__pdesc) \ | 407 | #define GET_RX_DESC_PKT_LEN(__pdesc) \ |
412 | LE_BITS_TO_4BYTE(__pdesc, 0, 14) | 408 | LE_BITS_TO_4BYTE(__pdesc, 0, 14) |
413 | #define GET_RX_DESC_CRC32(__pdesc) \ | 409 | #define GET_RX_DESC_CRC32(__pdesc) \ |
414 | LE_BITS_TO_4BYTE(__pdesc, 14, 1) | 410 | LE_BITS_TO_4BYTE(__pdesc, 14, 1) |
415 | #define GET_RX_DESC_ICV(__pdesc) \ | 411 | #define GET_RX_DESC_ICV(__pdesc) \ |
416 | LE_BITS_TO_4BYTE(__pdesc, 15, 1) | 412 | LE_BITS_TO_4BYTE(__pdesc, 15, 1) |
417 | #define GET_RX_DESC_DRV_INFO_SIZE(__pdesc) \ | 413 | #define GET_RX_DESC_DRV_INFO_SIZE(__pdesc) \ |
418 | LE_BITS_TO_4BYTE(__pdesc, 16, 4) | 414 | LE_BITS_TO_4BYTE(__pdesc, 16, 4) |
419 | #define GET_RX_DESC_SECURITY(__pdesc) \ | 415 | #define GET_RX_DESC_SECURITY(__pdesc) \ |
420 | LE_BITS_TO_4BYTE(__pdesc, 20, 3) | 416 | LE_BITS_TO_4BYTE(__pdesc, 20, 3) |
421 | #define GET_RX_DESC_QOS(__pdesc) \ | 417 | #define GET_RX_DESC_QOS(__pdesc) \ |
422 | LE_BITS_TO_4BYTE(__pdesc, 23, 1) | 418 | LE_BITS_TO_4BYTE(__pdesc, 23, 1) |
423 | #define GET_RX_DESC_SHIFT(__pdesc) \ | 419 | #define GET_RX_DESC_SHIFT(__pdesc) \ |
424 | LE_BITS_TO_4BYTE(__pdesc, 24, 2) | 420 | LE_BITS_TO_4BYTE(__pdesc, 24, 2) |
425 | #define GET_RX_DESC_PHYST(__pdesc) \ | 421 | #define GET_RX_DESC_PHYST(__pdesc) \ |
426 | LE_BITS_TO_4BYTE(__pdesc, 26, 1) | 422 | LE_BITS_TO_4BYTE(__pdesc, 26, 1) |
427 | #define GET_RX_DESC_SWDEC(__pdesc) \ | 423 | #define GET_RX_DESC_SWDEC(__pdesc) \ |
428 | LE_BITS_TO_4BYTE(__pdesc, 27, 1) | 424 | LE_BITS_TO_4BYTE(__pdesc, 27, 1) |
429 | #define GET_RX_DESC_LS(__pdesc) \ | 425 | #define GET_RX_DESC_LS(__pdesc) \ |
430 | LE_BITS_TO_4BYTE(__pdesc, 28, 1) | 426 | LE_BITS_TO_4BYTE(__pdesc, 28, 1) |
431 | #define GET_RX_DESC_FS(__pdesc) \ | 427 | #define GET_RX_DESC_FS(__pdesc) \ |
432 | LE_BITS_TO_4BYTE(__pdesc, 29, 1) | 428 | LE_BITS_TO_4BYTE(__pdesc, 29, 1) |
433 | #define GET_RX_DESC_EOR(__pdesc) \ | 429 | #define GET_RX_DESC_EOR(__pdesc) \ |
434 | LE_BITS_TO_4BYTE(__pdesc, 30, 1) | 430 | LE_BITS_TO_4BYTE(__pdesc, 30, 1) |
435 | #define GET_RX_DESC_OWN(__pdesc) \ | 431 | #define GET_RX_DESC_OWN(__pdesc) \ |
436 | LE_BITS_TO_4BYTE(__pdesc, 31, 1) | 432 | LE_BITS_TO_4BYTE(__pdesc, 31, 1) |
437 | 433 | ||
438 | #define SET_RX_DESC_PKT_LEN(__pdesc, __val) \ | 434 | #define SET_RX_DESC_PKT_LEN(__pdesc, __val) \ |
439 | SET_BITS_TO_LE_4BYTE(__pdesc, 0, 14, __val) | 435 | SET_BITS_TO_LE_4BYTE(__pdesc, 0, 14, __val) |
440 | #define SET_RX_DESC_EOR(__pdesc, __val) \ | 436 | #define SET_RX_DESC_EOR(__pdesc, __val) \ |
441 | SET_BITS_TO_LE_4BYTE(__pdesc, 30, 1, __val) | 437 | SET_BITS_TO_LE_4BYTE(__pdesc, 30, 1, __val) |
442 | #define SET_RX_DESC_OWN(__pdesc, __val) \ | 438 | #define SET_RX_DESC_OWN(__pdesc, __val) \ |
443 | SET_BITS_TO_LE_4BYTE(__pdesc, 31, 1, __val) | 439 | SET_BITS_TO_LE_4BYTE(__pdesc, 31, 1, __val) |
444 | 440 | ||
445 | #define GET_RX_DESC_MACID(__pdesc) \ | 441 | #define GET_RX_DESC_MACID(__pdesc) \ |
446 | LE_BITS_TO_4BYTE(__pdesc+4, 0, 5) | 442 | LE_BITS_TO_4BYTE(__pdesc+4, 0, 5) |
447 | #define GET_RX_DESC_TID(__pdesc) \ | 443 | #define GET_RX_DESC_TID(__pdesc) \ |
448 | LE_BITS_TO_4BYTE(__pdesc+4, 5, 4) | 444 | LE_BITS_TO_4BYTE(__pdesc+4, 5, 4) |
449 | #define GET_RX_DESC_HWRSVD(__pdesc) \ | 445 | #define GET_RX_DESC_HWRSVD(__pdesc) \ |
450 | LE_BITS_TO_4BYTE(__pdesc+4, 9, 5) | 446 | LE_BITS_TO_4BYTE(__pdesc+4, 9, 5) |
451 | #define GET_RX_DESC_PAGGR(__pdesc) \ | 447 | #define GET_RX_DESC_PAGGR(__pdesc) \ |
452 | LE_BITS_TO_4BYTE(__pdesc+4, 14, 1) | 448 | LE_BITS_TO_4BYTE(__pdesc+4, 14, 1) |
453 | #define GET_RX_DESC_FAGGR(__pdesc) \ | 449 | #define GET_RX_DESC_FAGGR(__pdesc) \ |
454 | LE_BITS_TO_4BYTE(__pdesc+4, 15, 1) | 450 | LE_BITS_TO_4BYTE(__pdesc+4, 15, 1) |
455 | #define GET_RX_DESC_A1_FIT(__pdesc) \ | 451 | #define GET_RX_DESC_A1_FIT(__pdesc) \ |
456 | LE_BITS_TO_4BYTE(__pdesc+4, 16, 4) | 452 | LE_BITS_TO_4BYTE(__pdesc+4, 16, 4) |
457 | #define GET_RX_DESC_A2_FIT(__pdesc) \ | 453 | #define GET_RX_DESC_A2_FIT(__pdesc) \ |
458 | LE_BITS_TO_4BYTE(__pdesc+4, 20, 4) | 454 | LE_BITS_TO_4BYTE(__pdesc+4, 20, 4) |
459 | #define GET_RX_DESC_PAM(__pdesc) \ | 455 | #define GET_RX_DESC_PAM(__pdesc) \ |
460 | LE_BITS_TO_4BYTE(__pdesc+4, 24, 1) | 456 | LE_BITS_TO_4BYTE(__pdesc+4, 24, 1) |
461 | #define GET_RX_DESC_PWR(__pdesc) \ | 457 | #define GET_RX_DESC_PWR(__pdesc) \ |
462 | LE_BITS_TO_4BYTE(__pdesc+4, 25, 1) | 458 | LE_BITS_TO_4BYTE(__pdesc+4, 25, 1) |
463 | #define GET_RX_DESC_MD(__pdesc) \ | 459 | #define GET_RX_DESC_MD(__pdesc) \ |
464 | LE_BITS_TO_4BYTE(__pdesc+4, 26, 1) | 460 | LE_BITS_TO_4BYTE(__pdesc+4, 26, 1) |
465 | #define GET_RX_DESC_MF(__pdesc) \ | 461 | #define GET_RX_DESC_MF(__pdesc) \ |
466 | LE_BITS_TO_4BYTE(__pdesc+4, 27, 1) | 462 | LE_BITS_TO_4BYTE(__pdesc+4, 27, 1) |
467 | #define GET_RX_DESC_TYPE(__pdesc) \ | 463 | #define GET_RX_DESC_TYPE(__pdesc) \ |
468 | LE_BITS_TO_4BYTE(__pdesc+4, 28, 2) | 464 | LE_BITS_TO_4BYTE(__pdesc+4, 28, 2) |
469 | #define GET_RX_DESC_MC(__pdesc) \ | 465 | #define GET_RX_DESC_MC(__pdesc) \ |
470 | LE_BITS_TO_4BYTE(__pdesc+4, 30, 1) | 466 | LE_BITS_TO_4BYTE(__pdesc+4, 30, 1) |
471 | #define GET_RX_DESC_BC(__pdesc) \ | 467 | #define GET_RX_DESC_BC(__pdesc) \ |
472 | LE_BITS_TO_4BYTE(__pdesc+4, 31, 1) | 468 | LE_BITS_TO_4BYTE(__pdesc+4, 31, 1) |
473 | #define GET_RX_DESC_SEQ(__pdesc) \ | 469 | #define GET_RX_DESC_SEQ(__pdesc) \ |
474 | LE_BITS_TO_4BYTE(__pdesc+8, 0, 12) | 470 | LE_BITS_TO_4BYTE(__pdesc+8, 0, 12) |
475 | #define GET_RX_DESC_FRAG(__pdesc) \ | 471 | #define GET_RX_DESC_FRAG(__pdesc) \ |
476 | LE_BITS_TO_4BYTE(__pdesc+8, 12, 4) | 472 | LE_BITS_TO_4BYTE(__pdesc+8, 12, 4) |
477 | #define GET_RX_DESC_NEXT_PKT_LEN(__pdesc) \ | 473 | #define GET_RX_DESC_NEXT_PKT_LEN(__pdesc) \ |
478 | LE_BITS_TO_4BYTE(__pdesc+8, 16, 14) | 474 | LE_BITS_TO_4BYTE(__pdesc+8, 16, 14) |
479 | #define GET_RX_DESC_NEXT_IND(__pdesc) \ | 475 | #define GET_RX_DESC_NEXT_IND(__pdesc) \ |
480 | LE_BITS_TO_4BYTE(__pdesc+8, 30, 1) | 476 | LE_BITS_TO_4BYTE(__pdesc+8, 30, 1) |
481 | #define GET_RX_DESC_RSVD(__pdesc) \ | 477 | #define GET_RX_DESC_RSVD(__pdesc) \ |
482 | LE_BITS_TO_4BYTE(__pdesc+8, 31, 1) | 478 | LE_BITS_TO_4BYTE(__pdesc+8, 31, 1) |
483 | 479 | ||
484 | #define GET_RX_DESC_RXMCS(__pdesc) \ | 480 | #define GET_RX_DESC_RXMCS(__pdesc) \ |
485 | LE_BITS_TO_4BYTE(__pdesc+12, 0, 6) | 481 | LE_BITS_TO_4BYTE(__pdesc+12, 0, 6) |
486 | #define GET_RX_DESC_RXHT(__pdesc) \ | 482 | #define GET_RX_DESC_RXHT(__pdesc) \ |
487 | LE_BITS_TO_4BYTE(__pdesc+12, 6, 1) | 483 | LE_BITS_TO_4BYTE(__pdesc+12, 6, 1) |
488 | #define GET_RX_DESC_SPLCP(__pdesc) \ | 484 | #define GET_RX_DESC_SPLCP(__pdesc) \ |
489 | LE_BITS_TO_4BYTE(__pdesc+12, 8, 1) | 485 | LE_BITS_TO_4BYTE(__pdesc+12, 8, 1) |
490 | #define GET_RX_DESC_BW(__pdesc) \ | 486 | #define GET_RX_DESC_BW(__pdesc) \ |
491 | LE_BITS_TO_4BYTE(__pdesc+12, 9, 1) | 487 | LE_BITS_TO_4BYTE(__pdesc+12, 9, 1) |
492 | #define GET_RX_DESC_HTC(__pdesc) \ | 488 | #define GET_RX_DESC_HTC(__pdesc) \ |
493 | LE_BITS_TO_4BYTE(__pdesc+12, 10, 1) | 489 | LE_BITS_TO_4BYTE(__pdesc+12, 10, 1) |
494 | #define GET_RX_DESC_HWPC_ERR(__pdesc) \ | 490 | #define GET_RX_DESC_HWPC_ERR(__pdesc) \ |
495 | LE_BITS_TO_4BYTE(__pdesc+12, 14, 1) | 491 | LE_BITS_TO_4BYTE(__pdesc+12, 14, 1) |
496 | #define GET_RX_DESC_HWPC_IND(__pdesc) \ | 492 | #define GET_RX_DESC_HWPC_IND(__pdesc) \ |
497 | LE_BITS_TO_4BYTE(__pdesc+12, 15, 1) | 493 | LE_BITS_TO_4BYTE(__pdesc+12, 15, 1) |
498 | #define GET_RX_DESC_IV0(__pdesc) \ | 494 | #define GET_RX_DESC_IV0(__pdesc) \ |
499 | LE_BITS_TO_4BYTE(__pdesc+12, 16, 16) | 495 | LE_BITS_TO_4BYTE(__pdesc+12, 16, 16) |
500 | 496 | ||
501 | #define GET_RX_DESC_IV1(__pdesc) \ | 497 | #define GET_RX_DESC_IV1(__pdesc) \ |
502 | LE_BITS_TO_4BYTE(__pdesc+16, 0, 32) | 498 | LE_BITS_TO_4BYTE(__pdesc+16, 0, 32) |
503 | #define GET_RX_DESC_TSFL(__pdesc) \ | 499 | #define GET_RX_DESC_TSFL(__pdesc) \ |
504 | LE_BITS_TO_4BYTE(__pdesc+20, 0, 32) | 500 | LE_BITS_TO_4BYTE(__pdesc+20, 0, 32) |
505 | 501 | ||
506 | #define GET_RX_DESC_BUFF_ADDR(__pdesc) \ | 502 | #define GET_RX_DESC_BUFF_ADDR(__pdesc) \ |
@@ -508,17 +504,17 @@ | |||
508 | #define GET_RX_DESC_BUFF_ADDR64(__pdesc) \ | 504 | #define GET_RX_DESC_BUFF_ADDR64(__pdesc) \ |
509 | LE_BITS_TO_4BYTE(__pdesc+28, 0, 32) | 505 | LE_BITS_TO_4BYTE(__pdesc+28, 0, 32) |
510 | 506 | ||
511 | #define SET_RX_DESC_BUFF_ADDR(__pdesc, __val) \ | 507 | #define SET_RX_DESC_BUFF_ADDR(__pdesc, __val) \ |
512 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 0, 32, __val) | 508 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 0, 32, __val) |
513 | #define SET_RX_DESC_BUFF_ADDR64(__pdesc, __val) \ | 509 | #define SET_RX_DESC_BUFF_ADDR64(__pdesc, __val) \ |
514 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 0, 32, __val) | 510 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 0, 32, __val) |
515 | 511 | ||
516 | #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size) \ | 512 | #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size) \ |
517 | do { \ | 513 | do { \ |
518 | if (_size > TX_DESC_NEXT_DESC_OFFSET) \ | 514 | if (_size > TX_DESC_NEXT_DESC_OFFSET) \ |
519 | memset(__pdesc, 0, TX_DESC_NEXT_DESC_OFFSET); \ | 515 | memset(__pdesc, 0, TX_DESC_NEXT_DESC_OFFSET); \ |
520 | else \ | 516 | else \ |
521 | memset(__pdesc, 0, _size); \ | 517 | memset(__pdesc, 0, _size); \ |
522 | } while (0) | 518 | } while (0) |
523 | 519 | ||
524 | struct rx_fwinfo_8723e { | 520 | struct rx_fwinfo_8723e { |
@@ -699,22 +695,27 @@ struct rx_desc_8723e { | |||
699 | 695 | ||
700 | } __packed; | 696 | } __packed; |
701 | 697 | ||
702 | void rtl8723ae_tx_fill_desc(struct ieee80211_hw *hw, | 698 | void rtl8723e_tx_fill_desc(struct ieee80211_hw *hw, |
703 | struct ieee80211_hdr *hdr, u8 *pdesc, | 699 | struct ieee80211_hdr *hdr, |
704 | u8 *pbd_desc_tx, struct ieee80211_tx_info *info, | 700 | u8 *pdesc, u8 *txbd, |
705 | struct ieee80211_sta *sta, | 701 | struct ieee80211_tx_info *info, |
706 | struct sk_buff *skb, u8 hw_queue, | 702 | struct ieee80211_sta *sta, |
707 | struct rtl_tcb_desc *ptcb_desc); | 703 | struct sk_buff *skb, u8 hw_queue, |
708 | bool rtl8723ae_rx_query_desc(struct ieee80211_hw *hw, | 704 | struct rtl_tcb_desc *ptcb_desc); |
709 | struct rtl_stats *status, | 705 | bool rtl8723e_rx_query_desc(struct ieee80211_hw *hw, |
710 | struct ieee80211_rx_status *rx_status, | 706 | struct rtl_stats *status, |
711 | u8 *pdesc, struct sk_buff *skb); | 707 | struct ieee80211_rx_status *rx_status, |
712 | void rtl8723ae_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx, | 708 | u8 *pdesc, struct sk_buff *skb); |
713 | u8 desc_name, u8 *val); | 709 | void rtl8723e_set_desc(struct ieee80211_hw *hw, |
714 | u32 rtl8723ae_get_desc(u8 *pdesc, bool istx, u8 desc_name); | 710 | u8 *pdesc, bool istx, u8 desc_name, u8 *val); |
715 | void rtl8723ae_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); | 711 | u32 rtl8723e_get_desc(u8 *pdesc, bool istx, u8 desc_name); |
716 | void rtl8723ae_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, | 712 | bool rtl8723e_is_tx_desc_closed(struct ieee80211_hw *hw, |
717 | bool b_firstseg, bool b_lastseg, | 713 | u8 hw_queue, u16 index); |
714 | void rtl8723e_tx_polling(struct ieee80211_hw *hw, u8 hw_queue); | ||
715 | void rtl8723e_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, | ||
716 | bool firstseg, bool lastseg, | ||
717 | struct sk_buff *skb); | ||
718 | u32 rtl8723e_rx_command_packet(struct ieee80211_hw *hw, | ||
719 | struct rtl_stats status, | ||
718 | struct sk_buff *skb); | 720 | struct sk_buff *skb); |
719 | |||
720 | #endif | 721 | #endif |