Generate events for carrier state, PVC state changes and flow control
changes. Still have to figure out, how to get at the ABR information.
This commit is contained in:
parent
8d0166bd1f
commit
8bbb21db05
@ -2230,6 +2230,9 @@ hatm_initialize(struct hatm_softc *sc)
|
||||
sc->ifatm.ifnet.if_baudrate = 53 * 8 * sc->ifatm.mib.pcr;
|
||||
|
||||
sc->utopia.flags &= ~UTP_FL_POLL_CARRIER;
|
||||
|
||||
ATMEV_SEND_IFSTATE_CHANGED(&sc->ifatm,
|
||||
sc->utopia.carrier == UTP_CARR_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -2250,6 +2253,9 @@ hatm_stop(struct hatm_softc *sc)
|
||||
return;
|
||||
sc->ifatm.ifnet.if_flags &= ~IFF_RUNNING;
|
||||
|
||||
ATMEV_SEND_IFSTATE_CHANGED(&sc->ifatm,
|
||||
sc->utopia.carrier == UTP_CARR_OK);
|
||||
|
||||
sc->utopia.flags |= UTP_FL_POLL_CARRIER;
|
||||
|
||||
/*
|
||||
|
@ -217,13 +217,11 @@ hatm_open_vcc(struct hatm_softc *sc, struct atmio_openvcc *arg)
|
||||
if (!(vcc->param.flags & ATMIO_FLAG_NORX))
|
||||
hatm_rx_vcc_open(sc, cid);
|
||||
|
||||
#ifdef notyet
|
||||
/* inform management about non-NG and NG-PVCs */
|
||||
if (!(vcc->param.flags & ATMIO_FLAG_NG) ||
|
||||
(vcc->param.flags & ATMIO_FLAG_PVC))
|
||||
atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED,
|
||||
(1 << 24) | (arg->param.vpi << 16) | arg->param.vci);
|
||||
#endif
|
||||
ATMEV_SEND_VCC_CHANGED(&sc->ifatm, arg->param.vpi,
|
||||
arg->param.vci, 1);
|
||||
|
||||
/* don't free below */
|
||||
vcc = NULL;
|
||||
@ -280,13 +278,10 @@ hatm_vcc_closed(struct hatm_softc *sc, u_int cid)
|
||||
{
|
||||
struct hevcc *vcc = sc->vccs[cid];
|
||||
|
||||
#ifdef notyet
|
||||
/* inform management about non-NG and NG-PVCs */
|
||||
if (!(vcc->param.flags & ATMIO_FLAG_NG) ||
|
||||
(vcc->param.flags & ATMIO_FLAG_PVC))
|
||||
atm_message(&sc->ifatm.ifnet, ATM_MSG_VCC_CHANGED,
|
||||
(0 << 24) | (HE_VPI(cid) << 16) | HE_VCI(cid));
|
||||
#endif
|
||||
ATMEV_SEND_VCC_CHANGED(&sc->ifatm, HE_VPI(cid), HE_VCI(cid), 0);
|
||||
|
||||
sc->open_vccs--;
|
||||
uma_zfree(sc->vcc_zone, vcc);
|
||||
|
@ -251,10 +251,8 @@ hatm_load_txbuf(void *uarg, bus_dma_segment_t *segs, int nseg,
|
||||
if (arg->vcc->ntpds + tpds_needed > arg->sc->max_tpd) {
|
||||
arg->sc->istats.flow_closed++;
|
||||
arg->vcc->vflags |= HE_VCC_FLOW_CTRL;
|
||||
#ifdef notyet
|
||||
atm_message(&arg->sc->ifatm.ifnet, ATM_MSG_FLOW_CONTROL,
|
||||
(1 << 24) | (arg->vpi << 16) | arg->vci);
|
||||
#endif
|
||||
ATMEV_SEND_FLOW_CONTROL(&arg->sc->ifatm,
|
||||
arg->vpi, arg->vci, 1);
|
||||
arg->error = 1;
|
||||
return;
|
||||
}
|
||||
@ -486,10 +484,8 @@ hatm_tx_complete(struct hatm_softc *sc, struct tpd *tpd, uint32_t flags)
|
||||
if ((vcc->vflags & HE_VCC_FLOW_CTRL) &&
|
||||
vcc->ntpds <= HE_CONFIG_TPD_FLOW_ENB) {
|
||||
vcc->vflags &= ~HE_VCC_FLOW_CTRL;
|
||||
#ifdef notyet
|
||||
atm_message(&sc->ifatm.ifnet, ATM_MSG_FLOW_CONTROL,
|
||||
(0 << 24) | (HE_VPI(tpd->cid) << 16) | HE_VCI(tpd->cid));
|
||||
#endif
|
||||
ATMEV_SEND_FLOW_CONTROL(&sc->ifatm,
|
||||
HE_VPI(tpd->cid), HE_VCI(tpd->cid), 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user