summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMursalin Akon <makon@nvidia.com>2011-09-22 14:13:15 -0700
committerRohan Somvanshi <rsomvanshi@nvidia.com>2011-09-28 04:53:34 -0700
commit89932d307cff80d67572a9b43e5fd1542b92b00e (patch)
tree64ab209e991fbdab872bac8ae83292489c7c25ed
parentdde2b745987527d4226e79b37689ad8e718c644b (diff)
net: r8168: add kernel integrationtegra-l4t-er-2011-09-28
Add proper kernel integration Change-Id: I723563f81b543eba023bc9b59288b28d11aef1ec Signed-off-by: Mursalin Akon <makon@nvidia.com> Reviewed-on: http://git-master/r/54113 Reviewed-by: Allen Martin <amartin@nvidia.com>
-rw-r--r--drivers/net/Kconfig11
-rw-r--r--drivers/net/Makefile1
-rw-r--r--drivers/net/r8168/Makefile27
-rw-r--r--drivers/net/r8168/Makefile_linux24x71
4 files changed, 14 insertions, 96 deletions
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index be5c811ed9d8..46f7409947b7 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2207,6 +2207,17 @@ config YELLOWFIN
To compile this driver as a module, choose M here: the module
will be called yellowfin. This is recommended.
+config R8168
+ tristate "Realtek 8168 gigabit ethernet support"
+ depends on PCI
+ select CRC32
+ select MII
+ ---help---
+ Say Y here if you have a Realtek 8168 PCI Gigabit Ethernet adapter.
+
+ To compile this driver as a module, choose M here: the module
+ will be called r8168. This is recommended.
+
config R8169
tristate "Realtek 8169 gigabit ethernet support"
depends on PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index a8eec22b788c..d301197ef24b 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -10,6 +10,7 @@ obj-$(CONFIG_TI_DAVINCI_EMAC) += davinci_emac.o
obj-$(CONFIG_E1000) += e1000/
obj-$(CONFIG_E1000E) += e1000e/
+obj-$(CONFIG_R8168) += r8168/
obj-$(CONFIG_IBM_NEW_EMAC) += ibm_newemac/
obj-$(CONFIG_IGB) += igb/
obj-$(CONFIG_IGBVF) += igbvf/
diff --git a/drivers/net/r8168/Makefile b/drivers/net/r8168/Makefile
index 88c9a5a524eb..e3a91269b859 100644
--- a/drivers/net/r8168/Makefile
+++ b/drivers/net/r8168/Makefile
@@ -30,31 +30,8 @@
# US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
################################################################################
-KVER := $(shell uname -r)
-KDIR := /lib/modules/$(KVER)/build
-KMISC := /lib/modules/$(KVER)/kernel/drivers/net/
-KEXT := $(shell echo $(KVER) | sed -ne 's/^2\.[567]\..*/k/p')o
-KFLAG := 2$(shell echo $(KVER) | sed -ne 's/^2\.[4]\..*/4/p')x
-
EXTRA_CFLAGS += -DCONFIG_R8168_NAPI
EXTRA_CFLAGS += -DCONFIG_R8168_VLAN
-modules:
-ifeq ($(KFLAG),24x)
- $(MAKE) -f Makefile_linux24x
-else
- $(MAKE) -C $(KDIR) SUBDIRS=$(PWD)/src modules
- strip --strip-debug r8168.$(KEXT)
-endif
-
-clean:
- rm -rf *.o *.ko *~ core* .dep* .*.d .*.cmd *.mod.c *.a *.s .*.flags .tmp_versions Module.symvers Modules.symvers Module.markers *.order
-
-
-install:
- install -m 744 -c r8168.$(KEXT) $(KMISC)
-
-ifneq ($(KFLAG),24x)
-obj-m += r8168.o
-r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o
-endif#($(KFLAG),24x)
+obj-$(CONFIG_R8168) += r8168.o
+r8168-objs := r8168_n.o r8168_asf.o rtl_eeprom.o rtltool.o
diff --git a/drivers/net/r8168/Makefile_linux24x b/drivers/net/r8168/Makefile_linux24x
deleted file mode 100644
index f6dc7c1bc007..000000000000
--- a/drivers/net/r8168/Makefile_linux24x
+++ /dev/null
@@ -1,71 +0,0 @@
-################################################################################
-#
-# r8168 is the Linux device driver released for RealTek RTL8168B/8111B,
-# RTL8168C/8111C, RTL8168CP/8111CP, RTL8168D/8111D, and RTL8168DP/8111DP, and
-# RTL8168E/8111E Gigabit Ethernet controllers with PCI-Express interface.
-#
-# Copyright(c) 2009 Realtek Semiconductor Corp. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
-# more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this program; if not, see <http://www.gnu.org/licenses/>.
-#
-# Author:
-# Realtek NIC software team <nicfae@realtek.com>
-# No. 2, Innovation Road II, Hsinchu Science Park, Hsinchu 300, Taiwan
-#
-################################################################################
-
-################################################################################
-# This product is covered by one or more of the following patents:
-# US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
-#################################################################################
-
-CC := gcc
-LD := ld
-ARCH := $(shell uname -m | sed 's/i.86/i386/')
-KSRC := /lib/modules/$(shell uname -r)/build
-CONFIG_FILE := $(KSRC)/include/linux/autoconf.h
-
-
-ifeq ($(ARCH),x86_64)
- MODCFLAGS += -mcmodel=kernel -mno-red-zone
-endif
-
-#standard flags for module builds
-MODCFLAGS += -DLINUX -D__KERNEL__ -DMODULE -O2 -pipe -Wall
-MODCFLAGS += -I$(KSRC)/include -I.
-MODCFLAGS += -DMODVERSIONS -DEXPORT_SYMTAB -include $(KSRC)/include/linux/modversions.h
-SOURCE := r8168_n.c r8168_asf.c rtl_eeprom.c rtltool.c
-OBJS := $(SOURCE:.c=.o)
-
-
-SMP := $(shell $(CC) $(MODCFLAGS) -E -dM $(CONFIG_FILE) | \
- grep CONFIG_SMP | awk '{print $$3}')
-
-ifneq ($(SMP),1)
- SMP := 0
-endif
-
-ifeq ($(SMP),1)
- MODCFLAGS += -D__SMP__
-endif
-
-modules: $(OBJS)
- $(LD) -r $^ -o r8168.o
- strip --strip-debug r8168.o
-
-%.o: %.c
- $(CC) $(MODCFLAGS) -c $< -o $@
-
-clean:
- rm *.o -f