summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_scan_sta.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-10-23 19:57:13 +0000
committerdes <des@FreeBSD.org>2008-10-23 19:57:13 +0000
commit2668f9825b6a67e6cde6f82c2a5ec2b8ff9c4e56 (patch)
tree2609af8ef76f3a981fc12a1baa30a22ecf79aabf /sys/net80211/ieee80211_scan_sta.c
parent859f75637c27578fee3a238da82d0eac47dc22f5 (diff)
downloadFreeBSD-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/ieee80211_scan_sta.c')
-rw-r--r--sys/net80211/ieee80211_scan_sta.c10
1 files changed, 5 insertions, 5 deletions
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);
OpenPOWER on IntegriCloud