Hi,
based on the previous diff, this rids the compat API from IFQ_PURGE.
ok?
Patrick
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index c469269eb4e..47505b6b733 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -737,7 +737,7 @@ ath_stop(struct ifnet *ifp)
} else {
sc->sc_rxlink = NULL;
}
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
#ifndef IEEE80211_STA_ONLY
ath_beacon_free(sc);
#endif
diff --git a/sys/net/if.c b/sys/net/if.c
index a021c398026..642bb9eca2e 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1614,7 +1614,7 @@ if_down(struct ifnet *ifp)
ifp->if_flags &= ~IFF_UP;
getmicrotime(&ifp->if_lastchange);
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
if_linkstate(ifp);
}
diff --git a/sys/net/if_mpip.c b/sys/net/if_mpip.c
index 5f82da2f94a..36c9f090270 100644
--- a/sys/net/if_mpip.c
+++ b/sys/net/if_mpip.c
@@ -681,19 +681,19 @@ mpip_start(struct ifnet *ifp)
uint8_t tos, prio, ttl;
if (!ISSET(ifp->if_flags, IFF_RUNNING) || n == NULL) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
return;
}
rt = rtalloc(sstosa(&n->n_nexthop), RT_RESOLVE, sc->sc_rdomain);
if (!rtisvalid(rt)) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
goto rtfree;
}
ifp0 = if_get(rt->rt_ifidx);
if (ifp0 == NULL) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
goto rtfree;
}
diff --git a/sys/net/if_mpw.c b/sys/net/if_mpw.c
index be8bdda2247..eb9c1c0888b 100644
--- a/sys/net/if_mpw.c
+++ b/sys/net/if_mpw.c
@@ -653,19 +653,19 @@ mpw_start(struct ifnet *ifp)
n = sc->sc_neighbor;
if (!ISSET(ifp->if_flags, IFF_RUNNING) ||
n == NULL) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
return;
}
rt = rtalloc(sstosa(&n->n_nexthop), RT_RESOLVE, sc->sc_rdomain);
if (!rtisvalid(rt)) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
goto rtfree;
}
ifp0 = if_get(rt->rt_ifidx);
if (ifp0 == NULL) {
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
goto rtfree;
}
diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c
index e894f412441..04bcb97ad83 100644
--- a/sys/net/if_pflog.c
+++ b/sys/net/if_pflog.c
@@ -192,7 +192,7 @@ pflog_clone_destroy(struct ifnet *ifp)
void
pflogstart(struct ifnet *ifp)
{
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
}
int
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c
index 8a486abd97c..7fcd2ba63a7 100644
--- a/sys/net/if_pfsync.c
+++ b/sys/net/if_pfsync.c
@@ -418,7 +418,7 @@ pfsync_clone_destroy(struct ifnet *ifp)
void
pfsyncstart(struct ifnet *ifp)
{
- IFQ_PURGE(&ifp->if_snd);
+ ifq_purge(&ifp->if_snd);
}
void
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 7dd1bf1274c..0da09a3b6ec 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -768,7 +768,7 @@ sppp_flush(struct ifnet *ifp)
{
struct sppp *sp = (struct sppp*) ifp;
- IFQ_PURGE(&sp->pp_if.if_snd);
+ ifq_purge(&sp->pp_if.if_snd);
mq_purge(&sp->pp_cpq);
}
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index eb2b25ffad0..2f367b93b30 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -285,11 +285,6 @@ struct ifg_list {
* IFQ compat on ifq API
*/
-#define IFQ_PURGE(ifq)
\
-do { \
- (void)ifq_purge(ifq); \
-} while (/* CONSTCOND */0)
-
#define IFQ_IS_EMPTY(ifq) ifq_empty(ifq)
#define IFQ_SET_MAXLEN(ifq, len) ifq_set_maxlen(ifq, len)