PERFORCE change 66387 for review

Sam Leffler sam at FreeBSD.org
Fri Dec 3 22:58:51 PST 2004


http://perforce.freebsd.org/chv.cgi?CH=66387

Change 66387 by sam at sam_ebb on 2004/12/04 06:58:30

	fix building w/o IEEE80211_DEBUG

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_none.c#2 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#2 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_node.c#24 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#21 edit
.. //depot/projects/wifi/sys/net80211/ieee80211_proto.c#14 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_none.c#2 (text+ko) ====

@@ -94,7 +94,9 @@
 none_encap(struct ieee80211_key *k, struct mbuf *m, u_int8_t keyid)
 {
 	struct ieee80211com *ic = k->wk_private;
+#ifdef IEEE80211_DEBUG
 	struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
+#endif
 
 	/*
 	 * The specified key is not setup; this can
@@ -111,8 +113,10 @@
 none_decap(struct ieee80211_key *k, struct mbuf *m)
 {
 	struct ieee80211com *ic = k->wk_private;
+#ifdef IEEE80211_DEBUG
 	struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
 	const u_int8_t *ivp = (const u_int8_t *)&wh[1];
+#endif
 
 	/*
 	 * The specified key is not setup; this can

==== //depot/projects/wifi/sys/net80211/ieee80211_crypto_tkip.c#2 (text+ko) ====

@@ -158,7 +158,9 @@
 	 * Handle TKIP counter measures requirement.
 	 */
 	if (ic->ic_flags & IEEE80211_F_COUNTERM) {
+#ifdef IEEE80211_DEBUG
 		struct ieee80211_frame *wh = mtod(m, struct ieee80211_frame *);
+#endif
 
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
 			"[%s] Discard frame due to countermeasures (%s)\n",

==== //depot/projects/wifi/sys/net80211/ieee80211_node.c#24 (text+ko) ====

@@ -1458,14 +1458,13 @@
 void
 ieee80211_iterate_nodes(struct ieee80211_node_table *nt, ieee80211_iter_func *f, void *arg)
 {
-	struct ieee80211com *ic = nt->nt_ic;
 	struct ieee80211_node *ni;
 	u_int gen;
 
 	IEEE80211_SCAN_LOCK(nt);
 	gen = nt->nt_scangen++;
 
-	IEEE80211_DPRINTF(ic, IEEE80211_MSG_NODE,
+	IEEE80211_DPRINTF(nt->nt_ic, IEEE80211_MSG_NODE,
 		"%s: sta scangen %u\n", __func__, gen);
 restart:
 	IEEE80211_NODE_LOCK(nt);

==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#21 (text+ko) ====

@@ -1559,8 +1559,10 @@
 			"[%s] pwr save q overflow, drops %d (size %d)\n",
 			ether_sprintf(ni->ni_macaddr), 
 			ni->ni_savedq.ifq_drops, IEEE80211_PS_MAX_QUEUE);
+#ifdef IEEE80211_DEBUG
 		if (ieee80211_msg_dumppkts(ic))
 			ieee80211_dump_pkt(mtod(m, caddr_t), m->m_len, -1, -1);
+#endif
 		m_freem(m);
 		return;
 	}

==== //depot/projects/wifi/sys/net80211/ieee80211_proto.c#14 (text+ko) ====

@@ -1029,6 +1029,7 @@
 			KASSERT(ni->ni_txrate < ni->ni_rates.rs_nrates,
 				("%s: bogus xmit rate %u setup\n", __func__,
 					ni->ni_txrate));
+#ifdef IEEE80211_DEBUG
 			if (ieee80211_msg_debug(ic)) {
 				if (ic->ic_opmode == IEEE80211_M_STA)
 					if_printf(ifp, "associated ");
@@ -1042,6 +1043,7 @@
 					ieee80211_chan2ieee(ic, ni->ni_chan),
 					IEEE80211_RATE2MBS(ni->ni_rates.rs_rates[ni->ni_txrate]));
 			}
+#endif
 			ic->ic_mgt_timer = 0;
 			if (ic->ic_opmode == IEEE80211_M_STA)
 				ieee80211_notify_node_join(ic, ni, 


More information about the p4-projects mailing list