Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jan 2009 05:35:58 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187378 - in head/sys/dev/usb2: ethernet wlan
Message-ID:  <200901180535.n0I5Zwxr062500@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: thompsa
Date: Sun Jan 18 05:35:58 2009
New Revision: 187378
URL: http://svn.freebsd.org/changeset/base/187378

Log:
  Just put the ifnet pointer first in the softc like it needs to be rather than
  adding another deliciously evil pointer.

Modified:
  head/sys/dev/usb2/ethernet/if_aue2.c
  head/sys/dev/usb2/ethernet/if_auereg.h
  head/sys/dev/usb2/ethernet/if_axe2.c
  head/sys/dev/usb2/ethernet/if_axereg.h
  head/sys/dev/usb2/ethernet/if_cdce2.c
  head/sys/dev/usb2/ethernet/if_cdcereg.h
  head/sys/dev/usb2/ethernet/if_cue2.c
  head/sys/dev/usb2/ethernet/if_cuereg.h
  head/sys/dev/usb2/ethernet/if_kue2.c
  head/sys/dev/usb2/ethernet/if_kuereg.h
  head/sys/dev/usb2/ethernet/if_rue2.c
  head/sys/dev/usb2/ethernet/if_ruereg.h
  head/sys/dev/usb2/ethernet/if_udav2.c
  head/sys/dev/usb2/ethernet/if_udavreg.h
  head/sys/dev/usb2/wlan/if_rum2.c
  head/sys/dev/usb2/wlan/if_rumvar.h
  head/sys/dev/usb2/wlan/if_ural2.c
  head/sys/dev/usb2/wlan/if_uralvar.h
  head/sys/dev/usb2/wlan/if_zyd2.c
  head/sys/dev/usb2/wlan/if_zydreg.h

Modified: head/sys/dev/usb2/ethernet/if_aue2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_aue2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_aue2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -834,7 +834,6 @@ aue_cfg_first_time_setup(struct aue_soft
 		    sc->sc_name);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "aue", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_auereg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_auereg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_auereg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;

Modified: head/sys/dev/usb2/ethernet/if_axe2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_axe2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_axe2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -843,7 +843,6 @@ axe_cfg_first_time_setup(struct axe_soft
 		    sc->sc_name);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "axe", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_axereg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_axereg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_axereg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;

Modified: head/sys/dev/usb2/ethernet/if_cdce2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_cdce2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_cdce2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -444,7 +444,6 @@ alloc_transfers:
 		device_printf(dev, "cannot if_alloc()\n");
 		goto detach;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "cdce", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_cdcereg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_cdcereg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_cdcereg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;

Modified: head/sys/dev/usb2/ethernet/if_cue2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_cue2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_cue2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -468,7 +468,6 @@ cue_cfg_first_time_setup(struct cue_soft
 		    sc->sc_unit);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "cue", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_cuereg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_cuereg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_cuereg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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];

Modified: head/sys/dev/usb2/ethernet/if_kue2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_kue2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_kue2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -536,7 +536,6 @@ kue_cfg_first_time_setup(struct kue_soft
 		    sc->sc_unit);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "kue", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_kuereg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_kuereg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_kuereg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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];

Modified: head/sys/dev/usb2/ethernet/if_rue2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_rue2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_rue2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -713,7 +713,6 @@ rue_cfg_first_time_setup(struct rue_soft
 		    sc->sc_name);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "rue", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_ruereg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_ruereg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_ruereg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;

Modified: head/sys/dev/usb2/ethernet/if_udav2.c
==============================================================================
--- head/sys/dev/usb2/ethernet/if_udav2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_udav2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -344,7 +344,6 @@ udav_cfg_first_time_setup(struct udav_so
 		    sc->sc_name);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 
 	ifp->if_softc = sc;
 	if_initname(ifp, "udav", sc->sc_unit);

Modified: head/sys/dev/usb2/ethernet/if_udavreg.h
==============================================================================
--- head/sys/dev/usb2/ethernet/if_udavreg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/ethernet/if_udavreg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;

Modified: head/sys/dev/usb2/wlan/if_rum2.c
==============================================================================
--- head/sys/dev/usb2/wlan/if_rum2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/wlan/if_rum2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -789,7 +789,6 @@ rum_cfg_first_time_setup(struct rum_soft
 		DPRINTFN(0, "could not if_alloc()!\n");
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 	sc->sc_ifp = ifp;
 	ic = ifp->if_l2com;
 

Modified: head/sys/dev/usb2/wlan/if_rumvar.h
==============================================================================
--- head/sys/dev/usb2/wlan/if_rumvar.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/wlan/if_rumvar.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;
 

Modified: head/sys/dev/usb2/wlan/if_ural2.c
==============================================================================
--- head/sys/dev/usb2/wlan/if_ural2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/wlan/if_ural2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -800,7 +800,6 @@ ural_cfg_first_time_setup(struct ural_so
 		DPRINTFN(0, "could not if_alloc()!\n");
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 	sc->sc_ifp = ifp;
 	ic = ifp->if_l2com;
 

Modified: head/sys/dev/usb2/wlan/if_uralvar.h
==============================================================================
--- head/sys/dev/usb2/wlan/if_uralvar.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/wlan/if_uralvar.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;
 

Modified: head/sys/dev/usb2/wlan/if_zyd2.c
==============================================================================
--- head/sys/dev/usb2/wlan/if_zyd2.c	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/wlan/if_zyd2.c	Sun Jan 18 05:35:58 2009	(r187378)
@@ -2078,7 +2078,6 @@ zyd_cfg_first_time_setup(struct zyd_soft
 		    sc->sc_name);
 		goto done;
 	}
-	sc->sc_evilhack = ifp;
 	sc->sc_ifp = ifp;
 	ic = ifp->if_l2com;
 

Modified: head/sys/dev/usb2/wlan/if_zydreg.h
==============================================================================
--- head/sys/dev/usb2/wlan/if_zydreg.h	Sun Jan 18 05:23:26 2009	(r187377)
+++ head/sys/dev/usb2/wlan/if_zydreg.h	Sun Jan 18 05:35:58 2009	(r187378)
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901180535.n0I5Zwxr062500>