Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / drivers / staging / rt2860 / spectrum_def.h
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 Module Name:
28 spectrum_def.h
29
30 Abstract:
31 Handle association related requests either from WSTA or from local MLME
32
33 Revision History:
34 Who When What
35 --------- ---------- ----------------------------------------------
36 Fonchi Wu 2008 created for 802.11h
37 */
38
39 #ifndef __SPECTRUM_DEF_H__
40 #define __SPECTRUM_DEF_H__
41
42 #define MAX_MEASURE_REQ_TAB_SIZE 3
43 #define MAX_HASH_MEASURE_REQ_TAB_SIZE MAX_MEASURE_REQ_TAB_SIZE
44
45 #define MAX_TPC_REQ_TAB_SIZE 3
46 #define MAX_HASH_TPC_REQ_TAB_SIZE MAX_TPC_REQ_TAB_SIZE
47
48 #define MIN_RCV_PWR 100 /* Negative value ((dBm) */
49
50 #define RM_TPC_REQ 0
51 #define RM_MEASURE_REQ 1
52
53 #define RM_BASIC 0
54 #define RM_CCA 1
55 #define RM_RPI_HISTOGRAM 2
56
57 #define TPC_REQ_AGE_OUT 500 /* ms */
58 #define MQ_REQ_AGE_OUT 500 /* ms */
59
60 #define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_HASH_TPC_REQ_TAB_SIZE)
61 #define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_MEASURE_REQ_TAB_SIZE)
62
63 typedef struct _MEASURE_REQ_ENTRY
64 {
65 struct _MEASURE_REQ_ENTRY *pNext;
66 ULONG lastTime;
67 BOOLEAN Valid;
68 UINT8 DialogToken;
69 UINT8 MeasureDialogToken[3]; // 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure.
70 } MEASURE_REQ_ENTRY, *PMEASURE_REQ_ENTRY;
71
72 typedef struct _MEASURE_REQ_TAB
73 {
74 UCHAR Size;
75 PMEASURE_REQ_ENTRY Hash[MAX_HASH_MEASURE_REQ_TAB_SIZE];
76 MEASURE_REQ_ENTRY Content[MAX_MEASURE_REQ_TAB_SIZE];
77 } MEASURE_REQ_TAB, *PMEASURE_REQ_TAB;
78
79 typedef struct _TPC_REQ_ENTRY
80 {
81 struct _TPC_REQ_ENTRY *pNext;
82 ULONG lastTime;
83 BOOLEAN Valid;
84 UINT8 DialogToken;
85 } TPC_REQ_ENTRY, *PTPC_REQ_ENTRY;
86
87 typedef struct _TPC_REQ_TAB
88 {
89 UCHAR Size;
90 PTPC_REQ_ENTRY Hash[MAX_HASH_TPC_REQ_TAB_SIZE];
91 TPC_REQ_ENTRY Content[MAX_TPC_REQ_TAB_SIZE];
92 } TPC_REQ_TAB, *PTPC_REQ_TAB;
93
94 #endif // __SPECTRUM_DEF_H__ //
95