linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: linux-wireless@vger.kernel.org, Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
	Ryder Lee <ryder.lee@mediatek.com>, Roy Luo <royluo@google.com>,
	Markus Theil <markus.theil@tu-ilmenau.de>
Subject: Re: [PATCH 1/3] mt76: usb: use max packet length for m76u_copy
Date: Fri, 29 Nov 2019 15:11:25 +0200	[thread overview]
Message-ID: <20191129131125.GF32696@localhost.localdomain> (raw)
In-Reply-To: <20191129130630.GA2497@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

> On Fri, Nov 29, 2019 at 02:47:44PM +0200, Lorenzo Bianconi wrote:
> > > +	usb->data_len = usb_maxpacket(udev, usb_sndctrlpipe(udev, 0), 1);
> > > +	if (usb->data_len < 32)
> > > +		usb->data_len = 32;
> > 
> > Hi Stanislaw,
> > 
> > 	usb->data_len = max_t(u16, 32,
> > 			      usb_maxpacket(udev, usb_sndctrlpipe(udev, 0), 1));
> > 
> 
> Why this is better ?

More readable for my point of view

> 
> > Moreover are you sure using ctrl endpoint 0 is fine for all devices?
> 
> usb_sndctrlpipe(udev, 0) is used in __mt76u_vendor_request() for all 
> out requests i.e. on all cases were usb->data is used.

ops, right :) Thx for for pointing this out.

Regards,
Lorenzo

> 
> Stanislaw 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2019-11-29 13:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 12:32 [PATCH 0/3] mt76: some further beaconing optimizations and cleanups Stanislaw Gruszka
2019-11-29 12:32 ` [PATCH 1/3] mt76: usb: use max packet length for m76u_copy Stanislaw Gruszka
2019-11-29 12:47   ` Lorenzo Bianconi
2019-11-29 13:06     ` Stanislaw Gruszka
2019-11-29 13:11       ` Lorenzo Bianconi [this message]
2019-11-29 12:32 ` [PATCH 2/3] mt76: mt76x02u: do not set NULL beacons Stanislaw Gruszka
2019-11-29 12:32 ` [PATCH 3/3] mt76: mt76x02: minor mt76x02_mac_set_beacon optimization Stanislaw Gruszka

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=20191129131125.GF32696@localhost.localdomain \
    --to=lorenzo@kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=markus.theil@tu-ilmenau.de \
    --cc=nbd@nbd.name \
    --cc=royluo@google.com \
    --cc=ryder.lee@mediatek.com \
    --cc=sgruszka@redhat.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;
as well as URLs for NNTP newsgroup(s).