diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/bge/if_bge.c | 10 | ||||
-rw-r--r-- | sys/dev/ed/if_ed.c | 10 | ||||
-rw-r--r-- | sys/dev/fe/if_fe.c | 8 | ||||
-rw-r--r-- | sys/dev/lge/if_lge.c | 12 | ||||
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 8 | ||||
-rw-r--r-- | sys/dev/my/if_my.c | 12 | ||||
-rw-r--r-- | sys/dev/nge/if_nge.c | 10 | ||||
-rw-r--r-- | sys/dev/re/if_re.c | 12 | ||||
-rw-r--r-- | sys/dev/sf/if_sf.c | 10 | ||||
-rw-r--r-- | sys/dev/sk/if_sk.c | 10 | ||||
-rw-r--r-- | sys/dev/sn/if_sn.c | 2 | ||||
-rw-r--r-- | sys/dev/tx/if_tx.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/if_aue.c | 10 | ||||
-rw-r--r-- | sys/dev/usb/if_axe.c | 12 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 6 | ||||
-rw-r--r-- | sys/dev/usb/if_rue.c | 12 | ||||
-rw-r--r-- | sys/dev/vr/if_vr.c | 10 | ||||
-rw-r--r-- | sys/dev/xe/if_xe.c | 8 |
18 files changed, 86 insertions, 86 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 123135c..cec9f82 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -206,7 +206,7 @@ static void bge_ifmedia_sts (struct ifnet *, struct ifmediareq *); static u_int8_t bge_eeprom_getbyte (struct bge_softc *, int, u_int8_t *); static int bge_read_eeprom (struct bge_softc *, caddr_t, int, int); -static u_int32_t bge_mchash (caddr_t); +static uint32_t bge_mchash (const uint8_t *); static void bge_setmulti (struct bge_softc *); static void bge_handle_events (struct bge_softc *); @@ -1130,13 +1130,13 @@ bge_init_tx_ring(sc) #define BGE_POLY 0xEDB88320 -static u_int32_t +static uint32_t bge_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc; + uint32_t crc; int idx, bit; - u_int8_t data; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index 063e7bb..d34c395 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -104,7 +104,7 @@ static u_short ed_pio_write_mbufs(struct ed_softc *, struct mbuf *, int); static void ed_setrcr (struct ed_softc *); -static u_int32_t ds_mchash (caddr_t addr); +static uint32_t ds_mchash (const uint8_t *); /* * Interrupt conversion table for WD/SMC ASIC/83C584 @@ -3531,14 +3531,14 @@ ed_setrcr(sc) /* * Compute crc for ethernet address */ -static u_int32_t +static uint32_t ds_mchash(addr) - caddr_t addr; + const uint8_t *addr; { #define ED_POLYNOMIAL 0x04c11db6 - register u_int32_t crc = 0xffffffff; + register uint32_t crc = 0xffffffff; register int carry, idx, bit; - register u_char data; + register uint8_t data; for (idx = 6; --idx >= 0;) { for (data = *addr++, bit = 8; --bit >= 0; data >>=1 ) { diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c index 23f1322..e47fcae 100644 --- a/sys/dev/fe/if_fe.c +++ b/sys/dev/fe/if_fe.c @@ -2046,14 +2046,14 @@ fe_write_mbufs (struct fe_softc *sc, struct mbuf *m) /* * Compute hash value for an Ethernet address */ -static u_int32_t -fe_mchash (caddr_t addr) +static uint32_t +fe_mchash (const uint8_t *addr) { #define FE_POLY 0xEDB88320L - u_long carry, crc = 0xFFFFFFFFL; + uint32_t carry, crc = 0xFFFFFFFFL; int idx, bit; - u_int8_t data; + uint8_t data; for ( idx = ETHER_ADDR_LEN; --idx >= 0; ) { for (data = *addr++, bit = 8; --bit >= 0; data >>= 1) { diff --git a/sys/dev/lge/if_lge.c b/sys/dev/lge/if_lge.c index df84d49..e9fd5e6 100644 --- a/sys/dev/lge/if_lge.c +++ b/sys/dev/lge/if_lge.c @@ -149,7 +149,7 @@ static int lge_miibus_writereg(device_t, int, int, int); static void lge_miibus_statchg(device_t); static void lge_setmulti(struct lge_softc *); -static u_int32_t lge_mchash(caddr_t); +static uint32_t lge_mchash(const uint8_t *); static void lge_reset(struct lge_softc *); static int lge_list_rx_init(struct lge_softc *); static int lge_list_tx_init(struct lge_softc *); @@ -367,13 +367,13 @@ lge_miibus_statchg(dev) return; } -static u_int32_t +static uint32_t lge_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index 1e7e9c3..e463c46 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -189,13 +189,13 @@ lance_probe(struct lnc_softc *sc) return (UNKNOWN); } -static __inline u_int32_t -lnc_mchash(caddr_t ether_addr) +static __inline uint32_t +lnc_mchash(const uint8_t *ether_addr) { #define LNC_POLYNOMIAL 0xEDB88320UL - u_int32_t crc = 0xFFFFFFFFUL; + uint32_t crc = 0xFFFFFFFF; int idx, bit; - u_int8_t data; + uint8_t data; for (idx = 0; idx < ETHER_ADDR_LEN; idx++) { for (data = *ether_addr++, bit = 0; bit < MULTICAST_FILTER_LEN; bit++) { diff --git a/sys/dev/my/if_my.c b/sys/dev/my/if_my.c index 82b45af..30137af 100644 --- a/sys/dev/my/if_my.c +++ b/sys/dev/my/if_my.c @@ -142,7 +142,7 @@ static void my_autoneg_mii(struct my_softc *, int, int); static void my_setmode_mii(struct my_softc *, int); static void my_getmode_mii(struct my_softc *); static void my_setcfg(struct my_softc *, int); -static u_int32_t my_mchash(caddr_t); +static uint32_t my_mchash(const uint8_t *); static void my_setmulti(struct my_softc *); static void my_reset(struct my_softc *); static int my_list_rx_init(struct my_softc *); @@ -313,12 +313,12 @@ my_phy_writereg(struct my_softc * sc, int reg, int data) return; } -static u_int32_t -my_mchash(caddr_t addr) +static uint32_t +my_mchash(const uint8_t *addr) { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index f01e8a9..c141cd8 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -184,7 +184,7 @@ static int nge_miibus_writereg(device_t, int, int, int); static void nge_miibus_statchg(device_t); static void nge_setmulti(struct nge_softc *); -static u_int32_t nge_mchash(caddr_t); +static uint32_t nge_mchash(const uint8_t *); static void nge_reset(struct nge_softc *); static int nge_list_rx_init(struct nge_softc *); static int nge_list_tx_init(struct nge_softc *); @@ -673,11 +673,11 @@ nge_miibus_statchg(dev) static u_int32_t nge_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index f96c17d..77157bc 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -225,7 +225,7 @@ static int re_miibus_readreg (device_t, int, int); static int re_miibus_writereg (device_t, int, int, int); static void re_miibus_statchg (device_t); -static u_int32_t re_mchash (caddr_t); +static uint32_t re_mchash (const uint8_t *); static void re_setmulti (struct rl_softc *); static void re_reset (struct rl_softc *); @@ -575,13 +575,13 @@ re_miibus_statchg(dev) /* * Calculate CRC of a multicast group address, return the upper 6 bits. */ -static u_int32_t +static uint32_t re_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/sf/if_sf.c b/sys/dev/sf/if_sf.c index 254277a..fc56f3b 100644 --- a/sys/dev/sf/if_sf.c +++ b/sys/dev/sf/if_sf.c @@ -159,7 +159,7 @@ static int sf_setvlan (struct sf_softc *, int, u_int32_t); #endif static u_int8_t sf_read_eeprom (struct sf_softc *, int); -static u_int32_t sf_mchash (caddr_t); +static uint32_t sf_mchash (const uint8_t *); static int sf_miibus_readreg (device_t, int, int); static int sf_miibus_writereg (device_t, int, int, int); @@ -260,11 +260,11 @@ csr_write_4(sc, reg, val) static u_int32_t sf_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/sk/if_sk.c b/sys/dev/sk/if_sk.c index 4c6611f..12b6a41 100644 --- a/sys/dev/sk/if_sk.c +++ b/sys/dev/sk/if_sk.c @@ -224,7 +224,7 @@ static int sk_marv_miibus_writereg (struct sk_if_softc *, int, int, int); static void sk_marv_miibus_statchg (struct sk_if_softc *); -static u_int32_t sk_mchash (caddr_t); +static uint32_t sk_mchash (const uint8_t *); static void sk_setfilt (struct sk_if_softc *, caddr_t, int); static void sk_setmulti (struct sk_if_softc *); @@ -714,11 +714,11 @@ sk_marv_miibus_statchg(sc_if) static u_int32_t sk_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc; - int idx, bit; - u_int8_t data; + uint32_t crc; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/sn/if_sn.c b/sys/dev/sn/if_sn.c index 689ee83..adf2487 100644 --- a/sys/dev/sn/if_sn.c +++ b/sys/dev/sn/if_sn.c @@ -133,7 +133,7 @@ static void snwatchdog(struct ifnet *); static void sn_setmcast(struct sn_softc *); static int sn_getmcf(struct arpcom *ac, u_char *mcf); -static uint32_t sn_mchash(const uint8_t *addr); +static uint32_t sn_mchash(const uint8_t *); /* I (GB) have been unlucky getting the hardware padding * to work properly. diff --git a/sys/dev/tx/if_tx.c b/sys/dev/tx/if_tx.c index fa4fc9d..6a6f3c8 100644 --- a/sys/dev/tx/if_tx.c +++ b/sys/dev/tx/if_tx.c @@ -101,7 +101,7 @@ static void epic_start_activity(epic_softc_t *); static void epic_set_rx_mode(epic_softc_t *); static void epic_set_tx_mode(epic_softc_t *); static void epic_set_mc_table(epic_softc_t *); -static u_int32_t tx_mchash(caddr_t); +static uint32_t tx_mchash(const uint8_t *); static int epic_read_eeprom(epic_softc_t *,u_int16_t); static void epic_output_eepromw(epic_softc_t *, u_int16_t); static u_int16_t epic_input_eepromw(epic_softc_t *); @@ -1425,13 +1425,13 @@ epic_set_mc_table(sc) /* * Synopsis: calculate EPIC's hash of multicast address. */ -static u_int32_t +static uint32_t tx_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc, carry; + uint32_t crc, carry; int idx, bit; - u_int8_t data; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 89cf808..6e3bf63 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -207,7 +207,7 @@ Static int aue_miibus_writereg(device_ptr_t, int, int, int); Static void aue_miibus_statchg(device_ptr_t); Static void aue_setmulti(struct aue_softc *); -Static u_int32_t aue_mchash(caddr_t); +Static uint32_t aue_mchash(const uint8_t *); Static void aue_reset(struct aue_softc *); Static int aue_csr_read_1(struct aue_softc *, int); @@ -522,11 +522,11 @@ aue_miibus_statchg(device_ptr_t dev) #define AUE_BITS 6 Static u_int32_t -aue_mchash(caddr_t addr) +aue_mchash(const uint8_t *addr) { - u_int32_t crc; - int idx, bit; - u_int8_t data; + uint32_t crc; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index c71514f..4ad6698 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -140,7 +140,7 @@ Static int axe_ifmedia_upd(struct ifnet *); Static void axe_ifmedia_sts(struct ifnet *, struct ifmediareq *); Static void axe_setmulti(struct axe_softc *); -Static u_int32_t axe_mchash(caddr_t); +Static uint32_t axe_mchash(const uint8_t *); Static device_method_t axe_methods[] = { /* Device interface */ @@ -313,12 +313,12 @@ axe_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr) return; } -Static u_int32_t -axe_mchash(caddr_t addr) +Static uint32_t +axe_mchash(const uint8_t *addr) { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index a9420bd..e4b5ce8 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -330,9 +330,9 @@ cue_getmac(struct cue_softc *sc, void *buf) Static uint32_t cue_mchash(const uint8_t *addr) { - uint32_t crc; - int idx, bit; - uint8_t data; + uint32_t crc; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/usb/if_rue.c b/sys/dev/usb/if_rue.c index b8fc87a..3707a36 100644 --- a/sys/dev/usb/if_rue.c +++ b/sys/dev/usb/if_rue.c @@ -157,7 +157,7 @@ Static int rue_miibus_readreg(device_ptr_t, int, int); Static int rue_miibus_writereg(device_ptr_t, int, int, int); Static void rue_miibus_statchg(device_ptr_t); -Static u_int32_t rue_mchash(caddr_t); +Static uint32_t rue_mchash(const uint8_t *); Static void rue_setmulti(struct rue_softc *); Static void rue_reset(struct rue_softc *); @@ -464,12 +464,12 @@ rue_miibus_statchg(device_ptr_t dev) * Calculate CRC of a multicast group address, return the upper 6 bits. */ -Static u_int32_t -rue_mchash(caddr_t addr) +Static uint32_t +rue_mchash(const uint8_t *addr) { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 1d35c3f..c2221be 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -160,7 +160,7 @@ static int vr_miibus_writereg (device_t, int, int, int); static void vr_miibus_statchg (device_t); static void vr_setcfg (struct vr_softc *, int); -static u_int32_t vr_mchash (caddr_t); +static uint32_t vr_mchash (const uint8_t *); static void vr_setmulti (struct vr_softc *); static void vr_reset (struct vr_softc *); static int vr_list_rx_init (struct vr_softc *); @@ -566,11 +566,11 @@ vr_miibus_statchg(dev) */ static u_int32_t vr_mchash(addr) - caddr_t addr; + const uint8_t *addr; { - u_int32_t crc, carry; - int idx, bit; - u_int8_t data; + uint32_t crc, carry; + int idx, bit; + uint8_t data; /* Compute CRC for the address value. */ crc = 0xFFFFFFFF; /* initial value */ diff --git a/sys/dev/xe/if_xe.c b/sys/dev/xe/if_xe.c index 3e51011..169c9f8 100644 --- a/sys/dev/xe/if_xe.c +++ b/sys/dev/xe/if_xe.c @@ -163,7 +163,7 @@ static void xe_enable_intr (struct xe_softc *scp); static void xe_disable_intr (struct xe_softc *scp); static void xe_set_multicast (struct xe_softc *scp); static void xe_set_addr (struct xe_softc *scp, u_int8_t* addr, unsigned idx); -static void xe_mchash (struct xe_softc *scp, caddr_t addr); +static void xe_mchash (struct xe_softc *scp, const uint8_t *addr); static int xe_pio_write_packet (struct xe_softc *scp, struct mbuf *mbp); /* @@ -1412,10 +1412,10 @@ xe_set_addr(struct xe_softc *scp, u_int8_t* addr, unsigned idx) { * address. */ static void -xe_mchash(struct xe_softc* scp, caddr_t addr) { - u_int32_t crc = 0xffffffff; +xe_mchash(struct xe_softc* scp, const uint8_t *addr) { + uint32_t crc = 0xffffffff; int idx, bit; - u_int8_t carry, byte, data, crc31, hash; + uint8_t carry, byte, data, crc31, hash; /* Compute CRC of the address -- standard Ethernet CRC function */ for (data = *addr++, idx = 0; idx < 6; idx++, data >>= 1) { |