From: Felix Fietkau <nbd@openwrt.org>
To: Johannes Berg <johannes@sipsolutions.net>,
Janusz Dziedzic <janusz.dziedzic@tieto.com>,
linux-wireless@vger.kernel.org
Subject: Re: [RFC/RFT v3] mac80211: Add NEED_ALIGNED4_SKBS hw flag
Date: Thu, 14 Jan 2016 13:47:51 +0100 [thread overview]
Message-ID: <569798F7.3050409@openwrt.org> (raw)
In-Reply-To: <1452774738.2444.22.camel@sipsolutions.net>
On 2016-01-14 13:32, Johannes Berg wrote:
> On Tue, 2016-01-05 at 14:06 +0100, Janusz Dziedzic wrote:
>> struct net_device *prev_dev = NULL;
>> + unsigned int padsize, hdrlen;
>> int rtap_len;
>>
>> + /* Remove padding if was added */
>> + if (ieee80211_hw_check(&local->hw, NEEDS_ALIGNED4_SKBS)) {
>> + hdrlen = ieee80211_hdrlen(hdr->frame_control);
>> + padsize = hdrlen & 3;
>> +
>> + if (padsize && skb->len > hdrlen + padsize) {
>> + memmove(skb->data + padsize, skb->data,
>> hdrlen);
>> + skb_pull(skb, padsize);
>> + }
>> + }
>
> But perhaps this should just be done by the driver?
I think it's better to do it here, because the driver can't know if a
frame will end up on a (cooked) monitor interface.
>> + /* Check if aligned skb required */
>> + if (ieee80211_hw_check(&local->hw, NEEDS_ALIGNED4_SKBS))
>> + build.hdr_len += build.hdr_len & 3;
>
> Pretty sure you need to increase the reserved space in the fast-xmit
> struct?
Is the round_up he added not enough?
- Felix
prev parent reply other threads:[~2016-01-14 12:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 13:06 [RFC/RFT v3] mac80211: Add NEED_ALIGNED4_SKBS hw flag Janusz Dziedzic
2016-01-14 12:32 ` Johannes Berg
2016-01-14 12:47 ` Felix Fietkau [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=569798F7.3050409@openwrt.org \
--to=nbd@openwrt.org \
--cc=janusz.dziedzic@tieto.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.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).