/*
-<:copyright-broadcom
-
- Copyright (c) 2002 Broadcom Corporation
- All Rights Reserved
- No portions of this material may be reproduced in any form without the
- written permission of:
- Broadcom Corporation
- 16215 Alton Parkway
- Irvine, California 92619
- All information contained in this document is Broadcom Corporation
- company private, proprietary, and trade secret.
-
-:>
+# <:copyright-gpl
+# Copyright 2004 Broadcom Corp. All Rights Reserved.
+# This program is free software; you can distribute it and/or modify it
+# under the terms of the GNU General Public License (Version 2) as
+# published by the Free Software Foundation.
+# This program is distributed in the hope 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.,
+# 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+# :>
*/
//**************************************************************************
// File Name : BcmAtmApi.h
#if !defined(_BCMATMAPI_H_)
#define _BCMATMAPI_H_
+//define CONFIG_ATM_EOP_MONITORING
+
#if defined(__cplusplus)
extern "C" {
#endif
// Constant Definitions
//**************************************************************************
+/* Values for traffic type */
+#define ATM_TRAFFIC 0
+#define PTM_TRAFFIC 1
+
// ATM physical port constants.
#define PHY_NUM_PORTS 4
#define PHY_0 0
#define PT_ADSL_INTERLEAVED 4 // [BCM6345 Only]
#define PT_ADSL_FAST 5 // [BCM6345 Only]
+// Values for ATM_PORT_CFG ucPortFlags.
+#define PF_UTOPIA_LEVEL_2 0x01
+#define PF_UTOPIA_NEG_EDGE_SEL 0x02
+
// Wildcard definitions.
#define ALL_INTERFACES 0xffffffff
#define ANY_PRIORITY 0xff
+// Values for priority packet groups.
+#define NUM_PRI_PKT_GROUPS 16
+#define NUM_ENTRIES_PER_PRI_PKT_GROUP 6
+
// Values for ATM_TRAFFIC_DESCR_PARM_ENTRY ulTrafficDescrType.
#define TDT_ATM_NO_TRAFFIC_DESCRIPTOR 1
#define TDT_ATM_NO_CLP_NO_SCR 2
{
UINT32 ulInterfaceId;
UINT8 ucPortType;
- UINT8 ucPortAddr;
+ UINT8 ucPortFlags;
UINT8 ucReserved[2];
} ATM_PORT_CFG, *PATM_PORT_CFG;
UINT16 usReceiveCellQSize;
UINT16 usReceivePktQSize;
UINT8 ucTransmitFifoPriority; // [BCM635x Only]
- UINT8 ucReserved;
+ UINT8 ucPrioritizeReceivePkts;
UINT16 usAal5CpcsMaxSduLength;
UINT16 usAal2SscsMaxSsarSduLength; // [BCM635x Only]
ATM_PORT_CFG PortCfg[PHY_NUM_PORTS];
} ATM_INITIALIZATION_PARMS, *PATM_INITIALIZATION_PARMS;
+// ATM_PRIORITY_PACKET_ENTRY contains fields for identifying a received packet.
+#define ID_ATM_PRIORITY_PACKET_ENTRY 1
+typedef struct AtmPriorityPacketEntry
+{
+ UINT32 ulStructureId;
+ UINT32 ulPacketOffset;
+ UINT16 usPacketValue;
+ UINT16 usValueMask;
+} ATM_PRIORITY_PACKET_ENTRY, *PATM_PRIORITY_PACKET_ENTRY;
+
+
// ATM_TRAFFIC_DESCR_PARM_ENTRY contains the fields needed to create a Traffic
// Descriptor Table parameter entry.
#define ID_ATM_TRAFFIC_DESCR_PARM_ENTRY 1
// ATM_INTERFACE_CFG contains configuration fields for an ATM interface.
-#define ID_ATM_INTERFACE_CFG 3
+#define ID_ATM_INTERFACE_CFG 4
typedef struct AtmInterfaceCfg
{
UINT32 ulStructureId;
UINT32 ulIfOperStatus; // read-only
UINT32 ulSendNullCells;
UINT32 ulTcScramble;
- UINT32 ulPortType; // read-only
+ UINT32 ulPortType;
UINT32 ulIfLastChange;
+ UINT32 ulPortFlags;
} ATM_INTERFACE_CFG, *PATM_INTERFACE_CFG;
// ATM_VCC_CFG contains configuration fields for an ATM Virtual Channel
// Connection (VCC).
-#define ID_ATM_VCC_CFG 2
+#define ID_ATM_VCC_CFG 3
#define TX_Q_PARM_SIZE 8
typedef struct AtmVccCfg
{
UINT32 ulAtmVclReceiveTrafficDescrIndex;
UINT32 ulAtmVclTransmitTrafficDescrIndex;
UINT32 ulTransmitQParmsSize;
+ UINT32 ulPriorityPacketGroupNumbers[NUM_PRI_PKT_GROUPS];
ATM_VCC_TRANSMIT_QUEUE_PARMS TransmitQParms[TX_Q_PARM_SIZE];
union
{
UINT32 ulIfOutErrors;
UINT32 ulIfInDiscards;
UINT32 ulIfOutDiscards;
+ UINT32 ulIfInPriPkts;
} ATM_INTF_AAL5_AAL0_STATS, *PATM_INTF_AAL5_AAL0_STATS;
// ATM_INTERFACE_STATS contains statistics for an ATM interface.
-#define ID_ATM_INTERFACE_STATS 1
+#define ID_ATM_INTERFACE_STATS 2
typedef struct AtmInterfaceStats
{
UINT32 ulStructureId;
BCMATM_STATUS BcmAtm_Initialize( PATM_INITIALIZATION_PARMS pInitValues );
BCMATM_STATUS BcmAtm_Uninitialize( void );
BCMATM_STATUS BcmAtm_GetInterfaceId( UINT8 ucPhyPort, UINT32 *pulInterfaceId );
+BCMATM_STATUS BcmAtm_GetPriorityPacketGroup(UINT32 ulGroupNumber,
+ PATM_PRIORITY_PACKET_ENTRY pPriorityPackets, UINT32 *pulPriorityPacketsSize);
+BCMATM_STATUS BcmAtm_SetPriorityPacketGroup(UINT32 ulGroupNumber,
+ PATM_PRIORITY_PACKET_ENTRY pPriorityPackets, UINT32 ulPriorityPacketsSize);
BCMATM_STATUS BcmAtm_GetTrafficDescrTableSize(UINT32 *pulTrafficDescrTableSize);
BCMATM_STATUS BcmAtm_GetTrafficDescrTable( PATM_TRAFFIC_DESCR_PARM_ENTRY
pTrafficDescTable, UINT32 ulTrafficDescrTableSize );