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
40881456
Commit
40881456
authored
Jan 10, 2004
by
Alexander Viro
Committed by
Stephen Hemminger
Jan 10, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[wan hdlc] hdlc->attach() switched to net_device.
parent
11b2884f
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
18 additions
and
31 deletions
+18
-31
drivers/net/wan/dscc4.c
drivers/net/wan/dscc4.c
+2
-3
drivers/net/wan/farsync.c
drivers/net/wan/farsync.c
+1
-1
drivers/net/wan/hd6457x.c
drivers/net/wan/hd6457x.c
+4
-15
drivers/net/wan/hdlc_cisco.c
drivers/net/wan/hdlc_cisco.c
+1
-1
drivers/net/wan/hdlc_fr.c
drivers/net/wan/hdlc_fr.c
+1
-1
drivers/net/wan/hdlc_ppp.c
drivers/net/wan/hdlc_ppp.c
+1
-1
drivers/net/wan/hdlc_raw.c
drivers/net/wan/hdlc_raw.c
+1
-1
drivers/net/wan/hdlc_raw_eth.c
drivers/net/wan/hdlc_raw_eth.c
+1
-1
drivers/net/wan/hdlc_x25.c
drivers/net/wan/hdlc_x25.c
+1
-1
drivers/net/wan/pc300_drv.c
drivers/net/wan/pc300_drv.c
+2
-3
drivers/net/wan/wanxl.c
drivers/net/wan/wanxl.c
+2
-2
include/linux/hdlc.h
include/linux/hdlc.h
+1
-1
No files found.
drivers/net/wan/dscc4.c
View file @
40881456
...
...
@@ -364,7 +364,7 @@ static void dscc4_release_ring(struct dscc4_dev_priv *);
static
void
dscc4_timer
(
unsigned
long
);
static
void
dscc4_tx_timeout
(
struct
net_device
*
);
static
irqreturn_t
dscc4_irq
(
int
irq
,
void
*
dev_id
,
struct
pt_regs
*
ptregs
);
static
int
dscc4_hdlc_attach
(
hdlc
_device
*
,
unsigned
short
,
unsigned
short
);
static
int
dscc4_hdlc_attach
(
struct
net
_device
*
,
unsigned
short
,
unsigned
short
);
static
int
dscc4_set_iface
(
struct
dscc4_dev_priv
*
,
struct
net_device
*
);
static
inline
int
dscc4_set_quartz
(
struct
dscc4_dev_priv
*
,
int
);
#ifdef DSCC4_POLLING
...
...
@@ -1986,10 +1986,9 @@ static void __devexit dscc4_remove_one(struct pci_dev *pdev)
pci_resource_len
(
pdev
,
0
));
}
static
int
dscc4_hdlc_attach
(
hdlc_device
*
hdlc
,
unsigned
short
encoding
,
static
int
dscc4_hdlc_attach
(
struct
net_device
*
dev
,
unsigned
short
encoding
,
unsigned
short
parity
)
{
struct
net_device
*
dev
=
hdlc_to_dev
(
hdlc
);
struct
dscc4_dev_priv
*
dpriv
=
dscc4_priv
(
dev
);
if
(
encoding
!=
ENCODING_NRZ
&&
...
...
drivers/net/wan/farsync.c
View file @
40881456
...
...
@@ -1331,7 +1331,7 @@ fst_close ( struct net_device *dev )
}
static
int
fst_attach
(
hdlc_device
*
hdlc
,
unsigned
short
encoding
,
unsigned
short
parity
)
fst_attach
(
struct
net_device
*
dev
,
unsigned
short
encoding
,
unsigned
short
parity
)
{
/* Setting currently fixed in FarSync card so we check and forget */
if
(
encoding
!=
ENCODING_NRZ
||
parity
!=
PARITY_CRC16_PR1_CCITT
)
...
...
drivers/net/wan/hd6457x.c
View file @
40881456
...
...
@@ -115,22 +115,11 @@ static inline int sca_intr_status(card_t *card)
return
result
;
}
static
inline
port_t
*
hdlc_to_port
(
hdlc_device
*
hdlc
)
{
return
(
port_t
*
)
hdlc
;
}
static
inline
port_t
*
dev_to_port
(
struct
net_device
*
dev
)
{
return
hdlc_to_port
(
dev_to_hdlc
(
dev
));
return
(
port_t
*
)
(
dev_to_hdlc
(
dev
));
}
static
inline
u16
next_desc
(
port_t
*
port
,
u16
desc
,
int
transmit
)
{
return
(
desc
+
1
)
%
(
transmit
?
port_to_card
(
port
)
->
tx_ring_buffers
...
...
@@ -639,7 +628,7 @@ static void sca_close(struct net_device *dev)
static
int
sca_attach
(
hdlc_device
*
hdlc
,
unsigned
short
encoding
,
static
int
sca_attach
(
struct
net_device
*
dev
,
unsigned
short
encoding
,
unsigned
short
parity
)
{
if
(
encoding
!=
ENCODING_NRZ
&&
...
...
@@ -660,8 +649,8 @@ static int sca_attach(hdlc_device *hdlc, unsigned short encoding,
parity
!=
PARITY_CRC16_PR1_CCITT
)
return
-
EINVAL
;
hdlc_to_port
(
hdlc
)
->
encoding
=
encoding
;
hdlc_to_port
(
hdlc
)
->
parity
=
parity
;
dev_to_port
(
dev
)
->
encoding
=
encoding
;
dev_to_port
(
dev
)
->
parity
=
parity
;
return
0
;
}
...
...
drivers/net/wan/hdlc_cisco.c
View file @
40881456
...
...
@@ -295,7 +295,7 @@ int hdlc_cisco_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
new_settings
.
timeout
<
2
)
return
-
EINVAL
;
result
=
hdlc
->
attach
(
hdlc
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
result
=
hdlc
->
attach
(
dev
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/hdlc_fr.c
View file @
40881456
...
...
@@ -1163,7 +1163,7 @@ int hdlc_fr_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
new_settings
.
dce
!=
1
))
return
-
EINVAL
;
result
=
hdlc
->
attach
(
hdlc
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
result
=
hdlc
->
attach
(
dev
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/hdlc_ppp.c
View file @
40881456
...
...
@@ -93,7 +93,7 @@ int hdlc_ppp_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
/* no settable parameters */
result
=
hdlc
->
attach
(
hdlc
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
result
=
hdlc
->
attach
(
dev
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/hdlc_raw.c
View file @
40881456
...
...
@@ -67,7 +67,7 @@ int hdlc_raw_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
if
(
new_settings
.
parity
==
PARITY_DEFAULT
)
new_settings
.
parity
=
PARITY_CRC16_PR1_CCITT
;
result
=
hdlc
->
attach
(
hdlc
,
new_settings
.
encoding
,
result
=
hdlc
->
attach
(
dev
,
new_settings
.
encoding
,
new_settings
.
parity
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/hdlc_raw_eth.c
View file @
40881456
...
...
@@ -81,7 +81,7 @@ int hdlc_raw_eth_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
if
(
new_settings
.
parity
==
PARITY_DEFAULT
)
new_settings
.
parity
=
PARITY_CRC16_PR1_CCITT
;
result
=
hdlc
->
attach
(
hdlc
,
new_settings
.
encoding
,
result
=
hdlc
->
attach
(
dev
,
new_settings
.
encoding
,
new_settings
.
parity
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/hdlc_x25.c
View file @
40881456
...
...
@@ -203,7 +203,7 @@ int hdlc_x25_ioctl(hdlc_device *hdlc, struct ifreq *ifr)
if
(
dev
->
flags
&
IFF_UP
)
return
-
EBUSY
;
result
=
hdlc
->
attach
(
hdlc
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
result
=
hdlc
->
attach
(
dev
,
ENCODING_NRZ
,
PARITY_CRC16_PR1_CCITT
);
if
(
result
)
return
result
;
...
...
drivers/net/wan/pc300_drv.c
View file @
40881456
...
...
@@ -290,7 +290,7 @@ static int clock_rate_calc(uclong, uclong, int *);
static
uclong
detect_ram
(
pc300_t
*
);
static
void
plx_init
(
pc300_t
*
);
static
void
cpc_trace
(
struct
net_device
*
,
struct
sk_buff
*
,
char
);
static
int
cpc_attach
(
hdlc
_device
*
,
unsigned
short
,
unsigned
short
);
static
int
cpc_attach
(
struct
net
_device
*
,
unsigned
short
,
unsigned
short
);
#ifdef CONFIG_PC300_MLPPP
void
cpc_tty_init
(
pc300dev_t
*
dev
);
...
...
@@ -3064,10 +3064,9 @@ int tx_config(pc300dev_t * d)
return
0
;
}
static
int
cpc_attach
(
hdlc_device
*
hdlc
,
unsigned
short
encoding
,
static
int
cpc_attach
(
struct
net_device
*
dev
,
unsigned
short
encoding
,
unsigned
short
parity
)
{
struct
net_device
*
dev
=
hdlc_to_dev
(
hdlc
);
pc300dev_t
*
d
=
(
pc300dev_t
*
)
dev
->
priv
;
pc300ch_t
*
chan
=
(
pc300ch_t
*
)
d
->
chan
;
pc300_t
*
card
=
(
pc300_t
*
)
chan
->
card
;
...
...
drivers/net/wan/wanxl.c
View file @
40881456
...
...
@@ -338,10 +338,10 @@ static int wanxl_xmit(struct sk_buff *skb, struct net_device *dev)
static
int
wanxl_attach
(
hdlc_device
*
hdlc
,
unsigned
short
encoding
,
static
int
wanxl_attach
(
struct
net_device
*
dev
,
unsigned
short
encoding
,
unsigned
short
parity
)
{
port_t
*
port
=
hdlc_to_port
(
hdlc
);
port_t
*
port
=
hdlc_to_port
(
dev_to_hdlc
(
dev
)
);
if
(
encoding
!=
ENCODING_NRZ
&&
encoding
!=
ENCODING_NRZI
)
...
...
include/linux/hdlc.h
View file @
40881456
...
...
@@ -100,7 +100,7 @@ typedef struct hdlc_device_struct {
struct
net_device_stats
stats
;
/* used by HDLC layer to take control over HDLC device from hw driver*/
int
(
*
attach
)(
struct
hdlc_device_struct
*
hdlc
,
int
(
*
attach
)(
struct
net_device
*
dev
,
unsigned
short
encoding
,
unsigned
short
parity
);
/* hardware driver must handle this instead of dev->hard_start_xmit */
...
...
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