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
6891c044
Commit
6891c044
authored
Feb 07, 2013
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_nic: instrument for WR_IS_NODE/WR_IS_SWITCH
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
e8f319f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
Makefile
kernel/wr_nic/Makefile
+4
-0
wr-nic.h
kernel/wr_nic/wr-nic.h
+13
-0
No files found.
kernel/wr_nic/Makefile
View file @
6891c044
# This Makefile is meant to be used by the wr-switch. When built for wr-node
# the relevant Makefile lived in the parent directory.
ccflags-y
+=
-DWR_SWITCH
obj-m
:=
wr-nic.o
wr-nic-objs
:=
module.o device.o nic-core.o endpoint.o ethtool.o
\
...
...
kernel/wr_nic/wr-nic.h
View file @
6891c044
...
...
@@ -25,6 +25,19 @@
#ifdef __KERNEL__
/* The rest is kernel-only */
/* The NIC can build for both the switch and the node. Prefer if to ifdef */
#ifdef WR_NODE
# define WR_IS_NODE 1
# define WR_IS_SWITCH 0
#else
# ifndef WR_SWITCH
# error "Please define WR_NODE or WR_SWITCH"
# else
# define WR_IS_NODE 0
# define WR_IS_SWITCH 1
# endif
#endif
#include <linux/interrupt.h>
#include <linux/spinlock.h>
#include <linux/mii.h>
/* Needed for stuct mii_if_info in wrn_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