aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/bcm/HostMIBSInterface.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 13:59:44 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-11 13:59:44 -0800
commit8966961b31c251b854169e9886394c2a20f2cea7 (patch)
tree248a625b23335acbd5ca4b55eb136fe0dc8ba0aa /drivers/staging/bcm/HostMIBSInterface.h
parentMerge tag 'char-misc-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc (diff)
parentMerge tag 'iio-for-3.8f' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next (diff)
downloadlinux-dev-8966961b31c251b854169e9886394c2a20f2cea7.tar.xz
linux-dev-8966961b31c251b854169e9886394c2a20f2cea7.zip
Merge tag 'staging-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging driver tree merge from Greg Kroah-Hartman: "Here's the big staging tree merge for 3.8-rc1 There's a lot of patches in here, the majority being the comedi rework/cleanup that has been ongoing and is causing a huge reduction in overall code size, which is amazing to watch. We also removed some older drivers (telephony and rts_pstor), and added a new one (fwserial which also came in through the tty tree due to tty api changes, take that one if you get merge conflicts.) The iio and ipack drivers are moving out of the staging area into their own part of the kernel as they have been cleaned up sufficiently and are working well. Overall, again a reduction of code: 768 files changed, 31887 insertions(+), 82166 deletions(-) All of this has been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'staging-3.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1298 commits) iio: imu: adis16480: remove duplicated include from adis16480.c iio: gyro: adis16136: remove duplicated include from adis16136.c iio:imu: adis16480: show_firmware() buffer too small iio:gyro: adis16136: divide by zero in write_frequency() iio: adc: Add Texas Instruments ADC081C021/027 support iio:ad7793: Add support for the ad7796 and ad7797 iio:ad7793: Add support for the ad7798 and ad7799 staging:iio: Move ad7793 driver out of staging staging:iio:ad7793: Implement stricter id checking staging:iio:ad7793: Move register definitions from header to source staging:iio:ad7793: Rework regulator handling staging:iio:ad7793: Rework platform data staging:iio:ad7793: Use kstrtol instead of strict_strtol staging:iio:ad7793: Use usleep_range instead of msleep staging:iio:ad7793: Fix temperature scale staging:iio:ad7793: Fix VDD monitor scale staging: gdm72xx: unlock on error in init_usb() staging: panel: pass correct lengths to keypad_send_key() staging: comedi: addi_apci_2032: fix interrupt support staging: comedi: addi_apci_2032: move i_APCI2032_ConfigDigitalOutput() ...
Diffstat (limited to 'drivers/staging/bcm/HostMIBSInterface.h')
-rw-r--r--drivers/staging/bcm/HostMIBSInterface.h384
1 files changed, 173 insertions, 211 deletions
diff --git a/drivers/staging/bcm/HostMIBSInterface.h b/drivers/staging/bcm/HostMIBSInterface.h
index e34531b638e8..f922ac49b70e 100644
--- a/drivers/staging/bcm/HostMIBSInterface.h
+++ b/drivers/staging/bcm/HostMIBSInterface.h
@@ -1,5 +1,3 @@
-
-
#ifndef _HOST_MIBSINTERFACE_H
#define _HOST_MIBSINTERFACE_H
@@ -10,221 +8,185 @@
* statistics used for the MIBS.
*/
-#define MIBS_MAX_CLASSIFIERS 100
-#define MIBS_MAX_PHSRULES 100
-#define MIBS_MAX_SERVICEFLOWS 17
-#define MIBS_MAX_IP_RANGE_LENGTH 4
-#define MIBS_MAX_PORT_RANGE 4
-#define MIBS_MAX_PROTOCOL_LENGTH 32
-#define MIBS_MAX_PHS_LENGTHS 255
-#define MIBS_IPV6_ADDRESS_SIZEINBYTES 0x10
+#define MIBS_MAX_CLASSIFIERS 100
+#define MIBS_MAX_PHSRULES 100
+#define MIBS_MAX_SERVICEFLOWS 17
+#define MIBS_MAX_IP_RANGE_LENGTH 4
+#define MIBS_MAX_PORT_RANGE 4
+#define MIBS_MAX_PROTOCOL_LENGTH 32
+#define MIBS_MAX_PHS_LENGTHS 255
+#define MIBS_IPV6_ADDRESS_SIZEINBYTES 0x10
#define MIBS_IP_LENGTH_OF_ADDRESS 4
-#define MIBS_MAX_HIST_ENTRIES 12
-#define MIBS_PKTSIZEHIST_RANGE 128
-
-typedef union _U_MIBS_IP_ADDRESS
-{
- struct
- {
- //Source Ip Address Range
- ULONG ulIpv4Addr[MIBS_MAX_IP_RANGE_LENGTH];
- //Source Ip Mask Address Range
- ULONG ulIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH];
+#define MIBS_MAX_HIST_ENTRIES 12
+#define MIBS_PKTSIZEHIST_RANGE 128
+
+union bcm_mibs_ip_addr {
+ struct {
+ /* Source Ip Address Range */
+ unsigned long ulIpv4Addr[MIBS_MAX_IP_RANGE_LENGTH];
+ /* Source Ip Mask Address Range */
+ unsigned long ulIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH];
};
- struct
- {
- //Source Ip Address Range
- ULONG ulIpv6Addr[MIBS_MAX_IP_RANGE_LENGTH * 4];
- //Source Ip Mask Address Range
- ULONG ulIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * 4];
-
+ struct {
+ /* Source Ip Address Range */
+ unsigned long ulIpv6Addr[MIBS_MAX_IP_RANGE_LENGTH * 4];
+ /* Source Ip Mask Address Range */
+ unsigned long ulIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * 4];
};
- struct
- {
- UCHAR ucIpv4Address[MIBS_MAX_IP_RANGE_LENGTH *
- MIBS_IP_LENGTH_OF_ADDRESS];
- UCHAR ucIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH *
- MIBS_IP_LENGTH_OF_ADDRESS];
+ struct {
+ unsigned char ucIpv4Address[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IP_LENGTH_OF_ADDRESS];
+ unsigned char ucIpv4Mask[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IP_LENGTH_OF_ADDRESS];
};
- struct
- {
- UCHAR ucIpv6Address[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
- UCHAR ucIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
+ struct {
+ unsigned char ucIpv6Address[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
+ unsigned char ucIpv6Mask[MIBS_MAX_IP_RANGE_LENGTH * MIBS_IPV6_ADDRESS_SIZEINBYTES];
};
-}U_MIBS_IP_ADDRESS;
-
-
-typedef struct _S_MIBS_HOST_INFO
-{
- ULONG64 GoodTransmits;
- ULONG64 GoodReceives;
- // this to keep track of the Tx and Rx MailBox Registers.
- ULONG NumDesUsed;
- ULONG CurrNumFreeDesc;
- ULONG PrevNumFreeDesc;
- // to keep track the no of byte received
- ULONG PrevNumRcevBytes;
- ULONG CurrNumRcevBytes;
-
+};
+
+struct bcm_mibs_host_info {
+ u64 GoodTransmits;
+ u64 GoodReceives;
+ /* this to keep track of the Tx and Rx MailBox Registers. */
+ unsigned long NumDesUsed;
+ unsigned long CurrNumFreeDesc;
+ unsigned long PrevNumFreeDesc;
+ /* to keep track the no of byte received */
+ unsigned long PrevNumRcevBytes;
+ unsigned long CurrNumRcevBytes;
/* QOS Related */
- ULONG BEBucketSize;
- ULONG rtPSBucketSize;
- ULONG LastTxQueueIndex;
- BOOLEAN TxOutofDescriptors;
- BOOLEAN TimerActive;
- UINT32 u32TotalDSD;
- UINT32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
- UINT32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
-}S_MIBS_HOST_INFO;
-
-typedef struct _S_MIBS_CLASSIFIER_RULE
-{
- ULONG ulSFID;
- UCHAR ucReserved[2];
- B_UINT16 uiClassifierRuleIndex;
- BOOLEAN bUsed;
- USHORT usVCID_Value;
- // This field detemines the Classifier Priority
- B_UINT8 u8ClassifierRulePriority;
- U_MIBS_IP_ADDRESS stSrcIpAddress;
- /*IP Source Address Length*/
- UCHAR ucIPSourceAddressLength;
-
- U_MIBS_IP_ADDRESS stDestIpAddress;
+ unsigned long BEBucketSize;
+ unsigned long rtPSBucketSize;
+ unsigned long LastTxQueueIndex;
+ bool TxOutofDescriptors;
+ bool TimerActive;
+ u32 u32TotalDSD;
+ u32 aTxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
+ u32 aRxPktSizeHist[MIBS_MAX_HIST_ENTRIES];
+};
+
+struct bcm_mibs_classifier_rule {
+ unsigned long ulSFID;
+ unsigned char ucReserved[2];
+ u16 uiClassifierRuleIndex;
+ bool bUsed;
+ unsigned short usVCID_Value;
+ u8 u8ClassifierRulePriority;
+ union bcm_mibs_ip_addr stSrcIpAddress;
+ /* IP Source Address Length */
+ unsigned char ucIPSourceAddressLength;
+ union bcm_mibs_ip_addr stDestIpAddress;
/* IP Destination Address Length */
- UCHAR ucIPDestinationAddressLength;
- UCHAR ucIPTypeOfServiceLength;//Type of service Length
- UCHAR ucTosLow;//Tos Low
- UCHAR ucTosHigh;//Tos High
- UCHAR ucTosMask;//Tos Mask
- UCHAR ucProtocolLength;//protocol Length
- UCHAR ucProtocol[MIBS_MAX_PROTOCOL_LENGTH];//protocol Length
- USHORT usSrcPortRangeLo[MIBS_MAX_PORT_RANGE];
- USHORT usSrcPortRangeHi[MIBS_MAX_PORT_RANGE];
- UCHAR ucSrcPortRangeLength;
- USHORT usDestPortRangeLo[MIBS_MAX_PORT_RANGE];
- USHORT usDestPortRangeHi[MIBS_MAX_PORT_RANGE];
- UCHAR ucDestPortRangeLength;
- BOOLEAN bProtocolValid;
- BOOLEAN bTOSValid;
- BOOLEAN bDestIpValid;
- BOOLEAN bSrcIpValid;
- UCHAR ucDirection;
- BOOLEAN bIpv6Protocol;
- UINT32 u32PHSRuleID;
-}S_MIBS_CLASSIFIER_RULE;
-
-
-typedef struct _S_MIBS_PHS_RULE
-{
- ULONG ulSFID;
- /// brief 8bit PHSI Of The Service Flow
- B_UINT8 u8PHSI;
- /// brief PHSF Of The Service Flow
- B_UINT8 u8PHSFLength;
- B_UINT8 u8PHSF[MIBS_MAX_PHS_LENGTHS];
- /// brief PHSM Of The Service Flow
- B_UINT8 u8PHSMLength;
- B_UINT8 u8PHSM[MIBS_MAX_PHS_LENGTHS];
- /// brief 8bit PHSS Of The Service Flow
- B_UINT8 u8PHSS;
- /// brief 8bit PHSV Of The Service Flow
- B_UINT8 u8PHSV;
- // Reserved bytes are 5, so that it is similar to S_PHS_RULE structure.
- B_UINT8 reserved[5];
+ unsigned char ucIPDestinationAddressLength;
+ unsigned char ucIPTypeOfServiceLength;
+ unsigned char ucTosLow;
+ unsigned char ucTosHigh;
+ unsigned char ucTosMask;
+ unsigned char ucProtocolLength;
+ unsigned char ucProtocol[MIBS_MAX_PROTOCOL_LENGTH];
+ unsigned short usSrcPortRangeLo[MIBS_MAX_PORT_RANGE];
+ unsigned short usSrcPortRangeHi[MIBS_MAX_PORT_RANGE];
+ unsigned char ucSrcPortRangeLength;
+ unsigned short usDestPortRangeLo[MIBS_MAX_PORT_RANGE];
+ unsigned short usDestPortRangeHi[MIBS_MAX_PORT_RANGE];
+ unsigned char ucDestPortRangeLength;
+ bool bProtocolValid;
+ bool bTOSValid;
+ bool bDestIpValid;
+ bool bSrcIpValid;
+ unsigned char ucDirection;
+ bool bIpv6Protocol;
+ u32 u32PHSRuleID;
+};
+
+struct bcm_mibs_phs_rule {
+ unsigned long ulSFID;
+ u8 u8PHSI;
+ u8 u8PHSFLength;
+ u8 u8PHSF[MIBS_MAX_PHS_LENGTHS];
+ u8 u8PHSMLength;
+ u8 u8PHSM[MIBS_MAX_PHS_LENGTHS];
+ u8 u8PHSS;
+ u8 u8PHSV;
+ u8 reserved[5];
+ long PHSModifiedBytes;
+ unsigned long PHSModifiedNumPackets;
+ unsigned long PHSErrorNumPackets;
+};
+
+struct bcm_mibs_parameters {
+ u32 wmanIfSfid;
+ u32 wmanIfCmnCpsSfState;
+ u32 wmanIfCmnCpsMaxSustainedRate;
+ u32 wmanIfCmnCpsMaxTrafficBurst;
+ u32 wmanIfCmnCpsMinReservedRate;
+ u32 wmanIfCmnCpsToleratedJitter;
+ u32 wmanIfCmnCpsMaxLatency;
+ u32 wmanIfCmnCpsFixedVsVariableSduInd;
+ u32 wmanIfCmnCpsSduSize;
+ u32 wmanIfCmnCpsSfSchedulingType;
+ u32 wmanIfCmnCpsArqEnable;
+ u32 wmanIfCmnCpsArqWindowSize;
+ u32 wmanIfCmnCpsArqBlockLifetime;
+ u32 wmanIfCmnCpsArqSyncLossTimeout;
+ u32 wmanIfCmnCpsArqDeliverInOrder;
+ u32 wmanIfCmnCpsArqRxPurgeTimeout;
+ u32 wmanIfCmnCpsArqBlockSize;
+ u32 wmanIfCmnCpsMinRsvdTolerableRate;
+ u32 wmanIfCmnCpsReqTxPolicy;
+ u32 wmanIfCmnSfCsSpecification;
+ u32 wmanIfCmnCpsTargetSaid;
+};
+
+struct bcm_mibs_table {
+ unsigned long ulSFID;
+ unsigned short usVCID_Value;
+ unsigned int uiThreshold;
+ u8 u8TrafficPriority;
+ bool bValid;
+ bool bActive;
+ bool bActivateRequestSent;
+ u8 u8QueueType;
+ unsigned int uiMaxBucketSize;
+ unsigned int uiCurrentQueueDepthOnTarget;
+ unsigned int uiCurrentBytesOnHost;
+ unsigned int uiCurrentPacketsOnHost;
+ unsigned int uiDroppedCountBytes;
+ unsigned int uiDroppedCountPackets;
+ unsigned int uiSentBytes;
+ unsigned int uiSentPackets;
+ unsigned int uiCurrentDrainRate;
+ unsigned int uiThisPeriodSentBytes;
+ u64 liDrainCalculated;
+ unsigned int uiCurrentTokenCount;
+ u64 liLastUpdateTokenAt;
+ unsigned int uiMaxAllowedRate;
+ unsigned int NumOfPacketsSent;
+ unsigned char ucDirection;
+ unsigned short usCID;
+ struct bcm_mibs_parameters stMibsExtServiceFlowTable;
+ unsigned int uiCurrentRxRate;
+ unsigned int uiThisPeriodRxBytes;
+ unsigned int uiTotalRxBytes;
+ unsigned int uiTotalTxBytes;
+};
+
+struct bcm_mibs_dropped_cntrl_msg {
+ unsigned long cm_responses;
+ unsigned long cm_control_newdsx_multiclassifier_resp;
+ unsigned long link_control_resp;
+ unsigned long status_rsp;
+ unsigned long stats_pointer_resp;
+ unsigned long idle_mode_status;
+ unsigned long auth_ss_host_msg;
+ unsigned long low_priority_message;
+};
+
+struct bcm_host_stats_mibs {
+ struct bcm_mibs_host_info stHostInfo;
+ struct bcm_mibs_classifier_rule astClassifierTable[MIBS_MAX_CLASSIFIERS];
+ struct bcm_mibs_table astSFtable[MIBS_MAX_SERVICEFLOWS];
+ struct bcm_mibs_phs_rule astPhsRulesTable[MIBS_MAX_PHSRULES];
+ struct bcm_mibs_dropped_cntrl_msg stDroppedAppCntrlMsgs;
+};
- LONG PHSModifiedBytes;
- ULONG PHSModifiedNumPackets;
- ULONG PHSErrorNumPackets;
-}S_MIBS_PHS_RULE;
-
-typedef struct _S_MIBS_EXTSERVICEFLOW_PARAMETERS
-{
- UINT32 wmanIfSfid;
- UINT32 wmanIfCmnCpsSfState;
- UINT32 wmanIfCmnCpsMaxSustainedRate;
- UINT32 wmanIfCmnCpsMaxTrafficBurst;
- UINT32 wmanIfCmnCpsMinReservedRate;
- UINT32 wmanIfCmnCpsToleratedJitter;
- UINT32 wmanIfCmnCpsMaxLatency;
- UINT32 wmanIfCmnCpsFixedVsVariableSduInd;
- UINT32 wmanIfCmnCpsSduSize;
- UINT32 wmanIfCmnCpsSfSchedulingType;
- UINT32 wmanIfCmnCpsArqEnable;
- UINT32 wmanIfCmnCpsArqWindowSize;
- UINT32 wmanIfCmnCpsArqBlockLifetime;
- UINT32 wmanIfCmnCpsArqSyncLossTimeout;
- UINT32 wmanIfCmnCpsArqDeliverInOrder;
- UINT32 wmanIfCmnCpsArqRxPurgeTimeout;
- UINT32 wmanIfCmnCpsArqBlockSize;
- UINT32 wmanIfCmnCpsMinRsvdTolerableRate;
- UINT32 wmanIfCmnCpsReqTxPolicy;
- UINT32 wmanIfCmnSfCsSpecification;
- UINT32 wmanIfCmnCpsTargetSaid;
-
-}S_MIBS_EXTSERVICEFLOW_PARAMETERS;
-
-
-typedef struct _S_MIBS_SERVICEFLOW_TABLE
-{
- //classification extension Rule
- ULONG ulSFID;
- USHORT usVCID_Value;
- UINT uiThreshold;
- // This field determines the priority of the SF Queues
- B_UINT8 u8TrafficPriority;
-
- BOOLEAN bValid;
- BOOLEAN bActive;
- BOOLEAN bActivateRequestSent;
- //BE or rtPS
- B_UINT8 u8QueueType;
- //maximum size of the bucket for the queue
- UINT uiMaxBucketSize;
- UINT uiCurrentQueueDepthOnTarget;
- UINT uiCurrentBytesOnHost;
- UINT uiCurrentPacketsOnHost;
- UINT uiDroppedCountBytes;
- UINT uiDroppedCountPackets;
- UINT uiSentBytes;
- UINT uiSentPackets;
- UINT uiCurrentDrainRate;
- UINT uiThisPeriodSentBytes;
- LARGE_INTEGER liDrainCalculated;
- UINT uiCurrentTokenCount;
- LARGE_INTEGER liLastUpdateTokenAt;
- UINT uiMaxAllowedRate;
- UINT NumOfPacketsSent;
- UCHAR ucDirection;
- USHORT usCID;
- S_MIBS_EXTSERVICEFLOW_PARAMETERS stMibsExtServiceFlowTable;
- UINT uiCurrentRxRate;
- UINT uiThisPeriodRxBytes;
- UINT uiTotalRxBytes;
- UINT uiTotalTxBytes;
-}S_MIBS_SERVICEFLOW_TABLE;
-
-typedef struct _S_MIBS_DROPPED_APP_CNTRL_MESSAGES
-{
- ULONG cm_responses;
- ULONG cm_control_newdsx_multiclassifier_resp;
- ULONG link_control_resp;
- ULONG status_rsp;
- ULONG stats_pointer_resp;
- ULONG idle_mode_status;
- ULONG auth_ss_host_msg;
- ULONG low_priority_message;
-
-}S_MIBS_DROPPED_APP_CNTRL_MESSAGES;
-
-typedef struct _S_MIBS_HOST_STATS_MIBS
-{
- S_MIBS_HOST_INFO stHostInfo;
- S_MIBS_CLASSIFIER_RULE astClassifierTable[MIBS_MAX_CLASSIFIERS];
- S_MIBS_SERVICEFLOW_TABLE astSFtable[MIBS_MAX_SERVICEFLOWS];
- S_MIBS_PHS_RULE astPhsRulesTable[MIBS_MAX_PHSRULES];
- S_MIBS_DROPPED_APP_CNTRL_MESSAGES stDroppedAppCntrlMsgs;
-}S_MIBS_HOST_STATS_MIBS;
#endif
-
-