8 #define _b43_declare_plcp_hdr(size) \
9 struct b43_plcp_hdr##size { \
21 #undef _b43_declare_plcp_hdr
76 struct b43_plcp_hdr6
plcp;
87 struct b43_plcp_hdr6
plcp;
100 #define B43_TXH_MAC_USEFBR 0x10000000
101 #define B43_TXH_MAC_KEYIDX 0x0FF00000
102 #define B43_TXH_MAC_KEYIDX_SHIFT 20
103 #define B43_TXH_MAC_KEYALG 0x00070000
104 #define B43_TXH_MAC_KEYALG_SHIFT 16
105 #define B43_TXH_MAC_AMIC 0x00008000
106 #define B43_TXH_MAC_RIFS 0x00004000
107 #define B43_TXH_MAC_LIFETIME 0x00002000
108 #define B43_TXH_MAC_FRAMEBURST 0x00001000
109 #define B43_TXH_MAC_SENDCTS 0x00000800
110 #define B43_TXH_MAC_AMPDU 0x00000600
111 #define B43_TXH_MAC_AMPDU_MPDU 0x00000000
112 #define B43_TXH_MAC_AMPDU_FIRST 0x00000200
113 #define B43_TXH_MAC_AMPDU_INTER 0x00000400
114 #define B43_TXH_MAC_AMPDU_LAST 0x00000600
115 #define B43_TXH_MAC_40MHZ 0x00000100
116 #define B43_TXH_MAC_5GHZ 0x00000080
117 #define B43_TXH_MAC_DFCS 0x00000040
118 #define B43_TXH_MAC_IGNPMQ 0x00000020
119 #define B43_TXH_MAC_HWSEQ 0x00000010
120 #define B43_TXH_MAC_STMSDU 0x00000008
121 #define B43_TXH_MAC_SENDRTS 0x00000004
122 #define B43_TXH_MAC_LONGFRAME 0x00000002
123 #define B43_TXH_MAC_ACK 0x00000001
126 #define B43_TXH_EFT_FB 0x03
127 #define B43_TXH_EFT_FB_CCK 0x00
128 #define B43_TXH_EFT_FB_OFDM 0x01
129 #define B43_TXH_EFT_FB_EWC 0x02
130 #define B43_TXH_EFT_FB_N 0x03
131 #define B43_TXH_EFT_RTS 0x0C
132 #define B43_TXH_EFT_RTS_CCK 0x00
133 #define B43_TXH_EFT_RTS_OFDM 0x04
134 #define B43_TXH_EFT_RTS_EWC 0x08
135 #define B43_TXH_EFT_RTS_N 0x0C
136 #define B43_TXH_EFT_RTSFB 0x30
137 #define B43_TXH_EFT_RTSFB_CCK 0x00
138 #define B43_TXH_EFT_RTSFB_OFDM 0x10
139 #define B43_TXH_EFT_RTSFB_EWC 0x20
140 #define B43_TXH_EFT_RTSFB_N 0x30
143 #define B43_TXH_PHY_ENC 0x0003
144 #define B43_TXH_PHY_ENC_CCK 0x0000
145 #define B43_TXH_PHY_ENC_OFDM 0x0001
146 #define B43_TXH_PHY_ENC_EWC 0x0002
147 #define B43_TXH_PHY_ENC_N 0x0003
148 #define B43_TXH_PHY_SHORTPRMBL 0x0010
149 #define B43_TXH_PHY_ANT 0x03C0
150 #define B43_TXH_PHY_ANT0 0x0000
151 #define B43_TXH_PHY_ANT1 0x0040
152 #define B43_TXH_PHY_ANT01AUTO 0x00C0
153 #define B43_TXH_PHY_ANT2 0x0100
154 #define B43_TXH_PHY_ANT3 0x0200
155 #define B43_TXH_PHY_TXPWR 0xFC00
156 #define B43_TXH_PHY_TXPWR_SHIFT 10
159 #define B43_TXH_PHY1_BW 0x0007
160 #define B43_TXH_PHY1_BW_10 0x0000
161 #define B43_TXH_PHY1_BW_10U 0x0001
162 #define B43_TXH_PHY1_BW_20 0x0002
163 #define B43_TXH_PHY1_BW_20U 0x0003
164 #define B43_TXH_PHY1_BW_40 0x0004
165 #define B43_TXH_PHY1_BW_40DUP 0x0005
166 #define B43_TXH_PHY1_MODE 0x0038
167 #define B43_TXH_PHY1_MODE_SISO 0x0000
168 #define B43_TXH_PHY1_MODE_CDD 0x0008
169 #define B43_TXH_PHY1_MODE_STBC 0x0010
170 #define B43_TXH_PHY1_MODE_SDM 0x0018
171 #define B43_TXH_PHY1_CRATE 0x0700
172 #define B43_TXH_PHY1_CRATE_1_2 0x0000
173 #define B43_TXH_PHY1_CRATE_2_3 0x0100
174 #define B43_TXH_PHY1_CRATE_3_4 0x0200
175 #define B43_TXH_PHY1_CRATE_4_5 0x0300
176 #define B43_TXH_PHY1_CRATE_5_6 0x0400
177 #define B43_TXH_PHY1_CRATE_7_8 0x0600
178 #define B43_TXH_PHY1_MODUL 0x3800
179 #define B43_TXH_PHY1_MODUL_BPSK 0x0000
180 #define B43_TXH_PHY1_MODUL_QPSK 0x0800
181 #define B43_TXH_PHY1_MODUL_QAM16 0x1000
182 #define B43_TXH_PHY1_MODUL_QAM64 0x1800
183 #define B43_TXH_PHY1_MODUL_QAM256 0x2000
189 switch (dev->
fw.hdr_format) {
191 return 112 +
sizeof(
struct b43_plcp_hdr6);
193 return 104 +
sizeof(
struct b43_plcp_hdr6);
195 return 100 +
sizeof(
struct b43_plcp_hdr6);
295 #define B43_RX_PHYST0_GAINCTL 0x4000
296 #define B43_RX_PHYST0_PLCPHCF 0x0200
297 #define B43_RX_PHYST0_PLCPFV 0x0100
298 #define B43_RX_PHYST0_SHORTPRMBL 0x0080
299 #define B43_RX_PHYST0_LCRS 0x0040
300 #define B43_RX_PHYST0_ANT 0x0020
301 #define B43_RX_PHYST0_UNSRATE 0x0010
302 #define B43_RX_PHYST0_CLIP 0x000C
303 #define B43_RX_PHYST0_CLIP_SHIFT 2
304 #define B43_RX_PHYST0_FTYPE 0x0003
305 #define B43_RX_PHYST0_CCK 0x0000
306 #define B43_RX_PHYST0_OFDM 0x0001
307 #define B43_RX_PHYST0_PRE_N 0x0002
308 #define B43_RX_PHYST0_STD_N 0x0003
311 #define B43_RX_PHYST2_LNAG 0xC000
312 #define B43_RX_PHYST2_LNAG_SHIFT 14
313 #define B43_RX_PHYST2_PNAG 0x3C00
314 #define B43_RX_PHYST2_PNAG_SHIFT 10
315 #define B43_RX_PHYST2_FOFF 0x03FF
318 #define B43_RX_PHYST3_DIGG 0x1800
319 #define B43_RX_PHYST3_DIGG_SHIFT 11
320 #define B43_RX_PHYST3_TRSTATE 0x0400
323 #define B43_RX_MAC_RXST_VALID 0x01000000
324 #define B43_RX_MAC_TKIP_MICERR 0x00100000
325 #define B43_RX_MAC_TKIP_MICATT 0x00080000
326 #define B43_RX_MAC_AGGTYPE 0x00060000
327 #define B43_RX_MAC_AGGTYPE_SHIFT 17
328 #define B43_RX_MAC_AMSDU 0x00010000
329 #define B43_RX_MAC_BEACONSENT 0x00008000
330 #define B43_RX_MAC_KEYIDX 0x000007E0
331 #define B43_RX_MAC_KEYIDX_SHIFT 5
332 #define B43_RX_MAC_DECERR 0x00000010
333 #define B43_RX_MAC_DEC 0x00000008
334 #define B43_RX_MAC_PADDING 0x00000004
335 #define B43_RX_MAC_RESP 0x00000002
336 #define B43_RX_MAC_FCSERR 0x00000001
339 #define B43_RX_CHAN_40MHZ 0x1000
340 #define B43_RX_CHAN_5GHZ 0x0800
341 #define B43_RX_CHAN_ID 0x07F8
342 #define B43_RX_CHAN_ID_SHIFT 3
343 #define B43_RX_CHAN_PHYTYPE 0x0007
367 static inline int b43_new_kidx_api(
struct b43_wldev *
dev)
370 return (dev->
fw.rev >= 351);
372 static inline u8 b43_kidx_to_fw(
struct b43_wldev *dev,
u8 raw_kidx)
375 if (b43_new_kidx_api(dev)) {
376 firmware_kidx = raw_kidx;
379 firmware_kidx = raw_kidx - 4;
381 firmware_kidx = raw_kidx;
383 return firmware_kidx;
385 static inline u8 b43_kidx_to_raw(
struct b43_wldev *dev,
u8 firmware_kidx)
388 if (b43_new_kidx_api(dev))
389 raw_kidx = firmware_kidx;
391 raw_kidx = firmware_kidx + 4;