aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/xmit.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/b43/xmit.h')
-rw-r--r--drivers/net/wireless/b43/xmit.h62
1 files changed, 46 insertions, 16 deletions
diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h
index 42debb5cd6fa..f6e8bc436d5a 100644
--- a/drivers/net/wireless/b43/xmit.h
+++ b/drivers/net/wireless/b43/xmit.h
@@ -46,7 +46,24 @@ struct b43_txhdr {
46 __le32 timeout; /* Timeout */ 46 __le32 timeout; /* Timeout */
47 47
48 union { 48 union {
49 /* The new r410 format. */ 49 /* Tested with 598.314, 644.1001 and 666.2 */
50 struct {
51 __le16 mimo_antenna; /* MIMO antenna select */
52 __le16 preload_size; /* Preload size */
53 PAD_BYTES(2);
54 __le16 cookie; /* TX frame cookie */
55 __le16 tx_status; /* TX status */
56 __le16 max_n_mpdus;
57 __le16 max_a_bytes_mrt;
58 __le16 max_a_bytes_fbr;
59 __le16 min_m_bytes;
60 struct b43_plcp_hdr6 rts_plcp; /* RTS PLCP header */
61 __u8 rts_frame[16]; /* The RTS frame (if used) */
62 PAD_BYTES(2);
63 struct b43_plcp_hdr6 plcp; /* Main PLCP header */
64 } format_598 __packed;
65
66 /* Tested with 410.2160, 478.104 and 508.* */
50 struct { 67 struct {
51 __le16 mimo_antenna; /* MIMO antenna select */ 68 __le16 mimo_antenna; /* MIMO antenna select */
52 __le16 preload_size; /* Preload size */ 69 __le16 preload_size; /* Preload size */
@@ -57,9 +74,9 @@ struct b43_txhdr {
57 __u8 rts_frame[16]; /* The RTS frame (if used) */ 74 __u8 rts_frame[16]; /* The RTS frame (if used) */
58 PAD_BYTES(2); 75 PAD_BYTES(2);
59 struct b43_plcp_hdr6 plcp; /* Main PLCP header */ 76 struct b43_plcp_hdr6 plcp; /* Main PLCP header */
60 } new_format __packed; 77 } format_410 __packed;
61 78
62 /* The old r351 format. */ 79 /* Tested with 351.126 */
63 struct { 80 struct {
64 PAD_BYTES(2); 81 PAD_BYTES(2);
65 __le16 cookie; /* TX frame cookie */ 82 __le16 cookie; /* TX frame cookie */
@@ -68,7 +85,7 @@ struct b43_txhdr {
68 __u8 rts_frame[16]; /* The RTS frame (if used) */ 85 __u8 rts_frame[16]; /* The RTS frame (if used) */
69 PAD_BYTES(2); 86 PAD_BYTES(2);
70 struct b43_plcp_hdr6 plcp; /* Main PLCP header */ 87 struct b43_plcp_hdr6 plcp; /* Main PLCP header */
71 } old_format __packed; 88 } format_351 __packed;
72 89
73 } __packed; 90 } __packed;
74} __packed; 91} __packed;
@@ -166,19 +183,18 @@ struct b43_tx_legacy_rate_phy_ctl_entry {
166#define B43_TXH_PHY1_MODUL_QAM256 0x2000 /* QAM256 */ 183#define B43_TXH_PHY1_MODUL_QAM256 0x2000 /* QAM256 */
167 184
168 185
169/* r351 firmware compatibility stuff. */
170static inline
171bool b43_is_old_txhdr_format(struct b43_wldev *dev)
172{
173 return (dev->fw.rev <= 351);
174}
175
176static inline 186static inline
177size_t b43_txhdr_size(struct b43_wldev *dev) 187size_t b43_txhdr_size(struct b43_wldev *dev)
178{ 188{
179 if (b43_is_old_txhdr_format(dev)) 189 switch (dev->fw.hdr_format) {
190 case B43_FW_HDR_598:
191 return 112 + sizeof(struct b43_plcp_hdr6);
192 case B43_FW_HDR_410:
193 return 104 + sizeof(struct b43_plcp_hdr6);
194 case B43_FW_HDR_351:
180 return 100 + sizeof(struct b43_plcp_hdr6); 195 return 100 + sizeof(struct b43_plcp_hdr6);
181 return 104 + sizeof(struct b43_plcp_hdr6); 196 }
197 return 0;
182} 198}
183 199
184 200
@@ -234,9 +250,23 @@ struct b43_rxhdr_fw4 {
234 } __packed; 250 } __packed;
235 __le16 phy_status2; /* PHY RX Status 2 */ 251 __le16 phy_status2; /* PHY RX Status 2 */
236 __le16 phy_status3; /* PHY RX Status 3 */ 252 __le16 phy_status3; /* PHY RX Status 3 */
237 __le32 mac_status; /* MAC RX status */ 253 union {
238 __le16 mac_time; 254 /* Tested with 598.314, 644.1001 and 666.2 */
239 __le16 channel; 255 struct {
256 __le16 phy_status4; /* PHY RX Status 4 */
257 __le16 phy_status5; /* PHY RX Status 5 */
258 __le32 mac_status; /* MAC RX status */
259 __le16 mac_time;
260 __le16 channel;
261 } format_598 __packed;
262
263 /* Tested with 351.126, 410.2160, 478.104 and 508.* */
264 struct {
265 __le32 mac_status; /* MAC RX status */
266 __le16 mac_time;
267 __le16 channel;
268 } format_351 __packed;
269 } __packed;
240} __packed; 270} __packed;
241 271
242/* PHY RX Status 0 */ 272/* PHY RX Status 0 */