hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/******************************************************************************
 *
 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
 *                                        
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
 *
 *
 ******************************************************************************/
 
#ifndef    __PHYDMACS_H__
#define    __PHYDMACS_H__
 
#define ACS_VERSION    "1.0"
#define CLM_VERSION "1.0"
 
#define ODM_MAX_CHANNEL_2G            14
#define ODM_MAX_CHANNEL_5G            24
 
// For phydm_AutoChannelSelectSettingAP()
#define STORE_DEFAULT_NHM_SETTING               0
#define RESTORE_DEFAULT_NHM_SETTING             1
#define ACS_NHM_SETTING                         2
 
typedef struct _ACS_
{
   BOOLEAN        bForceACSResult;
   u1Byte        CleanChannel_2G;
   u1Byte        CleanChannel_5G;
   u2Byte        Channel_Info_2G[2][ODM_MAX_CHANNEL_2G];        //Channel_Info[1]: Channel Score, Channel_Info[2]:Channel_Scan_Times
   u2Byte        Channel_Info_5G[2][ODM_MAX_CHANNEL_5G];    
 
#if ( DM_ODM_SUPPORT_TYPE & ODM_AP )    
    u1Byte              ACS_Step;
    // NHM Count 0-11
    u1Byte              NHM_Cnt[14][11];
 
    // AC-Series, for storing previous setting
    u4Byte              Reg0x990; 
    u4Byte              Reg0x994;
    u4Byte              Reg0x998;
    u4Byte              Reg0x99C;
    u1Byte              Reg0x9A0;   // u1Byte
 
    // N-Series, for storing previous setting
    u4Byte              Reg0x890; 
    u4Byte              Reg0x894;
    u4Byte              Reg0x898;
    u4Byte              Reg0x89C;
    u1Byte              Reg0xE28;   // u1Byte
#endif
 
}ACS, *PACS;
 
 
VOID
odm_AutoChannelSelectInit(
   IN        PVOID            pDM_VOID
);
 
VOID
odm_AutoChannelSelectReset(
   IN        PVOID            pDM_VOID
);
 
VOID
odm_AutoChannelSelect(
   IN        PVOID            pDM_VOID,
   IN        u1Byte            Channel
);
 
u1Byte
ODM_GetAutoChannelSelectResult(
   IN        PVOID            pDM_VOID,
   IN        u1Byte            Band
);
 
#if ( DM_ODM_SUPPORT_TYPE & ODM_AP )
 
VOID
phydm_AutoChannelSelectSettingAP(
    IN  PVOID   pDM_VOID,
    IN  u4Byte  Setting,             // 0: STORE_DEFAULT_NHM_SETTING; 1: RESTORE_DEFAULT_NHM_SETTING, 2: ACS_NHM_SETTING
    IN  u4Byte  acs_step        
);
 
VOID
phydm_GetNHMStatisticsAP(
    IN  PVOID       pDM_VOID,
    IN  u4Byte      idx,                // @ 2G, Real channel number = idx+1
    IN  u4Byte      acs_step
);
 
#endif  //#if ( DM_ODM_SUPPORT_TYPE & ODM_AP )
 
 
VOID
phydm_CLMInit(
   IN        PVOID            pDM_VOID,
   IN        u2Byte            sampleNum
);
 
VOID
phydm_CLMtrigger(
   IN        PVOID            pDM_VOID
);
 
BOOLEAN
phydm_checkCLMready(
   IN        PVOID            pDM_VOID
);
 
u2Byte
phydm_getCLMresult(
   IN        PVOID            pDM_VOID
);
 
 
#endif  //#ifndef    __PHYDMACS_H__