Commit 80e0b9ba authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Miguel Jimenez Lopez

wr_nic: instrument for WR_IS_NODE/WR_IS_SWITCH

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent ae53da30
# 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 \
......
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment