All of lore.kernel.org
 help / color / mirror / Atom feed
From: Solomon Peachy <solomon@linux-wlan.com>
To: "David S. Miller" <davem@rth.ninka.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] New ARPHRD types
Date: Wed, 23 Oct 2002 10:16:51 -0400	[thread overview]
Message-ID: <20021023141651.GA6644@linux-wlan.com> (raw)
In-Reply-To: <1035330936.16084.23.camel@rth.ninka.net>

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

On Tue, Oct 22, 2002 at 04:55:36PM -0700, David S. Miller wrote:
> If ARPHRD_IEEE80211 assumes 24 bytes, and like you say it shouldn't,
> fix that bug instead.  Don't add new ARP header types just to put
> a bandaid on another bug.

Oh, I completely agree.  Unfortunately, the underlying problem is that
the IEEE 802.11 spec has a variable-length hardware header, and that's
not fixable, ruby slippers or no.

I admit that the 80211_FULL was the easy way out, so let me ramble on a
bit and perhaps you can correct and/or clue me in...

AFAIK, no driver currently exposes a native 802.11 interface to the os
(instead exposing ethernet and converting on the fly to 802.11). I'd
like to change this, eventually submitting an equivalent of the stuff in
net/ethernet/eth.c, perhaps as part of the wireless extensions.  

hard_header_len is used on skb allocations to ensure we have enough
space for all of the various hardware headers without having to
reallocate/memcpy the skbs all over the place.

This would infer that we need to set hard_header_len to 30.  On a
transmit, we'd pre-allocate this skb, then pass it off to hard_header to
add in the hardware header, then pass it on to the hard_start_xmit call.
So in the case of "cooked" transmits, hard_header_len+hard_header() can
be anything they want to be, and the ARP type doesn't need to change.

Enter AF_PACKET, and things get messier.  According to the comments in
af_packet.c in 2.4.19, skb->mac.raw and skb->data are used for all
operations, both tx and rx, so they should be able to handle any header
length with no problems.

Now here's the crucual question.  Because of this variable-length
header, (skb->mac.raw - skb->data != hard_header_len).  My understanding
was that this (at least used to) cause problems.  If this isn't the
case... then there's no reason to create a new ARPHRD type with a
max-fixed-length header.  

Anyway, the native 802.11 OS interface is a ways off (mostly on paper
still), so there's plenty of time to work this out.  

In the shorter run, do you have any objections to the creation of the
ARPHRD_IEEE80211_CAPTURE type?  (and if not, what's the final number?)

Thanks!

 - Pizza
-- 
Solomon Peachy                        solomon@linux-wlan.com
AbsoluteValue Systems                 http://www.linux-wlan.com
715-D North Drive                     +1 (321) 259-0737  (office)
Melbourne, FL 32934                   +1 (321) 259-0286  (fax)

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2002-10-23 14:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-21 22:19 [PATCH] New ARPHRD types Solomon Peachy
2002-10-22 23:55 ` David S. Miller
2002-10-23 14:16   ` Solomon Peachy [this message]
2002-10-24  4:18     ` David S. Miller
2002-10-24 14:58       ` Solomon Peachy
2002-10-24 15:38         ` Alan Cox
2002-10-24 15:53           ` Solomon Peachy
2002-10-24 17:01             ` Alan Cox

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=20021023141651.GA6644@linux-wlan.com \
    --to=solomon@linux-wlan.com \
    --cc=davem@rth.ninka.net \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.