NetBSD/sys/dev/pcmcia/if_xivar.h
tls 7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00

50 lines
1.7 KiB
C

/* $NetBSD: if_xivar.h,v 1.8 2012/02/02 19:43:06 tls Exp $ */
/*
* Copyright (c) 2004 Charles M. Hannum. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by Charles M. Hannum.
* 4. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*/
#include <sys/rnd.h>
struct xi_softc {
device_t sc_dev; /* Generic device info */
struct ethercom sc_ethercom; /* Ethernet common part */
struct mii_data sc_mii; /* MII media information */
bus_space_tag_t sc_bst; /* Bus cookie */
bus_space_handle_t sc_bsh; /* Bus I/O handle */
/* Power management hooks and state. */
int (*sc_enable)(struct xi_softc *);
void (*sc_disable)(struct xi_softc *);
int sc_enabled;
int sc_chipset; /* Chipset type */
#define XI_CHIPSET_SCIPPER 0
#define XI_CHIPSET_MOHAWK 1
#define XI_CHIPSET_DINGO 2
u_int8_t sc_rev; /* Chip revision */
krndsource_t sc_rnd_source;
};
void xi_attach(struct xi_softc *, u_int8_t *);
int xi_detach(device_t, int);
int xi_activate(device_t, enum devact);
int xi_intr(void *);