From: Christian Lamparter <chunkeey@gmail.com>
To: Tristan Madani <tristmd@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>,
Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Ivo van Doorn <ivdoorn@gmail.com>, Kees Cook <kees@kernel.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
tristan@talencesecurity.com
Subject: Re: [PATCH v2 wireless 1/3] wifi: carl9170: replace open-coded IE search with cfg80211_find_ie()
Date: Tue, 27 Oct 2026 19:43:55 +0100 [thread overview]
Message-ID: <c5f62e31-4e10-4200-b0bc-a737a3a7c161@gmail.com> (raw)
In-Reply-To: <20261026223202.2089824-1-tristan@talencesecurity.com>
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 <tristan@talencesecurity.com>
Sure!
Acked-by: Christian Lamparter <chunkeey@gmail.com>
> ---
> 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
prev parent reply other threads:[~2026-10-27 18:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-26 22:32 Tristan Madani
2026-10-27 18:43 ` Christian Lamparter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c5f62e31-4e10-4200-b0bc-a737a3a7c161@gmail.com \
--to=chunkeey@gmail.com \
--cc=ivdoorn@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=stf_xl@wp.pl \
--cc=tristan@talencesecurity.com \
--cc=tristmd@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®