aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm/HostMIBSInterface.h
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2010-09-08 17:46:36 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-09 00:15:06 -0400
commitf8942e07a3db9d82e8fb11d3d494876b8bae9ff9 (patch)
tree2406636a4f9a4ac6b0bfc90e07aefa8b1b18b8ff /drivers/staging/bcm/HostMIBSInterface.h
parent2d2f03b022186e6d7520a758abdea9c04a2969fe (diff)
staging: Beeceem USB Wimax driver
The Sprint 4G network uses a Wimax dongle with Beecem chipset. The driver is typical of out of tree drivers, but maybe useful for people, and the hardware is readily available. Here is a staging ready version (i.e warts and all) 0. Started with Rel_5.2.7.3P1_USB from Sprint4GDeveloperPack-1.1 1. Consolidated files in staging 2. Remove Dos cr/lf 3. Remove unnecessary ioctl from usbbcm_fops Applied patches that were in the developer pack, surprising there were ones for 2.6.35 already. This is compile tested only, see TODO for what still needs to be done. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/bcm/HostMIBSInterface.h')
-rw-r--r--drivers/staging/bcm/HostMIBSInterface.h230
1 files changed, 230 insertions, 0 deletions
diff --git a/drivers/staging/bcm/HostMIBSInterface.h b/drivers/staging/bcm/HostMIBSInterface.h
new file mode 100644
index 00000000000..f17a4f13474
--- /dev/null
+++ b/drivers/staging/bcm/HostMIBSInterface.h
@@ -0,0 +1,230 @@
1
2
3#ifndef _HOST_MIBSINTERFACE_H
4#define _HOST_MIBSINTERFACE_H
5
6/*
7 * Copyright (c) 2007 Beceem Communications Pvt. Ltd
8 * File Name: HostMIBSInterface.h
9 * Abstract: This file contains DS used by the Host to update the Host
10 * statistics used for the MIBS.
11 */
12
13#define MIBS_MAX_CLASSIFIERS 100
14#define MIBS_MAX_PHSRULES 100
15#define MIBS_MAX_SERVICEFLOWS 17
16#define MIBS_MAX_IP_RANGE_LENGTH 4
17#define MIBS_MAX_PORT_RANGE 4
18#define MIBS_MAX_PROTOCOL_LENGTH 32
19#define MIBS_MAX_PHS_LENGTHS 255
20#define MIBS_IPV6_ADDRESS_SIZEINBYTES 0x10
21#define MIBS_IP_LENGTH_OF_ADDRESS 4
22#define MIBS_MAX_HIST_ENTRIES 12
23#define MIBS_PKTSIZEHIST_RANGE 128
24
25typedef union _U_MIBS_IP_ADDRESS
26{
27 struct
28 {
29 //Source Ip Address Range
30 ULONG ulIpv4Addr[MIBS_MAX_IP_RANGE_LENGTH];
31 //Source Ip Mask Address Range
32 ULONG ulIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH];
33 };
34 struct
35 {
36 //Source Ip Address Range
37 ULONG ulIpv6Addr[MIBS_MAX_IP_RANGE_LENGTH * 4];
38 //Source Ip Mask Address Range
39 ULONG ulIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * 4];
40
41 };
42 struct
43 {
44 UCHAR ucIpv4Address[MIBS_MAX_IP_RANGE_LENGTH *
45 MIBS_IP_LENGTH_OF_ADDRESS];
46 UCHAR ucIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH *
47 MIBS_IP_LENGTH_OF_ADDRESS];
48 };
49 struct
50 {
51 UCHAR ucIpv6Address[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
52 UCHAR ucIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
53 };
54}U_MIBS_IP_ADDRESS;
55
56
57typedef struct _S_MIBS_HOST_INFO
58{
59 ULONG64 GoodTransmits;
60 ULONG64 GoodReceives;
61 // this to keep track of the Tx and Rx MailBox Registers.
62 ULONG NumDesUsed;
63 ULONG CurrNumFreeDesc;
64 ULONG PrevNumFreeDesc;
65 // to keep track the no of byte recieved
66 ULONG PrevNumRcevBytes;
67 ULONG CurrNumRcevBytes;
68
69 /* QOS Related */
70 ULONG BEBucketSize;
71 ULONG rtPSBucketSize;
72 ULONG LastTxQueueIndex;
73 BOOLEAN TxOutofDescriptors;
74 BOOLEAN TimerActive;
75 UINT32 u32TotalDSD;
76 UINT32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
77 UINT32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
78}S_MIBS_HOST_INFO;
79
80typedef struct _S_MIBS_CLASSIFIER_RULE
81{
82 ULONG ulSFID;
83 UCHAR ucReserved[2];
84 B_UINT16 uiClassifierRuleIndex;
85 BOOLEAN bUsed;
86 USHORT usVCID_Value;
87 // This field detemines the Classifier Priority
88 B_UINT8 u8ClassifierRulePriority;
89 U_MIBS_IP_ADDRESS stSrcIpAddress;
90 /*IP Source Address Length*/
91 UCHAR ucIPSourceAddressLength;
92
93 U_MIBS_IP_ADDRESS stDestIpAddress;
94 /* IP Destination Address Length */
95 UCHAR ucIPDestinationAddressLength;
96 UCHAR ucIPTypeOfServiceLength;//Type of service Length
97 UCHAR ucTosLow;//Tos Low
98 UCHAR ucTosHigh;//Tos High
99 UCHAR ucTosMask;//Tos Mask
100 UCHAR ucProtocolLength;//protocol Length
101 UCHAR ucProtocol[MIBS_MAX_PROTOCOL_LENGTH];//protocol Length
102 USHORT usSrcPortRangeLo[MIBS_MAX_PORT_RANGE];
103 USHORT usSrcPortRangeHi[MIBS_MAX_PORT_RANGE];
104 UCHAR ucSrcPortRangeLength;
105 USHORT usDestPortRangeLo[MIBS_MAX_PORT_RANGE];
106 USHORT usDestPortRangeHi[MIBS_MAX_PORT_RANGE];
107 UCHAR ucDestPortRangeLength;
108 BOOLEAN bProtocolValid;
109 BOOLEAN bTOSValid;
110 BOOLEAN bDestIpValid;
111 BOOLEAN bSrcIpValid;
112 UCHAR ucDirection;
113 BOOLEAN bIpv6Protocol;
114 UINT32 u32PHSRuleID;
115}S_MIBS_CLASSIFIER_RULE;
116
117
118typedef struct _S_MIBS_PHS_RULE
119{
120 ULONG ulSFID;
121 /// brief 8bit PHSI Of The Service Flow
122 B_UINT8 u8PHSI;
123 /// brief PHSF Of The Service Flow
124 B_UINT8 u8PHSFLength;
125 B_UINT8 u8PHSF[MIBS_MAX_PHS_LENGTHS];
126 /// brief PHSM Of The Service Flow
127 B_UINT8 u8PHSMLength;
128 B_UINT8 u8PHSM[MIBS_MAX_PHS_LENGTHS];
129 /// brief 8bit PHSS Of The Service Flow
130 B_UINT8 u8PHSS;
131 /// brief 8bit PHSV Of The Service Flow
132 B_UINT8 u8PHSV;
133 // Reserved bytes are 5, so that it is similar to S_PHS_RULE structure.
134 B_UINT8 reserved[5];
135
136 LONG PHSModifiedBytes;
137 ULONG PHSModifiedNumPackets;
138 ULONG PHSErrorNumPackets;
139}S_MIBS_PHS_RULE;
140
141typedef struct _S_MIBS_EXTSERVICEFLOW_PARAMETERS
142{
143 UINT32 wmanIfSfid;
144 UINT32 wmanIfCmnCpsSfState;
145 UINT32 wmanIfCmnCpsMaxSustainedRate;
146 UINT32 wmanIfCmnCpsMaxTrafficBurst;
147 UINT32 wmanIfCmnCpsMinReservedRate;
148 UINT32 wmanIfCmnCpsToleratedJitter;
149 UINT32 wmanIfCmnCpsMaxLatency;
150 UINT32 wmanIfCmnCpsFixedVsVariableSduInd;
151 UINT32 wmanIfCmnCpsSduSize;
152 UINT32 wmanIfCmnCpsSfSchedulingType;
153 UINT32 wmanIfCmnCpsArqEnable;
154 UINT32 wmanIfCmnCpsArqWindowSize;
155 UINT32 wmanIfCmnCpsArqBlockLifetime;
156 UINT32 wmanIfCmnCpsArqSyncLossTimeout;
157 UINT32 wmanIfCmnCpsArqDeliverInOrder;
158 UINT32 wmanIfCmnCpsArqRxPurgeTimeout;
159 UINT32 wmanIfCmnCpsArqBlockSize;
160 UINT32 wmanIfCmnCpsMinRsvdTolerableRate;
161 UINT32 wmanIfCmnCpsReqTxPolicy;
162 UINT32 wmanIfCmnSfCsSpecification;
163 UINT32 wmanIfCmnCpsTargetSaid;
164
165}S_MIBS_EXTSERVICEFLOW_PARAMETERS;
166
167
168typedef struct _S_MIBS_SERVICEFLOW_TABLE
169{
170 //classification extension Rule
171 ULONG ulSFID;
172 USHORT usVCID_Value;
173 UINT uiThreshold;
174 // This field determines the priority of the SF Queues
175 B_UINT8 u8TrafficPriority;
176
177 BOOLEAN bValid;
178 BOOLEAN bActive;
179 BOOLEAN bActivateRequestSent;
180 //BE or rtPS
181 B_UINT8 u8QueueType;
182 //maximum size of the bucket for the queue
183 UINT uiMaxBucketSize;
184 UINT uiCurrentQueueDepthOnTarget;
185 UINT uiCurrentBytesOnHost;
186 UINT uiCurrentPacketsOnHost;
187 UINT uiDroppedCountBytes;
188 UINT uiDroppedCountPackets;
189 UINT uiSentBytes;
190 UINT uiSentPackets;
191 UINT uiCurrentDrainRate;
192 UINT uiThisPeriodSentBytes;
193 LARGE_INTEGER liDrainCalculated;
194 UINT uiCurrentTokenCount;
195 LARGE_INTEGER liLastUpdateTokenAt;
196 UINT uiMaxAllowedRate;
197 UINT NumOfPacketsSent;
198 UCHAR ucDirection;
199 USHORT usCID;
200 S_MIBS_EXTSERVICEFLOW_PARAMETERS stMibsExtServiceFlowTable;
201 UINT uiCurrentRxRate;
202 UINT uiThisPeriodRxBytes;
203 UINT uiTotalRxBytes;
204 UINT uiTotalTxBytes;
205}S_MIBS_SERVICEFLOW_TABLE;
206
207typedef struct _S_MIBS_DROPPED_APP_CNTRL_MESSAGES
208{
209 ULONG cm_responses;
210 ULONG cm_control_newdsx_multiclassifier_resp;
211 ULONG link_control_resp;
212 ULONG status_rsp;
213 ULONG stats_pointer_resp;
214 ULONG idle_mode_status;
215 ULONG auth_ss_host_msg;
216 ULONG low_priority_message;
217
218}S_MIBS_DROPPED_APP_CNTRL_MESSAGES;
219
220typedef struct _S_MIBS_HOST_STATS_MIBS
221{
222 S_MIBS_HOST_INFO stHostInfo;
223 S_MIBS_CLASSIFIER_RULE astClassifierTable[MIBS_MAX_CLASSIFIERS];
224 S_MIBS_SERVICEFLOW_TABLE astSFtable[MIBS_MAX_SERVICEFLOWS];
225 S_MIBS_PHS_RULE astPhsRulesTable[MIBS_MAX_PHSRULES];
226 S_MIBS_DROPPED_APP_CNTRL_MESSAGES stDroppedAppCntrlMsgs;
227}S_MIBS_HOST_STATS_MIBS;
228#endif
229
230