svn commit: r184268 - head/sys/net80211
Sam Leffler
sam at FreeBSD.org
Sat Oct 25 16:23:41 PDT 2008
Author: sam
Date: Sat Oct 25 23:23:41 2008
New Revision: 184268
URL: http://svn.freebsd.org/changeset/base/184268
Log:
add/improve debug msgs
Modified:
head/sys/net80211/ieee80211_adhoc.c
head/sys/net80211/ieee80211_crypto.c
head/sys/net80211/ieee80211_sta.c
Modified: head/sys/net80211/ieee80211_adhoc.c
==============================================================================
--- head/sys/net80211/ieee80211_adhoc.c Sat Oct 25 21:42:43 2008 (r184267)
+++ head/sys/net80211/ieee80211_adhoc.c Sat Oct 25 23:23:41 2008 (r184268)
@@ -209,8 +209,8 @@ adhoc_newstate(struct ieee80211vap *vap,
break;
default:
invalid:
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_ANY,
- "%s: invalid state transition %s -> %s\n", __func__,
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
+ "%s: unexpected state transition %s -> %s\n", __func__,
ieee80211_state_name[ostate], ieee80211_state_name[nstate]);
break;
}
@@ -735,11 +735,16 @@ adhoc_recv_mgmt(struct ieee80211_node *n
case IEEE80211_FC0_SUBTYPE_PROBE_REQ:
if (vap->iv_state != IEEE80211_S_RUN) {
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+ wh, NULL, "wrong state %s",
+ ieee80211_state_name[vap->iv_state]);
vap->iv_stats.is_rx_mgtdiscard++;
return;
}
if (IEEE80211_IS_MULTICAST(wh->i_addr2)) {
/* frame must be directed */
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+ wh, NULL, "%s", "not unicast");
vap->iv_stats.is_rx_mgtdiscard++; /* XXX stat */
return;
}
@@ -798,6 +803,9 @@ adhoc_recv_mgmt(struct ieee80211_node *n
const struct ieee80211_action *ia;
if (vap->iv_state != IEEE80211_S_RUN) {
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+ wh, NULL, "wrong state %s",
+ ieee80211_state_name[vap->iv_state]);
vap->iv_stats.is_rx_mgtdiscard++;
return;
}
@@ -857,6 +865,8 @@ adhoc_recv_mgmt(struct ieee80211_node *n
case IEEE80211_FC0_SUBTYPE_REASSOC_RESP:
case IEEE80211_FC0_SUBTYPE_DEAUTH:
case IEEE80211_FC0_SUBTYPE_DISASSOC:
+ IEEE80211_DISCARD(vap, IEEE80211_MSG_INPUT,
+ wh, NULL, "%s", "not handled");
vap->iv_stats.is_rx_mgtdiscard++;
return;
Modified: head/sys/net80211/ieee80211_crypto.c
==============================================================================
--- head/sys/net80211/ieee80211_crypto.c Sat Oct 25 21:42:43 2008 (r184267)
+++ head/sys/net80211/ieee80211_crypto.c Sat Oct 25 23:23:41 2008 (r184268)
@@ -267,6 +267,10 @@ ieee80211_crypto_newkey(struct ieee80211
void *keyctx;
int oflags;
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO,
+ "%s: cipher %u flags 0x%x keyix %u\n",
+ __func__, cipher, flags, key->wk_keyix);
+
/*
* Validate cipher and set reference to cipher routines.
*/
Modified: head/sys/net80211/ieee80211_sta.c
==============================================================================
--- head/sys/net80211/ieee80211_sta.c Sat Oct 25 21:42:43 2008 (r184267)
+++ head/sys/net80211/ieee80211_sta.c Sat Oct 25 23:23:41 2008 (r184268)
@@ -406,8 +406,8 @@ sta_newstate(struct ieee80211vap *vap, e
break;
default:
invalid:
- IEEE80211_DPRINTF(vap, IEEE80211_MSG_ANY,
- "%s: invalid state transition %s -> %s\n", __func__,
+ IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE,
+ "%s: unexpected state transition %s -> %s\n", __func__,
ieee80211_state_name[ostate], ieee80211_state_name[nstate]);
break;
}
More information about the svn-src-head
mailing list