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 Miniport generic portion header file
35 -------- ---------- ----------------------------------------------
36 Fonchi 03-12-2007 created
42 #define WIDTH_RD_IDLE 0
43 #define WIDTH_RD_CHECK 1
47 /*************************************************************************
49 * DFS Radar related definitions.
51 ************************************************************************/
52 //#define CARRIER_DETECT_TASK_NUM 6
53 //#define RADAR_DETECT_TASK_NUM 7
55 // McuRadarState && McuCarrierState for 2880-SW-MCU
57 #define WAIT_CTS_BEING_SENT 1
58 #define DO_DETECTION 2
61 #define RADAR_EVENT_CTS_SENT 0x01 // Host signal MCU that CTS has been sent
62 #define RADAR_EVENT_CTS_CARRIER_SENT 0x02 // Host signal MCU that CTS has been sent (Carrier)
63 #define RADAR_EVENT_RADAR_DETECTING 0x04 // Radar detection is on going, carrier detection hold back
64 #define RADAR_EVENT_CARRIER_DETECTING 0x08 // Carrier detection is on going, radar detection hold back
65 #define RADAR_EVENT_WIDTH_RADAR 0x10 // BBP == 2 radar detected
66 #define RADAR_EVENT_CTS_KICKED 0x20 // Radar detection need to sent double CTS, first CTS sent
69 #define DETECTION_STOP 0
70 #define RADAR_DETECTION 1
71 #define CARRIER_DETECTION 2
75 #ifdef TONE_RADAR_DETECT_SUPPORT
76 INT
Set_CarrierCriteria_Proc(IN PRTMP_ADAPTER pAd
, IN PSTRING arg
);
77 int Set_CarrierReCheck_Proc(IN PRTMP_ADAPTER pAd
, IN PSTRING arg
);
78 INT
Set_CarrierStopCheck_Proc(IN PRTMP_ADAPTER pAd
, IN PSTRING arg
);
79 void NewCarrierDetectionStart(PRTMP_ADAPTER pAd
);
80 void RTMPHandleRadarInterrupt(PRTMP_ADAPTER pAd
);
81 VOID
CSAsicDisableSync(IN PRTMP_ADAPTER pAd
);
82 #endif // TONE_RADAR_DETECT_SUPPORT //
85 VOID
BbpRadarDetectionStart(
86 IN PRTMP_ADAPTER pAd
);
88 VOID
BbpRadarDetectionStop(
89 IN PRTMP_ADAPTER pAd
);
91 VOID
RadarDetectionStart(
93 IN BOOLEAN CTS_Protect
,
96 VOID
RadarDetectionStop(
97 IN PRTMP_ADAPTER pAd
);
99 VOID
RadarDetectPeriodic(
100 IN PRTMP_ADAPTER pAd
);
103 BOOLEAN
RadarChannelCheck(
104 IN PRTMP_ADAPTER pAd
,
108 IN PRTMP_ADAPTER pAd
);
110 ULONG
RTMPBbpReadRadarDuration(
111 IN PRTMP_ADAPTER pAd
);
113 ULONG
RTMPReadRadarDuration(
114 IN PRTMP_ADAPTER pAd
);
116 VOID
RTMPCleanRadarDuration(
117 IN PRTMP_ADAPTER pAd
);
119 VOID
RTMPPrepareRDCTSFrame(
120 IN PRTMP_ADAPTER pAd
,
124 IN ULONG CTSBaseAddr
,
127 VOID
RTMPPrepareRadarDetectParams(
128 IN PRTMP_ADAPTER pAd
);
131 INT
Set_ChMovingTime_Proc(
132 IN PRTMP_ADAPTER pAd
,
135 INT
Set_LongPulseRadarTh_Proc(
136 IN PRTMP_ADAPTER pAd
,