Commit | Line | Data |
---|---|---|
ca97b838 BZ |
1 | /* |
2 | ************************************************************************* | |
3 | * Ralink Tech Inc. | |
4 | * 5F., No.36, Taiyuan St., Jhubei City, | |
5 | * Hsinchu County 302, | |
6 | * Taiwan, R.O.C. | |
7 | * | |
8 | * (c) Copyright 2002-2007, Ralink Technology, Inc. | |
9 | * | |
10 | * This program is free software; you can redistribute it and/or modify * | |
11 | * it under the terms of the GNU General Public License as published by * | |
12 | * the Free Software Foundation; either version 2 of the License, or * | |
13 | * (at your option) any later version. * | |
14 | * * | |
15 | * This program is distributed in the hope that it will be useful, * | |
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |
18 | * GNU General Public License for more details. * | |
19 | * * | |
20 | * You should have received a copy of the GNU General Public License * | |
21 | * along with this program; if not, write to the * | |
22 | * Free Software Foundation, Inc., * | |
23 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * | |
24 | * * | |
25 | ************************************************************************* | |
26 | */ | |
27 | ||
28 | #ifndef __DOT11_BASE_H__ | |
29 | #define __DOT11_BASE_H__ | |
30 | ||
31 | #include "rtmp_type.h" | |
32 | ||
cc277069 | 33 | /* 4-byte HTC field. maybe included in any frame except non-QOS data frame. The Order bit must set 1. */ |
62eb734b | 34 | struct PACKED rt_ht_control { |
51126deb BZ |
35 | u32 MA:1; /*management action payload exist in (QoS Null+HTC) */ |
36 | u32 TRQ:1; /*sounding request */ | |
37 | u32 MRQ:1; /*MCS feedback. Request for a MCS feedback */ | |
38 | u32 MRSorASI:3; /* MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110. */ | |
39 | u32 MFS:3; /*SET to the received value of MRS. 0x111 for unsolicited MFB. */ | |
40 | u32 MFBorASC:7; /*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */ | |
41 | u32 CalPos:2; /* calibration position */ | |
42 | u32 CalSeq:2; /*calibration sequence */ | |
43 | u32 FBKReq:2; /*feedback request */ | |
44 | u32 CSISTEERING:2; /*CSI/ STEERING */ | |
45 | u32 ZLFAnnouce:1; /* ZLF announcement */ | |
46 | u32 rsv:5; /*calibration sequence */ | |
47 | u32 ACConstraint:1; /*feedback request */ | |
48 | u32 RDG:1; /*RDG / More PPDU */ | |
62eb734b | 49 | }; |
ca97b838 | 50 | |
cc277069 | 51 | /* 2-byte QOS CONTROL field */ |
62eb734b | 52 | struct PACKED rt_qos_control { |
51126deb BZ |
53 | u16 TID:4; |
54 | u16 EOSP:1; | |
55 | u16 AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */ | |
56 | u16 AMsduPresent:1; | |
57 | u16 Txop_QueueSize:8; | |
62eb734b | 58 | }; |
ca97b838 | 59 | |
cc277069 | 60 | /* 2-byte Frame control field */ |
62eb734b | 61 | struct PACKED rt_frame_control { |
51126deb BZ |
62 | u16 Ver:2; /* Protocol version */ |
63 | u16 Type:2; /* MSDU type */ | |
64 | u16 SubType:4; /* MSDU subtype */ | |
65 | u16 ToDs:1; /* To DS indication */ | |
66 | u16 FrDs:1; /* From DS indication */ | |
67 | u16 MoreFrag:1; /* More fragment bit */ | |
68 | u16 Retry:1; /* Retry status bit */ | |
69 | u16 PwrMgmt:1; /* Power management bit */ | |
70 | u16 MoreData:1; /* More data bit */ | |
71 | u16 Wep:1; /* Wep data */ | |
72 | u16 Order:1; /* Strict order expected */ | |
62eb734b | 73 | }; |
ca97b838 | 74 | |
62eb734b BZ |
75 | struct PACKED rt_header_802_11 { |
76 | struct rt_frame_control FC; | |
51126deb BZ |
77 | u16 Duration; |
78 | u8 Addr1[MAC_ADDR_LEN]; | |
79 | u8 Addr2[MAC_ADDR_LEN]; | |
80 | u8 Addr3[MAC_ADDR_LEN]; | |
81 | u16 Frag:4; | |
82 | u16 Sequence:12; | |
83 | u8 Octet[0]; | |
62eb734b | 84 | }; |
ca97b838 | 85 | |
62eb734b BZ |
86 | struct PACKED rt_pspoll_frame { |
87 | struct rt_frame_control FC; | |
51126deb BZ |
88 | u16 Aid; |
89 | u8 Bssid[MAC_ADDR_LEN]; | |
90 | u8 Ta[MAC_ADDR_LEN]; | |
62eb734b | 91 | }; |
ca97b838 | 92 | |
62eb734b BZ |
93 | struct PACKED rt_rts_frame { |
94 | struct rt_frame_control FC; | |
51126deb BZ |
95 | u16 Duration; |
96 | u8 Addr1[MAC_ADDR_LEN]; | |
97 | u8 Addr2[MAC_ADDR_LEN]; | |
62eb734b | 98 | }; |
ca97b838 | 99 | |
cc277069 | 100 | #endif /* __DOT11_BASE_H__ // */ |