diff options
author | sam <sam@FreeBSD.org> | 2008-06-07 18:38:02 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-06-07 18:38:02 +0000 |
commit | 87278ff58a1872ef2002ec481db68eebce6f5884 (patch) | |
tree | 35c5bfa4ecd32a44b4590d4a19f0dd51d652edaf /sys/net80211 | |
parent | cbfc222a8531691610103b4385fa39d29d114bbc (diff) | |
download | FreeBSD-src-87278ff58a1872ef2002ec481db68eebce6f5884.zip FreeBSD-src-87278ff58a1872ef2002ec481db68eebce6f5884.tar.gz |
Change the calling convention for ic_node_alloc to deal with
some longstanding issues:
o pass the vap since it's now the "coin of the realm" and required
to do things like set initial tx parameters in private node
state for use prior to association
o pass the mac address as cards that maintain outboard station
tables require this to create an entry (e.g. in ibss mode)
o remove the node table reference, we only have one node table
and it's unlikely this will change so this is not needed to
find the com structure
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 9 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 3 |
2 files changed, 7 insertions, 5 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index c6aadb2..61cdeab 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -67,7 +67,8 @@ __FBSDID("$FreeBSD$"); static int ieee80211_sta_join1(struct ieee80211_node *); -static struct ieee80211_node *node_alloc(struct ieee80211_node_table *); +static struct ieee80211_node *node_alloc(struct ieee80211vap *, + const uint8_t [IEEE80211_ADDR_LEN]); static void node_cleanup(struct ieee80211_node *); static void node_free(struct ieee80211_node *); static void node_age(struct ieee80211_node *); @@ -723,7 +724,7 @@ ieee80211_node_deauth(struct ieee80211_node *ni, int reason) } static struct ieee80211_node * -node_alloc(struct ieee80211_node_table *nt) +node_alloc(struct ieee80211vap *vap, const uint8_t macaddr[IEEE80211_ADDR_LEN]) { struct ieee80211_node *ni; @@ -948,7 +949,7 @@ ieee80211_alloc_node(struct ieee80211_node_table *nt, struct ieee80211_node *ni; int hash; - ni = ic->ic_node_alloc(nt); + ni = ic->ic_node_alloc(vap, macaddr); if (ni == NULL) { vap->iv_stats.is_rx_nodealloc++; return NULL; @@ -996,7 +997,7 @@ ieee80211_tmp_node(struct ieee80211vap *vap, struct ieee80211com *ic = vap->iv_ic; struct ieee80211_node *ni; - ni = ic->ic_node_alloc(&ic->ic_sta); + ni = ic->ic_node_alloc(vap, macaddr); if (ni != NULL) { IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, "%s %p<%s>\n", __func__, ni, ether_sprintf(macaddr)); diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 9b362f6..f92b10f 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -227,7 +227,8 @@ struct ieee80211com { /* new station association callback/notification */ void (*ic_newassoc)(struct ieee80211_node *, int); /* node state management */ - struct ieee80211_node* (*ic_node_alloc)(struct ieee80211_node_table *); + struct ieee80211_node* (*ic_node_alloc)(struct ieee80211vap *, + const uint8_t [IEEE80211_ADDR_LEN]); void (*ic_node_free)(struct ieee80211_node *); void (*ic_node_cleanup)(struct ieee80211_node *); void (*ic_node_age)(struct ieee80211_node *); |