diff options
| author | Sam Leffler <sam@FreeBSD.org> | 2004-04-03 00:06:23 +0000 |
|---|---|---|
| committer | Sam Leffler <sam@FreeBSD.org> | 2004-04-03 00:06:23 +0000 |
| commit | 1e774079722bf9889cf27fc0189dae13e9cdcef1 (patch) | |
| tree | a607168a3e951a5f35108668db7850994da4d96c /sys/dev/ath | |
| parent | babe2453bd2e33368d54bf95c092fb1f90eb8c65 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ath')
| -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 3699e51f9766..c2da2572ea74 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); } |
