From: Johannes Berg <johannes@sipsolutions.net>
To: moorray3@wp.pl
Cc: Kalle Valo <kvalo@codeaurora.org>,
Felix Fietkau <nbd@openwrt.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
Jakub Kicinski <kubakici@wp.pl>
Subject: Re: [PATCH 1/2] add mt7601u driver
Date: Mon, 04 May 2015 11:37:28 +0200 [thread overview]
Message-ID: <1430732248.2013.16.camel@sipsolutions.net> (raw)
In-Reply-To: <1430571690-9054-2-git-send-email-moorray3@wp.pl> (sfid-20150502_150258_155524_72DB255C)
On Sat, 2015-05-02 at 15:01 +0200, moorray3@wp.pl wrote:
> +int mt7601u_wait_asic_ready(struct mt7601u_dev *dev)
> +{
> + int i = 100;
> + u32 val;
> +
> + do {
> + val = mt7601u_rr(dev, MT_MAC_CSR0);
> + if (val && ~val)
> + return 0;
No delays here? Seems odd. You do have one in the next function where
you also call the _rr() function.
> + skb = alloc_skb(seg_len, GFP_ATOMIC);
> + if (!skb)
> + return NULL;
> +
> + memset(skb->cb, 0, sizeof(skb->cb));
Pretty sure that's pointless.
> + if (rxwi->rxinfo & cpu_to_le32(MT_RXINFO_L2PAD)) {
> + int hdr_len = ieee80211_get_hdrlen_from_buf(data, seg_len);
> +
> + memcpy(skb_put(skb, hdr_len), data, hdr_len);
> + data += hdr_len + 2;
> + seg_len -= hdr_len;
> + }
> +
> + memcpy(skb_put(skb, seg_len), data, seg_len);
> +
> + return skb;
Don't know how your buffers are set up, but if the DMA engine consumes
pages you could consider using paged RX instead of the memcpy().
johannes
next prev parent reply other threads:[~2015-05-04 9:37 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-02 13:01 [PATCH 0/2] add mt7601u driver moorray3
2015-05-02 13:01 ` [PATCH 1/2] " moorray3
2015-05-04 9:37 ` Johannes Berg [this message]
2015-05-04 10:04 ` Jakub Kiciński
2015-05-04 10:15 ` Johannes Berg
2015-05-05 0:49 ` Jakub Kiciński
2015-05-05 6:45 ` Johannes Berg
2015-05-05 10:44 ` Jakub Kiciński
2015-05-02 13:01 ` [PATCH 2/2] add mt7601u build infrastructure and co moorray3
2015-05-05 20:22 ` [PATCHv2 0/2] add mt7601u driver Jakub Kicinski
2015-05-05 20:22 ` [PATCHv2 1/2] " Jakub Kicinski
2015-05-05 20:22 ` [PATCHv2 2/2] add mt7601u kbuild and others Jakub Kicinski
2015-05-25 8:13 ` [PATCHv2 0/2] add mt7601u driver Kalle Valo
2015-05-25 9:35 ` Jakub Kiciński
2015-05-26 7:16 ` Johannes Berg
2015-05-25 9:34 ` [PATCHv3 " Jakub Kicinski
2015-05-25 9:34 ` [PATCHv3 1/2] " Jakub Kicinski
2015-05-25 9:34 ` [PATCHv3 2/2] add mt7601u kbuild and others Jakub Kicinski
2015-05-26 10:26 ` [PATCHv3 0/2] add mt7601u driver Kalle Valo
2015-05-26 9:16 ` [PATCHv4] " Jakub Kicinski
2015-05-28 8:36 ` Kalle Valo
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=1430732248.2013.16.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=kubakici@wp.pl \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=moorray3@wp.pl \
--cc=nbd@openwrt.org \
/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).