summaryrefslogtreecommitdiff
path: root/drivers/staging/bcm/CmHost.h
blob: 847782c3765b55eea422aea7a27e2b4dce9dbf44 (plain)
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
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
/// **************************************************************************
/// (c) Beceem Communications Inc.
///     All Rights Reserved
///
///   \file        : CmHost.h
///   \author      : Rajeev Tirumala
///   \date        : September 8 , 2006
///   \brief       : Definitions for Connection Management Requests structure
///                  which we will use to setup our connection structures.Its high
///                  time we had a header file for CmHost.cpp to isolate the way
///                  f/w sends DSx messages and the way we interpret them in code.
///                              Revision History
///
///    Date       Author   Version   Description
///  08-Sep-06    Rajeev       0.1      Created
/// **************************************************************************
#ifndef _CM_HOST_H
#define _CM_HOST_H

#pragma once
#pragma pack (push,4)

#define  DSX_MESSAGE_EXCHANGE_BUFFER        0xBF60AC84 // This contains the pointer
#define  DSX_MESSAGE_EXCHANGE_BUFFER_SIZE   72000 // 24 K Bytes

/// \brief structure stLocalSFAddRequest
typedef struct stLocalSFAddRequestAlt{
	B_UINT8                         u8Type;
	B_UINT8      u8Direction;

	B_UINT16                        u16TID;
   /// \brief 16bitCID
    B_UINT16                        u16CID;
    /// \brief 16bitVCID
    B_UINT16                        u16VCID;


	/// \brief structure ParameterSet
    stServiceFlowParamSI              sfParameterSet;

    //USE_MEMORY_MANAGER();
}stLocalSFAddRequestAlt;

/// \brief structure stLocalSFAddIndication
typedef struct stLocalSFAddIndicationAlt{
    B_UINT8                         u8Type;
	B_UINT8      u8Direction;
	B_UINT16                         u16TID;
    /// \brief 16bitCID
    B_UINT16                        u16CID;
    /// \brief 16bitVCID
    B_UINT16                        u16VCID;
	/// \brief structure AuthorizedSet
    stServiceFlowParamSI              sfAuthorizedSet;
    /// \brief structure AdmittedSet
    stServiceFlowParamSI              sfAdmittedSet;
	/// \brief structure ActiveSet
    stServiceFlowParamSI              sfActiveSet;

	B_UINT8 						u8CC;	/**<  Confirmation Code*/
	B_UINT8 						u8Padd; 	/**<  8-bit Padding */
	B_UINT16						u16Padd;	/**< 16 bit Padding */
//    USE_MEMORY_MANAGER();
}stLocalSFAddIndicationAlt;

/// \brief structure stLocalSFAddConfirmation
typedef struct stLocalSFAddConfirmationAlt{
	B_UINT8                     u8Type;
	B_UINT8      				u8Direction;
	B_UINT16					u16TID;
    /// \brief 16bitCID
    B_UINT16                        u16CID;
    /// \brief 16bitVCID
    B_UINT16                        u16VCID;
    /// \brief structure AuthorizedSet
    stServiceFlowParamSI              sfAuthorizedSet;
    /// \brief structure AdmittedSet
    stServiceFlowParamSI              sfAdmittedSet;
    /// \brief structure ActiveSet
    stServiceFlowParamSI              sfActiveSet;
}stLocalSFAddConfirmationAlt;


/// \brief structure stLocalSFChangeRequest
typedef struct stLocalSFChangeRequestAlt{
    B_UINT8                         u8Type;
	B_UINT8      u8Direction;
	B_UINT16					u16TID;
    /// \brief 16bitCID
    B_UINT16                        u16CID;
    /// \brief 16bitVCID
    B_UINT16                        u16VCID;
	/*
	//Pointer location at which following Service Flow param Structure can be read
	//from the target. We get only the address location and we need to read out the
	//entire SF param structure at the given location on target
	*/
    /// \brief structure AuthorizedSet
    stServiceFlowParamSI              sfAuthorizedSet;
    /// \brief structure AdmittedSet
    stServiceFlowParamSI              sfAdmittedSet;
    /// \brief structure ParameterSet
    stServiceFlowParamSI              sfActiveSet;

	B_UINT8 						u8CC;	/**<  Confirmation Code*/
	B_UINT8 						u8Padd; 	/**<  8-bit Padding */
	B_UINT16						u16Padd;	/**< 16 bit */

}stLocalSFChangeRequestAlt;

/// \brief structure stLocalSFChangeConfirmation
typedef struct stLocalSFChangeConfirmationAlt{
	B_UINT8                         u8Type;
	B_UINT8      					u8Direction;
	B_UINT16						u16TID;
    /// \brief 16bitCID
    B_UINT16                        u16CID;
    /// \brief 16bitVCID
    B_UINT16                        u16VCID;
    /// \brief structure AuthorizedSet
    stServiceFlowParamSI              sfAuthorizedSet;
    /// \brief structure AdmittedSet
    stServiceFlowParamSI              sfAdmittedSet;
    /// \brief structure ActiveSet
    stServiceFlowParamSI              sfActiveSet;

}stLocalSFChangeConfirmationAlt;

/// \brief structure stLocalSFChangeIndication
typedef struct stLocalSFChangeIndicationAlt{
	B_UINT8                         u8Type;
		B_UINT8      u8Direction;
	B_UINT16						u16TID;
    /// \brief 16bitCID
    B_UINT16                        u16CID;
    /// \brief 16bitVCID
    B_UINT16                        u16VCID;
    /// \brief structure AuthorizedSet
    stServiceFlowParamSI              sfAuthorizedSet;
    /// \brief structure AdmittedSet
    stServiceFlowParamSI              sfAdmittedSet;
    /// \brief structure ActiveSet
    stServiceFlowParamSI              sfActiveSet;

	B_UINT8 						u8CC;	/**<  Confirmation Code*/
	B_UINT8 						u8Padd; 	/**<  8-bit Padding */
	B_UINT16						u16Padd;	/**< 16 bit */

}stLocalSFChangeIndicationAlt;

ULONG StoreCmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer,UINT *puBufferLength);

ULONG GetNextTargetBufferLocation(PMINI_ADAPTER Adapter,B_UINT16 tid);

INT AllocAdapterDsxBuffer(PMINI_ADAPTER Adapter);

INT FreeAdapterDsxBuffer(PMINI_ADAPTER Adapter);
ULONG SetUpTargetDsxBuffers(PMINI_ADAPTER Adapter);

BOOLEAN CmControlResponseMessage(PMINI_ADAPTER Adapter,PVOID pvBuffer);

VOID deleteSFBySfid(PMINI_ADAPTER Adapter, UINT uiSearchRuleIndex);

#pragma pack (pop)

#endif