Newer
Older
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
/******************************************************************************
Copyright (c) 2007-2015
Lantiq Beteiligungs-GmbH & Co. KG
For licensing information, see the file 'LICENSE' in the root folder of
this software module.
*******************************************************************************/
#ifndef _DSL_CPE_BND_VRX_H_
#define _DSL_CPE_BND_VRX_H_
#ifdef __cplusplus
extern "C" {
#endif
/** \file
Bonding implementation/interface for CPE Control Application
*/
#define DSL_CPE_BND_TX_RATE_RATIO_UNITY (0x0100)
typedef enum
{
DSL_BND_MASTER = 0,
DSL_BND_SLAVE = 1
} DSL_CPE_BND_MsStatus_t;
/*
LineMonitorStateMachine
*/
typedef struct {
DSL_uint16_t Port;
DSL_uint16_t PafAvailable;
DSL_uint16_t RemotePafAvailable;
DSL_uint16_t PafAggregate;
DSL_uint16_t PafEnable;
DSL_uint32_t TxDataRate;
DSL_CPE_BND_MsStatus_t MsStatus;
} DSL_CPE_BND_LineMonitorStateMachine_t;
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
/*
LineBondingConfiguration
*/
typedef struct {
/**
Indicates that a line has reached FULL_INIT during link activation handling.
SET : It will be set (to 1) for the current line in case of current line
reaches FULL_INIT line state (0x380).
RESET: It will be (unconditionally) reset (to 0) for the current line in
case of link drop happens on current line.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nFullInitReached;
/**
Indicates that a line received information from CO side that PAF is supported
SET : It will be set (to 1) for the current line if nFullInitReached for
the current line equals 1 and RemotePafAvailableCheck indicates that
the CO supports PAF (bonding)
RESET: It will be (unconditionally) reset (to 0) for the current line in
case of link drop happens on current line.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nRemotePafAvailable;
/**
Indicates that a line was disabled due to PAF configuration mismatch between both lines.
SET : It will be set (to 1) for a line in case of PAF (bonding) mismatch is
detected. Depending on the current line activation process it could
be applied to the current or the opposite line. The line for which
this flag is set will be also disabled.
RESET: It will be (unconditionally) reset (to 0) for the opposite line in
case of linkdrop happens on current line. In case of opposite line is
currently disabled it will be re-activated again.
\note Link drop condition will be detected at its earliest possible
link activation handling state. */
DSL_boolean_t nPafLineDisabled;
} DSL_CPE_BND_LineBondingConfiguration_t;
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
/**
Bonding Context
*/
typedef struct
{
/**
Line Monitor SM data*/
DSL_CPE_BND_LineMonitorStateMachine_t
lineMonitorStateMachine[DSL_CPE_MAX_DSL_ENTITIES];
/**
Remote discovery code*/
DSL_uint8_t remoteDiscoveryCode[6];
/**
Aggregate data state*/
DSL_uint32_t aggregateReg;
/**
CPE API Control Context*/
DSL_CPE_Control_Context_t *pCtrlCtx;
/**
TBD*/
DSL_PortMode_t nPortMode;
/**
TBD*/
DSL_boolean_t bFwRequested[DSL_CPE_MAX_DSL_ENTITIES];
/**
TBD*/
DSL_boolean_t bInitialFwRequestHandled;
/**
Paf line num firts reach FULL_INIT*/
DSL_int8_t nPafLineHandled;
/**
Line num was disabled by absent Paf*/
DSL_int8_t nPafLineDisabled;
DSL_CPE_BND_LineBondingConfiguration_t lineBondingConfig[DSL_CPE_MAX_DSL_ENTITIES];
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
} DSL_CPE_BND_Context_t;
/*
Function to start Bonding handling
*/
DSL_Error_t DSL_CPE_BND_Start(
DSL_CPE_Control_Context_t *pCtrlCtx,
DSL_int_t fd);
/*
Function to stop Bonding handling
*/
DSL_void_t DSL_CPE_BND_Stop(
DSL_CPE_BND_Context_t *pBndContext);
/*
Function to check the remote PAF status
*/
DSL_Error_t DSL_CPE_BND_RemotePafAvailableCheck(
DSL_int_t fd,
DSL_uint16_t *pRemotePafAvailable);
/*
Bonding handling for the Autoboot Restart Wait state
*/
DSL_Error_t DSL_CPE_BND_AutobootStatusRestartWait(
DSL_CPE_BND_Context_t *pBndCtx,
DSL_uint_t nDevice);
/*
Firmware Download for bonding
*/
DSL_Error_t DSL_CPE_BND_SyncDownloadFirmware(
DSL_CPE_BND_Context_t *pBndCtx,
DSL_int_t nDevice,
DSL_FirmwareRequestType_t nFwReqType,
DSL_PortMode_t nPortMode);
/*
Bonding handling for the Line State change
*/
DSL_Error_t DSL_CPE_BND_LineStateHandle(
DSL_CPE_BND_Context_t *pBndCtx,
DSL_int_t fd, DSL_uint_t nDevice,
DSL_LineStateValue_t nLineState,
DSL_LineStateValue_t nPrevLineState);
/*
Bonding handling for the System Interface status notification
*/
DSL_Error_t DSL_CPE_BND_SystemInterfaceStatusHandle(
DSL_CPE_BND_Context_t *pBndCtx,
DSL_int_t fd,
DSL_uint_t nDevice);
#ifdef __cplusplus
}
#endif
#endif /* _DSL_CPE_BND_VRX_H_ */