Just put the ifnet pointer first in the softc like it needs to be rather than

adding another deliciously evil pointer.
This commit is contained in:
Andrew Thompson 2009-01-18 05:35:58 +00:00
parent 50d670da08
commit f2476867dc
20 changed files with 10 additions and 30 deletions

View File

@ -834,7 +834,6 @@ aue_cfg_first_time_setup(struct aue_softc *sc,
sc->sc_name);
goto done;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "aue", sc->sc_unit);

View File

@ -205,14 +205,13 @@ struct aue_rxpkt {
} __packed;
struct aue_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct usb2_config_td sc_config_td;
struct usb2_callout sc_watchdog;
struct mtx sc_mtx;
struct aue_rxpkt sc_rxpkt;
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[AUE_N_TRANSFER];
device_t sc_miibus;

View File

@ -843,7 +843,6 @@ axe_cfg_first_time_setup(struct axe_softc *sc,
sc->sc_name);
goto done;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "axe", sc->sc_unit);

View File

@ -181,13 +181,12 @@ enum {
};
struct axe_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct usb2_config_td sc_config_td;
struct usb2_callout sc_watchdog;
struct mtx sc_mtx;
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[AXE_N_TRANSFER];
device_t sc_miibus;

View File

@ -444,7 +444,6 @@ cdce_attach(device_t dev)
device_printf(dev, "cannot if_alloc()\n");
goto detach;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "cdce", sc->sc_unit);

View File

@ -61,7 +61,7 @@ enum {
};
struct cdce_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
union cdce_eth_tx sc_tx;
union cdce_eth_rx sc_rx;
@ -70,7 +70,6 @@ struct cdce_softc {
struct cdce_mq sc_rx_mq;
struct cdce_mq sc_tx_mq;
struct ifnet *sc_ifp;
struct usb2_xfer *sc_xfer[CDCE_N_TRANSFER];
struct usb2_device *sc_udev;
device_t sc_dev;

View File

@ -468,7 +468,6 @@ cue_cfg_first_time_setup(struct cue_softc *sc,
sc->sc_unit);
goto done;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "cue", sc->sc_unit);

View File

@ -122,13 +122,12 @@ enum {
};
struct cue_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct usb2_config_td sc_config_td;
struct usb2_callout sc_watchdog;
struct mtx sc_mtx;
struct ifnet *sc_ifp;
device_t sc_dev;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[CUE_N_TRANSFER];

View File

@ -536,7 +536,6 @@ kue_cfg_first_time_setup(struct kue_softc *sc,
sc->sc_unit);
goto done;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "kue", sc->sc_unit);

View File

@ -125,14 +125,13 @@ enum {
};
struct kue_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct usb2_config_td sc_config_td;
struct usb2_callout sc_watchdog;
struct mtx sc_mtx;
struct kue_ether_desc sc_desc;
struct ifnet *sc_ifp;
device_t sc_dev;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[KUE_N_TRANSFER];

View File

@ -713,7 +713,6 @@ rue_cfg_first_time_setup(struct rue_softc *sc,
sc->sc_name);
goto done;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "rue", sc->sc_unit);

View File

@ -174,13 +174,12 @@ enum {
};
struct rue_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct usb2_config_td sc_config_td;
struct usb2_callout sc_watchdog;
struct mtx sc_mtx;
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[RUE_N_TRANSFER];
device_t sc_miibus;

View File

@ -344,7 +344,6 @@ udav_cfg_first_time_setup(struct udav_softc *sc,
sc->sc_name);
goto done;
}
sc->sc_evilhack = ifp;
ifp->if_softc = sc;
if_initname(ifp, "udav", sc->sc_unit);

View File

@ -145,13 +145,12 @@ enum {
};
struct udav_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct usb2_config_td sc_config_td;
struct usb2_callout sc_watchdog;
struct mtx sc_mtx;
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[UDAV_N_TRANSFER];
device_t sc_miibus;

View File

@ -789,7 +789,6 @@ rum_cfg_first_time_setup(struct rum_softc *sc,
DPRINTFN(0, "could not if_alloc()!\n");
goto done;
}
sc->sc_evilhack = ifp;
sc->sc_ifp = ifp;
ic = ifp->if_l2com;

View File

@ -120,7 +120,7 @@ enum {
};
struct rum_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct rum_ifq sc_tx_queue;
struct usb2_config_td sc_config_td;
@ -133,7 +133,6 @@ struct rum_softc {
struct rum_tx_radiotap_header sc_txtap;
struct usb2_xfer *sc_xfer[RUM_N_TRANSFER];
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
const struct ieee80211_rate_table *sc_rates;

View File

@ -800,7 +800,6 @@ ural_cfg_first_time_setup(struct ural_softc *sc,
DPRINTFN(0, "could not if_alloc()!\n");
goto done;
}
sc->sc_evilhack = ifp;
sc->sc_ifp = ifp;
ic = ifp->if_l2com;

View File

@ -120,7 +120,7 @@ enum {
};
struct ural_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct ural_ifq sc_tx_queue;
struct usb2_config_td sc_config_td;
@ -133,7 +133,6 @@ struct ural_softc {
struct ural_tx_radiotap_header sc_txtap;
struct usb2_xfer *sc_xfer[URAL_N_TRANSFER];
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
const struct ieee80211_rate_table *sc_rates;

View File

@ -2078,7 +2078,6 @@ zyd_cfg_first_time_setup(struct zyd_softc *sc,
sc->sc_name);
goto done;
}
sc->sc_evilhack = ifp;
sc->sc_ifp = ifp;
ic = ifp->if_l2com;

View File

@ -1285,7 +1285,7 @@ enum {
};
struct zyd_softc {
void *sc_evilhack; /* XXX this pointer must be first */
struct ifnet *sc_ifp;
struct zyd_rf sc_rf;
struct usb2_callout sc_watchdog;
@ -1299,7 +1299,6 @@ struct zyd_softc {
struct zyd_ifq sc_tx_queue;
struct cv sc_intr_cv;
struct ifnet *sc_ifp;
struct usb2_device *sc_udev;
struct usb2_xfer *sc_xfer[ZYD_N_TRANSFER];
const struct ieee80211_rate_table *sc_rates;