Do not use ShortGI and STBC with management frames; Atheros cards have problems with...
[ralink_drivers/rt2870_fbsd72.git] / rt2870_txwi.h
bloba208871558dde0468b9a814004503a01264285e5
2 /*-
3 * Copyright (c) 2009-2010 Alexander Egorenkov <egorenar@gmail.com>
4 * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 #ifndef _RT2870_TXWI_H_
20 #define _RT2870_TXWI_H_
22 #define RT2870_TXWI_FLAGS_SHIFT 0
23 #define RT2870_TXWI_FLAGS_MASK 0x1f
24 #define RT2870_TXWI_FLAGS_AMPDU (1 << 4)
25 #define RT2870_TXWI_FLAGS_TS (1 << 3)
26 #define RT2870_TXWI_FLAGS_CFACK (1 << 2)
27 #define RT2870_TXWI_FLAGS_MIMOPS (1 << 1)
28 #define RT2870_TXWI_FLAGS_FRAG (1 << 0)
30 #define RT2870_TXWI_MPDU_DENSITY_SHIFT 5
31 #define RT2870_TXWI_MPDU_DENSITY_MASK 0x7
33 #define RT2870_TXWI_TXOP_SHIFT 0
34 #define RT2870_TXWI_TXOP_MASK 0x3
35 #define RT2870_TXWI_TXOP_HT 0
36 #define RT2870_TXWI_TXOP_PIFS 1
37 #define RT2870_TXWI_TXOP_SIFS 2
38 #define RT2870_TXWI_TXOP_BACKOFF 3
40 #define RT2870_TXWI_MCS_SHIFT 0
41 #define RT2870_TXWI_MCS_MASK 0x7f
42 #define RT2870_TXWI_MCS_SHOTPRE (1 << 3)
44 #define RT2870_TXWI_BW_SHIFT 7
45 #define RT2870_TXWI_BW_MASK 0x1
46 #define RT2870_TXWI_BW_20 0
47 #define RT2870_TXWI_BW_40 1
49 #define RT2870_TXWI_SHORTGI_SHIFT 0
50 #define RT2870_TXWI_SHORTGI_MASK 0x1
52 #define RT2870_TXWI_STBC_SHIFT 1
53 #define RT2870_TXWI_STBC_MASK 0x3
55 #define RT2870_TXWI_IFS_SHIFT 3
56 #define RT2870_TXWI_IFS_MASK 0x1
58 #define RT2870_TXWI_PHYMODE_SHIFT 6
59 #define RT2870_TXWI_PHYMODE_MASK 0x3
60 #define RT2870_TXWI_PHYMODE_CCK 0
61 #define RT2870_TXWI_PHYMODE_OFDM 1
62 #define RT2870_TXWI_PHYMODE_HT_MIXED 2
63 #define RT2870_TXWI_PHYMODE_HT_GF 3
65 #define RT2870_TXWI_XFLAGS_SHIFT 0
66 #define RT2870_TXWI_XFLAGS_MASK 0x3
67 #define RT2870_TXWI_XFLAGS_NSEQ (1 << 1)
68 #define RT2870_TXWI_XFLAGS_ACK (1 << 0)
70 #define RT2870_TXWI_BAWIN_SIZE_SHIFT 2
71 #define RT2870_TXWI_BAWIN_SIZE_MASK 0x3f
73 #define RT2870_TXWI_MPDU_LEN_SHIFT 0
74 #define RT2870_TXWI_MPDU_LEN_MASK 0xfff
76 #define RT2870_TXWI_PID_SHIFT 12
77 #define RT2870_TXWI_PID_MASK 0xf
79 struct rt2870_txwi
81 uint8_t mpdu_density_flags;
82 uint8_t txop;
83 uint8_t bw_mcs;
84 uint8_t phymode_ifs_stbc_shortgi;
85 uint8_t bawin_size_xflags;
86 uint8_t wcid;
87 uint16_t pid_mpdu_len;
88 uint32_t iv;
89 uint32_t eiv;
90 } __packed;
92 #endif /* #ifndef _RT2870_TXWI_H_ */