Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
83865726
Commit
83865726
authored
Sep 30, 2002
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
http://linux-isdn.bkbits.net/linux-2.5.net
into nuts.ninka.net:/home/davem/src/BK/net-2.5
parents
184411aa
1ebb2981
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
67 deletions
+4
-67
drivers/net/hamachi.c
drivers/net/hamachi.c
+0
-63
net/ethernet/eth.c
net/ethernet/eth.c
+4
-4
No files found.
drivers/net/hamachi.c
View file @
83865726
...
@@ -1470,64 +1470,6 @@ static void hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *rgs)
...
@@ -1470,64 +1470,6 @@ static void hamachi_interrupt(int irq, void *dev_instance, struct pt_regs *rgs)
spin_unlock
(
&
hmp
->
lock
);
spin_unlock
(
&
hmp
->
lock
);
}
}
#ifdef TX_CHECKSUM
/*
* Copied from eth_type_trans(), with reduced header, since we don't
* get it on RX, only on TX.
*/
static
unsigned
short
hamachi_eth_type_trans
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
struct
ethhdr
*
eth
;
unsigned
char
*
rawp
;
skb
->
mac
.
raw
=
skb
->
data
;
skb_pull
(
skb
,
dev
->
hard_header_len
-
8
);
/* artificially enlarged on tx */
eth
=
skb
->
mac
.
ethernet
;
if
(
*
eth
->
h_dest
&
1
)
{
if
(
memcmp
(
eth
->
h_dest
,
dev
->
broadcast
,
ETH_ALEN
)
==
0
)
skb
->
pkt_type
=
PACKET_BROADCAST
;
else
skb
->
pkt_type
=
PACKET_MULTICAST
;
}
/*
* This ALLMULTI check should be redundant by 1.4
* so don't forget to remove it.
*
* Seems, you forgot to remove it. All silly devices
* seems to set IFF_PROMISC.
*/
else
if
(
dev
->
flags
&
(
IFF_PROMISC
/*|IFF_ALLMULTI*/
))
{
if
(
memcmp
(
eth
->
h_dest
,
dev
->
dev_addr
,
ETH_ALEN
))
skb
->
pkt_type
=
PACKET_OTHERHOST
;
}
if
(
ntohs
(
eth
->
h_proto
)
>=
1536
)
return
eth
->
h_proto
;
rawp
=
skb
->
data
;
/*
* This is a magic hack to spot IPX packets. Older Novell breaks
* the protocol design and runs IPX over 802.3 without an 802.2 LLC
* layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This
* won't work for fault tolerant netware but does for the rest.
*/
if
(
*
(
unsigned
short
*
)
rawp
==
0xFFFF
)
return
htons
(
ETH_P_802_3
);
/*
* Real 802.2 LLC
*/
return
htons
(
ETH_P_802_2
);
}
#endif
/* TX_CHECKSUM */
/* This routine is logically part of the interrupt handler, but seperated
/* This routine is logically part of the interrupt handler, but seperated
for clarity and better register allocation. */
for clarity and better register allocation. */
static
int
hamachi_rx
(
struct
net_device
*
dev
)
static
int
hamachi_rx
(
struct
net_device
*
dev
)
...
@@ -1632,12 +1574,7 @@ static int hamachi_rx(struct net_device *dev)
...
@@ -1632,12 +1574,7 @@ static int hamachi_rx(struct net_device *dev)
skb_put
(
skb
=
hmp
->
rx_skbuff
[
entry
],
pkt_len
);
skb_put
(
skb
=
hmp
->
rx_skbuff
[
entry
],
pkt_len
);
hmp
->
rx_skbuff
[
entry
]
=
NULL
;
hmp
->
rx_skbuff
[
entry
]
=
NULL
;
}
}
#ifdef TX_CHECKSUM
/* account for extra TX hard_header bytes */
skb
->
protocol
=
hamachi_eth_type_trans
(
skb
,
dev
);
#else
skb
->
protocol
=
eth_type_trans
(
skb
,
dev
);
skb
->
protocol
=
eth_type_trans
(
skb
,
dev
);
#endif
#ifdef RX_CHECKSUM
#ifdef RX_CHECKSUM
...
...
net/ethernet/eth.c
View file @
83865726
...
@@ -103,16 +103,16 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
...
@@ -103,16 +103,16 @@ int eth_header(struct sk_buff *skb, struct net_device *dev, unsigned short type,
if
(
dev
->
flags
&
(
IFF_LOOPBACK
|
IFF_NOARP
))
if
(
dev
->
flags
&
(
IFF_LOOPBACK
|
IFF_NOARP
))
{
{
memset
(
eth
->
h_dest
,
0
,
dev
->
addr_len
);
memset
(
eth
->
h_dest
,
0
,
dev
->
addr_len
);
return
(
dev
->
hard_header_len
)
;
return
ETH_HLEN
;
}
}
if
(
daddr
)
if
(
daddr
)
{
{
memcpy
(
eth
->
h_dest
,
daddr
,
dev
->
addr_len
);
memcpy
(
eth
->
h_dest
,
daddr
,
dev
->
addr_len
);
return
dev
->
hard_header_len
;
return
ETH_HLEN
;
}
}
return
-
dev
->
hard_header_len
;
return
-
ETH_HLEN
;
}
}
...
@@ -161,7 +161,7 @@ unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev)
...
@@ -161,7 +161,7 @@ unsigned short eth_type_trans(struct sk_buff *skb, struct net_device *dev)
unsigned
char
*
rawp
;
unsigned
char
*
rawp
;
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
mac
.
raw
=
skb
->
data
;
skb_pull
(
skb
,
dev
->
hard_header_len
);
skb_pull
(
skb
,
ETH_HLEN
);
eth
=
skb
->
mac
.
ethernet
;
eth
=
skb
->
mac
.
ethernet
;
if
(
*
eth
->
h_dest
&
1
)
if
(
*
eth
->
h_dest
&
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment