]>
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. */ |
ca97b838 | 34 | typedef struct PACKED { |
cc277069 BZ |
35 | UINT32 MA:1; /*management action payload exist in (QoS Null+HTC) */ |
36 | UINT32 TRQ:1; /*sounding request */ | |
37 | UINT32 MRQ:1; /*MCS feedback. Request for a MCS feedback */ | |
38 | UINT32 MRSorASI:3; /* MRQ Sequence identifier. unchanged during entire procedure. 0x000-0x110. */ | |
39 | UINT32 MFS:3; /*SET to the received value of MRS. 0x111 for unsolicited MFB. */ | |
40 | UINT32 MFBorASC:7; /*Link adaptation feedback containing recommended MCS. 0x7f for no feedback or not available */ | |
41 | UINT32 CalPos:2; /* calibration position */ | |
42 | UINT32 CalSeq:2; /*calibration sequence */ | |
43 | UINT32 FBKReq:2; /*feedback request */ | |
44 | UINT32 CSISTEERING:2; /*CSI/ STEERING */ | |
45 | UINT32 ZLFAnnouce:1; /* ZLF announcement */ | |
46 | UINT32 rsv:5; /*calibration sequence */ | |
47 | UINT32 ACConstraint:1; /*feedback request */ | |
48 | UINT32 RDG:1; /*RDG / More PPDU */ | |
ca97b838 BZ |
49 | } HT_CONTROL, *PHT_CONTROL; |
50 | ||
cc277069 | 51 | /* 2-byte QOS CONTROL field */ |
ca97b838 | 52 | typedef struct PACKED { |
52b81c89 BZ |
53 | USHORT TID:4; |
54 | USHORT EOSP:1; | |
cc277069 | 55 | USHORT AckPolicy:2; /*0: normal ACK 1:No ACK 2:scheduled under MTBA/PSMP 3: BA */ |
52b81c89 BZ |
56 | USHORT AMsduPresent:1; |
57 | USHORT Txop_QueueSize:8; | |
ca97b838 BZ |
58 | } QOS_CONTROL, *PQOS_CONTROL; |
59 | ||
cc277069 | 60 | /* 2-byte Frame control field */ |
52b81c89 | 61 | typedef struct PACKED { |
cc277069 BZ |
62 | USHORT Ver:2; /* Protocol version */ |
63 | USHORT Type:2; /* MSDU type */ | |
64 | USHORT SubType:4; /* MSDU subtype */ | |
65 | USHORT ToDs:1; /* To DS indication */ | |
66 | USHORT FrDs:1; /* From DS indication */ | |
67 | USHORT MoreFrag:1; /* More fragment bit */ | |
68 | USHORT Retry:1; /* Retry status bit */ | |
69 | USHORT PwrMgmt:1; /* Power management bit */ | |
70 | USHORT MoreData:1; /* More data bit */ | |
71 | USHORT Wep:1; /* Wep data */ | |
72 | USHORT Order:1; /* Strict order expected */ | |
ca97b838 BZ |
73 | } FRAME_CONTROL, *PFRAME_CONTROL; |
74 | ||
52b81c89 BZ |
75 | typedef struct PACKED _HEADER_802_11 { |
76 | FRAME_CONTROL FC; | |
77 | USHORT Duration; | |
78 | UCHAR Addr1[MAC_ADDR_LEN]; | |
79 | UCHAR Addr2[MAC_ADDR_LEN]; | |
80 | UCHAR Addr3[MAC_ADDR_LEN]; | |
81 | USHORT Frag:4; | |
82 | USHORT Sequence:12; | |
83 | UCHAR Octet[0]; | |
84 | } HEADER_802_11, *PHEADER_802_11; | |
ca97b838 BZ |
85 | |
86 | typedef struct PACKED _PSPOLL_FRAME { | |
52b81c89 BZ |
87 | FRAME_CONTROL FC; |
88 | USHORT Aid; | |
89 | UCHAR Bssid[MAC_ADDR_LEN]; | |
90 | UCHAR Ta[MAC_ADDR_LEN]; | |
91 | } PSPOLL_FRAME, *PPSPOLL_FRAME; | |
ca97b838 | 92 | |
52b81c89 BZ |
93 | typedef struct PACKED _RTS_FRAME { |
94 | FRAME_CONTROL FC; | |
95 | USHORT Duration; | |
96 | UCHAR Addr1[MAC_ADDR_LEN]; | |
97 | UCHAR Addr2[MAC_ADDR_LEN]; | |
98 | } RTS_FRAME, *PRTS_FRAME; | |
ca97b838 | 99 | |
cc277069 | 100 | #endif /* __DOT11_BASE_H__ // */ |