From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
george0505 <george0505@realtek.com>,
"'Zhaoming_Li'" <chaoming_li@realsil.com.cn>
Subject: Re: [RFC/RFT 1/8] rtlwifi: Prepare core for addition of USB driver
Date: Fri, 4 Feb 2011 07:29:41 +0100 [thread overview]
Message-ID: <20110204062940.GA2222@redhat.com> (raw)
In-Reply-To: <4D4B7D92.7000402@lwfinger.net>
Hi Larry
On Thu, Feb 03, 2011 at 10:16:18PM -0600, Larry Finger wrote:
> >> +static int _usbctrl_vendorreq_async_write(struct usb_device *udev, u8 request,
> >> + u16 value, u16 index, void *pdata,
> >> + u16 len, u8 requesttype)
> >> +{
> >> + int rc;
> >> + unsigned int pipe;
> >> + u8 reqtype;
> >> + struct usb_ctrlrequest *dr;
> >> + struct urb *urb;
> >> + struct rtl819x_async_write_data {
> >> + u8 data[REALTEK_USB_VENQT_MAX_BUF_SIZE];
> >> + struct usb_ctrlrequest dr;
> >> + } *buf;
> >> +
> >> + if (requesttype == VENDOR_READ) {
> >> + pipe = usb_rcvctrlpipe(udev, 0); /* read_in */
> >> + reqtype = REALTEK_USB_VENQT_READ;
> > This is not needed, or function should be named differently not _async_write.
>
> This one I do not understand. The function does do an asynchronous write. Please
> explain.
If function do "write", then requesttype argument should be removed, and
dr->bRequestType = REALTEK_USB_VENQT_WRITE should be hardcoded.
> >> + wvalue = (u16)(addr&0x0000ffff);
> >> + _usbctrl_vendorreq_sync(udev, request, wvalue, index, data, len,
> >> + requesttype);
> >> + ret = (le32_to_cpu(*data) & (0xffffffff >> ((4 - len) * 8)));
> > Ok, BYTEMASK can be used, but what mean this magic?
>
> As the output of this routine is always cast with (u8) when len is 1 and (u16)
> when len is 2, I think the magic can just disappear and ret can simply be
>
> ret = le32_to_cpu(*data);
Good.
> I will test and have contacted the original author. There is similar magic in
> _usb_write_async() that can also disappear.
>
> >> +
> >> + /* IBSS */
> >> + mac->beacon_interval = 100;
> >> +
> >> + /* AMPDU */
> >> + mac->min_space_cfg = 0;
> >> + mac->max_mss_density = 0;
> > Spaces.
>
> Please explain what you mean by "spaces".
I guess I should wrote "indention". On that lines, there in one space
after tab :-)
Thanks for working on my remarks.
Stanislaw
next prev parent reply other threads:[~2011-02-04 6:30 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-30 18:11 [RFC/RFT 0/8] rtl8192cu: Initial upload for comments Larry.Finger
2011-01-30 18:11 ` [RFC/RFT 1/8] rtlwifi: Prepare core for addition of USB driver Larry.Finger
2011-01-30 18:32 ` Hauke Mehrtens
2011-01-30 19:31 ` Larry Finger
2011-02-03 10:25 ` Stanislaw Gruszka
2011-02-04 4:16 ` Larry Finger
2011-02-04 6:29 ` Stanislaw Gruszka [this message]
2011-01-30 18:11 ` [RFC/RFT 2/8] rtl8192cu: Add new driver code - Part 1 Larry.Finger
2011-02-03 10:29 ` Stanislaw Gruszka
2011-01-30 18:11 ` [RFC/RFT 3/8] rtl8192cu: Add new driver code - Part 2 Larry.Finger
2011-02-03 11:28 ` Stanislaw Gruszka
2011-02-03 16:06 ` Larry Finger
2011-01-30 18:11 ` [RFC/RFT 4/8] rtl8192cu: Add new driver code - Part 3 Larry.Finger
2011-01-30 18:11 ` [RFC/RFT 5/8] rtl8192cu: Add new driver code - Part 4 Larry.Finger
2011-01-30 18:11 ` [RFC/RFT 6/8] rtl8192cu: Add new driver code - Part 5 Larry.Finger
2011-01-30 18:11 ` [RFC/RFT 7/8] rtl8192cu: Add new driver code - Part 6 Larry.Finger
2011-01-30 18:11 ` [RFC/RFT 8/8] rtl8192cu: Add new driver code - Part 7 Larry.Finger
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=20110204062940.GA2222@redhat.com \
--to=sgruszka@redhat.com \
--cc=Larry.Finger@lwfinger.net \
--cc=chaoming_li@realsil.com.cn \
--cc=george0505@realtek.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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).