summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2003-10-31 00:44:56 +0000
committerbrooks <brooks@FreeBSD.org>2003-10-31 00:44:56 +0000
commit2848a3b2e1434a91e521c644b9a96fefe87c786e (patch)
tree18f851d23bf685b52c8b7e05f012406ba3ca40bd /sys
parent186226fb16e2e0b6a25a8c492760b9c53fd031c1 (diff)
downloadFreeBSD-src-2848a3b2e1434a91e521c644b9a96fefe87c786e.zip
FreeBSD-src-2848a3b2e1434a91e521c644b9a96fefe87c786e.tar.gz
Initialize if_softc and use it in favor of &ipr_softc[ifp->if_unit] to
get the softc.
Diffstat (limited to 'sys')
-rw-r--r--sys/i4b/driver/i4b_ipr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/i4b/driver/i4b_ipr.c b/sys/i4b/driver/i4b_ipr.c
index 370e0e4..f2ea70e 100644
--- a/sys/i4b/driver/i4b_ipr.c
+++ b/sys/i4b/driver/i4b_ipr.c
@@ -201,6 +201,7 @@ i4biprattach(void *dummy)
NDBGL4(L4_DIALST, "setting dial state to ST_IDLE");
+ sc->sc_if.if_softc = sc;
sc->sc_state = ST_IDLE;
sc->sc_if.if_name = "ipr";
sc->sc_if.if_unit = i;
@@ -287,7 +288,7 @@ i4biproutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
s = SPLI4B();
unit = ifp->if_unit;
- sc = &ipr_softc[unit];
+ sc = ifp->if_softc;
/* check for IP */
@@ -408,7 +409,7 @@ i4biproutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
static int
i4biprioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
- struct ipr_softc *sc = &ipr_softc[ifp->if_unit];
+ struct ipr_softc *sc = ifp->if_softc;
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
int s;
@@ -513,7 +514,7 @@ static void
iprwatchdog(struct ifnet *ifp)
{
int unit = ifp->if_unit;
- struct ipr_softc *sc = &ipr_softc[unit];
+ struct ipr_softc *sc = ifp->if_softc;
bchan_statistics_t bs;
/* get # of bytes in and out from the HSCX driver */
OpenPOWER on IntegriCloud