Commit fad7fd0b authored by Alessandro Rubini's avatar Alessandro Rubini Committed by Adam Wujek

wr_nic: instrument for WR_IS_NODE/WR_IS_SWITCH

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent aed186b9
# This builds ./wr_nic as well, but wr_nic/Makefile is designed for the switch
ccflags-y += -DWR_NODE
LINUX ?= /lib/modules/$(shell uname -r)/build LINUX ?= /lib/modules/$(shell uname -r)/build
......
...@@ -25,6 +25,19 @@ ...@@ -25,6 +25,19 @@
#ifdef __KERNEL__ /* The rest is kernel-only */ #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/interrupt.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/mii.h> /* Needed for stuct mii_if_info in wrn_dev */ #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