allocate node table entries with a specific malloc type

This commit is contained in:
sam 2003-09-26 16:52:12 +00:00
parent 19d2ca15c6
commit 22bdcdfcee

View File

@ -78,6 +78,8 @@ static void ieee80211_setup_node(struct ieee80211com *ic,
static void _ieee80211_free_node(struct ieee80211com *, static void _ieee80211_free_node(struct ieee80211com *,
struct ieee80211_node *); struct ieee80211_node *);
MALLOC_DEFINE(M_80211_NODE, "node", "802.11 node state");
void void
ieee80211_node_attach(struct ifnet *ifp) ieee80211_node_attach(struct ifnet *ifp)
{ {
@ -393,14 +395,14 @@ ieee80211_end_scan(struct ifnet *ifp)
static struct ieee80211_node * static struct ieee80211_node *
ieee80211_node_alloc(struct ieee80211com *ic) ieee80211_node_alloc(struct ieee80211com *ic)
{ {
return malloc(sizeof(struct ieee80211_node), M_DEVBUF, return malloc(sizeof(struct ieee80211_node), M_80211_NODE,
M_NOWAIT | M_ZERO); M_NOWAIT | M_ZERO);
} }
static void static void
ieee80211_node_free(struct ieee80211com *ic, struct ieee80211_node *ni) ieee80211_node_free(struct ieee80211com *ic, struct ieee80211_node *ni)
{ {
free(ni, M_DEVBUF); free(ni, M_80211_NODE);
} }
static void static void