diff options
author | sam <sam@FreeBSD.org> | 2008-09-22 00:22:09 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2008-09-22 00:22:09 +0000 |
commit | 2aa10dc4b87e223212a2af6a07ba30965db72b64 (patch) | |
tree | 821a054d521aa5a7ca7de8a84ea0804bb50c98d7 /sys/net80211 | |
parent | fda4e8a8cf24c53b9fd1430adbf43e0411b1babb (diff) | |
download | FreeBSD-src-2aa10dc4b87e223212a2af6a07ba30965db72b64.zip FreeBSD-src-2aa10dc4b87e223212a2af6a07ba30965db72b64.tar.gz |
cleanup bss node setup; syncs w/ p4 state that's been in use for months
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_node.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 5fb8fba..f7aa3a9 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -1041,6 +1041,8 @@ ieee80211_tmp_node(struct ieee80211vap *vap, ni = ic->ic_node_alloc(vap, macaddr); if (ni != NULL) { + struct ieee80211_node *bss = vap->iv_bss; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_NODE, "%s %p<%s>\n", __func__, ni, ether_sprintf(macaddr)); @@ -1049,12 +1051,13 @@ ieee80211_tmp_node(struct ieee80211vap *vap, ni->ni_vap = vap; IEEE80211_ADDR_COPY(ni->ni_macaddr, macaddr); - IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_bss->ni_bssid); + IEEE80211_ADDR_COPY(ni->ni_bssid, bss->ni_bssid); ieee80211_node_initref(ni); /* mark referenced */ /* NB: required by ieee80211_fix_rate */ - ieee80211_node_set_chan(ni, vap->iv_bss->ni_chan); + ieee80211_node_set_chan(ni, bss->ni_chan); ieee80211_crypto_resetkey(vap, &ni->ni_ucastkey, IEEE80211_KEYIX_NONE); + ni->ni_txpower = bss->ni_txpower; /* XXX optimize away */ IEEE80211_NODE_SAVEQ_INIT(ni, "unknown"); IEEE80211_NODE_WDSQ_INIT(ni, "unknown"); @@ -1074,13 +1077,13 @@ ieee80211_dup_bss(struct ieee80211vap *vap, ni = ieee80211_alloc_node(&ic->ic_sta, vap, macaddr); if (ni != NULL) { + struct ieee80211_node *bss = vap->iv_bss; /* * Inherit from iv_bss. */ - ni->ni_authmode = vap->iv_bss->ni_authmode; - ni->ni_vlan = vap->iv_bss->ni_vlan; /* XXX?? */ - IEEE80211_ADDR_COPY(ni->ni_bssid, vap->iv_bss->ni_bssid); - ieee80211_node_set_chan(ni, vap->iv_bss->ni_chan); + copy_bss(ni, bss); + IEEE80211_ADDR_COPY(ni->ni_bssid, bss->ni_bssid); + ieee80211_node_set_chan(ni, bss->ni_chan); } return ni; } @@ -1107,8 +1110,7 @@ ieee80211_node_create_wds(struct ieee80211vap *vap, /* * Inherit any manually configured settings. */ - ni->ni_authmode = vap->iv_bss->ni_authmode; - ni->ni_vlan = vap->iv_bss->ni_vlan; + copy_bss(ni, vap->iv_bss); ieee80211_node_set_chan(ni, chan); /* NB: propagate ssid so available to WPA supplicant */ ni->ni_esslen = vap->iv_des_ssid[0].len; |