Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Apr 2026 21:07:55 +0000
From:      Bjoern A. Zeeb <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Adrian Chadd <adrian@FreeBSD.org>
Subject:   git: b55f25d49be2 - stable/15 - net80211: add support for drivers to disable sending NULL data frames
Message-ID:  <69e938ab.27669.748e896a@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by bz:

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

commit b55f25d49be2197353e00bd2d299b0556df91af1
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2025-08-27 17:03:22 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2026-04-22 20:56:50 +0000

    net80211: add support for drivers to disable sending NULL data frames
    
    net80211 has various places where null data / null qos data frames
    are sent.  However plenty of NICs shouldn't be sending them from
    net80211 and it may even upset their 802.11n window / sequence number
    tracking.
    
    So add support here.
    
    Differential Revision:  https://reviews.freebsd.org/D52297
    Reviewed by:    bz
    
    (cherry picked from commit 9bfb1405332c6c847dd29e4db4dd3afb56662021)
---
 sys/net80211/ieee80211_output.c | 6 ++++++
 sys/net80211/ieee80211_var.h    | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c
index 57fe687adffe..116fc76a9ce1 100644
--- a/sys/net80211/ieee80211_output.c
+++ b/sys/net80211/ieee80211_output.c
@@ -1082,6 +1082,12 @@ ieee80211_send_nulldata(struct ieee80211_node *ni)
 	uint8_t *frm;
 	int ret;
 
+	/* Don't send NULL frames if we've been configured not to do so. */
+	if ((ic->ic_flags_ext & IEEE80211_FEXT_NO_NULLDATA) != 0) {
+		ieee80211_node_decref(ni);
+		return (0);
+	}
+
 	if (vap->iv_state == IEEE80211_S_CAC) {
 		IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT | IEEE80211_MSG_DOTH,
 		    ni, "block %s frame in CAC state", "null data");
diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h
index c09bb90d7ad3..7b45261f59b1 100644
--- a/sys/net80211/ieee80211_var.h
+++ b/sys/net80211/ieee80211_var.h
@@ -700,13 +700,14 @@ MALLOC_DECLARE(M_80211_VAP);
 #define	IEEE80211_FEXT_QUIET_IE	0x00800000	/* STATUS: quiet IE in a beacon has been added */
 #define	IEEE80211_FEXT_UAPSD	0x01000000	/* CONF: enable U-APSD */
 #define	IEEE80211_FEXT_AMPDU_OFFLOAD	0x02000000	/* CONF: driver/fw handles AMPDU[-TX] itself */
+#define	IEEE80211_FEXT_NO_NULLDATA	0x04000000	/* CONF: don't originate NULL data frames from net80211 */
 
 #define	IEEE80211_FEXT_BITS \
 	"\20\2INACT\3SCANWAIT\4BGSCAN\5WPS\6TSN\7SCANREQ\10RESUME" \
 	"\0114ADDR\12NONEPR_PR\13SWBMISS\14DFS\15DOTD\16STATEWAIT\17REINIT" \
 	"\20BPF\21WDSLEGACY\22PROBECHAN\23UNIQMAC\24SCAN_OFFLOAD\25SEQNO_OFFLOAD" \
 	    "\26FRAG_OFFLOAD\27VHT" \
-	"\30QUIET_IE\31UAPSD\32AMPDU_OFFLOAD"
+	"\30QUIET_IE\31UAPSD\32AMPDU_OFFLOAD\33NO_NULLDATA"
 
 /* ic_flags_ht/iv_flags_ht */
 #define	IEEE80211_FHT_NONHT_PR	 0x00000001	/* STATUS: non-HT sta present */


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69e938ab.27669.748e896a>