diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 19:29:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-16 19:29:25 -0400 |
commit | 7a6362800cb7d1d618a697a650c7aaed3eb39320 (patch) | |
tree | 087f9bc6c13ef1fad4b392c5cf9325cd28fa8523 /drivers/net/wireless/rtlwifi/rtl8192ce/trx.h | |
parent | 6445ced8670f37cfc2c5e24a9de9b413dbfc788d (diff) | |
parent | ceda86a108671294052cbf51660097b6534672f5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1480 commits)
bonding: enable netpoll without checking link status
xfrm: Refcount destination entry on xfrm_lookup
net: introduce rx_handler results and logic around that
bonding: get rid of IFF_SLAVE_INACTIVE netdev->priv_flag
bonding: wrap slave state work
net: get rid of multiple bond-related netdevice->priv_flags
bonding: register slave pointer for rx_handler
be2net: Bump up the version number
be2net: Copyright notice change. Update to Emulex instead of ServerEngines
e1000e: fix kconfig for crc32 dependency
netfilter ebtables: fix xt_AUDIT to work with ebtables
xen network backend driver
bonding: Improve syslog message at device creation time
bonding: Call netif_carrier_off after register_netdevice
bonding: Incorrect TX queue offset
net_sched: fix ip_tos2prio
xfrm: fix __xfrm_route_forward()
be2net: Fix UDP packet detected status in RX compl
Phonet: fix aligned-mode pipe socket buffer header reserve
netxen: support for GbE port settings
...
Fix up conflicts in drivers/staging/brcm80211/brcmsmac/wl_mac80211.c
with the staging updates.
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192ce/trx.h')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192ce/trx.h | 464 |
1 files changed, 245 insertions, 219 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h index 53d0e0a5af5c..803adcc80c96 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h | |||
@@ -40,470 +40,494 @@ | |||
40 | #define USB_HWDESC_HEADER_LEN 32 | 40 | #define USB_HWDESC_HEADER_LEN 32 |
41 | #define CRCLENGTH 4 | 41 | #define CRCLENGTH 4 |
42 | 42 | ||
43 | /* Define a macro that takes a le32 word, converts it to host ordering, | ||
44 | * right shifts by a specified count, creates a mask of the specified | ||
45 | * bit count, and extracts that number of bits. | ||
46 | */ | ||
47 | |||
48 | #define SHIFT_AND_MASK_LE(__pdesc, __shift, __mask) \ | ||
49 | ((le32_to_cpu(*(((__le32 *)(__pdesc)))) >> (__shift)) & \ | ||
50 | BIT_LEN_MASK_32(__mask)) | ||
51 | |||
52 | /* Define a macro that clears a bit field in an le32 word and | ||
53 | * sets the specified value into that bit field. The resulting | ||
54 | * value remains in le32 ordering; however, it is properly converted | ||
55 | * to host ordering for the clear and set operations before conversion | ||
56 | * back to le32. | ||
57 | */ | ||
58 | |||
59 | #define SET_BITS_OFFSET_LE(__pdesc, __shift, __len, __val) \ | ||
60 | (*(__le32 *)(__pdesc) = \ | ||
61 | (cpu_to_le32((le32_to_cpu(*((__le32 *)(__pdesc))) & \ | ||
62 | (~(BIT_OFFSET_LEN_MASK_32((__shift), __len)))) | \ | ||
63 | (((u32)(__val) & BIT_LEN_MASK_32(__len)) << (__shift))))); | ||
64 | |||
65 | /* macros to read/write various fields in RX or TX descriptors */ | ||
66 | |||
43 | #define SET_TX_DESC_PKT_SIZE(__pdesc, __val) \ | 67 | #define SET_TX_DESC_PKT_SIZE(__pdesc, __val) \ |
44 | SET_BITS_TO_LE_4BYTE(__pdesc, 0, 16, __val) | 68 | SET_BITS_OFFSET_LE(__pdesc, 0, 16, __val) |
45 | #define SET_TX_DESC_OFFSET(__pdesc, __val) \ | 69 | #define SET_TX_DESC_OFFSET(__pdesc, __val) \ |
46 | SET_BITS_TO_LE_4BYTE(__pdesc, 16, 8, __val) | 70 | SET_BITS_OFFSET_LE(__pdesc, 16, 8, __val) |
47 | #define SET_TX_DESC_BMC(__pdesc, __val) \ | 71 | #define SET_TX_DESC_BMC(__pdesc, __val) \ |
48 | SET_BITS_TO_LE_4BYTE(__pdesc, 24, 1, __val) | 72 | SET_BITS_OFFSET_LE(__pdesc, 24, 1, __val) |
49 | #define SET_TX_DESC_HTC(__pdesc, __val) \ | 73 | #define SET_TX_DESC_HTC(__pdesc, __val) \ |
50 | SET_BITS_TO_LE_4BYTE(__pdesc, 25, 1, __val) | 74 | SET_BITS_OFFSET_LE(__pdesc, 25, 1, __val) |
51 | #define SET_TX_DESC_LAST_SEG(__pdesc, __val) \ | 75 | #define SET_TX_DESC_LAST_SEG(__pdesc, __val) \ |
52 | SET_BITS_TO_LE_4BYTE(__pdesc, 26, 1, __val) | 76 | SET_BITS_OFFSET_LE(__pdesc, 26, 1, __val) |
53 | #define SET_TX_DESC_FIRST_SEG(__pdesc, __val) \ | 77 | #define SET_TX_DESC_FIRST_SEG(__pdesc, __val) \ |
54 | SET_BITS_TO_LE_4BYTE(__pdesc, 27, 1, __val) | 78 | SET_BITS_OFFSET_LE(__pdesc, 27, 1, __val) |
55 | #define SET_TX_DESC_LINIP(__pdesc, __val) \ | 79 | #define SET_TX_DESC_LINIP(__pdesc, __val) \ |
56 | SET_BITS_TO_LE_4BYTE(__pdesc, 28, 1, __val) | 80 | SET_BITS_OFFSET_LE(__pdesc, 28, 1, __val) |
57 | #define SET_TX_DESC_NO_ACM(__pdesc, __val) \ | 81 | #define SET_TX_DESC_NO_ACM(__pdesc, __val) \ |
58 | SET_BITS_TO_LE_4BYTE(__pdesc, 29, 1, __val) | 82 | SET_BITS_OFFSET_LE(__pdesc, 29, 1, __val) |
59 | #define SET_TX_DESC_GF(__pdesc, __val) \ | 83 | #define SET_TX_DESC_GF(__pdesc, __val) \ |
60 | SET_BITS_TO_LE_4BYTE(__pdesc, 30, 1, __val) | 84 | SET_BITS_OFFSET_LE(__pdesc, 30, 1, __val) |
61 | #define SET_TX_DESC_OWN(__pdesc, __val) \ | 85 | #define SET_TX_DESC_OWN(__pdesc, __val) \ |
62 | SET_BITS_TO_LE_4BYTE(__pdesc, 31, 1, __val) | 86 | SET_BITS_OFFSET_LE(__pdesc, 31, 1, __val) |
63 | 87 | ||
64 | #define GET_TX_DESC_PKT_SIZE(__pdesc) \ | 88 | #define GET_TX_DESC_PKT_SIZE(__pdesc) \ |
65 | LE_BITS_TO_4BYTE(__pdesc, 0, 16) | 89 | SHIFT_AND_MASK_LE(__pdesc, 0, 16) |
66 | #define GET_TX_DESC_OFFSET(__pdesc) \ | 90 | #define GET_TX_DESC_OFFSET(__pdesc) \ |
67 | LE_BITS_TO_4BYTE(__pdesc, 16, 8) | 91 | SHIFT_AND_MASK_LE(__pdesc, 16, 8) |
68 | #define GET_TX_DESC_BMC(__pdesc) \ | 92 | #define GET_TX_DESC_BMC(__pdesc) \ |
69 | LE_BITS_TO_4BYTE(__pdesc, 24, 1) | 93 | SHIFT_AND_MASK_LE(__pdesc, 24, 1) |
70 | #define GET_TX_DESC_HTC(__pdesc) \ | 94 | #define GET_TX_DESC_HTC(__pdesc) \ |
71 | LE_BITS_TO_4BYTE(__pdesc, 25, 1) | 95 | SHIFT_AND_MASK_LE(__pdesc, 25, 1) |
72 | #define GET_TX_DESC_LAST_SEG(__pdesc) \ | 96 | #define GET_TX_DESC_LAST_SEG(__pdesc) \ |
73 | LE_BITS_TO_4BYTE(__pdesc, 26, 1) | 97 | SHIFT_AND_MASK_LE(__pdesc, 26, 1) |
74 | #define GET_TX_DESC_FIRST_SEG(__pdesc) \ | 98 | #define GET_TX_DESC_FIRST_SEG(__pdesc) \ |
75 | LE_BITS_TO_4BYTE(__pdesc, 27, 1) | 99 | SHIFT_AND_MASK_LE(__pdesc, 27, 1) |
76 | #define GET_TX_DESC_LINIP(__pdesc) \ | 100 | #define GET_TX_DESC_LINIP(__pdesc) \ |
77 | LE_BITS_TO_4BYTE(__pdesc, 28, 1) | 101 | SHIFT_AND_MASK_LE(__pdesc, 28, 1) |
78 | #define GET_TX_DESC_NO_ACM(__pdesc) \ | 102 | #define GET_TX_DESC_NO_ACM(__pdesc) \ |
79 | LE_BITS_TO_4BYTE(__pdesc, 29, 1) | 103 | SHIFT_AND_MASK_LE(__pdesc, 29, 1) |
80 | #define GET_TX_DESC_GF(__pdesc) \ | 104 | #define GET_TX_DESC_GF(__pdesc) \ |
81 | LE_BITS_TO_4BYTE(__pdesc, 30, 1) | 105 | SHIFT_AND_MASK_LE(__pdesc, 30, 1) |
82 | #define GET_TX_DESC_OWN(__pdesc) \ | 106 | #define GET_TX_DESC_OWN(__pdesc) \ |
83 | LE_BITS_TO_4BYTE(__pdesc, 31, 1) | 107 | SHIFT_AND_MASK_LE(__pdesc, 31, 1) |
84 | 108 | ||
85 | #define SET_TX_DESC_MACID(__pdesc, __val) \ | 109 | #define SET_TX_DESC_MACID(__pdesc, __val) \ |
86 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 0, 5, __val) | 110 | SET_BITS_OFFSET_LE(__pdesc+4, 0, 5, __val) |
87 | #define SET_TX_DESC_AGG_BREAK(__pdesc, __val) \ | 111 | #define SET_TX_DESC_AGG_BREAK(__pdesc, __val) \ |
88 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 5, 1, __val) | 112 | SET_BITS_OFFSET_LE(__pdesc+4, 5, 1, __val) |
89 | #define SET_TX_DESC_BK(__pdesc, __val) \ | 113 | #define SET_TX_DESC_BK(__pdesc, __val) \ |
90 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 6, 1, __val) | 114 | SET_BITS_OFFSET_LE(__pdesc+4, 6, 1, __val) |
91 | #define SET_TX_DESC_RDG_ENABLE(__pdesc, __val) \ | 115 | #define SET_TX_DESC_RDG_ENABLE(__pdesc, __val) \ |
92 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 7, 1, __val) | 116 | SET_BITS_OFFSET_LE(__pdesc+4, 7, 1, __val) |
93 | #define SET_TX_DESC_QUEUE_SEL(__pdesc, __val) \ | 117 | #define SET_TX_DESC_QUEUE_SEL(__pdesc, __val) \ |
94 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 8, 5, __val) | 118 | SET_BITS_OFFSET_LE(__pdesc+4, 8, 5, __val) |
95 | #define SET_TX_DESC_RDG_NAV_EXT(__pdesc, __val) \ | 119 | #define SET_TX_DESC_RDG_NAV_EXT(__pdesc, __val) \ |
96 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 13, 1, __val) | 120 | SET_BITS_OFFSET_LE(__pdesc+4, 13, 1, __val) |
97 | #define SET_TX_DESC_LSIG_TXOP_EN(__pdesc, __val) \ | 121 | #define SET_TX_DESC_LSIG_TXOP_EN(__pdesc, __val) \ |
98 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 14, 1, __val) | 122 | SET_BITS_OFFSET_LE(__pdesc+4, 14, 1, __val) |
99 | #define SET_TX_DESC_PIFS(__pdesc, __val) \ | 123 | #define SET_TX_DESC_PIFS(__pdesc, __val) \ |
100 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 15, 1, __val) | 124 | SET_BITS_OFFSET_LE(__pdesc+4, 15, 1, __val) |
101 | #define SET_TX_DESC_RATE_ID(__pdesc, __val) \ | 125 | #define SET_TX_DESC_RATE_ID(__pdesc, __val) \ |
102 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 16, 4, __val) | 126 | SET_BITS_OFFSET_LE(__pdesc+4, 16, 4, __val) |
103 | #define SET_TX_DESC_NAV_USE_HDR(__pdesc, __val) \ | 127 | #define SET_TX_DESC_NAV_USE_HDR(__pdesc, __val) \ |
104 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 20, 1, __val) | 128 | SET_BITS_OFFSET_LE(__pdesc+4, 20, 1, __val) |
105 | #define SET_TX_DESC_EN_DESC_ID(__pdesc, __val) \ | 129 | #define SET_TX_DESC_EN_DESC_ID(__pdesc, __val) \ |
106 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 21, 1, __val) | 130 | SET_BITS_OFFSET_LE(__pdesc+4, 21, 1, __val) |
107 | #define SET_TX_DESC_SEC_TYPE(__pdesc, __val) \ | 131 | #define SET_TX_DESC_SEC_TYPE(__pdesc, __val) \ |
108 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 22, 2, __val) | 132 | SET_BITS_OFFSET_LE(__pdesc+4, 22, 2, __val) |
109 | #define SET_TX_DESC_PKT_OFFSET(__pdesc, __val) \ | 133 | #define SET_TX_DESC_PKT_OFFSET(__pdesc, __val) \ |
110 | SET_BITS_TO_LE_4BYTE(__pdesc+4, 24, 8, __val) | 134 | SET_BITS_OFFSET_LE(__pdesc+4, 24, 8, __val) |
111 | 135 | ||
112 | #define GET_TX_DESC_MACID(__pdesc) \ | 136 | #define GET_TX_DESC_MACID(__pdesc) \ |
113 | LE_BITS_TO_4BYTE(__pdesc+4, 0, 5) | 137 | SHIFT_AND_MASK_LE(__pdesc+4, 0, 5) |
114 | #define GET_TX_DESC_AGG_ENABLE(__pdesc) \ | 138 | #define GET_TX_DESC_AGG_ENABLE(__pdesc) \ |
115 | LE_BITS_TO_4BYTE(__pdesc+4, 5, 1) | 139 | SHIFT_AND_MASK_LE(__pdesc+4, 5, 1) |
116 | #define GET_TX_DESC_AGG_BREAK(__pdesc) \ | 140 | #define GET_TX_DESC_AGG_BREAK(__pdesc) \ |
117 | LE_BITS_TO_4BYTE(__pdesc+4, 6, 1) | 141 | SHIFT_AND_MASK_LE(__pdesc+4, 6, 1) |
118 | #define GET_TX_DESC_RDG_ENABLE(__pdesc) \ | 142 | #define GET_TX_DESC_RDG_ENABLE(__pdesc) \ |
119 | LE_BITS_TO_4BYTE(__pdesc+4, 7, 1) | 143 | SHIFT_AND_MASK_LE(__pdesc+4, 7, 1) |
120 | #define GET_TX_DESC_QUEUE_SEL(__pdesc) \ | 144 | #define GET_TX_DESC_QUEUE_SEL(__pdesc) \ |
121 | LE_BITS_TO_4BYTE(__pdesc+4, 8, 5) | 145 | SHIFT_AND_MASK_LE(__pdesc+4, 8, 5) |
122 | #define GET_TX_DESC_RDG_NAV_EXT(__pdesc) \ | 146 | #define GET_TX_DESC_RDG_NAV_EXT(__pdesc) \ |
123 | LE_BITS_TO_4BYTE(__pdesc+4, 13, 1) | 147 | SHIFT_AND_MASK_LE(__pdesc+4, 13, 1) |
124 | #define GET_TX_DESC_LSIG_TXOP_EN(__pdesc) \ | 148 | #define GET_TX_DESC_LSIG_TXOP_EN(__pdesc) \ |
125 | LE_BITS_TO_4BYTE(__pdesc+4, 14, 1) | 149 | SHIFT_AND_MASK_LE(__pdesc+4, 14, 1) |
126 | #define GET_TX_DESC_PIFS(__pdesc) \ | 150 | #define GET_TX_DESC_PIFS(__pdesc) \ |
127 | LE_BITS_TO_4BYTE(__pdesc+4, 15, 1) | 151 | SHIFT_AND_MASK_LE(__pdesc+4, 15, 1) |
128 | #define GET_TX_DESC_RATE_ID(__pdesc) \ | 152 | #define GET_TX_DESC_RATE_ID(__pdesc) \ |
129 | LE_BITS_TO_4BYTE(__pdesc+4, 16, 4) | 153 | SHIFT_AND_MASK_LE(__pdesc+4, 16, 4) |
130 | #define GET_TX_DESC_NAV_USE_HDR(__pdesc) \ | 154 | #define GET_TX_DESC_NAV_USE_HDR(__pdesc) \ |
131 | LE_BITS_TO_4BYTE(__pdesc+4, 20, 1) | 155 | SHIFT_AND_MASK_LE(__pdesc+4, 20, 1) |
132 | #define GET_TX_DESC_EN_DESC_ID(__pdesc) \ | 156 | #define GET_TX_DESC_EN_DESC_ID(__pdesc) \ |
133 | LE_BITS_TO_4BYTE(__pdesc+4, 21, 1) | 157 | SHIFT_AND_MASK_LE(__pdesc+4, 21, 1) |
134 | #define GET_TX_DESC_SEC_TYPE(__pdesc) \ | 158 | #define GET_TX_DESC_SEC_TYPE(__pdesc) \ |
135 | LE_BITS_TO_4BYTE(__pdesc+4, 22, 2) | 159 | SHIFT_AND_MASK_LE(__pdesc+4, 22, 2) |
136 | #define GET_TX_DESC_PKT_OFFSET(__pdesc) \ | 160 | #define GET_TX_DESC_PKT_OFFSET(__pdesc) \ |
137 | LE_BITS_TO_4BYTE(__pdesc+4, 24, 8) | 161 | SHIFT_AND_MASK_LE(__pdesc+4, 24, 8) |
138 | 162 | ||
139 | #define SET_TX_DESC_RTS_RC(__pdesc, __val) \ | 163 | #define SET_TX_DESC_RTS_RC(__pdesc, __val) \ |
140 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 0, 6, __val) | 164 | SET_BITS_OFFSET_LE(__pdesc+8, 0, 6, __val) |
141 | #define SET_TX_DESC_DATA_RC(__pdesc, __val) \ | 165 | #define SET_TX_DESC_DATA_RC(__pdesc, __val) \ |
142 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 6, 6, __val) | 166 | SET_BITS_OFFSET_LE(__pdesc+8, 6, 6, __val) |
143 | #define SET_TX_DESC_BAR_RTY_TH(__pdesc, __val) \ | 167 | #define SET_TX_DESC_BAR_RTY_TH(__pdesc, __val) \ |
144 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 14, 2, __val) | 168 | SET_BITS_OFFSET_LE(__pdesc+8, 14, 2, __val) |
145 | #define SET_TX_DESC_MORE_FRAG(__pdesc, __val) \ | 169 | #define SET_TX_DESC_MORE_FRAG(__pdesc, __val) \ |
146 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 17, 1, __val) | 170 | SET_BITS_OFFSET_LE(__pdesc+8, 17, 1, __val) |
147 | #define SET_TX_DESC_RAW(__pdesc, __val) \ | 171 | #define SET_TX_DESC_RAW(__pdesc, __val) \ |
148 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 18, 1, __val) | 172 | SET_BITS_OFFSET_LE(__pdesc+8, 18, 1, __val) |
149 | #define SET_TX_DESC_CCX(__pdesc, __val) \ | 173 | #define SET_TX_DESC_CCX(__pdesc, __val) \ |
150 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 19, 1, __val) | 174 | SET_BITS_OFFSET_LE(__pdesc+8, 19, 1, __val) |
151 | #define SET_TX_DESC_AMPDU_DENSITY(__pdesc, __val) \ | 175 | #define SET_TX_DESC_AMPDU_DENSITY(__pdesc, __val) \ |
152 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 20, 3, __val) | 176 | SET_BITS_OFFSET_LE(__pdesc+8, 20, 3, __val) |
153 | #define SET_TX_DESC_ANTSEL_A(__pdesc, __val) \ | 177 | #define SET_TX_DESC_ANTSEL_A(__pdesc, __val) \ |
154 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 24, 1, __val) | 178 | SET_BITS_OFFSET_LE(__pdesc+8, 24, 1, __val) |
155 | #define SET_TX_DESC_ANTSEL_B(__pdesc, __val) \ | 179 | #define SET_TX_DESC_ANTSEL_B(__pdesc, __val) \ |
156 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 25, 1, __val) | 180 | SET_BITS_OFFSET_LE(__pdesc+8, 25, 1, __val) |
157 | #define SET_TX_DESC_TX_ANT_CCK(__pdesc, __val) \ | 181 | #define SET_TX_DESC_TX_ANT_CCK(__pdesc, __val) \ |
158 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 26, 2, __val) | 182 | SET_BITS_OFFSET_LE(__pdesc+8, 26, 2, __val) |
159 | #define SET_TX_DESC_TX_ANTL(__pdesc, __val) \ | 183 | #define SET_TX_DESC_TX_ANTL(__pdesc, __val) \ |
160 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 28, 2, __val) | 184 | SET_BITS_OFFSET_LE(__pdesc+8, 28, 2, __val) |
161 | #define SET_TX_DESC_TX_ANT_HT(__pdesc, __val) \ | 185 | #define SET_TX_DESC_TX_ANT_HT(__pdesc, __val) \ |
162 | SET_BITS_TO_LE_4BYTE(__pdesc+8, 30, 2, __val) | 186 | SET_BITS_OFFSET_LE(__pdesc+8, 30, 2, __val) |
163 | 187 | ||
164 | #define GET_TX_DESC_RTS_RC(__pdesc) \ | 188 | #define GET_TX_DESC_RTS_RC(__pdesc) \ |
165 | LE_BITS_TO_4BYTE(__pdesc+8, 0, 6) | 189 | SHIFT_AND_MASK_LE(__pdesc+8, 0, 6) |
166 | #define GET_TX_DESC_DATA_RC(__pdesc) \ | 190 | #define GET_TX_DESC_DATA_RC(__pdesc) \ |
167 | LE_BITS_TO_4BYTE(__pdesc+8, 6, 6) | 191 | SHIFT_AND_MASK_LE(__pdesc+8, 6, 6) |
168 | #define GET_TX_DESC_BAR_RTY_TH(__pdesc) \ | 192 | #define GET_TX_DESC_BAR_RTY_TH(__pdesc) \ |
169 | LE_BITS_TO_4BYTE(__pdesc+8, 14, 2) | 193 | SHIFT_AND_MASK_LE(__pdesc+8, 14, 2) |
170 | #define GET_TX_DESC_MORE_FRAG(__pdesc) \ | 194 | #define GET_TX_DESC_MORE_FRAG(__pdesc) \ |
171 | LE_BITS_TO_4BYTE(__pdesc+8, 17, 1) | 195 | SHIFT_AND_MASK_LE(__pdesc+8, 17, 1) |
172 | #define GET_TX_DESC_RAW(__pdesc) \ | 196 | #define GET_TX_DESC_RAW(__pdesc) \ |
173 | LE_BITS_TO_4BYTE(__pdesc+8, 18, 1) | 197 | SHIFT_AND_MASK_LE(__pdesc+8, 18, 1) |
174 | #define GET_TX_DESC_CCX(__pdesc) \ | 198 | #define GET_TX_DESC_CCX(__pdesc) \ |
175 | LE_BITS_TO_4BYTE(__pdesc+8, 19, 1) | 199 | SHIFT_AND_MASK_LE(__pdesc+8, 19, 1) |
176 | #define GET_TX_DESC_AMPDU_DENSITY(__pdesc) \ | 200 | #define GET_TX_DESC_AMPDU_DENSITY(__pdesc) \ |
177 | LE_BITS_TO_4BYTE(__pdesc+8, 20, 3) | 201 | SHIFT_AND_MASK_LE(__pdesc+8, 20, 3) |
178 | #define GET_TX_DESC_ANTSEL_A(__pdesc) \ | 202 | #define GET_TX_DESC_ANTSEL_A(__pdesc) \ |
179 | LE_BITS_TO_4BYTE(__pdesc+8, 24, 1) | 203 | SHIFT_AND_MASK_LE(__pdesc+8, 24, 1) |
180 | #define GET_TX_DESC_ANTSEL_B(__pdesc) \ | 204 | #define GET_TX_DESC_ANTSEL_B(__pdesc) \ |
181 | LE_BITS_TO_4BYTE(__pdesc+8, 25, 1) | 205 | SHIFT_AND_MASK_LE(__pdesc+8, 25, 1) |
182 | #define GET_TX_DESC_TX_ANT_CCK(__pdesc) \ | 206 | #define GET_TX_DESC_TX_ANT_CCK(__pdesc) \ |
183 | LE_BITS_TO_4BYTE(__pdesc+8, 26, 2) | 207 | SHIFT_AND_MASK_LE(__pdesc+8, 26, 2) |
184 | #define GET_TX_DESC_TX_ANTL(__pdesc) \ | 208 | #define GET_TX_DESC_TX_ANTL(__pdesc) \ |
185 | LE_BITS_TO_4BYTE(__pdesc+8, 28, 2) | 209 | SHIFT_AND_MASK_LE(__pdesc+8, 28, 2) |
186 | #define GET_TX_DESC_TX_ANT_HT(__pdesc) \ | 210 | #define GET_TX_DESC_TX_ANT_HT(__pdesc) \ |
187 | LE_BITS_TO_4BYTE(__pdesc+8, 30, 2) | 211 | SHIFT_AND_MASK_LE(__pdesc+8, 30, 2) |
188 | 212 | ||
189 | #define SET_TX_DESC_NEXT_HEAP_PAGE(__pdesc, __val) \ | 213 | #define SET_TX_DESC_NEXT_HEAP_PAGE(__pdesc, __val) \ |
190 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 0, 8, __val) | 214 | SET_BITS_OFFSET_LE(__pdesc+12, 0, 8, __val) |
191 | #define SET_TX_DESC_TAIL_PAGE(__pdesc, __val) \ | 215 | #define SET_TX_DESC_TAIL_PAGE(__pdesc, __val) \ |
192 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 8, 8, __val) | 216 | SET_BITS_OFFSET_LE(__pdesc+12, 8, 8, __val) |
193 | #define SET_TX_DESC_SEQ(__pdesc, __val) \ | 217 | #define SET_TX_DESC_SEQ(__pdesc, __val) \ |
194 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 16, 12, __val) | 218 | SET_BITS_OFFSET_LE(__pdesc+12, 16, 12, __val) |
195 | #define SET_TX_DESC_PKT_ID(__pdesc, __val) \ | 219 | #define SET_TX_DESC_PKT_ID(__pdesc, __val) \ |
196 | SET_BITS_TO_LE_4BYTE(__pdesc+12, 28, 4, __val) | 220 | SET_BITS_OFFSET_LE(__pdesc+12, 28, 4, __val) |
197 | 221 | ||
198 | #define GET_TX_DESC_NEXT_HEAP_PAGE(__pdesc) \ | 222 | #define GET_TX_DESC_NEXT_HEAP_PAGE(__pdesc) \ |
199 | LE_BITS_TO_4BYTE(__pdesc+12, 0, 8) | 223 | SHIFT_AND_MASK_LE(__pdesc+12, 0, 8) |
200 | #define GET_TX_DESC_TAIL_PAGE(__pdesc) \ | 224 | #define GET_TX_DESC_TAIL_PAGE(__pdesc) \ |
201 | LE_BITS_TO_4BYTE(__pdesc+12, 8, 8) | 225 | SHIFT_AND_MASK_LE(__pdesc+12, 8, 8) |
202 | #define GET_TX_DESC_SEQ(__pdesc) \ | 226 | #define GET_TX_DESC_SEQ(__pdesc) \ |
203 | LE_BITS_TO_4BYTE(__pdesc+12, 16, 12) | 227 | SHIFT_AND_MASK_LE(__pdesc+12, 16, 12) |
204 | #define GET_TX_DESC_PKT_ID(__pdesc) \ | 228 | #define GET_TX_DESC_PKT_ID(__pdesc) \ |
205 | LE_BITS_TO_4BYTE(__pdesc+12, 28, 4) | 229 | SHIFT_AND_MASK_LE(__pdesc+12, 28, 4) |
206 | 230 | ||
207 | #define SET_TX_DESC_RTS_RATE(__pdesc, __val) \ | 231 | #define SET_TX_DESC_RTS_RATE(__pdesc, __val) \ |
208 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 0, 5, __val) | 232 | SET_BITS_OFFSET_LE(__pdesc+16, 0, 5, __val) |
209 | #define SET_TX_DESC_AP_DCFE(__pdesc, __val) \ | 233 | #define SET_TX_DESC_AP_DCFE(__pdesc, __val) \ |
210 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 5, 1, __val) | 234 | SET_BITS_OFFSET_LE(__pdesc+16, 5, 1, __val) |
211 | #define SET_TX_DESC_QOS(__pdesc, __val) \ | 235 | #define SET_TX_DESC_QOS(__pdesc, __val) \ |
212 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 6, 1, __val) | 236 | SET_BITS_OFFSET_LE(__pdesc+16, 6, 1, __val) |
213 | #define SET_TX_DESC_HWSEQ_EN(__pdesc, __val) \ | 237 | #define SET_TX_DESC_HWSEQ_EN(__pdesc, __val) \ |
214 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 7, 1, __val) | 238 | SET_BITS_OFFSET_LE(__pdesc+16, 7, 1, __val) |
215 | #define SET_TX_DESC_USE_RATE(__pdesc, __val) \ | 239 | #define SET_TX_DESC_USE_RATE(__pdesc, __val) \ |
216 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 8, 1, __val) | 240 | SET_BITS_OFFSET_LE(__pdesc+16, 8, 1, __val) |
217 | #define SET_TX_DESC_DISABLE_RTS_FB(__pdesc, __val) \ | 241 | #define SET_TX_DESC_DISABLE_RTS_FB(__pdesc, __val) \ |
218 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 9, 1, __val) | 242 | SET_BITS_OFFSET_LE(__pdesc+16, 9, 1, __val) |
219 | #define SET_TX_DESC_DISABLE_FB(__pdesc, __val) \ | 243 | #define SET_TX_DESC_DISABLE_FB(__pdesc, __val) \ |
220 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 10, 1, __val) | 244 | SET_BITS_OFFSET_LE(__pdesc+16, 10, 1, __val) |
221 | #define SET_TX_DESC_CTS2SELF(__pdesc, __val) \ | 245 | #define SET_TX_DESC_CTS2SELF(__pdesc, __val) \ |
222 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 11, 1, __val) | 246 | SET_BITS_OFFSET_LE(__pdesc+16, 11, 1, __val) |
223 | #define SET_TX_DESC_RTS_ENABLE(__pdesc, __val) \ | 247 | #define SET_TX_DESC_RTS_ENABLE(__pdesc, __val) \ |
224 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 12, 1, __val) | 248 | SET_BITS_OFFSET_LE(__pdesc+16, 12, 1, __val) |
225 | #define SET_TX_DESC_HW_RTS_ENABLE(__pdesc, __val) \ | 249 | #define SET_TX_DESC_HW_RTS_ENABLE(__pdesc, __val) \ |
226 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 13, 1, __val) | 250 | SET_BITS_OFFSET_LE(__pdesc+16, 13, 1, __val) |
227 | #define SET_TX_DESC_PORT_ID(__pdesc, __val) \ | 251 | #define SET_TX_DESC_PORT_ID(__pdesc, __val) \ |
228 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 14, 1, __val) | 252 | SET_BITS_OFFSET_LE(__pdesc+16, 14, 1, __val) |
229 | #define SET_TX_DESC_WAIT_DCTS(__pdesc, __val) \ | 253 | #define SET_TX_DESC_WAIT_DCTS(__pdesc, __val) \ |
230 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 18, 1, __val) | 254 | SET_BITS_OFFSET_LE(__pdesc+16, 18, 1, __val) |
231 | #define SET_TX_DESC_CTS2AP_EN(__pdesc, __val) \ | 255 | #define SET_TX_DESC_CTS2AP_EN(__pdesc, __val) \ |
232 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 19, 1, __val) | 256 | SET_BITS_OFFSET_LE(__pdesc+16, 19, 1, __val) |
233 | #define SET_TX_DESC_TX_SUB_CARRIER(__pdesc, __val) \ | 257 | #define SET_TX_DESC_TX_SUB_CARRIER(__pdesc, __val) \ |
234 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 20, 2, __val) | 258 | SET_BITS_OFFSET_LE(__pdesc+16, 20, 2, __val) |
235 | #define SET_TX_DESC_TX_STBC(__pdesc, __val) \ | 259 | #define SET_TX_DESC_TX_STBC(__pdesc, __val) \ |
236 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 22, 2, __val) | 260 | SET_BITS_OFFSET_LE(__pdesc+16, 22, 2, __val) |
237 | #define SET_TX_DESC_DATA_SHORT(__pdesc, __val) \ | 261 | #define SET_TX_DESC_DATA_SHORT(__pdesc, __val) \ |
238 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 24, 1, __val) | 262 | SET_BITS_OFFSET_LE(__pdesc+16, 24, 1, __val) |
239 | #define SET_TX_DESC_DATA_BW(__pdesc, __val) \ | 263 | #define SET_TX_DESC_DATA_BW(__pdesc, __val) \ |
240 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 25, 1, __val) | 264 | SET_BITS_OFFSET_LE(__pdesc+16, 25, 1, __val) |
241 | #define SET_TX_DESC_RTS_SHORT(__pdesc, __val) \ | 265 | #define SET_TX_DESC_RTS_SHORT(__pdesc, __val) \ |
242 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 26, 1, __val) | 266 | SET_BITS_OFFSET_LE(__pdesc+16, 26, 1, __val) |
243 | #define SET_TX_DESC_RTS_BW(__pdesc, __val) \ | 267 | #define SET_TX_DESC_RTS_BW(__pdesc, __val) \ |
244 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 27, 1, __val) | 268 | SET_BITS_OFFSET_LE(__pdesc+16, 27, 1, __val) |
245 | #define SET_TX_DESC_RTS_SC(__pdesc, __val) \ | 269 | #define SET_TX_DESC_RTS_SC(__pdesc, __val) \ |
246 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 28, 2, __val) | 270 | SET_BITS_OFFSET_LE(__pdesc+16, 28, 2, __val) |
247 | #define SET_TX_DESC_RTS_STBC(__pdesc, __val) \ | 271 | #define SET_TX_DESC_RTS_STBC(__pdesc, __val) \ |
248 | SET_BITS_TO_LE_4BYTE(__pdesc+16, 30, 2, __val) | 272 | SET_BITS_OFFSET_LE(__pdesc+16, 30, 2, __val) |
249 | 273 | ||
250 | #define GET_TX_DESC_RTS_RATE(__pdesc) \ | 274 | #define GET_TX_DESC_RTS_RATE(__pdesc) \ |
251 | LE_BITS_TO_4BYTE(__pdesc+16, 0, 5) | 275 | SHIFT_AND_MASK_LE(__pdesc+16, 0, 5) |
252 | #define GET_TX_DESC_AP_DCFE(__pdesc) \ | 276 | #define GET_TX_DESC_AP_DCFE(__pdesc) \ |
253 | LE_BITS_TO_4BYTE(__pdesc+16, 5, 1) | 277 | SHIFT_AND_MASK_LE(__pdesc+16, 5, 1) |
254 | #define GET_TX_DESC_QOS(__pdesc) \ | 278 | #define GET_TX_DESC_QOS(__pdesc) \ |
255 | LE_BITS_TO_4BYTE(__pdesc+16, 6, 1) | 279 | SHIFT_AND_MASK_LE(__pdesc+16, 6, 1) |
256 | #define GET_TX_DESC_HWSEQ_EN(__pdesc) \ | 280 | #define GET_TX_DESC_HWSEQ_EN(__pdesc) \ |
257 | LE_BITS_TO_4BYTE(__pdesc+16, 7, 1) | 281 | SHIFT_AND_MASK_LE(__pdesc+16, 7, 1) |
258 | #define GET_TX_DESC_USE_RATE(__pdesc) \ | 282 | #define GET_TX_DESC_USE_RATE(__pdesc) \ |
259 | LE_BITS_TO_4BYTE(__pdesc+16, 8, 1) | 283 | SHIFT_AND_MASK_LE(__pdesc+16, 8, 1) |
260 | #define GET_TX_DESC_DISABLE_RTS_FB(__pdesc) \ | 284 | #define GET_TX_DESC_DISABLE_RTS_FB(__pdesc) \ |
261 | LE_BITS_TO_4BYTE(__pdesc+16, 9, 1) | 285 | SHIFT_AND_MASK_LE(__pdesc+16, 9, 1) |
262 | #define GET_TX_DESC_DISABLE_FB(__pdesc) \ | 286 | #define GET_TX_DESC_DISABLE_FB(__pdesc) \ |
263 | LE_BITS_TO_4BYTE(__pdesc+16, 10, 1) | 287 | SHIFT_AND_MASK_LE(__pdesc+16, 10, 1) |
264 | #define GET_TX_DESC_CTS2SELF(__pdesc) \ | 288 | #define GET_TX_DESC_CTS2SELF(__pdesc) \ |
265 | LE_BITS_TO_4BYTE(__pdesc+16, 11, 1) | 289 | SHIFT_AND_MASK_LE(__pdesc+16, 11, 1) |
266 | #define GET_TX_DESC_RTS_ENABLE(__pdesc) \ | 290 | #define GET_TX_DESC_RTS_ENABLE(__pdesc) \ |
267 | LE_BITS_TO_4BYTE(__pdesc+16, 12, 1) | 291 | SHIFT_AND_MASK_LE(__pdesc+16, 12, 1) |
268 | #define GET_TX_DESC_HW_RTS_ENABLE(__pdesc) \ | 292 | #define GET_TX_DESC_HW_RTS_ENABLE(__pdesc) \ |
269 | LE_BITS_TO_4BYTE(__pdesc+16, 13, 1) | 293 | SHIFT_AND_MASK_LE(__pdesc+16, 13, 1) |
270 | #define GET_TX_DESC_PORT_ID(__pdesc) \ | 294 | #define GET_TX_DESC_PORT_ID(__pdesc) \ |
271 | LE_BITS_TO_4BYTE(__pdesc+16, 14, 1) | 295 | SHIFT_AND_MASK_LE(__pdesc+16, 14, 1) |
272 | #define GET_TX_DESC_WAIT_DCTS(__pdesc) \ | 296 | #define GET_TX_DESC_WAIT_DCTS(__pdesc) \ |
273 | LE_BITS_TO_4BYTE(__pdesc+16, 18, 1) | 297 | SHIFT_AND_MASK_LE(__pdesc+16, 18, 1) |
274 | #define GET_TX_DESC_CTS2AP_EN(__pdesc) \ | 298 | #define GET_TX_DESC_CTS2AP_EN(__pdesc) \ |
275 | LE_BITS_TO_4BYTE(__pdesc+16, 19, 1) | 299 | SHIFT_AND_MASK_LE(__pdesc+16, 19, 1) |
276 | #define GET_TX_DESC_TX_SUB_CARRIER(__pdesc) \ | 300 | #define GET_TX_DESC_TX_SUB_CARRIER(__pdesc) \ |
277 | LE_BITS_TO_4BYTE(__pdesc+16, 20, 2) | 301 | SHIFT_AND_MASK_LE(__pdesc+16, 20, 2) |
278 | #define GET_TX_DESC_TX_STBC(__pdesc) \ | 302 | #define GET_TX_DESC_TX_STBC(__pdesc) \ |
279 | LE_BITS_TO_4BYTE(__pdesc+16, 22, 2) | 303 | SHIFT_AND_MASK_LE(__pdesc+16, 22, 2) |
280 | #define GET_TX_DESC_DATA_SHORT(__pdesc) \ | 304 | #define GET_TX_DESC_DATA_SHORT(__pdesc) \ |
281 | LE_BITS_TO_4BYTE(__pdesc+16, 24, 1) | 305 | SHIFT_AND_MASK_LE(__pdesc+16, 24, 1) |
282 | #define GET_TX_DESC_DATA_BW(__pdesc) \ | 306 | #define GET_TX_DESC_DATA_BW(__pdesc) \ |
283 | LE_BITS_TO_4BYTE(__pdesc+16, 25, 1) | 307 | SHIFT_AND_MASK_LE(__pdesc+16, 25, 1) |
284 | #define GET_TX_DESC_RTS_SHORT(__pdesc) \ | 308 | #define GET_TX_DESC_RTS_SHORT(__pdesc) \ |
285 | LE_BITS_TO_4BYTE(__pdesc+16, 26, 1) | 309 | SHIFT_AND_MASK_LE(__pdesc+16, 26, 1) |
286 | #define GET_TX_DESC_RTS_BW(__pdesc) \ | 310 | #define GET_TX_DESC_RTS_BW(__pdesc) \ |
287 | LE_BITS_TO_4BYTE(__pdesc+16, 27, 1) | 311 | SHIFT_AND_MASK_LE(__pdesc+16, 27, 1) |
288 | #define GET_TX_DESC_RTS_SC(__pdesc) \ | 312 | #define GET_TX_DESC_RTS_SC(__pdesc) \ |
289 | LE_BITS_TO_4BYTE(__pdesc+16, 28, 2) | 313 | SHIFT_AND_MASK_LE(__pdesc+16, 28, 2) |
290 | #define GET_TX_DESC_RTS_STBC(__pdesc) \ | 314 | #define GET_TX_DESC_RTS_STBC(__pdesc) \ |
291 | LE_BITS_TO_4BYTE(__pdesc+16, 30, 2) | 315 | SHIFT_AND_MASK_LE(__pdesc+16, 30, 2) |
292 | 316 | ||
293 | #define SET_TX_DESC_TX_RATE(__pdesc, __val) \ | 317 | #define SET_TX_DESC_TX_RATE(__pdesc, __val) \ |
294 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 0, 6, __val) | 318 | SET_BITS_OFFSET_LE(__pdesc+20, 0, 6, __val) |
295 | #define SET_TX_DESC_DATA_SHORTGI(__pdesc, __val) \ | 319 | #define SET_TX_DESC_DATA_SHORTGI(__pdesc, __val) \ |
296 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 6, 1, __val) | 320 | SET_BITS_OFFSET_LE(__pdesc+20, 6, 1, __val) |
297 | #define SET_TX_DESC_CCX_TAG(__pdesc, __val) \ | 321 | #define SET_TX_DESC_CCX_TAG(__pdesc, __val) \ |
298 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 7, 1, __val) | 322 | SET_BITS_OFFSET_LE(__pdesc+20, 7, 1, __val) |
299 | #define SET_TX_DESC_DATA_RATE_FB_LIMIT(__pdesc, __val) \ | 323 | #define SET_TX_DESC_DATA_RATE_FB_LIMIT(__pdesc, __val) \ |
300 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 8, 5, __val) | 324 | SET_BITS_OFFSET_LE(__pdesc+20, 8, 5, __val) |
301 | #define SET_TX_DESC_RTS_RATE_FB_LIMIT(__pdesc, __val) \ | 325 | #define SET_TX_DESC_RTS_RATE_FB_LIMIT(__pdesc, __val) \ |
302 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 13, 4, __val) | 326 | SET_BITS_OFFSET_LE(__pdesc+20, 13, 4, __val) |
303 | #define SET_TX_DESC_RETRY_LIMIT_ENABLE(__pdesc, __val) \ | 327 | #define SET_TX_DESC_RETRY_LIMIT_ENABLE(__pdesc, __val) \ |
304 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 17, 1, __val) | 328 | SET_BITS_OFFSET_LE(__pdesc+20, 17, 1, __val) |
305 | #define SET_TX_DESC_DATA_RETRY_LIMIT(__pdesc, __val) \ | 329 | #define SET_TX_DESC_DATA_RETRY_LIMIT(__pdesc, __val) \ |
306 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 18, 6, __val) | 330 | SET_BITS_OFFSET_LE(__pdesc+20, 18, 6, __val) |
307 | #define SET_TX_DESC_USB_TXAGG_NUM(__pdesc, __val) \ | 331 | #define SET_TX_DESC_USB_TXAGG_NUM(__pdesc, __val) \ |
308 | SET_BITS_TO_LE_4BYTE(__pdesc+20, 24, 8, __val) | 332 | SET_BITS_OFFSET_LE(__pdesc+20, 24, 8, __val) |
309 | 333 | ||
310 | #define GET_TX_DESC_TX_RATE(__pdesc) \ | 334 | #define GET_TX_DESC_TX_RATE(__pdesc) \ |
311 | LE_BITS_TO_4BYTE(__pdesc+20, 0, 6) | 335 | SHIFT_AND_MASK_LE(__pdesc+20, 0, 6) |
312 | #define GET_TX_DESC_DATA_SHORTGI(__pdesc) \ | 336 | #define GET_TX_DESC_DATA_SHORTGI(__pdesc) \ |
313 | LE_BITS_TO_4BYTE(__pdesc+20, 6, 1) | 337 | SHIFT_AND_MASK_LE(__pdesc+20, 6, 1) |
314 | #define GET_TX_DESC_CCX_TAG(__pdesc) \ | 338 | #define GET_TX_DESC_CCX_TAG(__pdesc) \ |
315 | LE_BITS_TO_4BYTE(__pdesc+20, 7, 1) | 339 | SHIFT_AND_MASK_LE(__pdesc+20, 7, 1) |
316 | #define GET_TX_DESC_DATA_RATE_FB_LIMIT(__pdesc) \ | 340 | #define GET_TX_DESC_DATA_RATE_FB_LIMIT(__pdesc) \ |
317 | LE_BITS_TO_4BYTE(__pdesc+20, 8, 5) | 341 | SHIFT_AND_MASK_LE(__pdesc+20, 8, 5) |
318 | #define GET_TX_DESC_RTS_RATE_FB_LIMIT(__pdesc) \ | 342 | #define GET_TX_DESC_RTS_RATE_FB_LIMIT(__pdesc) \ |
319 | LE_BITS_TO_4BYTE(__pdesc+20, 13, 4) | 343 | SHIFT_AND_MASK_LE(__pdesc+20, 13, 4) |
320 | #define GET_TX_DESC_RETRY_LIMIT_ENABLE(__pdesc) \ | 344 | #define GET_TX_DESC_RETRY_LIMIT_ENABLE(__pdesc) \ |
321 | LE_BITS_TO_4BYTE(__pdesc+20, 17, 1) | 345 | SHIFT_AND_MASK_LE(__pdesc+20, 17, 1) |
322 | #define GET_TX_DESC_DATA_RETRY_LIMIT(__pdesc) \ | 346 | #define GET_TX_DESC_DATA_RETRY_LIMIT(__pdesc) \ |
323 | LE_BITS_TO_4BYTE(__pdesc+20, 18, 6) | 347 | SHIFT_AND_MASK_LE(__pdesc+20, 18, 6) |
324 | #define GET_TX_DESC_USB_TXAGG_NUM(__pdesc) \ | 348 | #define GET_TX_DESC_USB_TXAGG_NUM(__pdesc) \ |
325 | LE_BITS_TO_4BYTE(__pdesc+20, 24, 8) | 349 | SHIFT_AND_MASK_LE(__pdesc+20, 24, 8) |
326 | 350 | ||
327 | #define SET_TX_DESC_TXAGC_A(__pdesc, __val) \ | 351 | #define SET_TX_DESC_TXAGC_A(__pdesc, __val) \ |
328 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 0, 5, __val) | 352 | SET_BITS_OFFSET_LE(__pdesc+24, 0, 5, __val) |
329 | #define SET_TX_DESC_TXAGC_B(__pdesc, __val) \ | 353 | #define SET_TX_DESC_TXAGC_B(__pdesc, __val) \ |
330 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 5, 5, __val) | 354 | SET_BITS_OFFSET_LE(__pdesc+24, 5, 5, __val) |
331 | #define SET_TX_DESC_USE_MAX_LEN(__pdesc, __val) \ | 355 | #define SET_TX_DESC_USE_MAX_LEN(__pdesc, __val) \ |
332 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 10, 1, __val) | 356 | SET_BITS_OFFSET_LE(__pdesc+24, 10, 1, __val) |
333 | #define SET_TX_DESC_MAX_AGG_NUM(__pdesc, __val) \ | 357 | #define SET_TX_DESC_MAX_AGG_NUM(__pdesc, __val) \ |
334 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 11, 5, __val) | 358 | SET_BITS_OFFSET_LE(__pdesc+24, 11, 5, __val) |
335 | #define SET_TX_DESC_MCSG1_MAX_LEN(__pdesc, __val) \ | 359 | #define SET_TX_DESC_MCSG1_MAX_LEN(__pdesc, __val) \ |
336 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 16, 4, __val) | 360 | SET_BITS_OFFSET_LE(__pdesc+24, 16, 4, __val) |
337 | #define SET_TX_DESC_MCSG2_MAX_LEN(__pdesc, __val) \ | 361 | #define SET_TX_DESC_MCSG2_MAX_LEN(__pdesc, __val) \ |
338 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 20, 4, __val) | 362 | SET_BITS_OFFSET_LE(__pdesc+24, 20, 4, __val) |
339 | #define SET_TX_DESC_MCSG3_MAX_LEN(__pdesc, __val) \ | 363 | #define SET_TX_DESC_MCSG3_MAX_LEN(__pdesc, __val) \ |
340 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 24, 4, __val) | 364 | SET_BITS_OFFSET_LE(__pdesc+24, 24, 4, __val) |
341 | #define SET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc, __val) \ | 365 | #define SET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc, __val) \ |
342 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 28, 4, __val) | 366 | SET_BITS_OFFSET_LE(__pdesc+24, 28, 4, __val) |
343 | 367 | ||
344 | #define GET_TX_DESC_TXAGC_A(__pdesc) \ | 368 | #define GET_TX_DESC_TXAGC_A(__pdesc) \ |
345 | LE_BITS_TO_4BYTE(__pdesc+24, 0, 5) | 369 | SHIFT_AND_MASK_LE(__pdesc+24, 0, 5) |
346 | #define GET_TX_DESC_TXAGC_B(__pdesc) \ | 370 | #define GET_TX_DESC_TXAGC_B(__pdesc) \ |
347 | LE_BITS_TO_4BYTE(__pdesc+24, 5, 5) | 371 | SHIFT_AND_MASK_LE(__pdesc+24, 5, 5) |
348 | #define GET_TX_DESC_USE_MAX_LEN(__pdesc) \ | 372 | #define GET_TX_DESC_USE_MAX_LEN(__pdesc) \ |
349 | LE_BITS_TO_4BYTE(__pdesc+24, 10, 1) | 373 | SHIFT_AND_MASK_LE(__pdesc+24, 10, 1) |
350 | #define GET_TX_DESC_MAX_AGG_NUM(__pdesc) \ | 374 | #define GET_TX_DESC_MAX_AGG_NUM(__pdesc) \ |
351 | LE_BITS_TO_4BYTE(__pdesc+24, 11, 5) | 375 | SHIFT_AND_MASK_LE(__pdesc+24, 11, 5) |
352 | #define GET_TX_DESC_MCSG1_MAX_LEN(__pdesc) \ | 376 | #define GET_TX_DESC_MCSG1_MAX_LEN(__pdesc) \ |
353 | LE_BITS_TO_4BYTE(__pdesc+24, 16, 4) | 377 | SHIFT_AND_MASK_LE(__pdesc+24, 16, 4) |
354 | #define GET_TX_DESC_MCSG2_MAX_LEN(__pdesc) \ | 378 | #define GET_TX_DESC_MCSG2_MAX_LEN(__pdesc) \ |
355 | LE_BITS_TO_4BYTE(__pdesc+24, 20, 4) | 379 | SHIFT_AND_MASK_LE(__pdesc+24, 20, 4) |
356 | #define GET_TX_DESC_MCSG3_MAX_LEN(__pdesc) \ | 380 | #define GET_TX_DESC_MCSG3_MAX_LEN(__pdesc) \ |
357 | LE_BITS_TO_4BYTE(__pdesc+24, 24, 4) | 381 | SHIFT_AND_MASK_LE(__pdesc+24, 24, 4) |
358 | #define GET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc) \ | 382 | #define GET_TX_DESC_MCS7_SGI_MAX_LEN(__pdesc) \ |
359 | LE_BITS_TO_4BYTE(__pdesc+24, 28, 4) | 383 | SHIFT_AND_MASK_LE(__pdesc+24, 28, 4) |
360 | 384 | ||
361 | #define SET_TX_DESC_TX_BUFFER_SIZE(__pdesc, __val) \ | 385 | #define SET_TX_DESC_TX_BUFFER_SIZE(__pdesc, __val) \ |
362 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 0, 16, __val) | 386 | SET_BITS_OFFSET_LE(__pdesc+28, 0, 16, __val) |
363 | #define SET_TX_DESC_MCSG4_MAX_LEN(__pdesc, __val) \ | 387 | #define SET_TX_DESC_MCSG4_MAX_LEN(__pdesc, __val) \ |
364 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 16, 4, __val) | 388 | SET_BITS_OFFSET_LE(__pdesc+28, 16, 4, __val) |
365 | #define SET_TX_DESC_MCSG5_MAX_LEN(__pdesc, __val) \ | 389 | #define SET_TX_DESC_MCSG5_MAX_LEN(__pdesc, __val) \ |
366 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 20, 4, __val) | 390 | SET_BITS_OFFSET_LE(__pdesc+28, 20, 4, __val) |
367 | #define SET_TX_DESC_MCSG6_MAX_LEN(__pdesc, __val) \ | 391 | #define SET_TX_DESC_MCSG6_MAX_LEN(__pdesc, __val) \ |
368 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 24, 4, __val) | 392 | SET_BITS_OFFSET_LE(__pdesc+28, 24, 4, __val) |
369 | #define SET_TX_DESC_MCS15_SGI_MAX_LEN(__pdesc, __val) \ | 393 | #define SET_TX_DESC_MCS15_SGI_MAX_LEN(__pdesc, __val) \ |
370 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 28, 4, __val) | 394 | SET_BITS_OFFSET_LE(__pdesc+28, 28, 4, __val) |
371 | 395 | ||
372 | #define GET_TX_DESC_TX_BUFFER_SIZE(__pdesc) \ | 396 | #define GET_TX_DESC_TX_BUFFER_SIZE(__pdesc) \ |
373 | LE_BITS_TO_4BYTE(__pdesc+28, 0, 16) | 397 | SHIFT_AND_MASK_LE(__pdesc+28, 0, 16) |
374 | #define GET_TX_DESC_MCSG4_MAX_LEN(__pdesc) \ | 398 | #define GET_TX_DESC_MCSG4_MAX_LEN(__pdesc) \ |
375 | LE_BITS_TO_4BYTE(__pdesc+28, 16, 4) | 399 | SHIFT_AND_MASK_LE(__pdesc+28, 16, 4) |
376 | #define GET_TX_DESC_MCSG5_MAX_LEN(__pdesc) \ | 400 | #define GET_TX_DESC_MCSG5_MAX_LEN(__pdesc) \ |
377 | LE_BITS_TO_4BYTE(__pdesc+28, 20, 4) | 401 | SHIFT_AND_MASK_LE(__pdesc+28, 20, 4) |
378 | #define GET_TX_DESC_MCSG6_MAX_LEN(__pdesc) \ | 402 | #define GET_TX_DESC_MCSG6_MAX_LEN(__pdesc) \ |
379 | LE_BITS_TO_4BYTE(__pdesc+28, 24, 4) | 403 | SHIFT_AND_MASK_LE(__pdesc+28, 24, 4) |
380 | #define GET_TX_DESC_MCS15_SGI_MAX_LEN(__pdesc) \ | 404 | #define GET_TX_DESC_MCS15_SGI_MAX_LEN(__pdesc) \ |
381 | LE_BITS_TO_4BYTE(__pdesc+28, 28, 4) | 405 | SHIFT_AND_MASK_LE(__pdesc+28, 28, 4) |
382 | 406 | ||
383 | #define SET_TX_DESC_TX_BUFFER_ADDRESS(__pdesc, __val) \ | 407 | #define SET_TX_DESC_TX_BUFFER_ADDRESS(__pdesc, __val) \ |
384 | SET_BITS_TO_LE_4BYTE(__pdesc+32, 0, 32, __val) | 408 | SET_BITS_OFFSET_LE(__pdesc+32, 0, 32, __val) |
385 | #define SET_TX_DESC_TX_BUFFER_ADDRESS64(__pdesc, __val) \ | 409 | #define SET_TX_DESC_TX_BUFFER_ADDRESS64(__pdesc, __val) \ |
386 | SET_BITS_TO_LE_4BYTE(__pdesc+36, 0, 32, __val) | 410 | SET_BITS_OFFSET_LE(__pdesc+36, 0, 32, __val) |
387 | 411 | ||
388 | #define GET_TX_DESC_TX_BUFFER_ADDRESS(__pdesc) \ | 412 | #define GET_TX_DESC_TX_BUFFER_ADDRESS(__pdesc) \ |
389 | LE_BITS_TO_4BYTE(__pdesc+32, 0, 32) | 413 | SHIFT_AND_MASK_LE(__pdesc+32, 0, 32) |
390 | #define GET_TX_DESC_TX_BUFFER_ADDRESS64(__pdesc) \ | 414 | #define GET_TX_DESC_TX_BUFFER_ADDRESS64(__pdesc) \ |
391 | LE_BITS_TO_4BYTE(__pdesc+36, 0, 32) | 415 | SHIFT_AND_MASK_LE(__pdesc+36, 0, 32) |
392 | 416 | ||
393 | #define SET_TX_DESC_NEXT_DESC_ADDRESS(__pdesc, __val) \ | 417 | #define SET_TX_DESC_NEXT_DESC_ADDRESS(__pdesc, __val) \ |
394 | SET_BITS_TO_LE_4BYTE(__pdesc+40, 0, 32, __val) | 418 | SET_BITS_OFFSET_LE(__pdesc+40, 0, 32, __val) |
395 | #define SET_TX_DESC_NEXT_DESC_ADDRESS64(__pdesc, __val) \ | 419 | #define SET_TX_DESC_NEXT_DESC_ADDRESS64(__pdesc, __val) \ |
396 | SET_BITS_TO_LE_4BYTE(__pdesc+44, 0, 32, __val) | 420 | SET_BITS_OFFSET_LE(__pdesc+44, 0, 32, __val) |
397 | 421 | ||
398 | #define GET_TX_DESC_NEXT_DESC_ADDRESS(__pdesc) \ | 422 | #define GET_TX_DESC_NEXT_DESC_ADDRESS(__pdesc) \ |
399 | LE_BITS_TO_4BYTE(__pdesc+40, 0, 32) | 423 | SHIFT_AND_MASK_LE(__pdesc+40, 0, 32) |
400 | #define GET_TX_DESC_NEXT_DESC_ADDRESS64(__pdesc) \ | 424 | #define GET_TX_DESC_NEXT_DESC_ADDRESS64(__pdesc) \ |
401 | LE_BITS_TO_4BYTE(__pdesc+44, 0, 32) | 425 | SHIFT_AND_MASK_LE(__pdesc+44, 0, 32) |
402 | 426 | ||
403 | #define GET_RX_DESC_PKT_LEN(__pdesc) \ | 427 | #define GET_RX_DESC_PKT_LEN(__pdesc) \ |
404 | LE_BITS_TO_4BYTE(__pdesc, 0, 14) | 428 | SHIFT_AND_MASK_LE(__pdesc, 0, 14) |
405 | #define GET_RX_DESC_CRC32(__pdesc) \ | 429 | #define GET_RX_DESC_CRC32(__pdesc) \ |
406 | LE_BITS_TO_4BYTE(__pdesc, 14, 1) | 430 | SHIFT_AND_MASK_LE(__pdesc, 14, 1) |
407 | #define GET_RX_DESC_ICV(__pdesc) \ | 431 | #define GET_RX_DESC_ICV(__pdesc) \ |
408 | LE_BITS_TO_4BYTE(__pdesc, 15, 1) | 432 | SHIFT_AND_MASK_LE(__pdesc, 15, 1) |
409 | #define GET_RX_DESC_DRV_INFO_SIZE(__pdesc) \ | 433 | #define GET_RX_DESC_DRV_INFO_SIZE(__pdesc) \ |
410 | LE_BITS_TO_4BYTE(__pdesc, 16, 4) | 434 | SHIFT_AND_MASK_LE(__pdesc, 16, 4) |
411 | #define GET_RX_DESC_SECURITY(__pdesc) \ | 435 | #define GET_RX_DESC_SECURITY(__pdesc) \ |
412 | LE_BITS_TO_4BYTE(__pdesc, 20, 3) | 436 | SHIFT_AND_MASK_LE(__pdesc, 20, 3) |
413 | #define GET_RX_DESC_QOS(__pdesc) \ | 437 | #define GET_RX_DESC_QOS(__pdesc) \ |
414 | LE_BITS_TO_4BYTE(__pdesc, 23, 1) | 438 | SHIFT_AND_MASK_LE(__pdesc, 23, 1) |
415 | #define GET_RX_DESC_SHIFT(__pdesc) \ | 439 | #define GET_RX_DESC_SHIFT(__pdesc) \ |
416 | LE_BITS_TO_4BYTE(__pdesc, 24, 2) | 440 | SHIFT_AND_MASK_LE(__pdesc, 24, 2) |
417 | #define GET_RX_DESC_PHYST(__pdesc) \ | 441 | #define GET_RX_DESC_PHYST(__pdesc) \ |
418 | LE_BITS_TO_4BYTE(__pdesc, 26, 1) | 442 | SHIFT_AND_MASK_LE(__pdesc, 26, 1) |
419 | #define GET_RX_DESC_SWDEC(__pdesc) \ | 443 | #define GET_RX_DESC_SWDEC(__pdesc) \ |
420 | LE_BITS_TO_4BYTE(__pdesc, 27, 1) | 444 | SHIFT_AND_MASK_LE(__pdesc, 27, 1) |
421 | #define GET_RX_DESC_LS(__pdesc) \ | 445 | #define GET_RX_DESC_LS(__pdesc) \ |
422 | LE_BITS_TO_4BYTE(__pdesc, 28, 1) | 446 | SHIFT_AND_MASK_LE(__pdesc, 28, 1) |
423 | #define GET_RX_DESC_FS(__pdesc) \ | 447 | #define GET_RX_DESC_FS(__pdesc) \ |
424 | LE_BITS_TO_4BYTE(__pdesc, 29, 1) | 448 | SHIFT_AND_MASK_LE(__pdesc, 29, 1) |
425 | #define GET_RX_DESC_EOR(__pdesc) \ | 449 | #define GET_RX_DESC_EOR(__pdesc) \ |
426 | LE_BITS_TO_4BYTE(__pdesc, 30, 1) | 450 | SHIFT_AND_MASK_LE(__pdesc, 30, 1) |
427 | #define GET_RX_DESC_OWN(__pdesc) \ | 451 | #define GET_RX_DESC_OWN(__pdesc) \ |
428 | LE_BITS_TO_4BYTE(__pdesc, 31, 1) | 452 | SHIFT_AND_MASK_LE(__pdesc, 31, 1) |
429 | 453 | ||
430 | #define SET_RX_DESC_PKT_LEN(__pdesc, __val) \ | 454 | #define SET_RX_DESC_PKT_LEN(__pdesc, __val) \ |
431 | SET_BITS_TO_LE_4BYTE(__pdesc, 0, 14, __val) | 455 | SET_BITS_OFFSET_LE(__pdesc, 0, 14, __val) |
432 | #define SET_RX_DESC_EOR(__pdesc, __val) \ | 456 | #define SET_RX_DESC_EOR(__pdesc, __val) \ |
433 | SET_BITS_TO_LE_4BYTE(__pdesc, 30, 1, __val) | 457 | SET_BITS_OFFSET_LE(__pdesc, 30, 1, __val) |
434 | #define SET_RX_DESC_OWN(__pdesc, __val) \ | 458 | #define SET_RX_DESC_OWN(__pdesc, __val) \ |
435 | SET_BITS_TO_LE_4BYTE(__pdesc, 31, 1, __val) | 459 | SET_BITS_OFFSET_LE(__pdesc, 31, 1, __val) |
436 | 460 | ||
437 | #define GET_RX_DESC_MACID(__pdesc) \ | 461 | #define GET_RX_DESC_MACID(__pdesc) \ |
438 | LE_BITS_TO_4BYTE(__pdesc+4, 0, 5) | 462 | SHIFT_AND_MASK_LE(__pdesc+4, 0, 5) |
439 | #define GET_RX_DESC_TID(__pdesc) \ | 463 | #define GET_RX_DESC_TID(__pdesc) \ |
440 | LE_BITS_TO_4BYTE(__pdesc+4, 5, 4) | 464 | SHIFT_AND_MASK_LE(__pdesc+4, 5, 4) |
441 | #define GET_RX_DESC_HWRSVD(__pdesc) \ | 465 | #define GET_RX_DESC_HWRSVD(__pdesc) \ |
442 | LE_BITS_TO_4BYTE(__pdesc+4, 9, 5) | 466 | SHIFT_AND_MASK_LE(__pdesc+4, 9, 5) |
443 | #define GET_RX_DESC_PAGGR(__pdesc) \ | 467 | #define GET_RX_DESC_PAGGR(__pdesc) \ |
444 | LE_BITS_TO_4BYTE(__pdesc+4, 14, 1) | 468 | SHIFT_AND_MASK_LE(__pdesc+4, 14, 1) |
445 | #define GET_RX_DESC_FAGGR(__pdesc) \ | 469 | #define GET_RX_DESC_FAGGR(__pdesc) \ |
446 | LE_BITS_TO_4BYTE(__pdesc+4, 15, 1) | 470 | SHIFT_AND_MASK_LE(__pdesc+4, 15, 1) |
447 | #define GET_RX_DESC_A1_FIT(__pdesc) \ | 471 | #define GET_RX_DESC_A1_FIT(__pdesc) \ |
448 | LE_BITS_TO_4BYTE(__pdesc+4, 16, 4) | 472 | SHIFT_AND_MASK_LE(__pdesc+4, 16, 4) |
449 | #define GET_RX_DESC_A2_FIT(__pdesc) \ | 473 | #define GET_RX_DESC_A2_FIT(__pdesc) \ |
450 | LE_BITS_TO_4BYTE(__pdesc+4, 20, 4) | 474 | SHIFT_AND_MASK_LE(__pdesc+4, 20, 4) |
451 | #define GET_RX_DESC_PAM(__pdesc) \ | 475 | #define GET_RX_DESC_PAM(__pdesc) \ |
452 | LE_BITS_TO_4BYTE(__pdesc+4, 24, 1) | 476 | SHIFT_AND_MASK_LE(__pdesc+4, 24, 1) |
453 | #define GET_RX_DESC_PWR(__pdesc) \ | 477 | #define GET_RX_DESC_PWR(__pdesc) \ |
454 | LE_BITS_TO_4BYTE(__pdesc+4, 25, 1) | 478 | SHIFT_AND_MASK_LE(__pdesc+4, 25, 1) |
455 | #define GET_RX_DESC_MD(__pdesc) \ | 479 | #define GET_RX_DESC_MD(__pdesc) \ |
456 | LE_BITS_TO_4BYTE(__pdesc+4, 26, 1) | 480 | SHIFT_AND_MASK_LE(__pdesc+4, 26, 1) |
457 | #define GET_RX_DESC_MF(__pdesc) \ | 481 | #define GET_RX_DESC_MF(__pdesc) \ |
458 | LE_BITS_TO_4BYTE(__pdesc+4, 27, 1) | 482 | SHIFT_AND_MASK_LE(__pdesc+4, 27, 1) |
459 | #define GET_RX_DESC_TYPE(__pdesc) \ | 483 | #define GET_RX_DESC_TYPE(__pdesc) \ |
460 | LE_BITS_TO_4BYTE(__pdesc+4, 28, 2) | 484 | SHIFT_AND_MASK_LE(__pdesc+4, 28, 2) |
461 | #define GET_RX_DESC_MC(__pdesc) \ | 485 | #define GET_RX_DESC_MC(__pdesc) \ |
462 | LE_BITS_TO_4BYTE(__pdesc+4, 30, 1) | 486 | SHIFT_AND_MASK_LE(__pdesc+4, 30, 1) |
463 | #define GET_RX_DESC_BC(__pdesc) \ | 487 | #define GET_RX_DESC_BC(__pdesc) \ |
464 | LE_BITS_TO_4BYTE(__pdesc+4, 31, 1) | 488 | SHIFT_AND_MASK_LE(__pdesc+4, 31, 1) |
465 | #define GET_RX_DESC_SEQ(__pdesc) \ | 489 | #define GET_RX_DESC_SEQ(__pdesc) \ |
466 | LE_BITS_TO_4BYTE(__pdesc+8, 0, 12) | 490 | SHIFT_AND_MASK_LE(__pdesc+8, 0, 12) |
467 | #define GET_RX_DESC_FRAG(__pdesc) \ | 491 | #define GET_RX_DESC_FRAG(__pdesc) \ |
468 | LE_BITS_TO_4BYTE(__pdesc+8, 12, 4) | 492 | SHIFT_AND_MASK_LE(__pdesc+8, 12, 4) |
469 | #define GET_RX_DESC_NEXT_PKT_LEN(__pdesc) \ | 493 | #define GET_RX_DESC_NEXT_PKT_LEN(__pdesc) \ |
470 | LE_BITS_TO_4BYTE(__pdesc+8, 16, 14) | 494 | SHIFT_AND_MASK_LE(__pdesc+8, 16, 14) |
471 | #define GET_RX_DESC_NEXT_IND(__pdesc) \ | 495 | #define GET_RX_DESC_NEXT_IND(__pdesc) \ |
472 | LE_BITS_TO_4BYTE(__pdesc+8, 30, 1) | 496 | SHIFT_AND_MASK_LE(__pdesc+8, 30, 1) |
473 | #define GET_RX_DESC_RSVD(__pdesc) \ | 497 | #define GET_RX_DESC_RSVD(__pdesc) \ |
474 | LE_BITS_TO_4BYTE(__pdesc+8, 31, 1) | 498 | SHIFT_AND_MASK_LE(__pdesc+8, 31, 1) |
475 | 499 | ||
476 | #define GET_RX_DESC_RXMCS(__pdesc) \ | 500 | #define GET_RX_DESC_RXMCS(__pdesc) \ |
477 | LE_BITS_TO_4BYTE(__pdesc+12, 0, 6) | 501 | SHIFT_AND_MASK_LE(__pdesc+12, 0, 6) |
478 | #define GET_RX_DESC_RXHT(__pdesc) \ | 502 | #define GET_RX_DESC_RXHT(__pdesc) \ |
479 | LE_BITS_TO_4BYTE(__pdesc+12, 6, 1) | 503 | SHIFT_AND_MASK_LE(__pdesc+12, 6, 1) |
480 | #define GET_RX_DESC_SPLCP(__pdesc) \ | 504 | #define GET_RX_DESC_SPLCP(__pdesc) \ |
481 | LE_BITS_TO_4BYTE(__pdesc+12, 8, 1) | 505 | SHIFT_AND_MASK_LE(__pdesc+12, 8, 1) |
482 | #define GET_RX_DESC_BW(__pdesc) \ | 506 | #define GET_RX_DESC_BW(__pdesc) \ |
483 | LE_BITS_TO_4BYTE(__pdesc+12, 9, 1) | 507 | SHIFT_AND_MASK_LE(__pdesc+12, 9, 1) |
484 | #define GET_RX_DESC_HTC(__pdesc) \ | 508 | #define GET_RX_DESC_HTC(__pdesc) \ |
485 | LE_BITS_TO_4BYTE(__pdesc+12, 10, 1) | 509 | SHIFT_AND_MASK_LE(__pdesc+12, 10, 1) |
486 | #define GET_RX_DESC_HWPC_ERR(__pdesc) \ | 510 | #define GET_RX_DESC_HWPC_ERR(__pdesc) \ |
487 | LE_BITS_TO_4BYTE(__pdesc+12, 14, 1) | 511 | SHIFT_AND_MASK_LE(__pdesc+12, 14, 1) |
488 | #define GET_RX_DESC_HWPC_IND(__pdesc) \ | 512 | #define GET_RX_DESC_HWPC_IND(__pdesc) \ |
489 | LE_BITS_TO_4BYTE(__pdesc+12, 15, 1) | 513 | SHIFT_AND_MASK_LE(__pdesc+12, 15, 1) |
490 | #define GET_RX_DESC_IV0(__pdesc) \ | 514 | #define GET_RX_DESC_IV0(__pdesc) \ |
491 | LE_BITS_TO_4BYTE(__pdesc+12, 16, 16) | 515 | SHIFT_AND_MASK_LE(__pdesc+12, 16, 16) |
492 | 516 | ||
493 | #define GET_RX_DESC_IV1(__pdesc) \ | 517 | #define GET_RX_DESC_IV1(__pdesc) \ |
494 | LE_BITS_TO_4BYTE(__pdesc+16, 0, 32) | 518 | SHIFT_AND_MASK_LE(__pdesc+16, 0, 32) |
495 | #define GET_RX_DESC_TSFL(__pdesc) \ | 519 | #define GET_RX_DESC_TSFL(__pdesc) \ |
496 | LE_BITS_TO_4BYTE(__pdesc+20, 0, 32) | 520 | SHIFT_AND_MASK_LE(__pdesc+20, 0, 32) |
497 | 521 | ||
498 | #define GET_RX_DESC_BUFF_ADDR(__pdesc) \ | 522 | #define GET_RX_DESC_BUFF_ADDR(__pdesc) \ |
499 | LE_BITS_TO_4BYTE(__pdesc+24, 0, 32) | 523 | SHIFT_AND_MASK_LE(__pdesc+24, 0, 32) |
500 | #define GET_RX_DESC_BUFF_ADDR64(__pdesc) \ | 524 | #define GET_RX_DESC_BUFF_ADDR64(__pdesc) \ |
501 | LE_BITS_TO_4BYTE(__pdesc+28, 0, 32) | 525 | SHIFT_AND_MASK_LE(__pdesc+28, 0, 32) |
502 | 526 | ||
503 | #define SET_RX_DESC_BUFF_ADDR(__pdesc, __val) \ | 527 | #define SET_RX_DESC_BUFF_ADDR(__pdesc, __val) \ |
504 | SET_BITS_TO_LE_4BYTE(__pdesc+24, 0, 32, __val) | 528 | SET_BITS_OFFSET_LE(__pdesc+24, 0, 32, __val) |
505 | #define SET_RX_DESC_BUFF_ADDR64(__pdesc, __val) \ | 529 | #define SET_RX_DESC_BUFF_ADDR64(__pdesc, __val) \ |
506 | SET_BITS_TO_LE_4BYTE(__pdesc+28, 0, 32, __val) | 530 | SET_BITS_OFFSET_LE(__pdesc+28, 0, 32, __val) |
507 | 531 | ||
508 | #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size) \ | 532 | #define CLEAR_PCI_TX_DESC_CONTENT(__pdesc, _size) \ |
509 | do { \ | 533 | do { \ |
@@ -711,4 +735,6 @@ void rtl92ce_tx_polling(struct ieee80211_hw *hw, unsigned int hw_queue); | |||
711 | void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, | 735 | void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, |
712 | bool b_firstseg, bool b_lastseg, | 736 | bool b_firstseg, bool b_lastseg, |
713 | struct sk_buff *skb); | 737 | struct sk_buff *skb); |
738 | bool _rtl92c_cmd_send_packet(struct ieee80211_hw *hw, struct sk_buff *skb); | ||
739 | |||
714 | #endif | 740 | #endif |