Fix another fallout from the ifnet change that assumed that a softc

starts with an ifatm which in turns has an ifnet. Remove also a couple
of unneccessary casts that could hide such things in the future.

Approved by:	re
This commit is contained in:
Hartmut Brandt 2005-07-01 10:45:02 +00:00
parent e5610d524c
commit 4df70a92b5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=147721
6 changed files with 9 additions and 9 deletions

View File

@ -2054,7 +2054,7 @@ fatm_start(struct ifnet *ifp)
u_int mlen, vpi, vci;
struct card_vcc *vc;
sc = (struct fatm_softc *)ifp->if_softc;
sc = ifp->if_softc;
while (1) {
IF_DEQUEUE(&ifp->if_snd, m);
@ -2544,7 +2544,7 @@ fatm_detach(device_t dev)
struct fatm_softc *sc;
struct txqueue *tx;
sc = (struct fatm_softc *)device_get_softc(dev);
sc = device_get_softc(dev);
if (device_is_alive(dev)) {
FATM_LOCK(sc);

View File

@ -1575,7 +1575,7 @@ static int
hatm_utopia_readregs(struct ifatm *ifatm, u_int reg, uint8_t *val, u_int *n)
{
u_int i;
struct hatm_softc *sc = (struct hatm_softc *)ifatm;
struct hatm_softc *sc = ifatm->ifp->if_softc;
if (reg >= (HE_REGO_SUNI_END - HE_REGO_SUNI) / 4)
return (EINVAL);
@ -1596,7 +1596,7 @@ static int
hatm_utopia_writereg(struct ifatm *ifatm, u_int reg, u_int mask, u_int val)
{
uint32_t regval;
struct hatm_softc *sc = (struct hatm_softc *)ifatm;
struct hatm_softc *sc = ifatm->ifp->if_softc;
if (reg >= (HE_REGO_SUNI_END - HE_REGO_SUNI) / 4)
return (EINVAL);
@ -1620,7 +1620,7 @@ static struct utopia_methods hatm_utopia_methods = {
static int
hatm_detach(device_t dev)
{
struct hatm_softc *sc = (struct hatm_softc *)device_get_softc(dev);
struct hatm_softc *sc = device_get_softc(dev);
mtx_lock(&sc->mtx);
hatm_stop(sc);

View File

@ -275,7 +275,7 @@ hatm_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
{
struct ifreq *ifr = (struct ifreq *)data;
struct ifaddr *ifa = (struct ifaddr *)data;
struct hatm_softc *sc = (struct hatm_softc *)ifp->if_softc;
struct hatm_softc *sc = ifp->if_softc;
struct atmio_vcctable *vtab;
int error = 0;

View File

@ -351,7 +351,7 @@ hatm_load_txbuf(void *uarg, bus_dma_segment_t *segs, int nseg,
void
hatm_start(struct ifnet *ifp)
{
struct hatm_softc *sc = (struct hatm_softc *)ifp->if_softc;
struct hatm_softc *sc = ifp->if_softc;
struct mbuf *m;
struct atm_pseudohdr *aph;
u_int cid;

View File

@ -465,7 +465,7 @@ patm_detach(device_t dev)
{
struct patm_softc *sc;
sc = (struct patm_softc *)device_get_softc(dev);
sc = device_get_softc(dev);
mtx_lock(&sc->mtx);
patm_stop(sc);

View File

@ -282,7 +282,7 @@ patm_tx_vcc_closed(struct patm_softc *sc, struct patm_vcc *vcc)
void
patm_start(struct ifnet *ifp)
{
struct patm_softc *sc = (struct patm_softc *)ifp->if_softc;
struct patm_softc *sc = ifp->if_softc;
struct mbuf *m;
struct atm_pseudohdr *aph;
u_int vpi, vci, cid;