/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "rge.h"
/*
* Local datatype for defining tables of (Offset, Name) pairs
*/
typedef struct {
char *name;
{ 0, "rx_ring_addr" },
{ 1, "rx_next" },
{ 2, "rx_free" },
{ 3, "rx_bcopy" },
{ 4, "tx_ring_addr" },
{ 5, "tx_next" },
{ 6, "tx_free" },
{ 7, "tx_flow" },
{ 8, "resched_needed" },
{ 9, "watchdog" },
{ 10, "rx_config" },
{ 11, "tx_config" },
{ 12, "mac_ver" },
{ 13, "phy_ver" },
{ 14, "chip_reset" },
{ 15, "phy_reset" },
{ 16, "loop_mode" },
{ -1, NULL }
};
static int
{
if (flag != KSTAT_READ)
return (EACCES);
return (0);
}
static kstat_t *
{
char *np;
int type;
size /= sizeof (rge_ksindex_t);
return (NULL);
switch (*np) {
default:
break;
case '%':
np += 1;
break;
case '$':
np += 1;
break;
case '&':
np += 1;
break;
}
}
return (ksp);
}
void
{
sizeof (rge_driverinfo), rge_driverinfo_update);
}
void
{
int i;
for (i = RGE_KSTAT_COUNT; --i >= 0; )
}
}
int
{
switch (stat) {
case MAC_STAT_IFSPEED:
break;
case MAC_STAT_MULTIRCV:
break;
case MAC_STAT_BRDCSTRCV:
break;
case MAC_STAT_NORCVBUF:
break;
case MAC_STAT_IERRORS:
break;
case MAC_STAT_OERRORS:
break;
case MAC_STAT_COLLISIONS:
break;
case MAC_STAT_RBYTES:
break;
case MAC_STAT_IPACKETS:
break;
case MAC_STAT_OBYTES:
break;
case MAC_STAT_OPACKETS:
break;
case ETHER_STAT_ALIGN_ERRORS:
break;
break;
break;
case ETHER_STAT_DEFER_XMTS:
break;
case ETHER_STAT_XCVR_ADDR:
break;
case ETHER_STAT_XCVR_ID:
*val <<= 16;
break;
case ETHER_STAT_XCVR_INUSE:
*val = XCVR_1000T;
break;
case ETHER_STAT_CAP_1000FDX:
*val = 1;
break;
case ETHER_STAT_CAP_1000HDX:
*val = 0;
break;
case ETHER_STAT_CAP_100FDX:
*val = 1;
break;
case ETHER_STAT_CAP_100HDX:
*val = 1;
break;
case ETHER_STAT_CAP_10FDX:
*val = 1;
break;
case ETHER_STAT_CAP_10HDX:
*val = 1;
break;
case ETHER_STAT_CAP_ASMPAUSE:
*val = 1;
break;
case ETHER_STAT_CAP_PAUSE:
*val = 1;
break;
case ETHER_STAT_CAP_AUTONEG:
*val = 1;
break;
break;
break;
break;
break;
case ETHER_STAT_ADV_CAP_10FDX:
break;
case ETHER_STAT_ADV_CAP_10HDX:
break;
break;
case ETHER_STAT_ADV_CAP_PAUSE:
break;
break;
case ETHER_STAT_LINK_DUPLEX:
break;
default:
return (ENOTSUP);
}
return (0);
}