PERFORCE change 66602 for review

Sam Leffler sam at FreeBSD.org
Mon Dec 6 18:35:53 PST 2004


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

Change 66602 by sam at sam_ebb on 2004/12/07 02:34:52

	more debug msg cleanups

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#23 edit

Differences ...

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

@@ -139,19 +139,19 @@
 	if ((m->m_flags & M_LINK0) != 0 && ni->ni_challenge != NULL) {
 		m->m_flags &= ~M_LINK0;
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
-			"%s: encrypting frame for %s\n",
-			__func__, ether_sprintf(wh->i_addr1));
+			"[%s] encrypting frame (%s)\n",
+			ether_sprintf(wh->i_addr1), __func__);
 		wh->i_fc[1] |= IEEE80211_FC1_WEP;
 	}
 #ifdef IEEE80211_DEBUG
 	/* avoid printing too many frames */
 	if ((ieee80211_msg_debug(ic) && doprint(ic, type)) ||
 	    ieee80211_msg_dumppkts(ic)) {
-		if_printf(ifp, "sending %s to %s on channel %u\n",
+		printf("[%s] send %s on channel %u\n",
+		    ether_sprintf(wh->i_addr1),
 		    ieee80211_mgt_subtype_name[
-		    (type & IEEE80211_FC0_SUBTYPE_MASK)
-		    >> IEEE80211_FC0_SUBTYPE_SHIFT],
-		    ether_sprintf(wh->i_addr1),
+			(type & IEEE80211_FC0_SUBTYPE_MASK) >>
+				IEEE80211_FC0_SUBTYPE_SHIFT],
 		    ieee80211_chan2ieee(ic, ni->ni_chan));
 	}
 #endif
@@ -452,7 +452,8 @@
 		key = ieee80211_crypto_getkey(ic, eh.ether_dhost, ni);
 		if (key == NULL && eh.ether_type != htons(ETHERTYPE_PAE)) {
 			IEEE80211_DPRINTF(ic, IEEE80211_MSG_CRYPTO,
-			    "%s: No default transmit key\n", __func__);
+			    "[%s] no default transmit key\n",
+			    ether_sprintf(ni->ni_macaddr));
 			/* XXX statistic */
 		}
 	} else
@@ -1076,7 +1077,8 @@
 				4 * sizeof(u_int16_t) + IEEE80211_CHALLENGE_LEN;
 			if (arg == IEEE80211_AUTH_SHARED_RESPONSE) {
 				IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
-				    "%s: request encrypt frame\n", __func__);
+				    "[%s] request encrypt frame (%s)\n",
+				    ether_sprintf(ni->ni_macaddr), __func__);
 				m->m_flags |= M_LINK0; /* WEP-encrypt, please */
 			}
 		} else
@@ -1102,7 +1104,7 @@
 
 	case IEEE80211_FC0_SUBTYPE_DEAUTH:
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_AUTH,
-			"send station %s deauthenticate (reason %d)\n",
+			"[%s] send station deauthenticate (reason %d)\n",
 			ether_sprintf(ni->ni_macaddr), arg);
 		m = ieee80211_getmgtframe(&frm, sizeof(u_int16_t));
 		if (m == NULL)
@@ -1236,7 +1238,7 @@
 
 	case IEEE80211_FC0_SUBTYPE_DISASSOC:
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC,
-			"send station %s disassociate (reason %d)\n",
+			"[%s] send station disassociate (reason %d)\n",
 			ether_sprintf(ni->ni_macaddr), arg);
 		m = ieee80211_getmgtframe(&frm, sizeof(u_int16_t));
 		if (m == NULL)
@@ -1250,7 +1252,8 @@
 
 	default:
 		IEEE80211_DPRINTF(ic, IEEE80211_MSG_ANY,
-			"%s: invalid mgmt frame type %u\n", __func__, type);
+			"[%s] invalid mgmt frame type %u\n",
+			ether_sprintf(ni->ni_macaddr), type);
 		senderr(EINVAL, is_tx_unknownmgt);
 		/* NOTREACHED */
 	}


More information about the p4-projects mailing list