allocate node table entries with a specific malloc type
This commit is contained in:
parent
19d2ca15c6
commit
22bdcdfcee
@ -78,6 +78,8 @@ static void ieee80211_setup_node(struct ieee80211com *ic,
|
||||
static void _ieee80211_free_node(struct ieee80211com *,
|
||||
struct ieee80211_node *);
|
||||
|
||||
MALLOC_DEFINE(M_80211_NODE, "node", "802.11 node state");
|
||||
|
||||
void
|
||||
ieee80211_node_attach(struct ifnet *ifp)
|
||||
{
|
||||
@ -393,14 +395,14 @@ ieee80211_end_scan(struct ifnet *ifp)
|
||||
static struct ieee80211_node *
|
||||
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);
|
||||
}
|
||||
|
||||
static void
|
||||
ieee80211_node_free(struct ieee80211com *ic, struct ieee80211_node *ni)
|
||||
{
|
||||
free(ni, M_DEVBUF);
|
||||
free(ni, M_80211_NODE);
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user