/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
* Copyright 2015 Garrett D'Amore <garret@damore.org>
*/
#include <sys/softmac_impl.h>
typedef struct i_softmac_stat_info_s {
char *ssi_name;
char *ssi_alias;
/*
* Must be the same order as mac_driver_stat.
*/
};
#define SOFTMAC_DRIVER_SI_SZ \
(sizeof (i_softmac_driver_si) / sizeof (i_softmac_driver_si[0]))
/*
* Must be the same order as ether_stat.
*/
{ ETHER_STAT_ALIGN_ERRORS, "align_errors",
"alignment_err" },
{ ETHER_STAT_TX_LATE_COLLISIONS, "tx_late_collisions",
"late_collisions" },
{ ETHER_STAT_EX_COLLISIONS, "ex_collisions",
"excessive_collisions" },
{ ETHER_STAT_MACRCV_ERRORS, "macrcv_errors",
"Rx Error Count" },
};
#define SOFTMAC_ETHER_SI_SZ \
(sizeof (i_softmac_ether_si) / sizeof (i_softmac_ether_si[0]))
static void softmac_rele_dev_kstat(kstat_t *);
static kstat_t *
{
return (NULL);
/*
* Find the kstat by the module name and the instance number.
*/
/*
* Update the kstat to get the latest statistics.
*/
return (ksp);
}
}
return (NULL);
}
static void
{
}
/*
* The kstat needs to be held when calling this function.
*/
static int
{
int i;
return (ret);
/*
* Search the kstat with the given name.
*/
case KSTAT_DATA_INT32:
case KSTAT_DATA_UINT32:
ret = 0;
break;
case KSTAT_DATA_INT64:
case KSTAT_DATA_UINT64:
ret = 0;
break;
#ifdef _LP64
case KSTAT_DATA_LONG:
case KSTAT_DATA_ULONG:
ret = 0;
break;
#endif
case KSTAT_DATA_CHAR:
break;
*valp = LINK_DUPLEX_FULL;
*valp = LINK_DUPLEX_HALF;
else
ret = 0;
break;
}
break;
}
}
return (ret);
}
int
{
int ret;
return (ENOTSUP);
if (IS_MAC_STAT(stat)) {
break;
}
}
} else {
val)) != 0)
val);
}
} else {
switch (softmac->smac_media) {
case DL_ETHER: {
if (stat ==
break;
}
}
} else {
}
break;
}
default:
break;
}
}
return (ret);
}