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
nexedi
linux
Commits
0c74ce27
Commit
0c74ce27
authored
Oct 27, 2004
by
David S. Miller
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://kernel.bkbits.net/acme/sk_buff-2.6
into nuts.davemloft.net:/disk1/BK/net-2.6
parents
c492d476
e03fab0e
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
38 additions
and
56 deletions
+38
-56
drivers/isdn/i4l/isdn_x25iface.c
drivers/isdn/i4l/isdn_x25iface.c
+4
-12
drivers/net/wan/cycx_x25.c
drivers/net/wan/cycx_x25.c
+3
-5
drivers/net/wan/dscc4.c
drivers/net/wan/dscc4.c
+0
-1
drivers/net/wan/hdlc_x25.c
drivers/net/wan/hdlc_x25.c
+4
-10
drivers/net/wan/lapbether.c
drivers/net/wan/lapbether.c
+5
-15
drivers/net/wan/x25_asy.c
drivers/net/wan/x25_asy.c
+5
-13
include/net/x25device.h
include/net/x25device.h
+17
-0
No files found.
drivers/isdn/i4l/isdn_x25iface.c
View file @
0c74ce27
...
...
@@ -21,6 +21,7 @@
#include <linux/netdevice.h>
#include <linux/concap.h>
#include <linux/wanrouter.h>
#include <net/x25device.h>
#include "isdn_x25iface.h"
/* for debugging messages not to cause an oops when device pointer is NULL*/
...
...
@@ -191,12 +192,9 @@ int isdn_x25iface_receive(struct concap_proto *cprot, struct sk_buff *skb)
IX25DEBUG
(
"isdn_x25iface_receive %s
\n
"
,
MY_DEVNAME
(
cprot
->
net_dev
)
);
if
(
(
(
ix25_pdata_t
*
)
(
cprot
->
proto_data
)
)
->
state
==
WAN_CONNECTED
){
skb
->
dev
=
cprot
->
net_dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
pkt_type
=
PACKET_HOST
;
if
(
skb_push
(
skb
,
1
)){
skb
->
data
[
0
]
=
0x00
;
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
protocol
=
x25_type_trans
(
skb
,
cprot
->
net_dev
)
;
netif_rx
(
skb
);
return
0
;
}
...
...
@@ -224,10 +222,7 @@ int isdn_x25iface_connect_ind(struct concap_proto *cprot)
*
state_p
=
WAN_CONNECTED
;
if
(
skb
){
*
(
skb_put
(
skb
,
1
)
)
=
0x01
;
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
dev
=
cprot
->
net_dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
cprot
->
net_dev
);
netif_rx
(
skb
);
return
0
;
}
else
{
...
...
@@ -256,10 +251,7 @@ int isdn_x25iface_disconn_ind(struct concap_proto *cprot)
skb
=
dev_alloc_skb
(
1
);
if
(
skb
){
*
(
skb_put
(
skb
,
1
)
)
=
0x02
;
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
dev
=
cprot
->
net_dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
cprot
->
net_dev
);
netif_rx
(
skb
);
return
0
;
}
else
{
...
...
drivers/net/wan/cycx_x25.c
View file @
0c74ce27
...
...
@@ -92,6 +92,8 @@
#include <linux/cyclomx.h>
/* Cyclom 2X common user API definitions */
#include <linux/cycx_x25.h>
/* X.25 firmware API definitions */
#include <net/x25device.h>
/* Defines & Macros */
#define CYCX_X25_MAX_CMD_RETRY 5
#define CYCX_X25_CHAN_MTU 2048
/* unfragmented logical channel MTU */
...
...
@@ -1486,11 +1488,7 @@ static void cycx_x25_chan_send_event(struct net_device *dev, u8 event)
ptr
=
skb_put
(
skb
,
1
);
*
ptr
=
event
;
skb
->
dev
=
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
dev
);
netif_rx
(
skb
);
dev
->
last_rx
=
jiffies
;
/* timestamp */
}
...
...
drivers/net/wan/dscc4.c
View file @
0c74ce27
...
...
@@ -519,7 +519,6 @@ inline int try_get_rx_skb(struct dscc4_dev_priv *dpriv, struct net_device *dev)
dpriv
->
rx_skbuff
[
dirty
]
=
skb
;
if
(
skb
)
{
skb
->
protocol
=
hdlc_type_trans
(
skb
,
dev
);
skb
->
mac
.
raw
=
skb
->
data
;
rx_fd
->
data
=
pci_map_single
(
dpriv
->
pci_priv
->
pdev
,
skb
->
data
,
len
,
PCI_DMA_FROMDEVICE
);
}
else
{
...
...
drivers/net/wan/hdlc_x25.c
View file @
0c74ce27
...
...
@@ -23,6 +23,8 @@
#include <linux/rtnetlink.h>
#include <linux/hdlc.h>
#include <net/x25device.h>
/* These functions are callbacks called by LAPB layer */
static
void
x25_connect_disconnect
(
struct
net_device
*
dev
,
int
reason
,
int
code
)
...
...
@@ -38,11 +40,7 @@ static void x25_connect_disconnect(struct net_device *dev, int reason, int code)
ptr
=
skb_put
(
skb
,
1
);
*
ptr
=
code
;
skb
->
dev
=
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
dev
);
netif_rx
(
skb
);
}
...
...
@@ -74,11 +72,7 @@ static int x25_data_indication(struct net_device *dev, struct sk_buff *skb)
ptr
=
skb
->
data
;
*
ptr
=
0
;
skb
->
dev
=
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
dev
);
return
netif_rx
(
skb
);
}
...
...
drivers/net/wan/lapbether.c
View file @
0c74ce27
...
...
@@ -43,6 +43,8 @@
#include <linux/lapb.h>
#include <linux/init.h>
#include <net/x25device.h>
static
char
bcast_addr
[
6
]
=
{
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
,
0xFF
};
/* If this number is made larger, check that the temporary string buffer
...
...
@@ -137,11 +139,7 @@ static int lapbeth_data_indication(struct net_device *dev, struct sk_buff *skb)
ptr
=
skb
->
data
;
*
ptr
=
0x00
;
skb
->
dev
=
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
dev
);
skb
->
dev
->
last_rx
=
jiffies
;
return
netif_rx
(
skb
);
}
...
...
@@ -233,11 +231,7 @@ static void lapbeth_connected(struct net_device *dev, int reason)
ptr
=
skb_put
(
skb
,
1
);
*
ptr
=
0x01
;
skb
->
dev
=
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
dev
);
skb
->
dev
->
last_rx
=
jiffies
;
netif_rx
(
skb
);
}
...
...
@@ -255,11 +249,7 @@ static void lapbeth_disconnected(struct net_device *dev, int reason)
ptr
=
skb_put
(
skb
,
1
);
*
ptr
=
0x02
;
skb
->
dev
=
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
dev
);
skb
->
dev
->
last_rx
=
jiffies
;
netif_rx
(
skb
);
}
...
...
drivers/net/wan/x25_asy.c
View file @
0c74ce27
...
...
@@ -34,6 +34,8 @@
#include <linux/init.h>
#include "x25_asy.h"
#include <net/x25device.h>
static
struct
net_device
**
x25_asy_devs
;
static
int
x25_asy_maxdev
=
SL_NRUNIT
;
...
...
@@ -209,10 +211,8 @@ static void x25_asy_bump(struct x25_asy *sl)
return
;
}
skb_push
(
skb
,
1
);
/* LAPB internal control */
skb
->
dev
=
sl
->
dev
;
memcpy
(
skb_put
(
skb
,
count
),
sl
->
rbuff
,
count
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
protocol
=
x25_type_trans
(
skb
,
sl
->
dev
);
if
((
err
=
lapb_data_received
(
skb
->
dev
,
skb
))
!=
LAPB_OK
)
{
kfree_skb
(
skb
);
...
...
@@ -419,11 +419,7 @@ static void x25_asy_connected(struct net_device *dev, int reason)
ptr
=
skb_put
(
skb
,
1
);
*
ptr
=
0x01
;
skb
->
dev
=
sl
->
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
sl
->
dev
);
netif_rx
(
skb
);
sl
->
dev
->
last_rx
=
jiffies
;
}
...
...
@@ -442,11 +438,7 @@ static void x25_asy_disconnected(struct net_device *dev, int reason)
ptr
=
skb_put
(
skb
,
1
);
*
ptr
=
0x02
;
skb
->
dev
=
sl
->
dev
;
skb
->
protocol
=
htons
(
ETH_P_X25
);
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
pkt_type
=
PACKET_HOST
;
skb
->
protocol
=
x25_type_trans
(
skb
,
sl
->
dev
);
netif_rx
(
skb
);
sl
->
dev
->
last_rx
=
jiffies
;
}
...
...
include/net/x25device.h
0 → 100644
View file @
0c74ce27
#ifndef _X25DEVICE_H
#define _X25DEVICE_H
#include <linux/if_ether.h>
#include <linux/if_packet.h>
#include <linux/skbuff.h>
static
inline
unsigned
short
x25_type_trans
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
skb
->
mac
.
raw
=
skb
->
data
;
skb
->
input_dev
=
skb
->
dev
=
dev
;
skb
->
pkt_type
=
PACKET_HOST
;
return
htons
(
ETH_P_X25
);
}
#endif
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