summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index f7aa3a94de1a..bfdc64b84e2f 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -148,8 +148,7 @@ ieee80211_node_latevattach(struct ieee80211vap *vap)
"WARNING: max aid too small, changed to %d\n",
vap->iv_max_aid);
}
- MALLOC(vap->iv_aid_bitmap, uint32_t *,
- howmany(vap->iv_max_aid, 32) * sizeof(uint32_t),
+ vap->iv_aid_bitmap = malloc( howmany(vap->iv_max_aid, 32) * sizeof(uint32_t),
M_80211_NODE, M_NOWAIT | M_ZERO);
if (vap->iv_aid_bitmap == NULL) {
/* XXX no way to recover */
@@ -175,7 +174,7 @@ ieee80211_node_vdetach(struct ieee80211vap *vap)
vap->iv_bss = NULL;
}
if (vap->iv_aid_bitmap != NULL) {
- FREE(vap->iv_aid_bitmap, M_80211_NODE);
+ free(vap->iv_aid_bitmap, M_80211_NODE);
vap->iv_aid_bitmap = NULL;
}
}
@@ -769,7 +768,7 @@ node_alloc(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN])
{
struct ieee80211_node *ni;
- MALLOC(ni, struct ieee80211_node *, sizeof(struct ieee80211_node),
+ ni = malloc(sizeof(struct ieee80211_node),
M_80211_NODE, M_NOWAIT | M_ZERO);
return ni;
}
@@ -787,11 +786,11 @@ ieee80211_ies_init(struct ieee80211_ies *ies, const uint8_t *data, int len)
memset(ies, 0, offsetof(struct ieee80211_ies, data));
if (ies->data != NULL && ies->len != len) {
/* data size changed */
- FREE(ies->data, M_80211_NODE_IE);
+ free(ies->data, M_80211_NODE_IE);
ies->data = NULL;
}
if (ies->data == NULL) {
- MALLOC(ies->data, uint8_t *, len, M_80211_NODE_IE, M_NOWAIT);
+ ies->data = malloc(len, M_80211_NODE_IE, M_NOWAIT);
if (ies->data == NULL) {
ies->len = 0;
/* NB: pointers have already been zero'd above */
@@ -810,7 +809,7 @@ void
ieee80211_ies_cleanup(struct ieee80211_ies *ies)
{
if (ies->data != NULL)
- FREE(ies->data, M_80211_NODE_IE);
+ free(ies->data, M_80211_NODE_IE);
}
/*
@@ -890,7 +889,7 @@ node_cleanup(struct ieee80211_node *ni)
ni->ni_associd = 0;
if (ni->ni_challenge != NULL) {
- FREE(ni->ni_challenge, M_80211_NODE);
+ free(ni->ni_challenge, M_80211_NODE);
ni->ni_challenge = NULL;
}
/*
@@ -926,7 +925,7 @@ node_free(struct ieee80211_node *ni)
ieee80211_ies_cleanup(&ni->ni_ies);
IEEE80211_NODE_SAVEQ_DESTROY(ni);
IEEE80211_NODE_WDSQ_DESTROY(ni);
- FREE(ni, M_80211_NODE);
+ free(ni, M_80211_NODE);
}
static void
@@ -1778,8 +1777,7 @@ ieee80211_node_table_init(struct ieee80211com *ic,
nt->nt_inact_init = inact;
nt->nt_keyixmax = keyixmax;
if (nt->nt_keyixmax > 0) {
- MALLOC(nt->nt_keyixmap, struct ieee80211_node **,
- keyixmax * sizeof(struct ieee80211_node *),
+ nt->nt_keyixmap = malloc( keyixmax * sizeof(struct ieee80211_node *),
M_80211_NODE, M_NOWAIT | M_ZERO);
if (nt->nt_keyixmap == NULL)
if_printf(ic->ic_ifp,
@@ -1839,7 +1837,7 @@ ieee80211_node_table_cleanup(struct ieee80211_node_table *nt)
printf("%s: %s[%u] still active\n", __func__,
nt->nt_name, i);
#endif
- FREE(nt->nt_keyixmap, M_80211_NODE);
+ free(nt->nt_keyixmap, M_80211_NODE);
nt->nt_keyixmap = NULL;
}
IEEE80211_NODE_ITERATE_LOCK_DESTROY(nt);