1 2/*- 3 * Copyright (c) 2009-2010 Alexander Egorenkov <egorenar@gmail.com> 4 * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> 5 * 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. 9 * 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. 17 */ 18 19#ifndef _RT2860_RXWI_H_ 20#define _RT2860_RXWI_H_ 21 22#define RT2860_RXWI_KEYIDX_SHIFT 0 23#define RT2860_RXWI_KEYIDX_MASK 0x3 24 25#define RT2860_RXWI_BSSIDX_SHIFT 2 26#define RT2860_RXWI_BSSIDX_MASK 0x7 27 28#define RT2860_RXWI_UDF_SHIFT 5 29#define RT2860_RXWI_UDF_MASK 0x7 30 31#define RT2860_RXWI_SIZE_SHIFT 0 32#define RT2860_RXWI_SIZE_MASK 0xfff 33 34#define RT2860_RXWI_TID_SHIFT 12 35#define RT2860_RXWI_TID_MASK 0xf 36 37#define RT2860_RXWI_FRAG_SHIFT 0 38#define RT2860_RXWI_FRAG_MASK 0xf 39 40#define RT2860_RXWI_SEQ_SHIFT 4 41#define RT2860_RXWI_SEQ_MASK 0xfff 42 43#define RT2860_RXWI_MCS_SHIFT 0 44#define RT2860_RXWI_MCS_MASK 0x7f 45#define RT2860_RXWI_MCS_SHOTPRE (1 << 3) 46 47#define RT2860_RXWI_BW_SHIFT 7 48#define RT2860_RXWI_BW_MASK 0x1 49#define RT2860_RXWI_BW_20 0 50#define RT2860_RXWI_BW_40 1 51 52#define RT2860_RXWI_SHORTGI_SHIFT 0 53#define RT2860_RXWI_SHORTGI_MASK 0x1 54 55#define RT2860_RXWI_STBC_SHIFT 1 56#define RT2860_RXWI_STBC_MASK 0x3 57 58#define RT2860_RXWI_PHYMODE_SHIFT 6 59#define RT2860_RXWI_PHYMODE_MASK 0x3 60#define RT2860_RXWI_PHYMODE_CCK 0 61#define RT2860_RXWI_PHYMODE_OFDM 1 62#define RT2860_RXWI_PHYMODE_HT_MIXED 2 63#define RT2860_RXWI_PHYMODE_HT_GF 3 64 65struct rt2860_rxwi 66{ 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; 78 79#endif /* #ifndef _RT2860_RXWI_H_ */ 80