From nobody Sun Dec 26 17:35:18 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 512A21904218; Sun, 26 Dec 2021 17:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JMScQ6g1Wz3JFH; Sun, 26 Dec 2021 17:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id ADEA96B12; Sun, 26 Dec 2021 17:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BQHZIOH080808; Sun, 26 Dec 2021 17:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BQHZIhO080807; Sun, 26 Dec 2021 17:35:18 GMT (envelope-from git) Date: Sun, 26 Dec 2021 17:35:18 GMT Message-Id: <202112261735.1BQHZIhO080807@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 04efa18f83d1 - main - net80211: add debugging information List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 04efa18f83d12dca2b69dd4cdb626f92e5ce64f0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640540119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yoxAcSKLmDmDj/8bdChc2Q0+sQBt2hw3wzIOT9EuJrg=; b=cDA4fX4hQfSGC9V7TgGdTrsqPoE9cose3e/8M2Zy1c+TVopAdmQi0/E3MX9rSTVeIdvhAV CaoHf5iaMc8IhtkbeAw9UOpbrvsDVaCb5hKKnsTRhwmOWH94umZ3gLnWNWraBkY8rwHNdy 3zqcBerV/m8LjjgDzGQzUzJtIBWWpV86wZ7GhO0XVfsOX3K6A24HQyFcDT8MCG7i2InRUL MO0OmzdSdDiWgigb8EJGq5FMZLWg5TJuQdhZu5fDboIFlmIk2INczABAogI8++E3JdGYzo h8PnuHiLI0mhDZueWCxxsKvi1871jIzrJ/AnB9/CpRG82rrXp1CfPf36vhWKJg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640540119; a=rsa-sha256; cv=none; b=CuI1uvECtdIPn5JS90LUgG+IYcYxAej5mj+JzwlGGlkPgmO34hz7+4cNOSVJoQFB2pF6pu /oJ6JuG3sOS8n+SpHnXlnAqdjKMaFnIedP4zWnXL+qpGX8+U3wQCj/Ac4ifmE6yl7d9P1r 4md8Zn16BS9tP9tI3Y6g+U/QleG9VGeZP5fxcsCmvUbsmXpJyIzMVaMnDozUxa+QsYvg5O +rq7NiAq0czlPi+/az7hn/lGUEPXCqUKtd2cqliemEFiQIg4MmS6QDT2NWhMMdrqaDC+GE 8P4P73RE+XWfQ9N3dH+SBSCD1N3RJ5K1YMWDonGZ4E3QkXj6mHf4xQxl38MGAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=04efa18f83d12dca2b69dd4cdb626f92e5ce64f0 commit 04efa18f83d12dca2b69dd4cdb626f92e5ce64f0 Author: Bjoern A. Zeeb AuthorDate: 2021-12-26 17:25:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-12-26 17:25:57 +0000 net80211: add debugging information Add more STATE / DEBUG probes and enhance the output of one in order to track state changes triggered by "ack" (or not). This helped to narrow down causes from drivers or the LinuxKPI 802.11 compat framework which kept us in a scan -> auth -> scan loop. Sponsored by: The FreeBSD Foundation MFC after: 3 days --- sys/net80211/ieee80211_node.c | 3 +++ sys/net80211/ieee80211_output.c | 18 +++++++++++++++++- sys/net80211/ieee80211_proto.c | 4 ++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index 95bed7821d16..80694c650ed4 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -895,6 +895,9 @@ ieee80211_sta_join1(struct ieee80211_node *selbs) * us to try to re-authenticate if we are operating * as a station. */ + IEEE80211_DPRINTF(vap, IEEE80211_MSG_AUTH, + "%s %p<%s> -> AUTH, FC0_SUBTYPE_DEAUTH\n", + __func__, selbs, ether_sprintf(selbs->ni_macaddr)); ieee80211_new_state(vap, IEEE80211_S_AUTH, IEEE80211_FC0_SUBTYPE_DEAUTH); } diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 9b1898df7b10..66d659af0866 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -3378,6 +3378,12 @@ ieee80211_tx_mgt_timeout(void *arg) { struct ieee80211vap *vap = arg; + IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE | IEEE80211_MSG_DEBUG, + "vap %p mode %s state %s flags %#x & %#x\n", vap, + ieee80211_opmode_name[vap->iv_opmode], + ieee80211_state_name[vap->iv_state], + vap->iv_ic->ic_flags, IEEE80211_F_SCAN); + IEEE80211_LOCK(vap->iv_ic); if (vap->iv_state != IEEE80211_S_INIT && (vap->iv_ic->ic_flags & IEEE80211_F_SCAN) == 0) { @@ -3423,6 +3429,11 @@ ieee80211_tx_mgt_cb(struct ieee80211_node *ni, void *arg, int status) * XXX what happens if !acked but response shows up before callback? */ if (vap->iv_state == ostate) { + IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE | IEEE80211_MSG_DEBUG, + "ni %p mode %s state %s ostate %d arg %p status %d\n", ni, + ieee80211_opmode_name[vap->iv_opmode], + ieee80211_state_name[vap->iv_state], ostate, arg, status); + callout_reset(&vap->iv_mgtsend, status == 0 ? IEEE80211_TRANS_WAIT*hz : 0, ieee80211_tx_mgt_timeout, vap); @@ -4170,8 +4181,13 @@ ieee80211_tx_complete(struct ieee80211_node *ni, struct mbuf *m, int status) if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); } else if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); - if (m->m_flags & M_TXCB) + if (m->m_flags & M_TXCB) { + IEEE80211_DPRINTF(ni->ni_vap, IEEE80211_MSG_STATE | IEEE80211_MSG_DEBUG, + "ni %p vap %p mode %s state %s m %p status %d\n", ni, ni->ni_vap, + ieee80211_opmode_name[ni->ni_vap->iv_opmode], + ieee80211_state_name[ni->ni_vap->iv_state], m, status); ieee80211_process_callback(ni, m, status); + } ieee80211_free_node(ni); } m_freem(m); diff --git a/sys/net80211/ieee80211_proto.c b/sys/net80211/ieee80211_proto.c index ad27275d8cfb..98a04e5251f0 100644 --- a/sys/net80211/ieee80211_proto.c +++ b/sys/net80211/ieee80211_proto.c @@ -2654,8 +2654,8 @@ ieee80211_new_state_locked(struct ieee80211vap *vap, } ostate = vap->iv_state; IEEE80211_DPRINTF(vap, IEEE80211_MSG_STATE, - "%s: %s -> %s (nrunning %d nscanning %d)\n", __func__, - ieee80211_state_name[ostate], ieee80211_state_name[nstate], + "%s: %s -> %s (arg %d) (nrunning %d nscanning %d)\n", __func__, + ieee80211_state_name[ostate], ieee80211_state_name[nstate], arg, nrunning, nscanning); switch (nstate) { case IEEE80211_S_SCAN: