variable dev->hard_header_len

From: Madhavi (madhavis@sasken.com)
Date: Fri May 30 2003 - 01:48:23 EST



Hi

I am trying to write a driver on linux-2.4.19. My hardware requires that
the packets going out should be VLAN tagged and coming in might/might not
have a tag. I have written a new hard_header function for this and set the
hard_header_len to ETH_HLEN+VLAN_HLEN. But, when a packet is received
without a tag, the eth_type_trans function is removing the first
ETH_HLEN+VLAN_HLEN bytes, as the hard_header_len is this much. so, the
packets are not being understood by the upper layers properly.

I changed the eth_type_trans function code as follows:

if the device is my device
skb_pull(skb,ETH_HLEN);
else
skb_pull(skb,dev->hard_header_len);

Could anyone tell me if it is going to affect any other functionality?

Could someone suggest some cleaner solution for my problem?

Thanks & regards
Madhavi.

Madhavi Suram
Software Engineer
Customer Delivery / Networks
Sasken Communication Technologies Limited
139/25, Ring Road, Domlur
Bangalore - 560071 India
Email: madhavis@xxxxxxxxxx
Tel: + 91 80 5355501 Extn: 8062
Fax: + 91 80 5351133
URL: www.sasken.com

************************************************************************

SASKEN BUSINESS DISCLAIMER

This message may contain confidential, proprietary or legally Privileged information. In case you are not the original intended Recipient of the message, you must not, directly or indirectly, use, Disclose, distribute, print, or copy any part of this message and you are requested to delete it and inform the sender. Any views expressed in this message are those of the individual sender unless otherwise stated. Nothing contained in this message shall be construed as an offer or acceptance of any offer by Sasken Communication Technologies Limited ("Sasken") unless sent with that express intent and with due authority of Sasken. Sasken has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email.

***********************************************************************