Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Mar 2008 16:54:12 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 137326 for review
Message-ID:  <200803101654.m2AGsCOF019287@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=137326

Change 137326 by sam@sam_ebb on 2008/03/10 16:53:47

	fix mlme debug msg for assoc request; we cannot take the mac
	address from the bss node, it's not set yet

Affected files ...

.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#40 edit

Differences ...

==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#40 (text+ko) ====

@@ -1184,7 +1184,8 @@
 };
 
 static void
-mlmedebug(struct ieee80211_node *ni, int op, int reason)
+mlmedebug(struct ieee80211vap *vap, const uint8_t mac[IEEE80211_ADDR_LEN],
+	int op, int reason)
 {
 #ifdef IEEE80211_DEBUG
 	static const struct {
@@ -1203,22 +1204,21 @@
 		{ IEEE80211_MSG_IOCTL | IEEE80211_MSG_STATE |
 		  IEEE80211_MSG_AUTH, "unauthorize" },
 	};
-	struct ieee80211vap *vap = ni->ni_vap;
 
 	if (op == IEEE80211_MLME_AUTH) {
-		IEEE80211_NOTE(vap, IEEE80211_MSG_IOCTL | IEEE80211_MSG_STATE |
-		    IEEE80211_MSG_AUTH, ni,
+		IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_IOCTL |
+		    IEEE80211_MSG_STATE | IEEE80211_MSG_AUTH, mac,
 		    "station authenticate %s via MLME (reason %d)",
 		    reason == IEEE80211_STATUS_SUCCESS ? "ACCEPT" : "REJECT",
 		    reason);
 	} else if (!(IEEE80211_MLME_ASSOC <= op && op <= IEEE80211_MLME_AUTH)) {
-		IEEE80211_NOTE(vap, IEEE80211_MSG_ANY, ni,
+		IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_ANY, mac,
 		    "unknown MLME request %d (reason %d)", op, reason);
 	} else if (reason == IEEE80211_STATUS_SUCCESS) {
-		IEEE80211_NOTE(vap, ops[op].mask, ni,
+		IEEE80211_NOTE_MAC(vap, ops[op].mask, mac,
 		    "station %s via MLME", ops[op].opstr);
 	} else {
-		IEEE80211_NOTE(vap, ops[op].mask, ni,
+		IEEE80211_NOTE_MAC(vap, ops[op].mask, mac,
 		    "station %s via MLME (reason %d)", ops[op].opstr, reason);
 	}
 #endif /* IEEE80211_DEBUG */
@@ -1239,7 +1239,7 @@
 	 */ 
 	if (ni->ni_associd == 0)
 		return;
-	mlmedebug(ni, mop->op, mop->reason);
+	mlmedebug(vap, ni->ni_macaddr, mop->op, mop->reason);
 	if (mop->op == IEEE80211_MLME_DEAUTH) {
 		IEEE80211_SEND_MGMT(ni, IEEE80211_FC0_SUBTYPE_DEAUTH,
 		    mop->reason);
@@ -1265,7 +1265,7 @@
 	case IEEE80211_MLME_DEAUTH:
 		switch (vap->iv_opmode) {
 		case IEEE80211_M_STA:
-			mlmedebug(vap->iv_bss, op, reason);
+			mlmedebug(vap, vap->iv_bss->ni_macaddr, op, reason);
 			/* XXX not quite right */
 			ieee80211_new_state(vap, IEEE80211_S_INIT, reason);
 			break;
@@ -1299,7 +1299,7 @@
 				break;
 			}
 #endif
-			mlmedebug(vap->iv_bss, op, reason);
+			mlmedebug(vap, vap->iv_bss->ni_macaddr, op, reason);
 			ni = ieee80211_ref_node(vap->iv_bss);
 			IEEE80211_SEND_MGMT(ni,
 			    IEEE80211_FC0_SUBTYPE_DEAUTH, reason);
@@ -1319,7 +1319,7 @@
 		}
 		ni = ieee80211_find_vap_node(&ic->ic_sta, vap, mac);
 		if (ni != NULL) {
-			mlmedebug(ni, op, reason);
+			mlmedebug(vap, mac, op, reason);
 			if (op == IEEE80211_MLME_AUTHORIZE)
 				ieee80211_node_authorize(ni);
 			else
@@ -1335,7 +1335,7 @@
 		}
 		ni = ieee80211_find_vap_node(&ic->ic_sta, vap, mac);
 		if (ni != NULL) {
-			mlmedebug(ni, op, reason);
+			mlmedebug(vap, mac, op, reason);
 			if (reason == IEEE80211_STATUS_SUCCESS) {
 				IEEE80211_SEND_MGMT(ni,
 				    IEEE80211_FC0_SUBTYPE_AUTH, 2);
@@ -1409,7 +1409,7 @@
 	ieee80211_scan_iterate(vap, mlmelookup, &lookup);
 	if (lookup.se == NULL)
 		return ENOENT;
-	mlmedebug(vap->iv_bss, IEEE80211_MLME_ASSOC, 0);
+	mlmedebug(vap, mac, IEEE80211_MLME_ASSOC, 0);
 	if (!ieee80211_sta_join(vap, lookup.se))
 		return EIO;		/* XXX unique but could be better */
 	return 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803101654.m2AGsCOF019287>