summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_node.h
diff options
context:
space:
mode:
authorDamien Bergamini <damien@cvs.openbsd.org>2009-01-28 17:15:22 +0000
committerDamien Bergamini <damien@cvs.openbsd.org>2009-01-28 17:15:22 +0000
commitfb3f10120ee99ec591063a1f25fb79f32c78cd01 (patch)
tree89bcc42e091bf850fefc0d233bcda89e47530023 /sys/net80211/ieee80211_node.h
parent6b2c2b39f1604a9e6733df499ad0a07c98092f82 (diff)
In ieee80211_find_node(), roll our own RB_FIND() based on the key (macaddr)
instead of resorting to horrid hacks/casts. Restore the ieee80211_node structure back to its original state.
Diffstat (limited to 'sys/net80211/ieee80211_node.h')
-rw-r--r--sys/net80211/ieee80211_node.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net80211/ieee80211_node.h b/sys/net80211/ieee80211_node.h
index 0cf7a12a896..961ace16a8f 100644
--- a/sys/net80211/ieee80211_node.h
+++ b/sys/net80211/ieee80211_node.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.h,v 1.37 2009/01/26 21:55:58 damien Exp $ */
+/* $OpenBSD: ieee80211_node.h,v 1.38 2009/01/28 17:15:21 damien Exp $ */
/* $NetBSD: ieee80211_node.h,v 1.9 2004/04/30 22:57:32 dyoung Exp $ */
/*-
@@ -137,9 +137,7 @@ struct ieee80211_ba {
* the ieee80211com structure.
*/
struct ieee80211_node {
- /* ni_macaddr must be the first field for RB_FIND() */
- u_int8_t ni_macaddr[IEEE80211_ADDR_LEN];
- u_int8_t ni_bssid[IEEE80211_ADDR_LEN];
+ RB_ENTRY(ieee80211_node) ni_node;
struct ieee80211com *ni_ic; /* back-pointer */
@@ -150,6 +148,10 @@ struct ieee80211_node {
u_int32_t ni_rstamp; /* recv timestamp */
u_int8_t ni_rssi; /* recv ssi */
+ /* header */
+ u_int8_t ni_macaddr[IEEE80211_ADDR_LEN];
+ u_int8_t ni_bssid[IEEE80211_ADDR_LEN];
+
/* beacon, probe response */
u_int8_t ni_tstamp[8]; /* from last rcv'd beacon */
u_int16_t ni_intval; /* beacon interval */
@@ -237,8 +239,6 @@ struct ieee80211_node {
#define IEEE80211_NODE_HT 0x0400 /* HT negotiated */
#define IEEE80211_NODE_SA_QUERY 0x0800 /* SA Query in progress */
#define IEEE80211_NODE_SA_QUERY_FAILED 0x1000 /* last SA Query failed */
-
- RB_ENTRY(ieee80211_node) ni_node;
};
RB_HEAD(ieee80211_tree, ieee80211_node);