public inbox for linux-wireless@vger.kernel.org
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Bitterblue Smith <rtl8821cerfe2@gmail.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: Sascha Hauer <sha@pengutronix.de>
Subject: RE: [PATCH] wifi: rtw88: usb: Simplify rtw_usb_write_data
Date: Fri, 3 May 2024 00:38:34 +0000	[thread overview]
Message-ID: <83295823271d4b3a8381e42d94a0c5d6@realtek.com> (raw)
In-Reply-To: <a4307823-f834-4cea-8206-6e966bb091ff@lwfinger.net>

Larry Finger <larry.finger@gmail.com> wrote:
> 
> On 5/2/24 4:23 PM, Bitterblue Smith wrote:
> > The skb created in this function always has the same headroom,
> > the chip's TX descriptor size. Use chip->tx_pkt_desc_sz directly.
> >
> > Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
> > ---
> > This is the patch I promised earlier:
> > https://lore.kernel.org/linux-wireless/cae2d330-a4fb-4570-9dde-09684af23ffd@gmail.com/
> > ---
> >   drivers/net/wireless/realtek/rtw88/usb.c | 14 +++++---------
> >   1 file changed, 5 insertions(+), 9 deletions(-)
> >
> > diff --git a/usb.c b/usb.c
> > index 1dfe7c6ae4ba..ff57976b9d3b 100644
> > --- a/usb.c
> > +++ b/usb.c
> > @@ -440,23 +440,21 @@ static int rtw_usb_write_data(struct rtw_dev *rtwdev,
> >   {
> >       const struct rtw_chip_info *chip = rtwdev->chip;
> >       struct sk_buff *skb;
> > -     unsigned int desclen, headsize, size;
> > +     unsigned int size;
> >       u8 qsel;
> >       int ret = 0;
> >
> >       size =pkt_info->tx_pkt_size;
> >       qsel = pkt_info->qsel;
> > -     desclen = chip->tx_pkt_desc_sz;
> > -     headsize = pkt_info->offset ? pkt_info->offset : desclen;
> >
> > -     skb = dev_alloc_skb(headsize + size);
> > +     skb = dev_alloc_skb(chip->tx_pkt_desc_sz + size);
> 
> When I added code to test if chip->tx_pkt_desc_sz was equal to
> pkt_info->tx_pkt_size at entry, it reported that there was a difference.

This patch didn't touch pkt_info->tx_pkt_size. Instead, I expected
pkt_info->offset was equal to chip->tx_pkt_desc_sz or 0.
(I replied the reason why it doesn't work by another mail in the same thread.)



  reply	other threads:[~2024-05-03  0:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 21:23 [PATCH] wifi: rtw88: usb: Simplify rtw_usb_write_data Bitterblue Smith
2024-05-02 22:18 ` Larry Finger
2024-05-03  0:38   ` Ping-Ke Shih [this message]
2024-05-03  9:53   ` Bitterblue Smith
2024-05-03  0:35 ` Ping-Ke Shih
2024-05-03 10:13   ` Bitterblue Smith

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=83295823271d4b3a8381e42d94a0c5d6@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=rtl8821cerfe2@gmail.com \
    --cc=sha@pengutronix.de \
    /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