From: David Kimdon <david.kimdon@devicescape.com>
To: Michael Buesch <mb@bu3sch.de>
Cc: David Kimdon <david.kimdon@devicescape.com>,
netdev@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>,
Jiri Benc <jbenc@suse.cz>
Subject: Re: [patch 2/3] d80211: remove poorly documented ieee80211_hw extra_hdr_room flag
Date: Tue, 10 Oct 2006 06:45:33 -0700 [thread overview]
Message-ID: <20061010134533.GB4518@devicescape.com> (raw)
In-Reply-To: <200610101200.12454.mb@bu3sch.de>
On Tue, Oct 10, 2006 at 12:00:12PM +0200, Michael Buesch wrote:
> On Monday 09 October 2006 19:03, David Kimdon wrote:
> > This flag is unused by all in tree drivers. Furthermore, the way that
> > it is documented is not consistent with the way it is actually used by
> > ieee80211.c. The original attempt appears to be something to do with
> > adding extra header room for low-level drivers which need to pad the
> > IEEE 802.11 header (example: Atheros).
>
> What about not removing it, but extending it.
Sure, I would be happy with that. For Atheros it will be '2' to
ensure that we can properly align the packet in the tx path without
needing to realloc.
> In the current form it's rather useless. But we could make extra_hdr_room
> a value instead of a flag. Bcm43xx needs somewhere around 30bytes extra
> header room. So every driver which does not need header room, sets this
> to 0. Every other driver to the specific value.
>
> We currently workaround the problem by using an extra DMA descriptor
> just for the header. That's not really a problem, though. But it means
> a little bit of additional overhead in the TX path. Well.
>
> > Signed-off-by: David Kimdon <david.kimdon@devicescape.com>
> >
> > Index: wireless-dev/include/net/d80211.h
> > ===================================================================
> > --- wireless-dev.orig/include/net/d80211.h
> > +++ wireless-dev/include/net/d80211.h
> > @@ -476,10 +476,6 @@ struct ieee80211_hw {
> > /* Force software encryption for TKIP packets if WMM is enabled. */
> > unsigned int no_tkip_wmm_hwaccel:1;
> >
> > - /* set if the payload needs to be padded at even boundaries after the
> > - * header */
> > - unsigned int extra_hdr_room:1;
> > -
> > /* Some devices handle Michael MIC internally and do not include MIC in
> > * the received packets passed up. device_strips_mic must be set
> > * for such devices. The 'encryption' frame control bit is expected to
> > Index: wireless-dev/net/d80211/ieee80211.c
> > ===================================================================
> > --- wireless-dev.orig/net/d80211/ieee80211.c
> > +++ wireless-dev/net/d80211/ieee80211.c
> > @@ -1551,7 +1551,7 @@ static int ieee80211_subif_start_xmit(st
> > * build in headroom in __dev_alloc_skb() (linux/skbuff.h) and
> > * alloc_skb() (net/core/skbuff.c)
> > */
> > - head_need = hdrlen + encaps_len + (local->hw->extra_hdr_room ? 2 : 0);
> > + head_need = hdrlen + encaps_len;
> > head_need -= skb_headroom(skb);
> >
> > /* We are going to modify skb data, so make a copy of it if happens to
> > Index: wireless-dev/drivers/net/wireless/d80211/adm8211/adm8211.c
> > ===================================================================
> > --- wireless-dev.orig/drivers/net/wireless/d80211/adm8211/adm8211.c
> > +++ wireless-dev/drivers/net/wireless/d80211/adm8211/adm8211.c
> > @@ -2018,7 +2018,6 @@ static int __devinit adm8211_probe(struc
> > hw->wep_include_iv = 1;
> > hw->data_nullfunc_ack = 0;
> > hw->no_tkip_wmm_hwaccel = 1;
> > - hw->extra_hdr_room = 0;
> > hw->device_strips_mic = 0;
> > hw->monitor_during_oper = 0;
> > hw->fraglist = 0;
> > Index: wireless-dev/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
> > ===================================================================
> > --- wireless-dev.orig/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
> > +++ wireless-dev/drivers/net/wireless/d80211/rt2x00/rt2400pci.c
> > @@ -2578,7 +2578,6 @@ static int rt2400pci_init_hw(struct rt2x
> > hw->wep_include_iv = 1;
> > hw->data_nullfunc_ack = 1;
> > hw->no_tkip_wmm_hwaccel = 1;
> > - hw->extra_hdr_room = 0;
> > hw->device_strips_mic = 0;
> > hw->monitor_during_oper = 1;
> > hw->fraglist = 0;
> > Index: wireless-dev/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
> > ===================================================================
> > --- wireless-dev.orig/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
> > +++ wireless-dev/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
> > @@ -2732,7 +2732,6 @@ static int rt2500pci_init_hw(struct rt2x
> > hw->wep_include_iv = 1;
> > hw->data_nullfunc_ack = 1;
> > hw->no_tkip_wmm_hwaccel = 1;
> > - hw->extra_hdr_room = 0;
> > hw->device_strips_mic = 0;
> > hw->monitor_during_oper = 1;
> > hw->fraglist = 0;
> > Index: wireless-dev/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
> > ===================================================================
> > --- wireless-dev.orig/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
> > +++ wireless-dev/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
> > @@ -2419,7 +2419,6 @@ static int rt2500usb_init_hw(struct rt2x
> > hw->wep_include_iv = 1;
> > hw->data_nullfunc_ack = 1;
> > hw->no_tkip_wmm_hwaccel = 1;
> > - hw->extra_hdr_room = 0;
> > hw->device_strips_mic = 0;
> > hw->monitor_during_oper = 1;
> > hw->fraglist = 0;
> > Index: wireless-dev/drivers/net/wireless/d80211/rt2x00/rt61pci.c
> > ===================================================================
> > --- wireless-dev.orig/drivers/net/wireless/d80211/rt2x00/rt61pci.c
> > +++ wireless-dev/drivers/net/wireless/d80211/rt2x00/rt61pci.c
> > @@ -3252,7 +3252,6 @@ static int rt61pci_init_hw(struct rt2x00
> > hw->wep_include_iv = 1;
> > hw->data_nullfunc_ack = 1;
> > hw->no_tkip_wmm_hwaccel = 1;
> > - hw->extra_hdr_room = 0;
> > hw->device_strips_mic = 0;
> > hw->monitor_during_oper = 1;
> > hw->fraglist = 0;
> > Index: wireless-dev/drivers/net/wireless/d80211/rt2x00/rt73usb.c
> > ===================================================================
> > --- wireless-dev.orig/drivers/net/wireless/d80211/rt2x00/rt73usb.c
> > +++ wireless-dev/drivers/net/wireless/d80211/rt2x00/rt73usb.c
> > @@ -2792,7 +2792,6 @@ static int rt73usb_init_hw(struct rt2x00
> > hw->wep_include_iv = 1;
> > hw->data_nullfunc_ack = 1;
> > hw->no_tkip_wmm_hwaccel = 1;
> > - hw->extra_hdr_room = 0;
> > hw->device_strips_mic = 0;
> > hw->monitor_during_oper = 1;
> > hw->fraglist = 0;
> >
> > --
> > -
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> --
> Greetings Michael.
next prev parent reply other threads:[~2006-10-10 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20061009170159.804032000@devicescape.com>
2006-10-09 17:02 ` [patch 1/3] d80211: use FCS_LEN instead of hardcoded number David Kimdon
2006-10-09 17:03 ` [patch 2/3] d80211: remove poorly documented ieee80211_hw extra_hdr_room flag David Kimdon
2006-10-10 10:00 ` Michael Buesch
2006-10-10 13:45 ` David Kimdon [this message]
2006-10-10 14:30 ` Michael Wu
2006-10-10 21:04 ` Michael Buesch
2006-10-11 0:37 ` David Kimdon
2006-10-09 17:03 ` [patch 3/3] d80211: silence sparse warning: bad constant expression David Kimdon
2006-10-09 20:11 ` David Kimdon
2006-10-18 13:56 ` Jiri Benc
2006-10-18 15:12 ` David Kimdon
2006-10-18 15:40 ` Jiri Benc
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=20061010134533.GB4518@devicescape.com \
--to=david.kimdon@devicescape.com \
--cc=jbenc@suse.cz \
--cc=linville@tuxdriver.com \
--cc=mb@bu3sch.de \
--cc=netdev@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).