From nobody Tue Sep 2 11:06:57 2025 X-Original-To: dev-commits-src-main@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 4cGNH61QXyz66WZl; Tue, 02 Sep 2025 11:06:58 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cGNH60f4cz3L4N; Tue, 02 Sep 2025 11:06:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756811218; 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=Wcr5P8i6ohyoJ2vBZhF06yK/QZ/ifD/aQxw58ii7V+k=; b=GRP/C9Xl0xV3tB0jfAUwUUJ3M8eEsQTJ4wXeWfWEwXOpO9Zw1zI8w60g3BbyAiSsUGXWsL KPjPsI1B1fhPR9+btEk6zUPfRSQHMWIxelRyJP+gf0VMvMMf+avJl69G1cVbKkRNNPWeuN eczNpTvEnOH5Es3qIC/Q1Pbuf3yW8nYSv0xnE1L+iUUwzfykgDMAOIwKTpGASr4JCAfpJm Cefml+X70OZ3NWkHdFb/SF3j7y1wyiIQIjXhMF3pKPr/2SxGmoCa+lVcji6VLIV+uflj6e XjBu0kf9CNsV2csmSp0d/pc/JGG9Vh7uNqnlklEp4qy0mxoVc2WiAmtdFvvQQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756811218; 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=Wcr5P8i6ohyoJ2vBZhF06yK/QZ/ifD/aQxw58ii7V+k=; b=Ms4Q3Z/ftnkmo/n3zGRaN8yDNseEf1YyGpWD493HyrVcKenmqHSOIQAaS6BLF0KxnKM7uQ +q9lYzBxJ8CgDl4Tb/F9kb8Nw06VTtkbt4hl60voeEakGc+JTVFSj37GhjTEkiHwOuz7Hs rRcrn5KiHE8DWoYgyBN4jvbZIDeXsX3Z0wQv705KinlZudOGOxH+csQPQsDubkyINiot7F vtxjpVeJkMDvcxKuWf+0NBQhlzJofBerbmmRdR0uTDqU59cBC+sWULrhdy1cs/Z2dFe4w2 wuW4kZuaRyYAwoCcjahAimEPl4UWZNG3qDm16cg3Fo59acxxZXXDJpbS3/J1Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756811218; a=rsa-sha256; cv=none; b=q1YtvV3h3QgtpA+0krzGvpZMkY1RWxqaaXusp291bho/dTDJMpcUNOBPiFQyaRJUhVbBJi 13DavPIFaLSChOwvB4Qzj65V7Ngq4LOWXzcgC6ARBrsTqWgwjeddIoi6uB7QfVhJNg9onS sJrfM2btHVbTmQMXlXrKQJwcv8HEs9CkvBAIiQvJOjLW+o5iCsTSJMoZYV3s9bdeuHYXgc Jo+rvwlJ89lq4XnLPq6RS+4YWVCTekr4n/c3yLfY2ixF/6gMNDm4fiUo2MK35QgBor9cWc 2A1pDfLvE335WDGnN4UB9rXp+nolUz2jfKA3T0NQeJ9C8KLQgfLwry5s1iwEeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cGNH56sgtzkmS; Tue, 02 Sep 2025 11:06:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 582B6vht085651; Tue, 2 Sep 2025 11:06:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 582B6vf1085648; Tue, 2 Sep 2025 11:06:57 GMT (envelope-from git) Date: Tue, 2 Sep 2025 11:06:57 GMT Message-Id: <202509021106.582B6vf1085648@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: 0533923acf22 - main - LinuxKPI: 802.11: use IEEE80211_FEXT_AMPDU_OFFLOAD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 0533923acf22d4f308590b651aacd17441f4a9b8 Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=0533923acf22d4f308590b651aacd17441f4a9b8 commit 0533923acf22d4f308590b651aacd17441f4a9b8 Author: Bjoern A. Zeeb AuthorDate: 2025-04-14 18:27:28 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-09-02 11:04:28 +0000 LinuxKPI: 802.11: use IEEE80211_FEXT_AMPDU_OFFLOAD Set IEEE80211_FEXT_AMPDU_OFFLOAD if the driver/firmware does AMPDU[-TX] offload and net80211 should stay out of the way. Later use IEEE80211_CONF_AMPDU_OFFLOAD() (the IEEE80211_FEXT_AMPDU_OFFLOAD net80211 flag) rather than the LinuxKPI check to clear AMPDU-RX if we do not support crypto offload. This may seem odd at first as AMPDU-RX is mandatory but we would not be able to get anything working if we would let net80211 do a (*ic_ampdu_rx_start)() call. Some of this is neccessary until we have the code for all drivers (rtw8x use further interfaces) sorted. Sponsored by: The FreeBSD Foundation (originally) MFC after: 3 days Fixes: ac2c7271b7c26 --- sys/compat/linuxkpi/common/src/linux_80211.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index 87390145a296..4cf9053f053b 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -4059,13 +4059,9 @@ lkpi_ic_vap_create(struct ieee80211com *ic, const char name[IFNAMSIZ], * Modern chipset/fw/drv will do A-MPDU in drv/fw and fail * to do so if they cannot do the crypto too. */ - if (!lkpi_hwcrypto && ieee80211_hw_check(hw, AMPDU_AGGREGATION)) + if (!lkpi_hwcrypto && IEEE80211_CONF_AMPDU_OFFLOAD(ic)) vap->iv_flags_ht &= ~IEEE80211_FHT_AMPDU_RX; #endif -#if defined(LKPI_80211_HT) - /* 20250125-BZ Keep A-MPDU TX cleared until we sorted out AddBA for all drivers. */ - vap->iv_flags_ht &= ~IEEE80211_FHT_AMPDU_TX; -#endif if (hw->max_listen_interval == 0) hw->max_listen_interval = 7 * (ic->ic_lintval / ic->ic_bintval); @@ -6609,6 +6605,14 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) if (ieee80211_hw_check(hw, SUPPORTS_TX_FRAG)) ic->ic_flags_ext |= IEEE80211_FEXT_FRAG_OFFLOAD; + /* Does HW support full AMPDU[-TX] offload? */ + if (ieee80211_hw_check(hw, AMPDU_AGGREGATION)) + ic->ic_flags_ext |= IEEE80211_FEXT_AMPDU_OFFLOAD; +#ifdef __notyet__ + if (ieee80211_hw_check(hw, TX_AMSDU)) + if (ieee80211_hw_check(hw, SUPPORTS_AMSDU_IN_AMPDU)) +#endif + /* * The wiphy variables report bitmasks of avail antennas. * (*get_antenna) get the current bitmask sets which can be