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
2607c88c
Commit
2607c88c
authored
Feb 14, 2005
by
Ralf Bächle
Committed by
David S. Miller
Feb 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NETROM/ROSE]: Use netdev_priv()
Signed-off-by:
David S. Miller
<
davem@davemloft.net
>
parent
62e2c839
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
net/netrom/nr_dev.c
net/netrom/nr_dev.c
+4
-4
net/rose/rose_dev.c
net/rose/rose_dev.c
+3
-3
No files found.
net/netrom/nr_dev.c
View file @
2607c88c
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
int
nr_rx_ip
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
int
nr_rx_ip
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_device_stats
*
stats
=
(
struct
net_device_stats
*
)
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
if
(
!
netif_running
(
dev
))
{
if
(
!
netif_running
(
dev
))
{
stats
->
rx_errors
++
;
stats
->
rx_errors
++
;
...
@@ -73,7 +73,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev)
...
@@ -73,7 +73,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev)
static
int
nr_rebuild_header
(
struct
sk_buff
*
skb
)
static
int
nr_rebuild_header
(
struct
sk_buff
*
skb
)
{
{
struct
net_device
*
dev
=
skb
->
dev
;
struct
net_device
*
dev
=
skb
->
dev
;
struct
net_device_stats
*
stats
=
(
struct
net_device_stats
*
)
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
struct
sk_buff
*
skbn
;
struct
sk_buff
*
skbn
;
unsigned
char
*
bp
=
skb
->
data
;
unsigned
char
*
bp
=
skb
->
data
;
int
len
;
int
len
;
...
@@ -186,7 +186,7 @@ static int nr_close(struct net_device *dev)
...
@@ -186,7 +186,7 @@ static int nr_close(struct net_device *dev)
static
int
nr_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
nr_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_device_stats
*
stats
=
(
struct
net_device_stats
*
)
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
dev_kfree_skb
(
skb
);
dev_kfree_skb
(
skb
);
stats
->
tx_errors
++
;
stats
->
tx_errors
++
;
return
0
;
return
0
;
...
@@ -194,7 +194,7 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -194,7 +194,7 @@ static int nr_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
nr_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
nr_get_stats
(
struct
net_device
*
dev
)
{
{
return
(
struct
net_device_stats
*
)
dev
->
priv
;
return
netdev_priv
(
dev
)
;
}
}
void
nr_setup
(
struct
net_device
*
dev
)
void
nr_setup
(
struct
net_device
*
dev
)
...
...
net/rose/rose_dev.c
View file @
2607c88c
...
@@ -57,7 +57,7 @@ static int rose_header(struct sk_buff *skb, struct net_device *dev, unsigned sho
...
@@ -57,7 +57,7 @@ static int rose_header(struct sk_buff *skb, struct net_device *dev, unsigned sho
static
int
rose_rebuild_header
(
struct
sk_buff
*
skb
)
static
int
rose_rebuild_header
(
struct
sk_buff
*
skb
)
{
{
struct
net_device
*
dev
=
skb
->
dev
;
struct
net_device
*
dev
=
skb
->
dev
;
struct
net_device_stats
*
stats
=
(
struct
net_device_stats
*
)
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
unsigned
char
*
bp
=
(
unsigned
char
*
)
skb
->
data
;
unsigned
char
*
bp
=
(
unsigned
char
*
)
skb
->
data
;
struct
sk_buff
*
skbn
;
struct
sk_buff
*
skbn
;
...
@@ -117,7 +117,7 @@ static int rose_close(struct net_device *dev)
...
@@ -117,7 +117,7 @@ static int rose_close(struct net_device *dev)
static
int
rose_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
static
int
rose_xmit
(
struct
sk_buff
*
skb
,
struct
net_device
*
dev
)
{
{
struct
net_device_stats
*
stats
=
(
struct
net_device_stats
*
)
dev
->
priv
;
struct
net_device_stats
*
stats
=
netdev_priv
(
dev
)
;
if
(
!
netif_running
(
dev
))
{
if
(
!
netif_running
(
dev
))
{
printk
(
KERN_ERR
"ROSE: rose_xmit - called when iface is down
\n
"
);
printk
(
KERN_ERR
"ROSE: rose_xmit - called when iface is down
\n
"
);
...
@@ -130,7 +130,7 @@ static int rose_xmit(struct sk_buff *skb, struct net_device *dev)
...
@@ -130,7 +130,7 @@ static int rose_xmit(struct sk_buff *skb, struct net_device *dev)
static
struct
net_device_stats
*
rose_get_stats
(
struct
net_device
*
dev
)
static
struct
net_device_stats
*
rose_get_stats
(
struct
net_device
*
dev
)
{
{
return
(
struct
net_device_stats
*
)
dev
->
priv
;
return
netdev_priv
(
dev
)
;
}
}
void
rose_setup
(
struct
net_device
*
dev
)
void
rose_setup
(
struct
net_device
*
dev
)
...
...
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