summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sk.c
diff options
context:
space:
mode:
authorNathan Binkert <nate@cvs.openbsd.org>2003-05-08 04:20:06 +0000
committerNathan Binkert <nate@cvs.openbsd.org>2003-05-08 04:20:06 +0000
commit2f56ca6db0deb5ff2669d1b118793639009427d5 (patch)
treef9801e663045fb7ff1dc1a88467efac356ab3f8f /sys/dev/pci/if_sk.c
parent60b1e8d22e2e18e205fced0f5cfed251b97fe56b (diff)
a bit more cleanup
Diffstat (limited to 'sys/dev/pci/if_sk.c')
-rw-r--r--sys/dev/pci/if_sk.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c
index 2fe4a04d702..72bf161d805 100644
--- a/sys/dev/pci/if_sk.c
+++ b/sys/dev/pci/if_sk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sk.c,v 1.29 2003/05/08 02:16:37 nate Exp $ */
+/* $OpenBSD: if_sk.c,v 1.30 2003/05/08 04:20:05 nate Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -371,11 +371,8 @@ sk_miibus_writereg(struct device *dev, int phy, int reg, int val)
void
sk_miibus_statchg(struct device *dev)
{
- struct sk_if_softc *sc_if;
- struct mii_data *mii;
-
- sc_if = (struct sk_if_softc *)dev;
- mii = &sc_if->sk_mii;
+ struct sk_if_softc *sc_if = (struct sk_if_softc *)dev;
+ struct mii_data *mii = &sc_if->sk_mii;
/*
* If this is a GMII PHY, manually set the XMAC's
@@ -422,7 +419,7 @@ sk_setfilt(struct sk_if_softc *sc_if, caddr_t addr, int slot)
void
sk_setmulti(struct sk_if_softc *sc_if)
{
- struct ifnet *ifp;
+ struct ifnet *ifp = &sc_if->arpcom.ac_if;
u_int32_t hashes[2] = { 0, 0 };
int h, i;
struct arpcom *ac = &sc_if->arpcom;
@@ -430,8 +427,6 @@ sk_setmulti(struct sk_if_softc *sc_if)
struct ether_multistep step;
u_int8_t dummy[] = { 0, 0, 0, 0, 0 ,0 };
- ifp = &sc_if->arpcom.ac_if;
-
/* First, zot all the existing filters. */
for (i = 1; i < XM_RXFILT_MAX; i++)
sk_setfilt(sc_if, (caddr_t)&dummy, i);
@@ -482,13 +477,10 @@ allmulti:
int
sk_init_rx_ring(struct sk_if_softc *sc_if)
{
- struct sk_chain_data *cd;
- struct sk_ring_data *rd;
+ struct sk_chain_data *cd = &sc_if->sk_cdata;
+ struct sk_ring_data *rd = sc_if->sk_rdata;
int i;
- cd = &sc_if->sk_cdata;
- rd = sc_if->sk_rdata;
-
bzero((char *)rd->sk_rx_ring,
sizeof(struct sk_rx_desc) * SK_RX_RING_CNT);
@@ -1146,7 +1138,6 @@ sk_encap(struct sk_if_softc *sc_if, struct mbuf *m_head, u_int32_t *txidx)
struct mbuf *m;
u_int32_t frag, cur, cnt = 0;
- m = m_head;
cur = frag = *txidx;
/*