From nobody Wed May 04 15:18:13 2022 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 2B1F81AB1630; Wed, 4 May 2022 15:18:14 +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 4KtgSj6bkPz3s5t; Wed, 4 May 2022 15:18:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651677494; 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=Z9tcqxCxWaOiYoSILlIRRtrXEwbrIomIldLq+Ul8hUQ=; b=jfgtzGOp00RRK1nUWHrzpLxwZ1N2KSBoVTg7iDDNNdITbMcqyC5v2saQ9VHmQwYpa9V3BR wwXg+fCmbW2aBrfUeOzofFCc6Jd3dWfkigrZpXL9kakEmiIedd5MI4Th5Q/7J6gL4Xt0nP K23L2itGZCUq9TKG/k4HSqpkWRfWqmiawGOzw+TV28jHsHRzjLTAI5ioo/99xw3nwk6nEa gGdhPtgwCWBbahgno8zCKkde937vkvnsSAINGXlq7YK0v9doJNYmI9MZqH2rnWfI9nmG4s kdcamu99DCokZcPQCiTQeYisSh/qpYev8d72dTj2jev6jKp+2jKEB5TtENgJuw== 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 A4EC8153AB; Wed, 4 May 2022 15:18:13 +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 244FIDkl020302; Wed, 4 May 2022 15:18:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 244FIDbl020301; Wed, 4 May 2022 15:18:13 GMT (envelope-from git) Date: Wed, 4 May 2022 15:18:13 GMT Message-Id: <202205041518.244FIDbl020301@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: 596167005078 - stable/13 - LinuxKPI: 802.11: fill in two more TODOs 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/13 X-Git-Reftype: branch X-Git-Commit: 5961670050788ecfe208f455b32becf5e1bbfaeb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651677494; 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=Z9tcqxCxWaOiYoSILlIRRtrXEwbrIomIldLq+Ul8hUQ=; b=n4xFXggLEIa7biyVNRpHTV5XTaHGHOpQXNCX82vq9dKW+cSIPoc5ir1gahUzJW/8ObkKga Hdoda0S5VpFf36d3SzJm0O+O0QJBR01NOPmkSivIW7+FaGoXakXe3/UyvAzmoFn+IXCugM XnAxt8y2gR+x/d9YjIuP7RGT/bw/y8I/QpEluvmMINNp51GW7VMMy0TkVY/Tx3fBdfHTNx OCeHPAx36BJbWktkNp9TvD7Rgb87fp9thmlExyu/zU/AgBM3BZOfAXsblCwXE/Ou58tW0R RLQghFFeBIt3DjGVxQtMKBh9dNRncwTYh9Cz+zzGodzRaGl954TqoXCNBIr9VQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651677494; a=rsa-sha256; cv=none; b=MMm0/aEeKhUPc8Sk+0Lprel8nA8t5PtpNVQr4q//Wx7SdM9oToo9fxt7dFtbzYC1YMHdXB s0E1XnqKKx4IrQbA9+14SUOvYGyQ1HFCrGCZsQjMQX02Ysihug1IcvMqH8HGka1j65RvGh MIPTnkRd8xJEHAT0QUbX4sxWr7uztl6FIvAGJsOZbVzItKbXiT+guvdiPOojPNnNBV5F/W y3dTS7H2/T7KX+M4oJdmRZuI8Jh8iUwvqM4nwzg1BacWZoQBiHwpcyU3eRaQqjPbQHxMEw 5m08KAehewrw1geqoQw4NhT/6QVTNnipO5zNfflI59U2+Nt/+GvVd1wCmThhyQ== 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=5961670050788ecfe208f455b32becf5e1bbfaeb commit 5961670050788ecfe208f455b32becf5e1bbfaeb Author: Bjoern A. Zeeb AuthorDate: 2022-04-30 08:00:04 +0000 Commit: Bjoern A. Zeeb CommitDate: 2022-05-04 13:13:11 +0000 LinuxKPI: 802.11: fill in two more TODOs Implement ieee80211_is_data_present() and a subset of ieee80211_is_bufferable_mmpdu() which hopefully is good enough in the compat code for now. This is partly in preparation for some TXQ changes coming up soon. Sponsored by: The FreeBSD Foundation (cherry picked from commit 00614c9c2ddc34f3f9061e87542efb4edbd936a9) --- sys/compat/linuxkpi/common/include/net/mac80211.h | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/net/mac80211.h b/sys/compat/linuxkpi/common/include/net/mac80211.h index c62ab1fbaa72..857fa0a9bb03 100644 --- a/sys/compat/linuxkpi/common/include/net/mac80211.h +++ b/sys/compat/linuxkpi/common/include/net/mac80211.h @@ -1102,8 +1102,13 @@ ieee80211_is_disassoc(__le16 fc) static __inline bool ieee80211_is_data_present(__le16 fc) { - TODO(); - return (false); + __le16 v; + + /* If it is a data frame and NODATA is not present. */ + fc &= htole16(IEEE80211_FC0_TYPE_MASK | IEEE80211_FC0_SUBTYPE_NODATA); + v = htole16(IEEE80211_FC0_TYPE_DATA); + + return (fc == v); } static __inline bool @@ -1166,7 +1171,19 @@ ieee80211_is_back_req(__le16 fc) static __inline bool ieee80211_is_bufferable_mmpdu(__le16 fc) { - TODO(); + + /* 11.2.2 Bufferable MMPDUs, 80211-2020. */ + /* XXX we do not care about IBSS yet. */ + + if (!ieee80211_is_mgmt(fc)) + return (false); + if (ieee80211_is_action(fc)) /* XXX FTM? */ + return (true); + if (ieee80211_is_disassoc(fc)) + return (true); + if (ieee80211_is_deauth(fc)) + return (true); + return (false); }