PERFORCE change 47059 for review
Sam Leffler
sam at FreeBSD.org
Mon Feb 16 14:45:29 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=47059
Change 47059 by sam at sam_ebb on 2004/02/16 14:45:03
sync with madwifi
Affected files ...
.. //depot/projects/netperf+sockets/sys/net80211/ieee80211_linux.h#3 edit
Differences ...
==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_linux.h#3 (text+ko) ====
@@ -30,7 +30,7 @@
#define _NET80211_IEEE80211_LINUX_H_
/*
- * Locking definitions.
+ * Node locking definitions.
*/
typedef rwlock_t ieee80211_node_lock_t;
#define IEEE80211_NODE_LOCK_INIT(_ic, _name) rwlock_init(&(_ic)->ic_nodelock)
@@ -42,10 +42,28 @@
#define IEEE80211_NODE_LOCK_ASSERT(_ic) \
KASSERT(rwlock_is_locked(&(_ic)->ic_nodelock), ("node not locked!"))
+/*
+ * 802.1x state locking definitions.
+ */
+typedef spinlock_t eapol_node_lock_t;
+#define EAPOL_LOCK_INIT(_ec, _name) spin_lock_init(&(_ec)->ec_lock)
+#define EAPOL_LOCK_DESTROY(_ec)
+#define EAPOL_LOCK(_ec) spin_lock_bh(&(_ec)->ec_lock)
+#define EAPOL_UNLOCK(_ec) spin_unlock_bh(&(_ec)->ec_lock)
+#define EAPOL_LOCK_ASSERT(_ec) \
+ KASSERT(spin_is_locked(&(_ec)->ec_lock), ("node not locked!"))
+
#define M_LINK0 0x01 /* frame needs WEP encryption */
/*
* Node reference counting definitions.
+ *
+ * ieee80211_node_initref initialize the reference count to 1
+ * ieee80211_node_incref add a reference
+ * ieee80211_node_decref remove a reference
+ * ieee80211_node_dectestref remove a reference and return 1 if this
+ * is the last reference, otherwise 0
+ * ieee80211_node_refcnt reference count for printing (only)
*/
#define ieee80211_node_initref(_ni) \
atomic_set(&(_ni)->ni_refcnt, 1)
@@ -55,6 +73,7 @@
atomic_dec(&(_ni)->ni_refcnt)
#define ieee80211_node_dectestref(_ni) \
atomic_dec_and_test(&(_ni)->ni_refcnt)
+#define ieee80211_node_refcnt(_ni) (_ni)->ni_refcnt.counter
#define le16toh(_x) le16_to_cpu(_x)
#define htole16(_x) cpu_to_le16(_x)
More information about the p4-projects
mailing list