Do not use ShortGI and STBC with management frames; Atheros cards have problems with...
[ralink_drivers/rt2870_fbsd72.git] / rt2870_rxwi.h
blobc8b8f1fce0ed8b6d955dcbe197429a0ecb18371e
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_RXWI_H_
20 #define _RT2870_RXWI_H_
22 #define RT2870_RXWI_KEYIDX_SHIFT 0
23 #define RT2870_RXWI_KEYIDX_MASK 0x3
25 #define RT2870_RXWI_BSSIDX_SHIFT 2
26 #define RT2870_RXWI_BSSIDX_MASK 0x7
28 #define RT2870_RXWI_UDF_SHIFT 5
29 #define RT2870_RXWI_UDF_MASK 0x7
31 #define RT2870_RXWI_SIZE_SHIFT 0
32 #define RT2870_RXWI_SIZE_MASK 0xfff
34 #define RT2870_RXWI_TID_SHIFT 12
35 #define RT2870_RXWI_TID_MASK 0xf
37 #define RT2870_RXWI_FRAG_SHIFT 0
38 #define RT2870_RXWI_FRAG_MASK 0xf
40 #define RT2870_RXWI_SEQ_SHIFT 4
41 #define RT2870_RXWI_SEQ_MASK 0xfff
43 #define RT2870_RXWI_MCS_SHIFT 0
44 #define RT2870_RXWI_MCS_MASK 0x7f
45 #define RT2870_RXWI_MCS_SHOTPRE (1 << 3)
47 #define RT2870_RXWI_BW_SHIFT 7
48 #define RT2870_RXWI_BW_MASK 0x1
49 #define RT2870_RXWI_BW_20 0
50 #define RT2870_RXWI_BW_40 1
52 #define RT2870_RXWI_SHORTGI_SHIFT 0
53 #define RT2870_RXWI_SHORTGI_MASK 0x1
55 #define RT2870_RXWI_STBC_SHIFT 1
56 #define RT2870_RXWI_STBC_MASK 0x3
58 #define RT2870_RXWI_PHYMODE_SHIFT 6
59 #define RT2870_RXWI_PHYMODE_MASK 0x3
60 #define RT2870_RXWI_PHYMODE_CCK 0
61 #define RT2870_RXWI_PHYMODE_OFDM 1
62 #define RT2870_RXWI_PHYMODE_HT_MIXED 2
63 #define RT2870_RXWI_PHYMODE_HT_GF 3
65 struct rt2870_rxwi
67 uint8_t wcid;
68 uint8_t udf_bssidx_keyidx;
69 uint16_t tid_size;
70 uint16_t seq_frag;
71 uint8_t bw_mcs;
72 uint8_t phymode_stbc_shortgi;
73 uint8_t rssi[3];
74 uint8_t reserved1;
75 uint8_t snr[2];
76 uint16_t reserved2;
77 } __packed;
79 #endif /* #ifndef _RT2870_RXWI_H_ */