svn commit: r195319 - projects/mesh11s/sys/net80211
Sam Leffler
sam at FreeBSD.org
Fri Jul 3 17:58:45 UTC 2009
Author: sam
Date: Fri Jul 3 17:58:45 2009
New Revision: 195319
URL: http://svn.freebsd.org/changeset/base/195319
Log:
revert node hash until we find a cheaper hash function
Modified:
projects/mesh11s/sys/net80211/ieee80211_node.h
Modified: projects/mesh11s/sys/net80211/ieee80211_node.h
==============================================================================
--- projects/mesh11s/sys/net80211/ieee80211_node.h Fri Jul 3 17:54:33 2009 (r195318)
+++ projects/mesh11s/sys/net80211/ieee80211_node.h Fri Jul 3 17:58:45 2009 (r195319)
@@ -58,8 +58,10 @@
#define IEEE80211_NONERP_PRESENT_AGE msecs_to_ticks(60*1000)
#define IEEE80211_NODE_HASHSIZE 32 /* NB: hash size must be pow2 */
-#define IEEE80211_NODE_HASH(ic, addr) \
- (ieee80211_mac_hash(ic, addr) & (IEEE80211_NODE_HASHSIZE-1))
+/* simple hash is enough for variation of macaddr */
+#define IEEE80211_NODE_HASH(ic, addr) \
+ (((const uint8_t *)(addr))[IEEE80211_ADDR_LEN - 1] % \
+ IEEE80211_NODE_HASHSIZE)
struct ieee80211_node_table;
struct ieee80211com;
More information about the svn-src-projects
mailing list