Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
dced9213
Commit
dced9213
authored
Oct 31, 2014
by
Adam Wujek
💬
Committed by
Alessandro Rubini
Dec 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_nic: unify pstats part in nic-core.c (switch)
Signed-off-by:
Adam Wujek
<
adam.wujek@cern.ch
>
parent
073b41b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
nic-core.c
kernel/wr_nic/nic-core.c
+6
-2
No files found.
kernel/wr_nic/nic-core.c
View file @
dced9213
...
...
@@ -20,7 +20,9 @@
#include <asm/unaligned.h>
#include "wr-nic.h"
#if WR_IS_SWITCH
#include "wr_pstats.h"
#endif
#include "nic-mem.h"
/*
...
...
@@ -220,17 +222,20 @@ static int wrn_start_xmit(struct sk_buff *skb, struct net_device *dev)
return
0
;
}
#if WR_IS_SWITCH
int
(
*
wr_nic_pstats_callback
)(
int
epnum
,
unsigned
int
ctr
[
PSTATS_CNT_PP
]);
EXPORT_SYMBOL
(
wr_nic_pstats_callback
);
static
unsigned
int
nic_counters
[
PSTATS_CNT_PP
];
static
DEFINE_SPINLOCK
(
nic_counters_lock
);
#endif
struct
net_device_stats
*
wrn_get_stats
(
struct
net_device
*
dev
)
{
struct
wrn_ep
*
ep
=
netdev_priv
(
dev
);
#if WR_IS_SWITCH
if
(
wr_nic_pstats_callback
)
{
int
i
;
...
...
@@ -259,9 +264,8 @@ struct net_device_stats *wrn_get_stats(struct net_device *dev)
}
spin_unlock
(
&
nic_counters_lock
);
}
#endif
return
&
ep
->
stats
;
return
NULL
;
}
/*
...
...
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