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
b29cbe77
Commit
b29cbe77
authored
Sep 27, 2002
by
Kai Germaschewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ISDN: 'ethernet over ISDN' cleanups
parent
737bfa64
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
60 deletions
+3
-60
drivers/isdn/i4l/isdn_net.c
drivers/isdn/i4l/isdn_net.c
+3
-53
include/linux/isdn.h
include/linux/isdn.h
+0
-7
No files found.
drivers/isdn/i4l/isdn_net.c
View file @
b29cbe77
...
@@ -1355,46 +1355,6 @@ isdn_net_rcv_skb(int idx, struct sk_buff *skb)
...
@@ -1355,46 +1355,6 @@ isdn_net_rcv_skb(int idx, struct sk_buff *skb)
return
0
;
return
0
;
}
}
static
int
my_eth_header
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
,
unsigned
short
type
,
void
*
daddr
,
void
*
saddr
,
unsigned
len
)
{
struct
ethhdr
*
eth
=
(
struct
ethhdr
*
)
skb_push
(
skb
,
ETH_HLEN
);
/*
* Set the protocol type. For a packet of type ETH_P_802_3 we
* put the length here instead. It is up to the 802.2 layer to
* carry protocol information.
*/
if
(
type
!=
ETH_P_802_3
)
eth
->
h_proto
=
htons
(
type
);
else
eth
->
h_proto
=
htons
(
len
);
/*
* Set the source hardware address.
*/
if
(
saddr
)
memcpy
(
eth
->
h_source
,
saddr
,
dev
->
addr_len
);
else
memcpy
(
eth
->
h_source
,
dev
->
dev_addr
,
dev
->
addr_len
);
/*
* Anyway, the loopback-device should never use this function...
*/
if
(
dev
->
flags
&
(
IFF_LOOPBACK
|
IFF_NOARP
))
{
memset
(
eth
->
h_dest
,
0
,
dev
->
addr_len
);
return
ETH_HLEN
/*(dev->hard_header_len)*/
;
}
if
(
daddr
)
{
memcpy
(
eth
->
h_dest
,
daddr
,
dev
->
addr_len
);
return
ETH_HLEN
/*dev->hard_header_len*/
;
}
return
-
ETH_HLEN
/*dev->hard_header_len*/
;
}
/*
/*
* build an header
* build an header
* depends on encaps that is being used.
* depends on encaps that is being used.
...
@@ -1409,9 +1369,6 @@ isdn_net_header(struct sk_buff *skb, struct net_device *dev, unsigned short type
...
@@ -1409,9 +1369,6 @@ isdn_net_header(struct sk_buff *skb, struct net_device *dev, unsigned short type
ushort
len
=
0
;
ushort
len
=
0
;
switch
(
lp
->
p_encap
)
{
switch
(
lp
->
p_encap
)
{
case
ISDN_NET_ENCAP_ETHER
:
len
=
my_eth_header
(
skb
,
dev
,
type
,
daddr
,
saddr
,
plen
);
break
;
case
ISDN_NET_ENCAP_SYNCPPP
:
case
ISDN_NET_ENCAP_SYNCPPP
:
/* stick on a fake header to keep fragmentation code happy. */
/* stick on a fake header to keep fragmentation code happy. */
len
=
IPPP_MAX_HEADER
;
len
=
IPPP_MAX_HEADER
;
...
@@ -1482,12 +1439,9 @@ static int
...
@@ -1482,12 +1439,9 @@ static int
isdn_net_init
(
struct
net_device
*
ndev
)
isdn_net_init
(
struct
net_device
*
ndev
)
{
{
ushort
max_hlhdr_len
=
0
;
ushort
max_hlhdr_len
=
0
;
isdn_net_local
*
lp
=
(
isdn_net_local
*
)
ndev
->
priv
;
int
drvidx
,
i
;
int
drvidx
,
i
;
ether_setup
(
ndev
);
ether_setup
(
ndev
);
lp
->
org_hhc
=
ndev
->
hard_header_cache
;
lp
->
org_hcu
=
ndev
->
header_cache_update
;
/* Setup the generic properties */
/* Setup the generic properties */
...
@@ -2578,8 +2532,6 @@ isdn_net_realrm(isdn_net_dev *p)
...
@@ -2578,8 +2532,6 @@ isdn_net_realrm(isdn_net_dev *p)
((
isdn_net_local
*
)
(
p
->
local
.
master
->
priv
))
->
slave
=
p
->
local
.
slave
;
((
isdn_net_local
*
)
(
p
->
local
.
master
->
priv
))
->
slave
=
p
->
local
.
slave
;
}
else
{
}
else
{
/* Unregister only if it's a master-device */
/* Unregister only if it's a master-device */
p
->
dev
.
hard_header_cache
=
p
->
local
.
org_hhc
;
p
->
dev
.
header_cache_update
=
p
->
local
.
org_hcu
;
unregister_netdev
(
&
p
->
dev
);
unregister_netdev
(
&
p
->
dev
);
}
}
/* Unlink device from chain */
/* Unlink device from chain */
...
@@ -2662,11 +2614,9 @@ isdn_rawip_setup(isdn_net_dev *p)
...
@@ -2662,11 +2614,9 @@ isdn_rawip_setup(isdn_net_dev *p)
static
int
static
int
isdn_ether_setup
(
isdn_net_dev
*
p
)
isdn_ether_setup
(
isdn_net_dev
*
p
)
{
{
isdn_net_local
*
lp
=
&
p
->
local
;
p
->
dev
.
hard_header
=
eth_header
;
p
->
dev
.
hard_header_cache
=
eth_header_cache
;
p
->
dev
.
hard_header
=
isdn_net_header
;
p
->
dev
.
header_cache_update
=
eth_header_cache_update
;
p
->
dev
.
hard_header_cache
=
lp
->
org_hhc
;
p
->
dev
.
header_cache_update
=
lp
->
org_hcu
;
p
->
dev
.
flags
=
IFF_BROADCAST
|
IFF_MULTICAST
;
p
->
dev
.
flags
=
IFF_BROADCAST
|
IFF_MULTICAST
;
return
0
;
return
0
;
...
...
include/linux/isdn.h
View file @
b29cbe77
...
@@ -353,13 +353,6 @@ typedef struct isdn_net_local_s {
...
@@ -353,13 +353,6 @@ typedef struct isdn_net_local_s {
/* a particular channel (including */
/* a particular channel (including */
/* the frame_cnt */
/* the frame_cnt */
int
(
*
org_hhc
)(
struct
neighbour
*
neigh
,
struct
hh_cache
*
hh
);
/* Ptr to orig. header_cache_update */
void
(
*
org_hcu
)(
struct
hh_cache
*
,
struct
net_device
*
,
unsigned
char
*
);
int
pppbind
;
/* ippp device for bindings */
int
pppbind
;
/* ippp device for bindings */
int
dialtimeout
;
/* How long shall we try on dialing? (jiffies) */
int
dialtimeout
;
/* How long shall we try on dialing? (jiffies) */
int
dialwait
;
/* How long shall we wait after failed attempt? (jiffies) */
int
dialwait
;
/* How long shall we wait after failed attempt? (jiffies) */
...
...
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