Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3149014lqo; Wed, 15 May 2024 00:41:03 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVqn0MxH99yFJLpqJ3TWNUR/0ETTFoOeQV/POj9eTaC2s5Tls4RkA0f1PJ9TKQKXQz5Ex7wZC/Oq8MzDmggZjWQio+XMcClqcy1YzHr6w== X-Google-Smtp-Source: AGHT+IGDMOIFl9lGlV4k09nfwROBj6QntArTx98D/b+M3BDG/c5PjeQX6TmdDugcG0PFFDrRAlD8 X-Received: by 2002:a05:6808:219c:b0:3c9:6f28:f306 with SMTP id 5614622812f47-3c9970bd210mr20031538b6e.40.1715758863710; Wed, 15 May 2024 00:41:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715758863; cv=pass; d=google.com; s=arc-20160816; b=njkBAygfMnTddiTe2BclIWocCNctU8cSqFRSu0a0EtwcMzjFsndCkL1BqLO23RTzTi yzw3p078+k+LwaTnI55lNBZuO1WUH9Qk9K281rNGvs8OU5klR6B0WnCeoPdFIrW0zHEc zPB2x0Z5vR3FQdEgHCE39087mn6j8hC+kCm4kkI7euGqw1wriHvbsw+60HUr8L0dgtqp q1fqPQBW15EorG+tOBkwFIWkQDgGxB00upIpqKH6Wusvy+jIq7tM0A3eN+cuwvP9e+ox HSO30ZG93z5mZFHSVeRZNf4QZjC8/jTTw/6A7l3P4LfPRge6lWSf8KJ6YxzxzUgb8yfE TaQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X9WTqttk+8SrOJn82P1W7v6AhIuayiPTDGMBySZ37ac=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=LoFVeYEFJBzO8N/yRDmqNo35tHVaovk54+FNn6Sz4CZkXJYfCPGBJ3zjzR6uYx3/um RhU18H6v/j3FUuMgAcCA3+wQhHyO5y4x6WcEWRDyWsFKXEdlgyZxIWyu3QcqYcPS6Pga e34GliJDYtbPgUwoSEa/gBEEFiCeTDEz4I7XzDOqNOz8ucFo0i2nOsydtG/+rbW2OQGF OYoJTWO6qkr3/AOUAwA+AoO1pkY7eJQyi7TjRZQ6Asvy4MJtO0cV/v3UhqvVYlULQ8TP mIcAOFFypeEuR97f7wZTzkCUnx3JpgVHC7WpJgGWa3hUfC2i+ZjL5oocJSXdGcRN9lah T3sA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Pnpvm8oJ; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7673-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-634103f7038si12726639a12.393.2024.05.15.00.41.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 00:41:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=Pnpvm8oJ; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7673-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7673-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 5DC8DB22B73 for ; Wed, 15 May 2024 07:39:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E211C4AEF4; Wed, 15 May 2024 07:39:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="Pnpvm8oJ" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0F86847F78 for ; Wed, 15 May 2024 07:39:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715758749; cv=none; b=bM32BUJZ4JNbqJNWdPwBP9iQ3ex7x9xgUnZADHsEneSfHrwyb1UmS8cqMD1p9Ewk2SES4ovvIkaOhGULIJPxnsQEppUEIlPtJ0EzhiM0z+uC25zFknHIBtM/JLm22o/1/6LJkcEwplqsg0Onl2kTiYiWliIIZmBLgEkzQLYKESw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715758749; c=relaxed/simple; bh=yq1Mq2gs0gC0KAxEjFCmGz91agtgyakecfU/RP5JT70=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oOdlHfEugOT0P6EUk3SiZWKJQoARF/V0NwkS7rewkPY6j0LdHucN7abQZMxXvqQ1qV9SKkgaPKIcAOlWM0x5lKljuWqVV1fSuO9MwiAWFdl9Yd2dB1nhgzBqzf/A4zdfRf8eEAYU5sl7icRw7cts/5MQabPH2r8nWtol1cbofCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=Pnpvm8oJ; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=X9WTqttk+8SrOJn82P1W7v6AhIuayiPTDGMBySZ37ac=; t=1715758748; x=1716968348; b=Pnpvm8oJPVuTzWrF2byYP/PRZpZLrxqdj+Ic/tpJqBSOfpj iqB9tt+lcXA5LvfIVMOnAOqhSpQR83nfWi+4ffLKbkT/jaR9+MTuL2SPVWDrY4zFmGLYwfVuQqB6V Ier9VsGZQB4fP/v9KZA04CzghCoJQpBAGcHIj8sLHnggdGImbHghmfJVHrJxzS9VhOfnyqdSjQiS3 0t5WXlbZfUAt+TyMlYBkmLqTsEpEVEfrFd9dmAGd7WwZN/FszYVp9QB1mcKdqbimq+QsdRkqeUG10 D940f6W1bkEkAQripoPiT5/UhHg4GtcUdkfPXB48iv6gqLvZ/LtBfUlCAg/lHNNg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1s79E9-000000063rL-36X3; Wed, 15 May 2024 09:39:05 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH 4/6] wifi: ieee80211: remove ieee80211_next_tbtt_present() Date: Wed, 15 May 2024 09:38:38 +0200 Message-ID: <20240515093852.774ced74dea8.I152525b4cff6e6a25be6c48fe6a4b89f17bab8a9@changeid> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240515073852.11273-8-johannes@sipsolutions.net> References: <20240515073852.11273-8-johannes@sipsolutions.net> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg This is actually completely equivalent to the other function ieee80211_is_s1g_short_beacon(), but open-codes the logic. Implement the necessary logic in ieee80211_is_s1g_short_beacon() and remove ieee80211_next_tbtt_present(). Signed-off-by: Johannes Berg --- include/linux/ieee80211.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 713266ce48a7..72b351abb4f6 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -604,25 +604,15 @@ static inline bool ieee80211_is_s1g_beacon(__le16 fc) } /** - * ieee80211_next_tbtt_present - check if IEEE80211_FTYPE_EXT && - * IEEE80211_STYPE_S1G_BEACON && IEEE80211_S1G_BCN_NEXT_TBTT - * @fc: frame control bytes in little-endian byteorder - */ -static inline bool ieee80211_next_tbtt_present(__le16 fc) -{ - return (fc & cpu_to_le16(IEEE80211_FCTL_FTYPE | IEEE80211_FCTL_STYPE)) == - cpu_to_le16(IEEE80211_FTYPE_EXT | IEEE80211_STYPE_S1G_BEACON) && - fc & cpu_to_le16(IEEE80211_S1G_BCN_NEXT_TBTT); -} - -/** - * ieee80211_is_s1g_short_beacon - check if next tbtt present bit is set. Only - * true for S1G beacons when they're short. + * ieee80211_is_s1g_short_beacon - check if frame is an S1G short beacon * @fc: frame control bytes in little-endian byteorder + * Return: whether or not the frame is an S1G short beacon, + * i.e. it is an S1G beacon with 'next TBTT' flag set */ static inline bool ieee80211_is_s1g_short_beacon(__le16 fc) { - return ieee80211_is_s1g_beacon(fc) && ieee80211_next_tbtt_present(fc); + return ieee80211_is_s1g_beacon(fc) && + (fc & cpu_to_le16(IEEE80211_S1G_BCN_NEXT_TBTT)); } /** -- 2.45.0