diff options
author | des <des@FreeBSD.org> | 2008-10-23 19:57:13 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2008-10-23 19:57:13 +0000 |
commit | 2668f9825b6a67e6cde6f82c2a5ec2b8ff9c4e56 (patch) | |
tree | 2609af8ef76f3a981fc12a1baa30a22ecf79aabf /sys/net80211 | |
parent | 859f75637c27578fee3a238da82d0eac47dc22f5 (diff) | |
download | FreeBSD-src-2668f9825b6a67e6cde6f82c2a5ec2b8ff9c4e56.zip FreeBSD-src-2668f9825b6a67e6cde6f82c2a5ec2b8ff9c4e56.tar.gz |
Revert the removal of the MALLOC and FREE macros from the net80211 code.
Requested by: sam
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_acl.c | 14 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto_ccmp.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto_tkip.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_crypto_wep.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_freebsd.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_hostap.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_input.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 27 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 22 | ||||
-rw-r--r-- | sys/net80211/ieee80211_power.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_proto.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_scan.c | 4 | ||||
-rw-r--r-- | sys/net80211/ieee80211_scan_sta.c | 10 | ||||
-rw-r--r-- | sys/net80211/ieee80211_sta.c | 2 |
14 files changed, 56 insertions, 51 deletions
diff --git a/sys/net80211/ieee80211_acl.c b/sys/net80211/ieee80211_acl.c index b638834..13407a4 100644 --- a/sys/net80211/ieee80211_acl.c +++ b/sys/net80211/ieee80211_acl.c @@ -99,7 +99,7 @@ acl_attach(struct ieee80211vap *vap) { struct aclstate *as; - as = malloc(sizeof(struct aclstate), + MALLOC(as, struct aclstate *, sizeof(struct aclstate), M_80211_ACL, M_NOWAIT | M_ZERO); if (as == NULL) return 0; @@ -123,7 +123,7 @@ acl_detach(struct ieee80211vap *vap) acl_free_all(vap); vap->iv_as = NULL; ACL_LOCK_DESTROY(as); - free(as, M_80211_ACL); + FREE(as, M_80211_ACL); } static __inline struct acl * @@ -147,7 +147,7 @@ _acl_free(struct aclstate *as, struct acl *acl) TAILQ_REMOVE(&as->as_list, acl, acl_list); LIST_REMOVE(acl, acl_hash); - free(acl, M_80211_ACL); + FREE(acl, M_80211_ACL); as->as_nacls--; } @@ -175,7 +175,7 @@ acl_add(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) struct acl *acl, *new; int hash; - new = malloc(sizeof(struct acl), M_80211_ACL, M_NOWAIT | M_ZERO); + MALLOC(new, struct acl *, sizeof(struct acl), M_80211_ACL, M_NOWAIT | M_ZERO); if (new == NULL) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL, "ACL: add %s failed, no memory\n", ether_sprintf(mac)); @@ -188,7 +188,7 @@ acl_add(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN]) LIST_FOREACH(acl, &as->as_hash[hash], acl_hash) { if (IEEE80211_ADDR_EQ(acl->acl_macaddr, mac)) { ACL_UNLOCK(as); - free(new, M_80211_ACL); + FREE(new, M_80211_ACL); IEEE80211_DPRINTF(vap, IEEE80211_MSG_ACL, "ACL: add %s failed, already present\n", ether_sprintf(mac)); @@ -301,7 +301,7 @@ acl_getioctl(struct ieee80211vap *vap, struct ieee80211req *ireq) ireq->i_len = space; /* return required space */ return 0; /* NB: must not error */ } - ap = malloc(space, + MALLOC(ap, struct ieee80211req_maclist *, space, M_TEMP, M_NOWAIT); if (ap == NULL) return ENOMEM; @@ -317,7 +317,7 @@ acl_getioctl(struct ieee80211vap *vap, struct ieee80211req *ireq) ireq->i_len = space; } else error = copyout(ap, ireq->i_data, ireq->i_len); - free(ap, M_TEMP); + FREE(ap, M_TEMP); return error; } return EINVAL; diff --git a/sys/net80211/ieee80211_crypto_ccmp.c b/sys/net80211/ieee80211_crypto_ccmp.c index 67679f5..bdaf7e3 100644 --- a/sys/net80211/ieee80211_crypto_ccmp.c +++ b/sys/net80211/ieee80211_crypto_ccmp.c @@ -96,7 +96,7 @@ ccmp_attach(struct ieee80211vap *vap, struct ieee80211_key *k) { struct ccmp_ctx *ctx; - ctx = malloc(sizeof(struct ccmp_ctx), + MALLOC(ctx, struct ccmp_ctx *, sizeof(struct ccmp_ctx), M_80211_CRYPTO, M_NOWAIT | M_ZERO); if (ctx == NULL) { vap->iv_stats.is_crypto_nomem++; @@ -113,7 +113,7 @@ ccmp_detach(struct ieee80211_key *k) { struct ccmp_ctx *ctx = k->wk_private; - free(ctx, M_80211_CRYPTO); + FREE(ctx, M_80211_CRYPTO); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index 744b643..f509856 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -109,7 +109,7 @@ tkip_attach(struct ieee80211vap *vap, struct ieee80211_key *k) { struct tkip_ctx *ctx; - ctx = malloc(sizeof(struct tkip_ctx), + MALLOC(ctx, struct tkip_ctx *, sizeof(struct tkip_ctx), M_80211_CRYPTO, M_NOWAIT | M_ZERO); if (ctx == NULL) { vap->iv_stats.is_crypto_nomem++; @@ -126,7 +126,7 @@ tkip_detach(struct ieee80211_key *k) { struct tkip_ctx *ctx = k->wk_private; - free(ctx, M_80211_CRYPTO); + FREE(ctx, M_80211_CRYPTO); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } diff --git a/sys/net80211/ieee80211_crypto_wep.c b/sys/net80211/ieee80211_crypto_wep.c index dc31e0b..7eade59 100644 --- a/sys/net80211/ieee80211_crypto_wep.c +++ b/sys/net80211/ieee80211_crypto_wep.c @@ -87,7 +87,7 @@ wep_attach(struct ieee80211vap *vap, struct ieee80211_key *k) { struct wep_ctx *ctx; - ctx = malloc(sizeof(struct wep_ctx), + MALLOC(ctx, struct wep_ctx *, sizeof(struct wep_ctx), M_80211_CRYPTO, M_NOWAIT | M_ZERO); if (ctx == NULL) { vap->iv_stats.is_crypto_nomem++; @@ -106,7 +106,7 @@ wep_detach(struct ieee80211_key *k) { struct wep_ctx *ctx = k->wk_private; - free(ctx, M_80211_CRYPTO); + FREE(ctx, M_80211_CRYPTO); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } diff --git a/sys/net80211/ieee80211_freebsd.c b/sys/net80211/ieee80211_freebsd.c index 8ca0197..71174b7 100644 --- a/sys/net80211/ieee80211_freebsd.c +++ b/sys/net80211/ieee80211_freebsd.c @@ -234,7 +234,7 @@ ieee80211_sysctl_vattach(struct ieee80211vap *vap) struct sysctl_oid *oid; char num[14]; /* sufficient for 32 bits */ - ctx = malloc(sizeof(struct sysctl_ctx_list), + MALLOC(ctx, struct sysctl_ctx_list *, sizeof(struct sysctl_ctx_list), M_DEVBUF, M_NOWAIT | M_ZERO); if (ctx == NULL) { if_printf(ifp, "%s: cannot allocate sysctl context!\n", @@ -310,7 +310,7 @@ ieee80211_sysctl_vdetach(struct ieee80211vap *vap) if (vap->iv_sysctl != NULL) { sysctl_ctx_free(vap->iv_sysctl); - free(vap->iv_sysctl, M_DEVBUF); + FREE(vap->iv_sysctl, M_DEVBUF); vap->iv_sysctl = NULL; } } diff --git a/sys/net80211/ieee80211_hostap.c b/sys/net80211/ieee80211_hostap.c index 37d2c2f..c0a99a1 100644 --- a/sys/net80211/ieee80211_hostap.c +++ b/sys/net80211/ieee80211_hostap.c @@ -902,7 +902,7 @@ hostap_auth_open(struct ieee80211_node *ni, struct ieee80211_frame *wh, * open auth is attempted. */ if (ni->ni_challenge != NULL) { - free(ni->ni_challenge, M_80211_NODE); + FREE(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } /* XXX hack to workaround calling convention */ @@ -1986,7 +1986,7 @@ hostap_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0, return; /* discard challenge after association */ if (ni->ni_challenge != NULL) { - free(ni->ni_challenge, M_80211_NODE); + FREE(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } /* NB: 802.11 spec says to ignore station's privacy bit */ diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 4a83111..67bcd43 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -499,7 +499,7 @@ int ieee80211_alloc_challenge(struct ieee80211_node *ni) { if (ni->ni_challenge == NULL) - ni->ni_challenge = malloc(IEEE80211_CHALLENGE_LEN, + MALLOC(ni->ni_challenge, uint32_t*, IEEE80211_CHALLENGE_LEN, M_80211_NODE, M_NOWAIT); if (ni->ni_challenge == NULL) { IEEE80211_NOTE(ni->ni_vap, diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index c9f4995..cab8b33 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -320,14 +320,14 @@ ieee80211_ioctl_getscanresults(struct ieee80211vap *vap, space = req.space; /* XXX M_WAITOK after driver lock released */ - p = malloc(space, M_TEMP, M_NOWAIT | M_ZERO); + MALLOC(p, void *, space, M_TEMP, M_NOWAIT | M_ZERO); if (p == NULL) return ENOMEM; req.sr = p; ieee80211_scan_iterate(vap, get_scan_result, &req); ireq->i_len = space - req.space; error = copyout(p, ireq->i_data, ireq->i_len); - free(p, M_TEMP); + FREE(p, M_TEMP); } else ireq->i_len = 0; @@ -467,7 +467,7 @@ getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, if (req.space > 0) { space = req.space; /* XXX M_WAITOK after driver lock released */ - p = malloc(space, M_TEMP, M_NOWAIT | M_ZERO); + MALLOC(p, void *, space, M_TEMP, M_NOWAIT | M_ZERO); if (p == NULL) { error = ENOMEM; goto bad; @@ -479,7 +479,7 @@ getstainfo_common(struct ieee80211vap *vap, struct ieee80211req *ireq, get_sta_info(&req, ni); ireq->i_len = space - req.space; error = copyout(p, (uint8_t *) ireq->i_data+off, ireq->i_len); - free(p, M_TEMP); + FREE(p, M_TEMP); } else ireq->i_len = 0; bad: @@ -696,7 +696,8 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, if (ireq->i_len != sizeof(struct ieee80211_devcaps_req)) return EINVAL; - dc = malloc( sizeof(struct ieee80211_devcaps_req), M_TEMP, M_NOWAIT | M_ZERO); + MALLOC(dc, struct ieee80211_devcaps_req *, + sizeof(struct ieee80211_devcaps_req), M_TEMP, M_NOWAIT | M_ZERO); if (dc == NULL) return ENOMEM; dc->dc_drivercaps = ic->ic_caps; @@ -706,7 +707,7 @@ ieee80211_ioctl_getdevcaps(struct ieee80211com *ic, ic->ic_getradiocaps(ic, &ci->ic_nchans, ci->ic_chans); ieee80211_sort_channels(ci->ic_chans, ci->ic_nchans); error = copyout(dc, ireq->i_data, sizeof(*dc)); - free(dc, M_TEMP); + FREE(dc, M_TEMP); return error; } @@ -1992,13 +1993,14 @@ ieee80211_ioctl_setregdomain(struct ieee80211vap *vap, if (ireq->i_len != sizeof(struct ieee80211_regdomain_req)) return EINVAL; - reg = malloc( sizeof(struct ieee80211_regdomain_req), M_TEMP, M_NOWAIT); + MALLOC(reg, struct ieee80211_regdomain_req *, + sizeof(struct ieee80211_regdomain_req), M_TEMP, M_NOWAIT); if (reg == NULL) return ENOMEM; error = copyin(ireq->i_data, reg, sizeof(*reg)); if (error == 0) error = ieee80211_setregdomain(vap, reg); - free(reg, M_TEMP); + FREE(reg, M_TEMP); return (error == 0 ? ENETRESET : error); } @@ -2137,7 +2139,7 @@ setappie(struct ieee80211_appie **aie, const struct ieee80211req *ireq) if (ireq->i_len == 0) { /* delete any existing ie */ if (app != NULL) { *aie = NULL; /* XXX racey */ - free(app, M_80211_NODE_IE); + FREE(app, M_80211_NODE_IE); } return 0; } @@ -2151,19 +2153,20 @@ setappie(struct ieee80211_appie **aie, const struct ieee80211req *ireq) * * XXX bad bad bad */ - napp = malloc( sizeof(struct ieee80211_appie) + ireq->i_len, M_80211_NODE_IE, M_NOWAIT); + MALLOC(napp, struct ieee80211_appie *, + sizeof(struct ieee80211_appie) + ireq->i_len, M_80211_NODE_IE, M_NOWAIT); if (napp == NULL) return ENOMEM; /* XXX holding ic lock */ error = copyin(ireq->i_data, napp->ie_data, ireq->i_len); if (error) { - free(napp, M_80211_NODE_IE); + FREE(napp, M_80211_NODE_IE); return error; } napp->ie_len = ireq->i_len; *aie = napp; if (app != NULL) - free(app, M_80211_NODE_IE); + FREE(app, M_80211_NODE_IE); return 0; } diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index bfdc64b..f7aa3a9 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -148,7 +148,8 @@ ieee80211_node_latevattach(struct ieee80211vap *vap) "WARNING: max aid too small, changed to %d\n", vap->iv_max_aid); } - vap->iv_aid_bitmap = malloc( howmany(vap->iv_max_aid, 32) * sizeof(uint32_t), + MALLOC(vap->iv_aid_bitmap, uint32_t *, + 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 */ @@ -174,7 +175,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; } } @@ -768,7 +769,7 @@ node_alloc(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) { struct ieee80211_node *ni; - ni = malloc(sizeof(struct ieee80211_node), + MALLOC(ni, struct ieee80211_node *, sizeof(struct ieee80211_node), M_80211_NODE, M_NOWAIT | M_ZERO); return ni; } @@ -786,11 +787,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) { - ies->data = malloc(len, M_80211_NODE_IE, M_NOWAIT); + MALLOC(ies->data, uint8_t *, len, M_80211_NODE_IE, M_NOWAIT); if (ies->data == NULL) { ies->len = 0; /* NB: pointers have already been zero'd above */ @@ -809,7 +810,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); } /* @@ -889,7 +890,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; } /* @@ -925,7 +926,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 @@ -1777,7 +1778,8 @@ ieee80211_node_table_init(struct ieee80211com *ic, nt->nt_inact_init = inact; nt->nt_keyixmax = keyixmax; if (nt->nt_keyixmax > 0) { - nt->nt_keyixmap = malloc( keyixmax * sizeof(struct ieee80211_node *), + MALLOC(nt->nt_keyixmap, struct ieee80211_node **, + keyixmax * sizeof(struct ieee80211_node *), M_80211_NODE, M_NOWAIT | M_ZERO); if (nt->nt_keyixmap == NULL) if_printf(ic->ic_ifp, @@ -1837,7 +1839,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); diff --git a/sys/net80211/ieee80211_power.c b/sys/net80211/ieee80211_power.c index debbd42..2a7dda8 100644 --- a/sys/net80211/ieee80211_power.c +++ b/sys/net80211/ieee80211_power.c @@ -80,7 +80,7 @@ ieee80211_power_latevattach(struct ieee80211vap *vap) */ if (vap->iv_opmode == IEEE80211_M_HOSTAP) { vap->iv_tim_len = howmany(vap->iv_max_aid,8) * sizeof(uint8_t); - vap->iv_tim_bitmap = malloc(vap->iv_tim_len, + MALLOC(vap->iv_tim_bitmap, uint8_t *, vap->iv_tim_len, M_80211_POWER, M_NOWAIT | M_ZERO); if (vap->iv_tim_bitmap == NULL) { printf("%s: no memory for TIM bitmap!\n", __func__); @@ -94,7 +94,7 @@ void ieee80211_power_vdetach(struct ieee80211vap *vap) { if (vap->iv_tim_bitmap != NULL) { - free(vap->iv_tim_bitmap, M_80211_POWER); + FREE(vap->iv_tim_bitmap, M_80211_POWER); vap->iv_tim_bitmap = NULL; } } diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index 31b68fd..452bd3f 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -214,7 +214,7 @@ ieee80211_proto_vdetach(struct ieee80211vap *vap) { #define FREEAPPIE(ie) do { \ if (ie != NULL) \ - free(ie, M_80211_NODE_IE); \ + FREE(ie, M_80211_NODE_IE); \ } while (0) /* * Detach operating mode module. diff --git a/sys/net80211/ieee80211_scan.c b/sys/net80211/ieee80211_scan.c index 7fe649b..dabb404 100644 --- a/sys/net80211/ieee80211_scan.c +++ b/sys/net80211/ieee80211_scan.c @@ -96,7 +96,7 @@ ieee80211_scan_attach(struct ieee80211com *ic) { struct scan_state *ss; - ss = malloc(sizeof(struct scan_state), + MALLOC(ss, struct scan_state *, sizeof(struct scan_state), M_80211_SCAN, M_NOWAIT | M_ZERO); if (ss == NULL) { ic->ic_scan = NULL; @@ -122,7 +122,7 @@ ieee80211_scan_detach(struct ieee80211com *ic) } ic->ic_flags &= ~IEEE80211_F_SCAN; ic->ic_scan = NULL; - free(SCAN_PRIVATE(ss), M_80211_SCAN); + FREE(SCAN_PRIVATE(ss), M_80211_SCAN); } } diff --git a/sys/net80211/ieee80211_scan_sta.c b/sys/net80211/ieee80211_scan_sta.c index 1da40f6..6b5bf88 100644 --- a/sys/net80211/ieee80211_scan_sta.c +++ b/sys/net80211/ieee80211_scan_sta.c @@ -138,7 +138,7 @@ sta_attach(struct ieee80211_scan_state *ss) { struct sta_table *st; - st = malloc(sizeof(struct sta_table), + MALLOC(st, struct sta_table *, sizeof(struct sta_table), M_80211_SCAN, M_NOWAIT | M_ZERO); if (st == NULL) return 0; @@ -162,7 +162,7 @@ sta_detach(struct ieee80211_scan_state *ss) sta_flush_table(st); mtx_destroy(&st->st_lock); mtx_destroy(&st->st_scanlock); - free(st, M_80211_SCAN); + FREE(st, M_80211_SCAN); KASSERT(nrefs > 0, ("imbalanced attach/detach")); nrefs--; /* NB: we assume caller locking */ } @@ -196,7 +196,7 @@ sta_flush_table(struct sta_table *st) TAILQ_REMOVE(&st->st_entry, se, se_list); LIST_REMOVE(se, se_hash); ieee80211_ies_cleanup(&se->base.se_ies); - free(se, M_80211_SCAN); + FREE(se, M_80211_SCAN); } memset(st->st_maxrssi, 0, sizeof(st->st_maxrssi)); } @@ -229,7 +229,7 @@ sta_add(struct ieee80211_scan_state *ss, LIST_FOREACH(se, &st->st_hash[hash], se_hash) if (IEEE80211_ADDR_EQ(se->base.se_macaddr, macaddr)) goto found; - se = malloc(sizeof(struct sta_entry), + MALLOC(se, struct sta_entry *, sizeof(struct sta_entry), M_80211_SCAN, M_NOWAIT | M_ZERO); if (se == NULL) { mtx_unlock(&st->st_lock); @@ -1439,7 +1439,7 @@ adhoc_age(struct ieee80211_scan_state *ss) TAILQ_REMOVE(&st->st_entry, se, se_list); LIST_REMOVE(se, se_hash); ieee80211_ies_cleanup(&se->base.se_ies); - free(se, M_80211_SCAN); + FREE(se, M_80211_SCAN); } } mtx_unlock(&st->st_lock); diff --git a/sys/net80211/ieee80211_sta.c b/sys/net80211/ieee80211_sta.c index c00af2b..c50fa53 100644 --- a/sys/net80211/ieee80211_sta.c +++ b/sys/net80211/ieee80211_sta.c @@ -1013,7 +1013,7 @@ sta_auth_shared(struct ieee80211_node *ni, struct ieee80211_frame *wh, switch (seq) { case IEEE80211_AUTH_SHARED_PASS: if (ni->ni_challenge != NULL) { - free(ni->ni_challenge, M_80211_NODE); + FREE(ni->ni_challenge, M_80211_NODE); ni->ni_challenge = NULL; } if (status != 0) { |