diff options
-rw-r--r-- | sys/dev/ath/if_ath.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 3699e51..c2da257 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -325,7 +325,9 @@ ath_attach(u_int16_t devid, struct ath_softc *sc) ieee80211_ifattach(ifp); /* override default methods */ ic->ic_node_alloc = ath_node_alloc; + sc->sc_node_free = ic->ic_node_free; ic->ic_node_free = ath_node_free; + sc->sc_node_copy = ic->ic_node_copy; ic->ic_node_copy = ath_node_copy; ic->ic_node_getrssi = ath_node_getrssi; sc->sc_newstate = ic->ic_newstate; @@ -1516,14 +1518,18 @@ ath_node_free(struct ieee80211com *ic, struct ieee80211_node *ni) if (bf->bf_node == ni) bf->bf_node = NULL; } - free(ni, M_DEVBUF); + (*sc->sc_node_free)(ic, ni); } static void ath_node_copy(struct ieee80211com *ic, struct ieee80211_node *dst, const struct ieee80211_node *src) { - *(struct ath_node *)dst = *(const struct ath_node *)src; + struct ath_softc *sc = ic->ic_if.if_softc; + + memcpy(&dst[1], &src[1], + sizeof(struct ath_node) - sizeof(struct ieee80211_node)); + (*sc->sc_node_copy)(ic, dst, src); } |