From b148bf45e00854fc92a79e2434843fc0ced325ba Mon Sep 17 00:00:00 2001 From: andre Date: Sat, 24 Aug 2013 16:57:44 +0000 Subject: Add an mbuf pointer parameter to (*ext_free) to give the external free function access to the mbuf the external memory was attached to. Mechanically adjust all users to include the mbuf parameter. This fixes a long standing annoyance for external free functions. Before one had to sacrifice one of the argument pointers for this. Sponsored by: The FreeBSD Foundation --- sys/dev/hatm/if_hatm_intr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/dev/hatm') diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index b6a5368..d23f119 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -261,7 +261,7 @@ hatm_mbuf_page_alloc(struct hatm_softc *sc, u_int group) * Free an mbuf and put it onto the free list. */ static void -hatm_mbuf0_free(void *buf, void *args) +hatm_mbuf0_free(struct mbuf *m, void *buf, void *args) { struct hatm_softc *sc = args; struct mbuf0_chunk *c = buf; @@ -272,7 +272,7 @@ hatm_mbuf0_free(void *buf, void *args) hatm_ext_free(&sc->mbuf_list[0], (struct mbufx_free *)c); } static void -hatm_mbuf1_free(void *buf, void *args) +hatm_mbuf1_free(struct mbuf *m, void *buf, void *args) { struct hatm_softc *sc = args; struct mbuf1_chunk *c = buf; @@ -461,7 +461,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_int group, u_int handle) hatm_mbuf0_free, c0, sc, M_PKTHDR, EXT_EXTREF); m->m_data += MBUF0_OFFSET; } else - hatm_mbuf0_free(c0, sc); + hatm_mbuf0_free(NULL, c0, sc); } else { struct mbuf1_chunk *c1; @@ -485,7 +485,7 @@ hatm_rx_buffer(struct hatm_softc *sc, u_int group, u_int handle) hatm_mbuf1_free, c1, sc, M_PKTHDR, EXT_EXTREF); m->m_data += MBUF1_OFFSET; } else - hatm_mbuf1_free(c1, sc); + hatm_mbuf1_free(NULL, c1, sc); } return (m); -- cgit v1.1