2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
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. *
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. *
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. *
25 *************************************************************************
31 Handle association related requests either from WSTA or from local MLME
35 --------- ---------- ----------------------------------------------
36 Fonchi Wu 2008 created for 802.11h
39 #ifndef __SPECTRUM_DEF_H__
40 #define __SPECTRUM_DEF_H__
42 #define MAX_MEASURE_REQ_TAB_SIZE 32
43 #define MAX_HASH_MEASURE_REQ_TAB_SIZE MAX_MEASURE_REQ_TAB_SIZE
45 #define MAX_TPC_REQ_TAB_SIZE 32
46 #define MAX_HASH_TPC_REQ_TAB_SIZE MAX_TPC_REQ_TAB_SIZE
48 #define MIN_RCV_PWR 100 /* Negative value ((dBm) */
50 #define TPC_REQ_AGE_OUT 500 /* ms */
51 #define MQ_REQ_AGE_OUT 500 /* ms */
53 #define TPC_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_HASH_TPC_REQ_TAB_SIZE)
54 #define MQ_DIALOGTOKEN_HASH_INDEX(_DialogToken) ((_DialogToken) % MAX_MEASURE_REQ_TAB_SIZE)
56 struct rt_measure_req_entry;
58 struct rt_measure_req_entry {
59 struct rt_measure_req_entry *pNext;
60 unsigned long lastTime;
63 u8 MeasureDialogToken[3]; /* 0:basic measure, 1: CCA measure, 2: RPI_Histogram measure. */
66 struct rt_measure_req_tab {
68 struct rt_measure_req_entry *Hash[MAX_HASH_MEASURE_REQ_TAB_SIZE];
69 struct rt_measure_req_entry Content[MAX_MEASURE_REQ_TAB_SIZE];
72 struct rt_tpc_req_entry;
74 struct rt_tpc_req_entry {
75 struct rt_tpc_req_entry *pNext;
76 unsigned long lastTime;
81 struct rt_tpc_req_tab {
83 struct rt_tpc_req_entry *Hash[MAX_HASH_TPC_REQ_TAB_SIZE];
84 struct rt_tpc_req_entry Content[MAX_TPC_REQ_TAB_SIZE];
87 /* The regulatory information */
88 struct rt_dot11_channel_set {
94 struct rt_dot11_regulatory_information {
96 struct rt_dot11_channel_set ChannelSet;
100 #define RM_MEASURE_REQ 1
104 #define RM_RPI_HISTOGRAM 2
106 #define RM_NOISE_HISTOGRAM 4
108 struct PACKED rt_tpc_report_info {
113 struct PACKED rt_ch_sw_ann_info {
119 typedef union PACKED _MEASURE_REQ_MODE {
125 u8 DurationMandatory:1;
129 } MEASURE_REQ_MODE, *PMEASURE_REQ_MODE;
131 struct PACKED rt_measure_req {
133 u64 MeasureStartTime;
137 struct PACKED rt_measure_req_info {
139 MEASURE_REQ_MODE ReqMode;
144 typedef union PACKED _MEASURE_BASIC_REPORT_MAP {
149 u8 UnidentifiedSignal:1;
155 } MEASURE_BASIC_REPORT_MAP, *PMEASURE_BASIC_REPORT_MAP;
157 struct PACKED rt_measure_basic_report {
159 u64 MeasureStartTime;
161 MEASURE_BASIC_REPORT_MAP Map;
164 struct PACKED rt_measure_cca_report {
166 u64 MeasureStartTime;
168 u8 CCA_Busy_Fraction;
171 struct PACKED rt_measure_rpi_report {
173 u64 MeasureStartTime;
178 typedef union PACKED _MEASURE_REPORT_MODE {
186 } MEASURE_REPORT_MODE, *PMEASURE_REPORT_MODE;
188 struct PACKED rt_measure_report_info {
195 struct PACKED rt_quiet_info {
202 #endif /* __SPECTRUM_DEF_H__ // */