Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Sep 2025 11:06:59 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 00c9ebbbc653 - main - LinuxKPI: 802.11: counting beacons for debug only when assoc
Message-ID:  <202509021106.582B6xbS085734@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=00c9ebbbc6533bd0b23e374a59e91345bb26d3dc

commit 00c9ebbbc6533bd0b23e374a59e91345bb26d3dc
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-09-02 08:20:11 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-09-02 11:04:29 +0000

    LinuxKPI: 802.11: counting beacons for debug only when assoc
    
    Simplify the logic and only count beacons when we are assoc, given
    we only do this for debugging purposes of beacon/connection loss.
    
    Fixes:  bdfe17f129db0
    MFC after:      3 days
---
 sys/compat/linuxkpi/common/src/linux_80211.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 6c838df28ff6..f0881773726f 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -3828,6 +3828,7 @@ lkpi_iv_sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
 	enum ieee80211_bss_changed bss_changed;
 
 	lvif = VAP_TO_LVIF(ni->ni_vap);
+	vif = LVIF_TO_VIF(lvif);
 
 	lvif->iv_recv_mgmt(ni, m0, subtype, rxs, rssi, nf);
 
@@ -3835,13 +3836,18 @@ lkpi_iv_sta_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m0,
 	case IEEE80211_FC0_SUBTYPE_PROBE_RESP:
 		break;
 	case IEEE80211_FC0_SUBTYPE_BEACON:
-		lvif->beacons++;
+		/*
+		 * Only count beacons when assoc. SCAN has its own logging.
+		 * This is for connection/beacon loss/session protection almost
+		 * over debugging when trying to get into a stable RUN state.
+		 */
+		if (vif->cfg.assoc)
+			lvif->beacons++;
 		break;
 	default:
 		return;
 	}
 
-	vif = LVIF_TO_VIF(lvif);
 	lhw = ni->ni_ic->ic_softc;
 	hw = LHW_TO_HW(lhw);
 



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