Re: linux kernel 2.6.9-rc4, skb->mac.ethernet => eth_hdr(skb) issues.
emil <[email protected]> Thu, 14 Oct 2004 13:09:10 +0200
| Newsgroups | gmane.linux.drivers.at76c503a.user |
|---|---|
| Message-ID | <[email protected]> |
> Could you please try the attached patch against 0.12beta21 (might work
> against former versions as well) - I don't have a 2.6.9-rc4 here at the
> moment.
>
> Thanks!
I'm sad to say that it doesn't
/usr/src/atm/at/at76c503.c: In function `ieee80211_to_eth':
/usr/src/atm/at/at76c503.c:3919: error: invalid lvalue in assignment
at76c503.c:
3919: eth_hdr(skb) = eth_hdr_p;
It seams that one can not assign a value to the eth_hdr(skb)
function...?
The eth_hdr() definition is added in
include/linux/if_ether.h:
----
[...]
/*
* This is an Ethernet frame header.
*/
struct ethhdr {
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
unsigned char h_source[ETH_ALEN]; /* source ether addr */
unsigned short h_proto; /* packet type ID field */
} __attribute__((packed));
#ifdef __KERNEL__
#include <linux/skbuff.h>
static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
{
return (struct ethhdr *)skb->mac.raw;
}
#endif
----
One need to put it there in another way i suppose. Directly in skb->mac.raw.
In my digging I noticed there's alot of nice functions for juggling with
skb's in net/core/skbuff.c . But that's a bit too advanced for me. =(
Thanks! =)
/Emil L.