From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.53 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793126638; b=lRLD96Fr37znSAaBwA+5t2IdtAbp05mj5Ub+djOSSsjTRFdJa2a86zrjoKYH/cPGGu5j 6FHv0Z0ghT2MAi2fUXwHo83HQyBKjxojeSiFlU95o4wZkzv//l1LCvU6otVOuGLzueHMX ihHawN1w3MU2tdRQtR5EezZ22Ur9sCK5si6MnvTOVIner3deh6tCbb/H/8KmI2Ez02A94 rCyKPweGIFoHXfv+U8cbutU83d01wx5+EIkcHTvLEtPfc0IFWDWr9K5Ts+6UW8Hpd5jSk +5iz0+CUSN4cnHqjh+aqkpgKx7VnZoc7UAQgbouB6C75gWxLVBIYq6y6cvzZ1sF/HWA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793126638; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Received:Message-ID:Date:MIME-Version:User-Agent:Subject: Content-Language:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=mgdYMJyAkUlwT7RfESxpZUFd0c3Pn7YULHqUey2cwFc=; b=tLKsDDvAay77OVdV4XahSouenMS9Du+WPg80R6Dsa0eMCJSo/1tQWaLNguH0xD9YpcXo AgbX6K7jGLzuTpTPE/CNpZo6pLgHJF2TZBUuADnxFQsIi0cASfoIBz+TMyC1315AmLfQL 9jnHKowaR22xdP07cJTJrQXJb016hC7xcgguuMA3z5KoZcOQr+sxJbOOrFzLKYINwirwo AZX2vkoD/BPANJRolw6fHYtdGIhRAPebTM8EKca6Lrh5e+4Ee/bAzjqlvTVT/4Hl8ucJr S6E+pMQKmJIT1/TzKFOi+lMXXSTN2RFibmoLoz1f49WqYOq//AKPTow2Y4KhpbOwWIQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=qPwm5oar; arc=none smtp.remote-ip=209.85.221.53 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 857EC606A323 for ; Tue, 27 Oct 2026 18:43:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 857EC606A323 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=qPwm5oar Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-48df4e9d2d4so99503f8f.3 for ; Tue, 27 Oct 2026 11:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1793126637; x=1793731437; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=mgdYMJyAkUlwT7RfESxpZUFd0c3Pn7YULHqUey2cwFc=; b=qPwm5oar98PCQlwDOw9kJrG8AWB47g668VVfH+h+9LwHytAQ4tJkuRB1WoUoh1KZGg QJIAqVpw8pKBMv8ou7w8bbLf3+tPI6i4XpYPd4LDLbCvTspp+mVvpwvEhVWUc+kp/cJy H8tH2zi54+V7YyyFeTS2VFXZGNzHomQ6ZIQMT80lDlwJc0Rbahoj+UOcVArQISa2okM8 XWk49/mw2j0AHpY1/wfZAhClWQAI0/2gZjHmoC0yT6jBdS4biWBm6L3B7MtNvVsQehwG SmTcbK3nM5EnmblQPBcABDqycE0BWHzrZw4udwEyjMkfPy7KTKahaH9J0UqnYab/Movg 6AFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793126637; x=1793731437; h=content-transfer-encoding:content-type:in-reply-to:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=mgdYMJyAkUlwT7RfESxpZUFd0c3Pn7YULHqUey2cwFc=; b=LyR9MqSlQqVbHpTaKQvae+pAxI7FMGtlwF+mFLga6q5Ukm174a6kPGn9Y/8X0bsvY0 bSDI9e/IxILwScgNrNAvMoUh9KorL1BmMkK8oKhDrljKQBll4QN3dB2ykg96PC8x3eFQ lYHSiMSyj9VK5COcDvwTAu2eNl1+ojfikb1py273fD0t0VNl/uOlZjKp3cWOLOXV+XoG zT6hAruI0S9/5ZjgacUFST6XeyjH1RegZ0uHAp+5bnLdU3AbR0V5rmnM2TOmwtueNOtk MKsPDrJb6UbNYi95fgnCqJarECIWAHEumU5j3UZcQAxRsN02k9xf0cwdPDpfKekINv8b 0TeQ== X-Forwarded-Encrypted: i=1; AKwUvBwMTndDUk/R2FC1xjhhpcrAObLtshQVyFe0g/Ndcrka+NGu+wvlnLWLYhvSa3sCyA+OAGfDcUfY5GuktDE=@vger.kernel.org X-Gm-Message-State: AFq9FYJAl1vFOE5FQBJQVf0aBwhG/lvVnUjPvRO3NyHbBlR34iX9rASZ tAVm8/4g6eBbMxeXO2LyG81pKtJ7eU41IkKHclFREkZlaa8WWXTTIxKK X-Gm-Gg: AYBFou39o85meWWOfZclaVZB77E4ViZxtshW7p9Z+AcSPz8nGN7iy7FR+dpMcgdu0nT 7JAA+DuuZs37ahWRRs8bEvCDr5S23yPljMg9DkXturWFbEpVIhh07DaF9zM35EKLzrudFNejxVV ENq4jcsMnE2Tnbq6Eyj18Tz3uFvm/f08JfiHGKyAODSEEpkJVxEB0bqHsX8fedIkdC+++zqN8iD dbSw21mv6zY54ZvwnxqL9JoTPh/lLuv3oY659Q3zg7vgoYkybm2+bF30nPeqEwSKEQDzNVMINWk vap9Ch+mBbNRPUOPuMOuQIn7ALZAkdhA6FZMs2WocFVDXnu2Cy5j0A+rlhs7anL//aBr5dMNbU2 /VsayHQRpwduGq9C3dGcUBRPn6lOBUe8qNyKs58Cec4Zp7hnv7vEyt010B5zGW6wpD93m7Ftmy0 d3LynCKK0hdFzwJvdcCff+btgxhgeHed7sK+dbfA5WFiFIpW+8PoQfLJLT3GnhMKAezriC++WcD HJ48tXgZjal5ucdmC60GtpiyHelbvfDWOUmXTPThELAIBaNpmoYttOJqdVNUyKj8dd3VPHl+W2V wAAMQCZKDg+hC9bpIpK8HiiltHKRvycOpAkA/wPfedhz+Lb+sg== X-Received: by 2002:a5d:4e46:0:b0:48d:f36e:fbcb with SMTP id ffacd0b85a97d-48e5d58f60cmr502427f8f.14.1793126636649; Tue, 27 Oct 2026 11:43:56 -0700 (PDT) Received: from shift (p200300d5ff07190050f496fffe46beef.dip0.t-ipconnect.de. [2003:d5:ff07:1900:50f4:96ff:fe46:beef]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e3ecde7c3sm25746227f8f.51.2026.10.27.11.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2026 11:43:56 -0700 (PDT) Received: from localhost ([127.0.0.1]) by shift.daheim with esmtp (Exim 4.100.1) (envelope-from ) id 1xLm9K-000000002yU-1lce; Tue, 27 Oct 2026 19:43:55 +0100 Message-ID: Date: Tue, 27 Oct 2026 19:43:55 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 wireless 1/3] wifi: carl9170: replace open-coded IE search with cfg80211_find_ie() Content-Language: de-DE To: Tristan Madani , Johannes Berg , Stanislaw Gruszka Cc: Ivo van Doorn , Kees Cook , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, tristan@talencesecurity.com References: <20261026223202.2089824-1-tristan@talencesecurity.com> From: Christian Lamparter In-Reply-To: <20261026223202.2089824-1-tristan@talencesecurity.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 10/26/26 11:32 PM, Tristan Madani wrote: > carl9170_find_ie() open-codes the IE search that cfg80211_find_ie() > already provides. Replace the hand-rolled function with > cfg80211_find_ie() at the single call site. > > Fixes: a84fab3cbfdc4 ("carl9170: 802.11 rx/tx processing and usb backend") > Signed-off-by: Tristan Madani Sure! Acked-by: Christian Lamparter > --- > drivers/net/wireless/ath/carl9170/rx.c | 27 ++++++-------------------- > 1 file changed, 6 insertions(+), 21 deletions(-) > > diff --git a/drivers/net/wireless/ath/carl9170/rx.c b/drivers/net/wireless/ath/carl9170/rx.c > index fbe46a5e4e415..9db6ac9d6d3c0 100644 > --- a/drivers/net/wireless/ath/carl9170/rx.c > +++ b/drivers/net/wireless/ath/carl9170/rx.c > [...]> @@ -541,7 +523,10 @@ static void carl9170_ps_beacon(struct ar9170 *ar, void *data, unsigned int len) > > ar->ps.last_beacon = jiffies; > > - tim = carl9170_find_ie(data, len - FCS_LEN, WLAN_EID_TIM); > + tim = cfg80211_find_ie(WLAN_EID_TIM, mgmt->u.beacon.variable, > + (len - FCS_LEN) - > + offsetof(struct ieee80211_mgmt, > + u.beacon.variable)); nit: If there ever will be a v3. You could consider that the 80 characters per line is not a strict rule. This is straight out of "Documentation/process/maintainer-tip.rst: "The 80 character rule is not a strict rule, so please use common sense when breaking lines. Especially format strings should never be broken up." my 2ยข: tim = cfg80211_find_ie(WLAN_EID_TIM, mgmt->u.beacon.variable, len - FCS_LEN - offsetof(struct ieee80211_mgmt, u.beacon.variable)); Cheers, Christian