From nobody Thu Dec 30 19:22:41 2021 X-Original-To: dev-commits-src-branches@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 BA89A191FA2F; Thu, 30 Dec 2021 19:22:44 +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 4JPypV0zhHz3C2h; Thu, 30 Dec 2021 19:22:41 +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 65AAC1E0C4; Thu, 30 Dec 2021 19:22:41 +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 1BUJMf8e017417; Thu, 30 Dec 2021 19:22:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BUJMfLR017416; Thu, 30 Dec 2021 19:22:41 GMT (envelope-from git) Date: Thu, 30 Dec 2021 19:22:41 GMT Message-Id: <202112301922.1BUJMfLR017416@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: de4b87bb78e8 - stable/13 - net80211: add debugging information List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: de4b87bb78e8016e6ca74865bb1c10a8d2990249 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640892162; 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=lE/yZIWUvx33w30vx3huBoKsEHzLn4iPhGc1lFvUSP8=; b=ogeEpCTHzI2z913Cg+o6yuGObjjEsuXV1+x93DFKT/INHyjsCZ1/HxswHh9mTnheRabF6q lhyKjYRPYraLnybp+Fpda+ptWA/SSTCssNNYFrY9Uc/apgFfzl7Y2z7FIQxvwqDhHfWCfJ 4vvuzeExWm6AdY8eSP9hNevswUxfu5uRYwA7Zy61nCLcKyyUL7BoDdpCK2vqOOZJuw4Hyv y7q/OrOBVZyLGg7EbccXEZrQbIskplF2yvNPzh9OuM7nT2gcBOwmccwamla92k0Ydn9abT ZLOII8BcDDukGnAnlEa/Uf1aBsgc2MZLO84s4ciFzj8OUxUwDhzjpT8tT1ParA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640892162; a=rsa-sha256; cv=none; b=uzgzYft0TT53zqausrlY24uU1LqBX2HI78ApD1OapPK0o9D9VnEyxhGi1I+9/u7pT7Oivb qDoYgLXv+RrMIgnZkJuPWW6bug7g3jpL1S3PNq7zo2wqN1LoWjUb+ipjM0bCJXKGGd2DAO lQYSY0XsPVcIhQhHe2JrdABZWHpfGCzchbBshlufE9u+Ef2yz1qX4DZ2kVeQOFht4ZKug9 k5zWVY9vvFW82J28bxbapXzma8c6iiOw5FR+6N1s6yEE8xPWu7a50zUs3rMbGDY+8OHqj1 hF/VotVS+75ScVyDiwSYJdZGIg2KK1JvGi/klo1VA+BS+vQDlaKtxOVS5u+HAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=de4b87bb78e8016e6ca74865bb1c10a8d2990249 commit de4b87bb78e8016e6ca74865bb1c10a8d2990249 Author: Bjoern A. Zeeb AuthorDate: 2021-12-26 17:25:57 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-12-30 18:26:53 +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 (cherry picked from commit 04efa18f83d12dca2b69dd4cdb626f92e5ce64f0) --- 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 3ddb82343efe..7f381259214c 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: