From: Stanislaw Gruszka <stf_xl@wp.pl>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-wireless@vger.kernel.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH wireless-next] wifi: rt2x00: Use device-managed register buffers
Date: Thu, 23 Jul 2026 10:33:10 +0200 [thread overview]
Message-ID: <20260723083310.GC4577@wp.pl> (raw)
In-Reply-To: <20260717220052.824624-1-rosenp@gmail.com>
On Fri, Jul 17, 2026 at 03:00:52PM -0700, Rosen Penev wrote:
> The rt2x00 PCI and USB probe paths allocate EEPROM and RF storage with
> plain kzalloc() and then free it from bus-specific teardown helpers. The
> USB path also manages the CSR cache the same way. These buffers are
> tied to the device lifetime, so the explicit free paths add probe and
> disconnect cleanup without providing separate ownership.
>
> Allocate the buffers with devm_kzalloc() before the mac80211 hardware is
> allocated, then attach the resulting storage to struct rt2x00_dev after
> the driver-private state exists. This lets driver detach and probe
> failure rely on device-managed cleanup and removes the duplicated
> bus-specific buffer freeing.
>
> Assisted-by: Codex:GPT-5.5
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
> int rt2x00usb_probe(struct usb_interface *usb_intf,
> const struct rt2x00_ops *ops)
> {
> struct usb_device *usb_dev = interface_to_usbdev(usb_intf);
> - struct ieee80211_hw *hw;
> struct rt2x00_dev *rt2x00dev;
> + struct ieee80211_hw *hw;
> + __le16 *eeprom;
> + void *cache;
> int retval;
> + u32* rf;
Nit, u32 *rf;
Regards
Stanislaw
prev parent reply other threads:[~2026-07-23 8:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 22:00 [PATCH wireless-next] wifi: rt2x00: Use device-managed register buffers Rosen Penev
2026-07-23 8:33 ` Stanislaw Gruszka [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=20260723083310.GC4577@wp.pl \
--to=stf_xl@wp.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rosenp@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