From nobody Thu Nov 14 01:53:56 2024 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 4Xpjqn0G1fz5ctfL; Thu, 14 Nov 2024 01:53:57 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xpjqm5k2rz44sD; Thu, 14 Nov 2024 01:53:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549236; 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=91FCoyoO2F0CPZBO3oCuiC6vP2IL3bb6n9atZZAdht4=; b=FDi11BhLySAj3Qs0ItEIyeHMnspKkNwXDvG9/RrxoCuTixUpBjG+UqeVskOzRv/SKYs8x7 2TRsJdIdrqBn2j2ejAUmoBEC6vzAfyCEQLIJQuW+sZDwkOR2vQeV1t/T8iCMBVtlXJeGX9 dlM8rQUfe4HBKAL+o+dIpQbS7ByeCRrz2NdWHqnIM/UYFwQHtbfuI2AFGsKYXFKWBwmyQZ vGbhiGlnKe13fQx+wQ6t0Dt7oc1P88YtMF1berWbvBv7saFQQs+aZOduGJlgrDVuppzAqM xVqIUgskUUcE9H3Ya72gddGyoqYMZXY3CFCT258sNTIiTvjsy7U7JU0MxJHsOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731549236; 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=91FCoyoO2F0CPZBO3oCuiC6vP2IL3bb6n9atZZAdht4=; b=xE6nLAb7QTyKwzGF5YryCTStbDri4xtH/LtfIqg1xk0bSZYDypTrlqG9CnfhuVPFAkwUhA T8d2Cts3cxzgWfhtADxO/Cn4CxuPCD8NvX05oU/B+ahBpO25YdA9YtWtxqemmZRBAG4ByV 2oRatPD88trcJxrJI1HkfPqj2RmVre+rq/sebz8viEfGHza3V4qTnmb3QdYDMdKvehNzAL lHpOGCX7II1m+E62yPfpy7l8BdWzwfH0xj8T1nb5VAAv97xvI+ldfwMQWFPZgDMPvIhH0+ WaYaizfaP5XmWXDcfsB9oZvUInTLLF1dm1xmukJiCpD27Lbh1jIN3o7rFwB7Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731549236; a=rsa-sha256; cv=none; b=OGN5EkHi1lMAo1oBf/ec9CBFM1wVAqOPW/bUPCYxRuC1pM8mRoKOpgNWCRNdbf1oQGZP5U TmJwquH4RVvPn43Xug8NHfep5uXQRTpBnuT2fgxDn/rFOaR8h07sATaaSHp9zraaMRXDEl rr9SoD/2g0VKsV7vQbha9JypbQ2DA+s3ujgOrJQH5v5dD0sj8M7NIZl0NrgwVhHn8CqdP4 AU14q/KlVRfx8A9dx4pyDCJvw0PKsikee/vFL62ft1FCDGG+YS+bZYnYPatK3AcEAvRhDo 47LAt/cmiIvAJ4m3TMDZI6wap29u7UVF0fLNuAJPjH+1h96o1+ILi7LxepZrWQ== 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 4Xpjqm4p6QzK02; Thu, 14 Nov 2024 01:53:56 +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 4AE1ruAj055257; Thu, 14 Nov 2024 01:53:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE1ruWL055254; Thu, 14 Nov 2024 01:53:56 GMT (envelope-from git) Date: Thu, 14 Nov 2024 01:53:56 GMT Message-Id: <202411140153.4AE1ruWL055254@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: ce5b0b7b991f - stable/14 - LinuxKPI: 802.11: hookup net80211 callbacks dependent on (*ampdu_action)() 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/stable/14 X-Git-Reftype: branch X-Git-Commit: ce5b0b7b991f302fe1caef0bdbd838c743e6361b Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ce5b0b7b991f302fe1caef0bdbd838c743e6361b commit ce5b0b7b991f302fe1caef0bdbd838c743e6361b Author: Bjoern A. Zeeb AuthorDate: 2024-01-27 13:24:27 +0000 Commit: Bjoern A. Zeeb CommitDate: 2024-11-14 01:53:12 +0000 LinuxKPI: 802.11: hookup net80211 callbacks dependent on (*ampdu_action)() If a LinuxkPI base wireless driver does not support the (*ampdu_action)() ieee80211_ops function for offloading parts to firmware there is no reason for us to hook into the net80211 callbacks either but simply to let software (net80211) handle this. Sponsored by: The FreeBSD Foundation (commit) (cherry picked from commit 86bc7259d3d558495511a0a23d137b4a6cd030f3) --- sys/compat/linuxkpi/common/src/linux_80211.c | 56 +++++++++++++++------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b0ad1dee4784..1a07ef0a82fe 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -1,6 +1,6 @@ /*- * Copyright (c) 2020-2024 The FreeBSD Foundation - * Copyright (c) 2020-2022 Bjoern A. Zeeb + * Copyright (c) 2020-2024 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -4681,30 +4681,36 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw) ic->ic_node_free = lkpi_ic_node_free; #ifdef LKPI_80211_HT - lhw->ic_recv_action = ic->ic_recv_action; - ic->ic_recv_action = lkpi_ic_recv_action; - lhw->ic_send_action = ic->ic_send_action; - ic->ic_send_action = lkpi_ic_send_action; - - lhw->ic_ampdu_enable = ic->ic_ampdu_enable; - ic->ic_ampdu_enable = lkpi_ic_ampdu_enable; - - lhw->ic_addba_request = ic->ic_addba_request; - ic->ic_addba_request = lkpi_ic_addba_request; - lhw->ic_addba_response = ic->ic_addba_response; - ic->ic_addba_response = lkpi_ic_addba_response; - lhw->ic_addba_stop = ic->ic_addba_stop; - ic->ic_addba_stop = lkpi_ic_addba_stop; - lhw->ic_addba_response_timeout = ic->ic_addba_response_timeout; - ic->ic_addba_response_timeout = lkpi_ic_addba_response_timeout; - - lhw->ic_bar_response = ic->ic_bar_response; - ic->ic_bar_response = lkpi_ic_bar_response; - - lhw->ic_ampdu_rx_start = ic->ic_ampdu_rx_start; - ic->ic_ampdu_rx_start = lkpi_ic_ampdu_rx_start; - lhw->ic_ampdu_rx_stop = ic->ic_ampdu_rx_stop; - ic->ic_ampdu_rx_stop = lkpi_ic_ampdu_rx_stop; + /* + * Only attach if the driver/firmware supports (*ampdu_action)(). + * Otherwise it is in the hands of net80211. + */ + if (lhw->ops->ampdu_action != NULL) { + lhw->ic_recv_action = ic->ic_recv_action; + ic->ic_recv_action = lkpi_ic_recv_action; + lhw->ic_send_action = ic->ic_send_action; + ic->ic_send_action = lkpi_ic_send_action; + + lhw->ic_ampdu_enable = ic->ic_ampdu_enable; + ic->ic_ampdu_enable = lkpi_ic_ampdu_enable; + + lhw->ic_addba_request = ic->ic_addba_request; + ic->ic_addba_request = lkpi_ic_addba_request; + lhw->ic_addba_response = ic->ic_addba_response; + ic->ic_addba_response = lkpi_ic_addba_response; + lhw->ic_addba_stop = ic->ic_addba_stop; + ic->ic_addba_stop = lkpi_ic_addba_stop; + lhw->ic_addba_response_timeout = ic->ic_addba_response_timeout; + ic->ic_addba_response_timeout = lkpi_ic_addba_response_timeout; + + lhw->ic_bar_response = ic->ic_bar_response; + ic->ic_bar_response = lkpi_ic_bar_response; + + lhw->ic_ampdu_rx_start = ic->ic_ampdu_rx_start; + ic->ic_ampdu_rx_start = lkpi_ic_ampdu_rx_start; + lhw->ic_ampdu_rx_stop = ic->ic_ampdu_rx_stop; + ic->ic_ampdu_rx_stop = lkpi_ic_ampdu_rx_stop; + } #endif lkpi_radiotap_attach(lhw);