Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp2422252rbb; Wed, 28 Feb 2024 00:57:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWda84W79xdNd0CBus/LELP1lWMGRM6QuH50dmTJu1qSzmtEbWUldJQL/dyCwnz09wiIuye/QORljH52pB6reg+wHe4kTW9xHdqs5b6tQ== X-Google-Smtp-Source: AGHT+IFlTl6alacem1b1p8A7ifr0uQHcZ7M/auIS1os3qT2Z7PH1rjuYRQEH5AJb8ykwuVhRl349 X-Received: by 2002:a17:903:244e:b0:1dc:c45c:5d24 with SMTP id l14-20020a170903244e00b001dcc45c5d24mr2944743pls.4.1709110651089; Wed, 28 Feb 2024 00:57:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709110651; cv=pass; d=google.com; s=arc-20160816; b=x9qSsw3UiQa1GWd0qvj2QXj9IeUevVA9MsZcnTnqOaYpr5dbcyZwGseLGzZf93SXYU 4YkfvpylUEWPJaBJKOw1p9Y48dSdN4ny5UdhMUVAB7IpzNtWDInIN126gqm74n9rcVbw rNt1NRU1PCAi0PHrjtR207VZR2TqInIOm+a0o6pKSUPZkpykx5lEIUWkKgbrEoiD+wTI 385AAkxVAr18Aer/cMMGV8czKQ6dZ17PEgqqn4kGAnTBkGSypsp4XvDf74lI73SGAiqV h+HPgY7SirFKaK/dna2P7c61MwxJIkpYJ4QU33430o0VLKE2o9ILehvjW1QvRkOIYimV P0cw== 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=j5oxcJP2A8Odjp+ntNsOu7pyOW3a2wG4g7laIEkEmao=; fh=0ZKV22Mpi0Z+/zRlCC9GRUAKl0wLMxmYgR1nXO1NAEs=; b=g+0EvAycD5xGVh121Zy5O4ELQwSXh1U+0pjG2hsDQb2uhjj4R79EYaiN8n/pHWVR3D /Pelc7VrjV9n8CaK2wGCxeuANODkR/ZVbdG1X0uYNpLwGtzmzvzBQAKWiSmkgVe7S5E3 H3jJmIBfHKU3Tjl1gkvkSzPmS/Rsf8xI7YrPVumO7j4kXcFcfSs9OS8EXZSLMw7084MB 9BO3wudwOrvYtkvLywTRGrIeqqf9muVJWMSsnlFTe6xhHnW2AX78CgkaruCBoQ3aP4Tz 2C4I9qhTwJYeaG4JoheCTfnPFDlUm9Dn6TpR5IZCzgkwG3n3MOlPcIKahuRFK2rYdUmg j5pA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=h7wdCHUj; 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-4147-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4147-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l7-20020a170903244700b001db82e38d83si2947253pls.10.2024.02.28.00.57.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 00:57:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4147-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=h7wdCHUj; 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-4147-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4147-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 442D0B26933 for ; Wed, 28 Feb 2024 08:49:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B58A72E642; Wed, 28 Feb 2024 08:49:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="h7wdCHUj" 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 173B32D61A for ; Wed, 28 Feb 2024 08:49:09 +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=1709110151; cv=none; b=Z+mF8V9QnVVqpodnYvxZuNaAuA5vBdvgnAeuUrzTzHMb+bJ04Lc24MS5IkYoGEYoWl4RbAaj3EcLgRJTdGlCtHNKx6FWB9m1GA8eT5EBbtmlmfYpmX78ZboYOZYoZXhFC0Rz1+ER3FfCthEZS6yWUugfrkx1NlPayoIOVUi92So= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709110151; c=relaxed/simple; bh=hOinKWtUg5W4CrkwaEyr458E8imU8uIRCSZhyha97rM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=izPkyz8bpCr5zJQL6TUak25rd84TBfoYJqi1U1Fpq7RmgDUCoOOZ+QSTDqaNL7kATGMeqtt6PlKd6uoeNYjfKEyjRmCB54hXLi8+3d0eSPCibh6UX5Eq4g9qeTWittkhEA//98MQvzPm/eietCnNwTDI+Mp6dGZdk7G6lVAF8hY= 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=h7wdCHUj; 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=j5oxcJP2A8Odjp+ntNsOu7pyOW3a2wG4g7laIEkEmao=; t=1709110150; x=1710319750; b=h7wdCHUjj4Otbd6jlKOGe9yhZCOA77ZPFlTd8yxJ5clNKOl olX6CwSB8dl5oTv6qrhjY0JUKS0+QmpDVihWesl/xdqCKxq9xSdWynbXkfAM6duACLzoH9rEE4Lb9 rP9ZBfcENw0D2aM3uyMPF0BnZugoUjgecvoL8aaV8xMs9QcBd0dehJ32pM6vzeIsW52dEgIvKGUuE YgsuD4l3b6iDcI5grbdzAMoyGxshAexqWs6NNs2V7/8qAF9tVLGW4EREVALz/IOsHH7QjVpdTYghU yosOVk0ZcOIaUPyi5ju2IT+h6h594p/T35du51GSOgieH/aEjv13vBWzr3+BriwA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rfFch-0000000C0BC-1RZf; Wed, 28 Feb 2024 09:49:07 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit Subject: [PATCH 4/8] wifi: mac80211: remove unnecessary ML element checks Date: Wed, 28 Feb 2024 09:48:12 +0100 Message-ID: <20240228094901.9e32c4b63875.Ia2ee0aafdc8a48bd21b485cc36a9866f950d781b@changeid> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240228084901.18661-10-johannes@sipsolutions.net> References: <20240228084901.18661-10-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 Given the prior changes to ieee80211_mle_size_ok(), we can now pass NULL to for_each_mle_subelement(), so no longer need to check for that here explicitly. Reviewed-by: Miriam Rachel Korenblit Signed-off-by: Johannes Berg --- net/mac80211/parse.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/mac80211/parse.c b/net/mac80211/parse.c index ae0f14bd952a..d231aaecc219 100644 --- a/net/mac80211/parse.c +++ b/net/mac80211/parse.c @@ -720,9 +720,6 @@ static void ieee80211_mle_get_sta_prof(struct ieee802_11_elems *elems, ssize_t ml_len = elems->ml_basic_len; const struct element *sub; - if (!ml || !ml_len) - return; - for_each_mle_subelement(sub, (u8 *)ml, ml_len) { struct ieee80211_mle_per_sta_profile *prof = (void *)sub->data; ssize_t sta_prof_len; -- 2.43.2