* [net-next 06/12] dm9000: Move the Davicom driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Ben Dooks, Sascha Hauer
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the Davicom driver into drivers/net/ethernet/davicom/ and
make the necessary Kconfig and Makefile changes.
CC: Ben Dooks <ben@simtec.co.uk>
CC: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/net/Kconfig | 28 ------------------------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/davicom/Kconfig | 31 +++++++++++++++++++++++++++
drivers/net/ethernet/davicom/Makefile | 5 ++++
drivers/net/{ => ethernet/davicom}/dm9000.c | 0
drivers/net/{ => ethernet/davicom}/dm9000.h | 0
8 files changed, 38 insertions(+), 29 deletions(-)
create mode 100644 drivers/net/ethernet/davicom/Kconfig
create mode 100644 drivers/net/ethernet/davicom/Makefile
rename drivers/net/{ => ethernet/davicom}/dm9000.c (100%)
rename drivers/net/{ => ethernet/davicom}/dm9000.h (100%)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index e83f559..23155cc 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -246,34 +246,6 @@ config NET_NETX
To compile this driver as a module, choose M here. The module
will be called netx-eth.
-config DM9000
- tristate "DM9000 support"
- depends on ARM || BLACKFIN || MIPS
- select CRC32
- select MII
- ---help---
- Support for DM9000 chipset.
-
- To compile this driver as a module, choose M here. The module
- will be called dm9000.
-
-config DM9000_DEBUGLEVEL
- int "DM9000 maximum debug level"
- depends on DM9000
- default 4
- help
- The maximum level of debugging code compiled into the DM9000
- driver.
-
-config DM9000_FORCE_SIMPLE_PHY_POLL
- bool "Force simple NSR based PHY polling"
- depends on DM9000
- ---help---
- This configuration forces the DM9000 to use the NSR's LinkStatus
- bit to determine if the link is up or down instead of the more
- costly MII PHY reads. Note, this will not work if the chip is
- operating with an external PHY.
-
config NET_PCI
bool "EISA, VLB, PCI and on board controllers"
depends on ISA || EISA || PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 08ee56f..298587f 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -52,7 +52,6 @@ obj-$(CONFIG_EQUALIZER) += eql.o
obj-$(CONFIG_TUN) += tun.o
obj-$(CONFIG_VETH) += veth.o
obj-$(CONFIG_NET_NETX) += netx-eth.o
-obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_ETHERNET) += ethernet/
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 0cec25c..45eef59 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -24,6 +24,7 @@ source "drivers/net/ethernet/brocade/Kconfig"
source "drivers/net/ethernet/chelsio/Kconfig"
source "drivers/net/ethernet/cirrus/Kconfig"
source "drivers/net/ethernet/cisco/Kconfig"
+source "drivers/net/ethernet/davicom/Kconfig"
config DNET
tristate "Dave ethernet support (DNET)"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index ebe8aee..dfd5146 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -16,6 +16,7 @@ obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
obj-$(CONFIG_NET_VENDOR_CHELSIO) += chelsio/
obj-$(CONFIG_NET_VENDOR_CIRRUS) += cirrus/
obj-$(CONFIG_NET_VENDOR_CISCO) += cisco/
+obj-$(CONFIG_DM9000) += davicom/
obj-$(CONFIG_DNET) += dnet.o
obj-$(CONFIG_NET_VENDOR_DEC) += dec/
obj-$(CONFIG_NET_VENDOR_DLINK) += dlink/
diff --git a/drivers/net/ethernet/davicom/Kconfig b/drivers/net/ethernet/davicom/Kconfig
new file mode 100644
index 0000000..1809d25
--- /dev/null
+++ b/drivers/net/ethernet/davicom/Kconfig
@@ -0,0 +1,31 @@
+#
+# Davicom device configuration
+#
+
+config DM9000
+ tristate "DM9000 support"
+ depends on ARM || BLACKFIN || MIPS
+ select CRC32
+ select MII
+ ---help---
+ Support for DM9000 chipset.
+
+ To compile this driver as a module, choose M here. The module
+ will be called dm9000.
+
+config DM9000_DEBUGLEVEL
+ int "DM9000 maximum debug level"
+ depends on DM9000
+ default 4
+ ---help---
+ The maximum level of debugging code compiled into the DM9000
+ driver.
+
+config DM9000_FORCE_SIMPLE_PHY_POLL
+ bool "Force simple NSR based PHY polling"
+ depends on DM9000
+ ---help---
+ This configuration forces the DM9000 to use the NSR's LinkStatus
+ bit to determine if the link is up or down instead of the more
+ costly MII PHY reads. Note, this will not work if the chip is
+ operating with an external PHY.
diff --git a/drivers/net/ethernet/davicom/Makefile b/drivers/net/ethernet/davicom/Makefile
new file mode 100644
index 0000000..74b31f0
--- /dev/null
+++ b/drivers/net/ethernet/davicom/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for the Davicom device drivers.
+#
+
+obj-$(CONFIG_DM9000) += dm9000.o
diff --git a/drivers/net/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
similarity index 100%
rename from drivers/net/dm9000.c
rename to drivers/net/ethernet/davicom/dm9000.c
diff --git a/drivers/net/dm9000.h b/drivers/net/ethernet/davicom/dm9000.h
similarity index 100%
rename from drivers/net/dm9000.h
rename to drivers/net/ethernet/davicom/dm9000.h
--
1.7.6
^ permalink raw reply related
* [net-next 07/12] netx: Move the netx driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Sascha Hauer
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the netx driver into drivers/net/ethernet/ and make the
necessary Kconfig and Makefile changes.
CC: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/net/Kconfig | 10 ----------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 11 +++++++++++
drivers/net/ethernet/Makefile | 1 +
drivers/net/{ => ethernet}/netx-eth.c | 0
5 files changed, 12 insertions(+), 11 deletions(-)
rename drivers/net/{ => ethernet}/netx-eth.c (100%)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 23155cc..572ddf2 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -236,16 +236,6 @@ config SH_ETH
This driver supporting CPUs are:
- SH7710, SH7712, SH7763, SH7619, SH7724, and SH7757.
-config NET_NETX
- tristate "NetX Ethernet support"
- select MII
- depends on ARCH_NETX
- help
- This is support for the Hilscher netX builtin Ethernet ports
-
- To compile this driver as a module, choose M here. The module
- will be called netx-eth.
-
config NET_PCI
bool "EISA, VLB, PCI and on board controllers"
depends on ISA || EISA || PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 298587f..8fa5b60 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -51,7 +51,6 @@ obj-$(CONFIG_DEFXX) += defxx.o
obj-$(CONFIG_EQUALIZER) += eql.o
obj-$(CONFIG_TUN) += tun.o
obj-$(CONFIG_VETH) += veth.o
-obj-$(CONFIG_NET_NETX) += netx-eth.o
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_ETHERNET) += ethernet/
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 45eef59..6e36196 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -102,6 +102,17 @@ config FEALNX
source "drivers/net/ethernet/natsemi/Kconfig"
source "drivers/net/ethernet/8390/Kconfig"
+
+config NET_NETX
+ tristate "NetX Ethernet support"
+ select MII
+ depends on ARCH_NETX
+ ---help---
+ This is support for the Hilscher netX builtin Ethernet ports
+
+ To compile this driver as a module, choose M here. The module
+ will be called netx-eth.
+
source "drivers/net/ethernet/nuvoton/Kconfig"
source "drivers/net/ethernet/nvidia/Kconfig"
source "drivers/net/ethernet/octeon/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index dfd5146..c274820 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -42,6 +42,7 @@ obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o
obj-$(CONFIG_NET_VENDOR_MYRI) += myricom/
obj-$(CONFIG_FEALNX) += fealnx.o
obj-$(CONFIG_NET_VENDOR_NATSEMI) += natsemi/
+obj-$(CONFIG_NET_NETX) += netx-eth.o
obj-$(CONFIG_NET_VENDOR_NUVOTON) += nuvoton/
obj-$(CONFIG_NET_VENDOR_NVIDIA) += nvidia/
obj-$(CONFIG_OCTEON_MGMT_ETHERNET) += octeon/
diff --git a/drivers/net/netx-eth.c b/drivers/net/ethernet/netx-eth.c
similarity index 100%
rename from drivers/net/netx-eth.c
rename to drivers/net/ethernet/netx-eth.c
--
1.7.6
^ permalink raw reply related
* [net-next 05/12] enc28j60: Move the Microchip driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Claudio Lanconelli
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the Microchip driver into drivers/net/ethernet/microchip/ and
make the necessary Kconfig and Makefile changes.
CC: Claudio Lanconelli <lanconelli.claudio@eptar.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/Kconfig | 17 ---------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/microchip/Kconfig | 37 ++++++++++++++++++++
drivers/net/ethernet/microchip/Makefile | 5 +++
drivers/net/{ => ethernet/microchip}/enc28j60.c | 0
drivers/net/{ => ethernet/microchip}/enc28j60_hw.h | 0
8 files changed, 44 insertions(+), 18 deletions(-)
create mode 100644 drivers/net/ethernet/microchip/Kconfig
create mode 100644 drivers/net/ethernet/microchip/Makefile
rename drivers/net/{ => ethernet/microchip}/enc28j60.c (100%)
rename drivers/net/{ => ethernet/microchip}/enc28j60_hw.h (100%)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 75ca0da..e83f559 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -274,23 +274,6 @@ config DM9000_FORCE_SIMPLE_PHY_POLL
costly MII PHY reads. Note, this will not work if the chip is
operating with an external PHY.
-config ENC28J60
- tristate "ENC28J60 support"
- depends on EXPERIMENTAL && SPI && NET_ETHERNET
- select CRC32
- ---help---
- Support for the Microchip EN28J60 ethernet chip.
-
- To compile this driver as a module, choose M here. The module will be
- called enc28j60.
-
-config ENC28J60_WRITEVERIFY
- bool "Enable write verify"
- depends on ENC28J60
- ---help---
- Enable the verify after the buffer write useful for debugging purpose.
- If unsure, say N.
-
config NET_PCI
bool "EISA, VLB, PCI and on board controllers"
depends on ISA || EISA || PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index e2f1f55..08ee56f 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -53,7 +53,6 @@ obj-$(CONFIG_TUN) += tun.o
obj-$(CONFIG_VETH) += veth.o
obj-$(CONFIG_NET_NETX) += netx-eth.o
obj-$(CONFIG_DM9000) += dm9000.o
-obj-$(CONFIG_ENC28J60) += enc28j60.o
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_ETHERNET) += ethernet/
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 32561c7..0cec25c 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -78,6 +78,7 @@ config LANTIQ_ETOP
source "drivers/net/ethernet/marvell/Kconfig"
source "drivers/net/ethernet/mellanox/Kconfig"
source "drivers/net/ethernet/micrel/Kconfig"
+source "drivers/net/ethernet/microchip/Kconfig"
config MIPS_SIM_NET
tristate "MIPS simulator Network device"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 94f1be8..ebe8aee 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -36,6 +36,7 @@ obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
obj-$(CONFIG_NET_VENDOR_MARVELL) += marvell/
obj-$(CONFIG_NET_VENDOR_MELLANOX) += mellanox/
obj-$(CONFIG_NET_VENDOR_MICREL) += micrel/
+obj-$(CONFIG_NET_VENDOR_MICROCHIP) += microchip/
obj-$(CONFIG_MIPS_SIM_NET) += mipsnet.o
obj-$(CONFIG_NET_VENDOR_MYRI) += myricom/
obj-$(CONFIG_FEALNX) += fealnx.o
diff --git a/drivers/net/ethernet/microchip/Kconfig b/drivers/net/ethernet/microchip/Kconfig
new file mode 100644
index 0000000..53b0b04
--- /dev/null
+++ b/drivers/net/ethernet/microchip/Kconfig
@@ -0,0 +1,37 @@
+#
+# Microchip network device configuration
+#
+
+config NET_VENDOR_MICROCHIP
+ bool "Microchip devices"
+ depends on SPI && EXPERIMENTAL
+ ---help---
+ If you have a network (Ethernet) card belonging to this class, say Y
+ and read the Ethernet-HOWTO, available from
+ <http://www.tldp.org/docs.html#howto>.
+
+ Note that the answer to this question doesn't directly affect the
+ kernel: saying N will just cause the configurator to skip all
+ the questions about Microchip cards. If you say Y, you will be asked
+ for your specific card in the following questions.
+
+if NET_VENDOR_MICROCHIP
+
+config ENC28J60
+ tristate "ENC28J60 support"
+ depends on SPI && EXPERIMENTAL
+ select CRC32
+ ---help---
+ Support for the Microchip EN28J60 ethernet chip.
+
+ To compile this driver as a module, choose M here. The module will be
+ called enc28j60.
+
+config ENC28J60_WRITEVERIFY
+ bool "Enable write verify"
+ depends on ENC28J60
+ ---help---
+ Enable the verify after the buffer write useful for debugging purpose.
+ If unsure, say N.
+
+endif # NET_VENDOR_MICROCHIP
diff --git a/drivers/net/ethernet/microchip/Makefile b/drivers/net/ethernet/microchip/Makefile
new file mode 100644
index 0000000..573d429
--- /dev/null
+++ b/drivers/net/ethernet/microchip/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for the Microchip network device drivers.
+#
+
+obj-$(CONFIG_ENC28J60) += enc28j60.o
diff --git a/drivers/net/enc28j60.c b/drivers/net/ethernet/microchip/enc28j60.c
similarity index 100%
rename from drivers/net/enc28j60.c
rename to drivers/net/ethernet/microchip/enc28j60.c
diff --git a/drivers/net/enc28j60_hw.h b/drivers/net/ethernet/microchip/enc28j60_hw.h
similarity index 100%
rename from drivers/net/enc28j60_hw.h
rename to drivers/net/ethernet/microchip/enc28j60_hw.h
--
1.7.6
^ permalink raw reply related
* [net-next 04/12] greth: Move the Aeroflex Gaisler driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Kristoffer Glembo
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the Aeroflex Gaisler driver into drivers/net/ethernet/aeroflex/
and make the necessary Kconfig and Makefile changes.
CC: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/Kconfig | 8 --------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/aeroflex/Kconfig | 11 +++++++++++
drivers/net/ethernet/aeroflex/Makefile | 5 +++++
drivers/net/{ => ethernet/aeroflex}/greth.c | 0
drivers/net/{ => ethernet/aeroflex}/greth.h | 0
8 files changed, 18 insertions(+), 9 deletions(-)
create mode 100644 drivers/net/ethernet/aeroflex/Kconfig
create mode 100644 drivers/net/ethernet/aeroflex/Makefile
rename drivers/net/{ => ethernet/aeroflex}/greth.c (100%)
rename drivers/net/{ => ethernet/aeroflex}/greth.h (100%)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index fe2a8bc..75ca0da 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -291,14 +291,6 @@ config ENC28J60_WRITEVERIFY
Enable the verify after the buffer write useful for debugging purpose.
If unsure, say N.
-config GRETH
- tristate "Aeroflex Gaisler GRETH Ethernet MAC support"
- depends on SPARC
- select PHYLIB
- select CRC32
- help
- Say Y here if you want to use the Aeroflex Gaisler GRETH Ethernet MAC.
-
config NET_PCI
bool "EISA, VLB, PCI and on board controllers"
depends on ISA || EISA || PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 4e74d93..e2f1f55 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -54,7 +54,6 @@ obj-$(CONFIG_VETH) += veth.o
obj-$(CONFIG_NET_NETX) += netx-eth.o
obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_ENC28J60) += enc28j60.o
-obj-$(CONFIG_GRETH) += greth.o
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_ETHERNET) += ethernet/
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index e89bb27..32561c7 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -13,6 +13,7 @@ if ETHERNET
source "drivers/net/ethernet/3com/Kconfig"
source "drivers/net/ethernet/adaptec/Kconfig"
+source "drivers/net/ethernet/aeroflex/Kconfig"
source "drivers/net/ethernet/amd/Kconfig"
source "drivers/net/ethernet/apple/Kconfig"
source "drivers/net/ethernet/atheros/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 5ef1218..94f1be8 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -5,6 +5,7 @@
obj-$(CONFIG_NET_VENDOR_3COM) += 3com/
obj-$(CONFIG_NET_VENDOR_8390) += 8390/
obj-$(CONFIG_NET_VENDOR_ADAPTEC) += adaptec/
+obj-$(CONFIG_GRETH) += aeroflex/
obj-$(CONFIG_NET_VENDOR_AMD) += amd/
obj-$(CONFIG_NET_VENDOR_APPLE) += apple/
obj-$(CONFIG_NET_VENDOR_ATHEROS) += atheros/
diff --git a/drivers/net/ethernet/aeroflex/Kconfig b/drivers/net/ethernet/aeroflex/Kconfig
new file mode 100644
index 0000000..4f4a8d7
--- /dev/null
+++ b/drivers/net/ethernet/aeroflex/Kconfig
@@ -0,0 +1,11 @@
+#
+# Aeroflex Gaisler network device configuration
+#
+
+config GRETH
+ tristate "Aeroflex Gaisler GRETH Ethernet MAC support"
+ depends on SPARC
+ select PHYLIB
+ select CRC32
+ ---help---
+ Say Y here if you want to use the Aeroflex Gaisler GRETH Ethernet MAC.
diff --git a/drivers/net/ethernet/aeroflex/Makefile b/drivers/net/ethernet/aeroflex/Makefile
new file mode 100644
index 0000000..6e62a67
--- /dev/null
+++ b/drivers/net/ethernet/aeroflex/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for the Aeroflex Gaisler network device drivers.
+#
+
+obj-$(CONFIG_GRETH) += greth.o
diff --git a/drivers/net/greth.c b/drivers/net/ethernet/aeroflex/greth.c
similarity index 100%
rename from drivers/net/greth.c
rename to drivers/net/ethernet/aeroflex/greth.c
diff --git a/drivers/net/greth.h b/drivers/net/ethernet/aeroflex/greth.h
similarity index 100%
rename from drivers/net/greth.h
rename to drivers/net/ethernet/aeroflex/greth.h
--
1.7.6
^ permalink raw reply related
* [net-next 03/12] ethoc: Move the Avionic driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Thierry Reding
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the Avionic driver into drivers/net/ethernet/ and make the
necessary Kconfig and Makefile changes.
CC: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/Kconfig | 10 ----------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 11 +++++++++++
drivers/net/ethernet/Makefile | 1 +
drivers/net/{ => ethernet}/ethoc.c | 0
5 files changed, 12 insertions(+), 11 deletions(-)
rename drivers/net/{ => ethernet}/ethoc.c (100%)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index d292da7..fe2a8bc 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -291,16 +291,6 @@ config ENC28J60_WRITEVERIFY
Enable the verify after the buffer write useful for debugging purpose.
If unsure, say N.
-config ETHOC
- tristate "OpenCores 10/100 Mbps Ethernet MAC support"
- depends on NET_ETHERNET && HAS_IOMEM && HAS_DMA
- select MII
- select PHYLIB
- select CRC32
- select BITREVERSE
- help
- Say Y here if you want to use the OpenCores 10/100 Mbps Ethernet MAC.
-
config GRETH
tristate "Aeroflex Gaisler GRETH Ethernet MAC support"
depends on SPARC
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 14960d4..4e74d93 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -54,7 +54,6 @@ obj-$(CONFIG_VETH) += veth.o
obj-$(CONFIG_NET_NETX) += netx-eth.o
obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_ENC28J60) += enc28j60.o
-obj-$(CONFIG_ETHOC) += ethoc.o
obj-$(CONFIG_GRETH) += greth.o
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index a911753..e89bb27 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -103,6 +103,17 @@ source "drivers/net/ethernet/nuvoton/Kconfig"
source "drivers/net/ethernet/nvidia/Kconfig"
source "drivers/net/ethernet/octeon/Kconfig"
source "drivers/net/ethernet/oki-semi/Kconfig"
+
+config ETHOC
+ tristate "OpenCores 10/100 Mbps Ethernet MAC support"
+ depends on HAS_IOMEM && HAS_DMA
+ select MII
+ select PHYLIB
+ select CRC32
+ select BITREVERSE
+ ---help---
+ Say Y here if you want to use the OpenCores 10/100 Mbps Ethernet MAC.
+
source "drivers/net/ethernet/packetengines/Kconfig"
source "drivers/net/ethernet/pasemi/Kconfig"
source "drivers/net/ethernet/qlogic/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 5154291..5ef1218 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -43,6 +43,7 @@ obj-$(CONFIG_NET_VENDOR_NUVOTON) += nuvoton/
obj-$(CONFIG_NET_VENDOR_NVIDIA) += nvidia/
obj-$(CONFIG_OCTEON_MGMT_ETHERNET) += octeon/
obj-$(CONFIG_NET_VENDOR_OKI) += oki-semi/
+obj-$(CONFIG_ETHOC) += ethoc.o
obj-$(CONFIG_NET_PACKET_ENGINE) += packetengines/
obj-$(CONFIG_NET_VENDOR_PASEMI) += pasemi/
obj-$(CONFIG_NET_VENDOR_QLOGIC) += qlogic/
diff --git a/drivers/net/ethoc.c b/drivers/net/ethernet/ethoc.c
similarity index 100%
rename from drivers/net/ethoc.c
rename to drivers/net/ethernet/ethoc.c
--
1.7.6
^ permalink raw reply related
* [net-next 02/12] dnet: Move the Dave Ethernet driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Ilya Yanok
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the Dave Ethernet driver into drivers/net/ethernet/ and
make the necessary Kconfig and Makefile changes.
CC: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/Kconfig | 11 -----------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 12 ++++++++++++
drivers/net/ethernet/Makefile | 1 +
drivers/net/{ => ethernet}/dnet.c | 0
drivers/net/{ => ethernet}/dnet.h | 0
6 files changed, 13 insertions(+), 12 deletions(-)
rename drivers/net/{ => ethernet}/dnet.c (100%)
rename drivers/net/{ => ethernet}/dnet.h (100%)
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 39ba799..d292da7 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -309,17 +309,6 @@ config GRETH
help
Say Y here if you want to use the Aeroflex Gaisler GRETH Ethernet MAC.
-config DNET
- tristate "Dave ethernet support (DNET)"
- depends on NET_ETHERNET && HAS_IOMEM
- select PHYLIB
- help
- The Dave ethernet interface (DNET) is found on Qong Board FPGA.
- Say Y to include support for the DNET chip.
-
- To compile this driver as a module, choose M here: the module
- will be called dnet.
-
config NET_PCI
bool "EISA, VLB, PCI and on board controllers"
depends on ISA || EISA || PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 5b37149..14960d4 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -57,7 +57,6 @@ obj-$(CONFIG_ENC28J60) += enc28j60.o
obj-$(CONFIG_ETHOC) += ethoc.o
obj-$(CONFIG_GRETH) += greth.o
-obj-$(CONFIG_DNET) += dnet.o
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
obj-$(CONFIG_ETHERNET) += ethernet/
obj-$(CONFIG_TR) += tokenring/
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index c1ce356..a911753 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -23,6 +23,18 @@ source "drivers/net/ethernet/brocade/Kconfig"
source "drivers/net/ethernet/chelsio/Kconfig"
source "drivers/net/ethernet/cirrus/Kconfig"
source "drivers/net/ethernet/cisco/Kconfig"
+
+config DNET
+ tristate "Dave ethernet support (DNET)"
+ depends on HAS_IOMEM
+ select PHYLIB
+ ---help---
+ The Dave ethernet interface (DNET) is found on Qong Board FPGA.
+ Say Y to include support for the DNET chip.
+
+ To compile this driver as a module, choose M here: the module
+ will be called dnet.
+
source "drivers/net/ethernet/dec/Kconfig"
source "drivers/net/ethernet/dlink/Kconfig"
source "drivers/net/ethernet/emulex/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 34e84fa..5154291 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_NET_VENDOR_BROCADE) += brocade/
obj-$(CONFIG_NET_VENDOR_CHELSIO) += chelsio/
obj-$(CONFIG_NET_VENDOR_CIRRUS) += cirrus/
obj-$(CONFIG_NET_VENDOR_CISCO) += cisco/
+obj-$(CONFIG_DNET) += dnet.o
obj-$(CONFIG_NET_VENDOR_DEC) += dec/
obj-$(CONFIG_NET_VENDOR_DLINK) += dlink/
obj-$(CONFIG_NET_VENDOR_EMULEX) += emulex/
diff --git a/drivers/net/dnet.c b/drivers/net/ethernet/dnet.c
similarity index 100%
rename from drivers/net/dnet.c
rename to drivers/net/ethernet/dnet.c
diff --git a/drivers/net/dnet.h b/drivers/net/ethernet/dnet.h
similarity index 100%
rename from drivers/net/dnet.h
rename to drivers/net/ethernet/dnet.h
--
1.7.6
^ permalink raw reply related
* [net-next 01/12] hp100: Move the HP driver
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann, Jaroslav Kysela
In-Reply-To: <1313222196-10074-1-git-send-email-jeffrey.t.kirsher@intel.com>
Move the HP driver into drivers/net/ethernet/hp/ and
made the necessary Kconfig and Makefile changes.
CC: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
MAINTAINERS | 2 +-
drivers/net/Kconfig | 11 -----------
drivers/net/Makefile | 1 -
drivers/net/ethernet/Kconfig | 1 +
drivers/net/ethernet/Makefile | 1 +
drivers/net/ethernet/hp/Kconfig | 31 +++++++++++++++++++++++++++++++
drivers/net/ethernet/hp/Makefile | 5 +++++
drivers/net/{ => ethernet/hp}/hp100.c | 0
drivers/net/{ => ethernet/hp}/hp100.h | 0
9 files changed, 39 insertions(+), 13 deletions(-)
create mode 100644 drivers/net/ethernet/hp/Kconfig
create mode 100644 drivers/net/ethernet/hp/Makefile
rename drivers/net/{ => ethernet/hp}/hp100.c (100%)
rename drivers/net/{ => ethernet/hp}/hp100.h (100%)
diff --git a/MAINTAINERS b/MAINTAINERS
index 8ca886e..dfa4269 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3066,7 +3066,7 @@ F: drivers/platform/x86/tc1100-wmi.c
HP100: Driver for HP 10/100 Mbit/s Voice Grade Network Adapter Series
M: Jaroslav Kysela <perex@perex.cz>
S: Maintained
-F: drivers/net/hp100.*
+F: drivers/net/ethernet/hp/hp100.*
HPET: High Precision Event Timers driver
M: Clemens Ladisch <clemens@ladisch.de>
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index e6e10a4..39ba799 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -320,17 +320,6 @@ config DNET
To compile this driver as a module, choose M here: the module
will be called dnet.
-config HP100
- tristate "HP 10/100VG PCLAN (ISA, EISA, PCI) support"
- depends on ISA || EISA || PCI
- help
- If you have a network (Ethernet) card of this type, say Y and read
- the Ethernet-HOWTO, available from
- <http://www.tldp.org/docs.html#howto>.
-
- To compile this driver as a module, choose M here. The module
- will be called hp100.
-
config NET_PCI
bool "EISA, VLB, PCI and on board controllers"
depends on ISA || EISA || PCI
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 670e175..5b37149 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -26,7 +26,6 @@ obj-$(CONFIG_SH_ETH) += sh_eth.o
obj-$(CONFIG_NET) += Space.o loopback.o
obj-$(CONFIG_NET_SB1000) += sb1000.o
-obj-$(CONFIG_HP100) += hp100.o
obj-$(CONFIG_PPP) += ppp_generic.o
obj-$(CONFIG_PPP_ASYNC) += ppp_async.o
diff --git a/drivers/net/ethernet/Kconfig b/drivers/net/ethernet/Kconfig
index 8cd38c9..c1ce356 100644
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
@@ -30,6 +30,7 @@ source "drivers/net/ethernet/neterion/Kconfig"
source "drivers/net/ethernet/faraday/Kconfig"
source "drivers/net/ethernet/freescale/Kconfig"
source "drivers/net/ethernet/fujitsu/Kconfig"
+source "drivers/net/ethernet/hp/Kconfig"
source "drivers/net/ethernet/ibm/Kconfig"
source "drivers/net/ethernet/intel/Kconfig"
source "drivers/net/ethernet/i825xx/Kconfig"
diff --git a/drivers/net/ethernet/Makefile b/drivers/net/ethernet/Makefile
index 50e040c..34e84fa 100644
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_NET_VENDOR_EXAR) += neterion/
obj-$(CONFIG_NET_VENDOR_FARADAY) += faraday/
obj-$(CONFIG_NET_VENDOR_FREESCALE) += freescale/
obj-$(CONFIG_NET_VENDOR_FUJITSU) += fujitsu/
+obj-$(CONFIG_NET_VENDOR_HP) += hp/
obj-$(CONFIG_NET_VENDOR_IBM) += ibm/
obj-$(CONFIG_NET_VENDOR_INTEL) += intel/
obj-$(CONFIG_NET_VENDOR_I825XX) += i825xx/
diff --git a/drivers/net/ethernet/hp/Kconfig b/drivers/net/ethernet/hp/Kconfig
new file mode 100644
index 0000000..07b42e9
--- /dev/null
+++ b/drivers/net/ethernet/hp/Kconfig
@@ -0,0 +1,31 @@
+#
+# HP network device configuration
+#
+
+config NET_VENDOR_HP
+ bool "HP devices"
+ depends on ISA || EISA || PCI
+ ---help---
+ If you have a network (Ethernet) card belonging to this class, say Y
+ and read the Ethernet-HOWTO, available from
+ <http://www.tldp.org/docs.html#howto>.
+
+ Note that the answer to this question doesn't directly affect the
+ kernel: saying N will just cause the configurator to skip all
+ the questions about HP cards. If you say Y, you will be asked for
+ your specific card in the following questions.
+
+if NET_VENDOR_HP
+
+config HP100
+ tristate "HP 10/100VG PCLAN (ISA, EISA, PCI) support"
+ depends on (ISA || EISA || PCI)
+ ---help---
+ If you have a network (Ethernet) card of this type, say Y and read
+ the Ethernet-HOWTO, available from
+ <http://www.tldp.org/docs.html#howto>.
+
+ To compile this driver as a module, choose M here. The module
+ will be called hp100.
+
+endif # NET_VENDOR_HP
diff --git a/drivers/net/ethernet/hp/Makefile b/drivers/net/ethernet/hp/Makefile
new file mode 100644
index 0000000..20b6918
--- /dev/null
+++ b/drivers/net/ethernet/hp/Makefile
@@ -0,0 +1,5 @@
+#
+# Makefile for the HP network device drivers.
+#
+
+obj-$(CONFIG_HP100) += hp100.o
diff --git a/drivers/net/hp100.c b/drivers/net/ethernet/hp/hp100.c
similarity index 100%
rename from drivers/net/hp100.c
rename to drivers/net/ethernet/hp/hp100.c
diff --git a/drivers/net/hp100.h b/drivers/net/ethernet/hp/hp100.h
similarity index 100%
rename from drivers/net/hp100.h
rename to drivers/net/ethernet/hp/hp100.h
--
1.7.6
^ permalink raw reply related
* [net-next 00/12] drivers/net organize Ethernet drivers (7th series)
From: Jeff Kirsher @ 2011-08-13 7:56 UTC (permalink / raw)
To: davem; +Cc: Jeff Kirsher, netdev, gospo, sassmann
This is the seventh of seven 10 patch series (although this series is 12
patches) to move the Ethernet drivers into drivers/net/ethernet/.
There is still a bit of cleanup left (FDDI, PPP, SLIP, etc), which will
be coming shortly and small in comparison to the Ethernet driver move.
The following are changes since commit 9bba23b0ae933a143f8ea89e59c6becf0c1c1d1e:
starfire: Move the Adaptec driver
and are available in the git repository at:
master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/next-organize master
Jeff Kirsher (12):
hp100: Move the HP driver
dnet: Move the Dave Ethernet driver
ethoc: Move the Avionic driver
greth: Move the Aeroflex Gaisler driver
enc28j60: Move the Microchip driver
dm9000: Move the Davicom driver
netx: Move the netx driver
sh_eth: Move the Renesas SuperH driver
xircom: Move the Xircom driver
tile: Move the Tilera driver
acenic: Move the Alteon driver
drivers/net: Kconfig and Makefile cleanup
MAINTAINERS | 6 +-
drivers/net/Kconfig | 238 ---
drivers/net/Makefile | 14 -
drivers/net/ethernet/3com/Kconfig | 27 -
drivers/net/ethernet/3com/Makefile | 1 -
drivers/net/ethernet/Kconfig | 48 +
drivers/net/ethernet/Makefile | 11 +
drivers/net/ethernet/aeroflex/Kconfig | 11 +
drivers/net/ethernet/aeroflex/Makefile | 5 +
drivers/net/{ => ethernet/aeroflex}/greth.c | 0
drivers/net/{ => ethernet/aeroflex}/greth.h | 0
drivers/net/ethernet/alteon/Kconfig | 47 +
drivers/net/ethernet/alteon/Makefile | 5 +
drivers/net/ethernet/{3com => alteon}/acenic.c | 0
drivers/net/ethernet/{3com => alteon}/acenic.h | 0
drivers/net/ethernet/davicom/Kconfig | 31 +
drivers/net/ethernet/davicom/Makefile | 5 +
drivers/net/{ => ethernet/davicom}/dm9000.c | 0
drivers/net/{ => ethernet/davicom}/dm9000.h | 0
drivers/net/{ => ethernet}/dnet.c | 0
drivers/net/{ => ethernet}/dnet.h | 0
drivers/net/{ => ethernet}/ethoc.c | 0
drivers/net/ethernet/hp/Kconfig | 31 +
drivers/net/ethernet/hp/Makefile | 5 +
drivers/net/{ => ethernet/hp}/hp100.c | 0
drivers/net/{ => ethernet/hp}/hp100.h | 0
drivers/net/ethernet/microchip/Kconfig | 37 +
drivers/net/ethernet/microchip/Makefile | 5 +
drivers/net/{ => ethernet/microchip}/enc28j60.c | 0
drivers/net/{ => ethernet/microchip}/enc28j60_hw.h | 0
drivers/net/{ => ethernet}/netx-eth.c | 0
drivers/net/ethernet/renesas/Kconfig | 18 +
drivers/net/ethernet/renesas/Makefile | 5 +
drivers/net/{ => ethernet/renesas}/sh_eth.c | 0
drivers/net/{ => ethernet/renesas}/sh_eth.h | 0
drivers/net/ethernet/tile/Kconfig | 15 +
drivers/net/{ => ethernet}/tile/Makefile | 0
drivers/net/{ => ethernet}/tile/tilepro.c | 0
drivers/net/ethernet/xircom/Kconfig | 30 +
drivers/net/ethernet/xircom/Makefile | 5 +
.../net/{pcmcia => ethernet/xircom}/xirc2ps_cs.c | 0
drivers/net/pci-skeleton.c | 1923 --------------------
drivers/net/pcmcia/Kconfig | 9 -
drivers/net/pcmcia/Makefile | 1 -
44 files changed, 317 insertions(+), 2216 deletions(-)
create mode 100644 drivers/net/ethernet/aeroflex/Kconfig
create mode 100644 drivers/net/ethernet/aeroflex/Makefile
rename drivers/net/{ => ethernet/aeroflex}/greth.c (100%)
rename drivers/net/{ => ethernet/aeroflex}/greth.h (100%)
create mode 100644 drivers/net/ethernet/alteon/Kconfig
create mode 100644 drivers/net/ethernet/alteon/Makefile
rename drivers/net/ethernet/{3com => alteon}/acenic.c (100%)
rename drivers/net/ethernet/{3com => alteon}/acenic.h (100%)
create mode 100644 drivers/net/ethernet/davicom/Kconfig
create mode 100644 drivers/net/ethernet/davicom/Makefile
rename drivers/net/{ => ethernet/davicom}/dm9000.c (100%)
rename drivers/net/{ => ethernet/davicom}/dm9000.h (100%)
rename drivers/net/{ => ethernet}/dnet.c (100%)
rename drivers/net/{ => ethernet}/dnet.h (100%)
rename drivers/net/{ => ethernet}/ethoc.c (100%)
create mode 100644 drivers/net/ethernet/hp/Kconfig
create mode 100644 drivers/net/ethernet/hp/Makefile
rename drivers/net/{ => ethernet/hp}/hp100.c (100%)
rename drivers/net/{ => ethernet/hp}/hp100.h (100%)
create mode 100644 drivers/net/ethernet/microchip/Kconfig
create mode 100644 drivers/net/ethernet/microchip/Makefile
rename drivers/net/{ => ethernet/microchip}/enc28j60.c (100%)
rename drivers/net/{ => ethernet/microchip}/enc28j60_hw.h (100%)
rename drivers/net/{ => ethernet}/netx-eth.c (100%)
create mode 100644 drivers/net/ethernet/renesas/Kconfig
create mode 100644 drivers/net/ethernet/renesas/Makefile
rename drivers/net/{ => ethernet/renesas}/sh_eth.c (100%)
rename drivers/net/{ => ethernet/renesas}/sh_eth.h (100%)
create mode 100644 drivers/net/ethernet/tile/Kconfig
rename drivers/net/{ => ethernet}/tile/Makefile (100%)
rename drivers/net/{ => ethernet}/tile/tilepro.c (100%)
create mode 100644 drivers/net/ethernet/xircom/Kconfig
create mode 100644 drivers/net/ethernet/xircom/Makefile
rename drivers/net/{pcmcia => ethernet/xircom}/xirc2ps_cs.c (100%)
delete mode 100644 drivers/net/pci-skeleton.c
--
1.7.6
^ permalink raw reply
* Re: [net-next 00/10] drivers/net organize Ethernet drivers (6th series)
From: David Miller @ 2011-08-13 6:26 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, sassmann
In-Reply-To: <1313178344-8168-1-git-send-email-jeffrey.t.kirsher@intel.com>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 12 Aug 2011 12:45:34 -0700
> This is the sixth of seven 10 patch series to move the Ethernet
> drivers into drivers/net/ethernet/
>
> The following are changes since commit b13ad8f498793dc582b7f42f27b8f44490bd608d:
> xilinx/ll_temac: Move the Xilinx drivers
> and are available in the git repository at:
> master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/next-organize master
Pulled, thanks Jeff.
^ permalink raw reply
* Re: linux-next: Tree for Aug 12 (benet/be2net)
From: David Miller @ 2011-08-13 6:20 UTC (permalink / raw)
To: rdunlap
Cc: shemminger, sfr, netdev, linux-next, linux-kernel, sathya.perla,
subbu.seetharaman, ajit.khaparde
In-Reply-To: <20110812151409.b8af0108.rdunlap@xenotime.net>
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Fri, 12 Aug 2011 15:14:09 -0700
> On Fri, 12 Aug 2011 15:06:07 -0700 Stephen Hemminger wrote:
>
>> On Fri, 12 Aug 2011 13:56:18 -0700
>> Randy Dunlap <rdunlap@xenotime.net> wrote:
>>
>> > On Fri, 12 Aug 2011 17:13:11 +1000 Stephen Rothwell wrote:
>> >
>> > > Hi all,
>> > >
>> > > [The kernel.org mirroring is being very slow today]
>> >
>> > [s.l.o.w.]
>> >
>> > > The net tree gained a build failure do I used the version from
>> > > next-20110811.
>> >
>> >
>> > On i386:
>> >
>> > drivers/built-in.o: In function `be_rx_eqd_update':
>> > be_main.c:(.text+0x569229): undefined reference to `__udivdi3'
>> >
>>
>> Already fixed:
>
> That's really good news. It appears to be re-b0rked
> or this patch is not in linux-next yet.
Stephen Rothwell dropped the net-next tree from -next yesterday due to
some other unrelated fallout.
^ permalink raw reply
* Re: linux-next: Tree for Aug 12 (benet/be2net)
From: David Miller @ 2011-08-13 6:19 UTC (permalink / raw)
To: rdunlap
Cc: sfr, netdev, linux-next, linux-kernel, sathya.perla,
subbu.seetharaman, ajit.khaparde
In-Reply-To: <20110812135618.a209d9af.rdunlap@xenotime.net>
From: Randy Dunlap <rdunlap@xenotime.net>
Date: Fri, 12 Aug 2011 13:56:18 -0700
> On Fri, 12 Aug 2011 17:13:11 +1000 Stephen Rothwell wrote:
>
>> Hi all,
>>
>> [The kernel.org mirroring is being very slow today]
>
> [s.l.o.w.]
>
>> The net tree gained a build failure do I used the version from
>> next-20110811.
>
>
> On i386:
>
> drivers/built-in.o: In function `be_rx_eqd_update':
> be_main.c:(.text+0x569229): undefined reference to `__udivdi3'
This is fixed in the net-next tree already by Eric Dumazet, but
thanks for reporting. :-)
^ permalink raw reply
* Re: [PATCH] bridge: mask forwarding of IEEE 802 local multicast groups
From: Ed Swierk @ 2011-08-13 5:43 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
In-Reply-To: <20110812154545.79d8313f@nehalam.ftrdhcpuser.net>
On Fri, Aug 12, 2011 at 3:45 PM, Stephen Hemminger
<shemminger@vyatta.com> wrote:
> If you turn off STP that is what it does right now. It forwards STP
> and 802.1X frames. The patch was only related to turning on STP
> and still expecting 802.1X frames to be forwarded (in violation of
> the spec).
As far as I can tell, the only case currently where the bridge
forwards a packet destined for a link-local multicast address is
if (p->br->stp_enabled == BR_NO_STP && dest[5] == 0)
dest[5] != 0 for an LLDP packet, whose destination address is
01-80-C2-00-00-0E per IEEE 802.1AB-2005.
--Ed
^ permalink raw reply
* Let op Let op! Te activeren! Webmail Quota Limiet
From: Nicolle Smith @ 2011-08-13 0:38 UTC (permalink / raw)
Uw mailbox heeft overschreden de limiet van 1GB, die zo
gedefinieerd door de beheerder, bent u draait op 5.9GB, mag u niet
kunnen verzenden of ontvangen nieuwe berichten totdat u opnieuw valideren van uw
mailbox. Om revalidates uw mailbox,
Klik op onderstaande link:
http://sindicato2.com/form/use/please/form1.html
dank U
Webmail System Administrator
2011 ITS Help Desk.
^ permalink raw reply
* Re: [net-next RFC PATCH 0/7] multiqueue support for tun/tap
From: Sridhar Samudrala @ 2011-08-13 0:46 UTC (permalink / raw)
To: Jason Wang
Cc: mst, netdev, linux-kernel, virtualization, davem, krkumar2, rusty,
qemu-devel, kvm, mirq-linux
In-Reply-To: <20110812015221.31613.95001.stgit@intel-e5620-16-2.englab.nay.redhat.com>
On Fri, 2011-08-12 at 09:54 +0800, Jason Wang wrote:
> As multi-queue nics were commonly used for high-end servers,
> current single queue based tap can not satisfy the
> requirement of scaling guest network performance as the
> numbers of vcpus increase. So the following series
> implements multiple queue support in tun/tap.
>
> In order to take advantages of this, a multi-queue capable
> driver and qemu were also needed. I just rebase the latest
> version of Krishna's multi-queue virtio-net driver into this
> series to simplify the test. And for multiqueue supported
> qemu, you can refer the patches I post in
> http://www.spinics.net/lists/kvm/msg52808.html. Vhost is
> also a must to achieve high performance and its code could
> be used for multi-queue without modification. Alternatively,
> this series can be also used for Krishna's M:N
> implementation of multiqueue but I didn't test it.
>
> The idea is simple: each socket were abstracted as a queue
> for tun/tap, and userspace may open as many files as
> required and then attach them to the devices. In order to
> keep the ABI compatibility, device creation were still
> finished in TUNSETIFF, and two new ioctls TUNATTACHQUEUE and
> TUNDETACHQUEUE were added for user to manipulate the numbers
> of queues for the tun/tap.
Is it possible to have tap create these queues automatically when
TUNSETIFF is called instead of having userspace to do the new
ioctls. I am just wondering if it is possible to get multi-queue
to be enabled without any changes to qemu. I guess the number of queues
could be based on the number of vhost threads/guest virtio-net queues.
Also, is it possible to enable multi-queue on the host alone without
any guest virtio-net changes?
Have you done any multiple TCP_RR/UDP_RR testing with small packet
sizes? 256byte request/response with 50-100 instances?
>
> I've done some basic performance testing of multi queue
> tap. For tun, I just test it through vpnc.
>
> Notes:
> - Test shows improvement when receving packets from
> local/external host to guest, and send big packet from guest
> to local/external host.
> - Current multiqueue based virtio-net/tap introduce a
> regression of send small packet (512 byte) from guest to
> local/external host. I suspect it's the issue of queue
> selection in both guest driver and tap. Would continue to
> investigate.
> - I would post the perforamnce numbers as a reply of this
> mail.
>
> TODO:
> - solve the issue of packet transmission of small packets.
> - addressing the comments of virtio-net driver
> - performance tunning
>
> Please review and comment it, Thanks.
>
> ---
>
> Jason Wang (5):
> tuntap: move socket/sock related structures to tun_file
> tuntap: categorize ioctl
> tuntap: introduce multiqueue related flags
> tuntap: multiqueue support
> tuntap: add ioctls to attach or detach a file form tap device
>
> Krishna Kumar (2):
> Change virtqueue structure
> virtio-net changes
>
>
> drivers/net/tun.c | 738 ++++++++++++++++++++++++++-----------------
> drivers/net/virtio_net.c | 578 ++++++++++++++++++++++++----------
> drivers/virtio/virtio_pci.c | 10 -
> include/linux/if_tun.h | 5
> include/linux/virtio.h | 1
> include/linux/virtio_net.h | 3
> 6 files changed, 867 insertions(+), 468 deletions(-)
>
^ permalink raw reply
* Re: [RFC PATCH v2 0/9] bql: Byte Queue Limits
From: Stephen Hemminger @ 2011-08-13 0:38 UTC (permalink / raw)
To: Tom Herbert; +Cc: davem, netdev
In-Reply-To: <CA+mtBx-nezRVZ7Q3h1uFCycEK6bL+ZsBR8Go69KsMu+g0UYvLw@mail.gmail.com>
On Fri, 12 Aug 2011 17:33:24 -0700
Tom Herbert <therbert@google.com> wrote:
> > 1. Need a way to configure the values. My preference would be new
> > netlink attribute and via 'ip link set' ...
> >
> As opposed to using sysfs entries?
Both are useful. But netlink is more consistent and has the
ability to be used as a transport.
^ permalink raw reply
* Re: [RFC PATCH v2 0/9] bql: Byte Queue Limits
From: Tom Herbert @ 2011-08-13 0:33 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: davem, netdev
In-Reply-To: <20110812112025.5788de0b@nehalam.ftrdhcpuser.net>
> 1. Need a way to configure the values. My preference would be new
> netlink attribute and via 'ip link set' ...
>
As opposed to using sysfs entries?
> 2. Does this need to know the speed of the link (autonegotiation) or
No.
> is it self clocking?
It is self clocking. The only time related tunable is hold_time
(which I think can have a reasonable default).
Tom
^ permalink raw reply
* [PATCH][Trivial] net/wan/hdlc_ppp: remove dead goto
From: Jesper Juhl @ 2011-08-12 23:39 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: netdev, linux-kernel, trivial
From: Jesper Juhl <jj@chaosbits.net>
We'll either hit one of the case labels or the default in the switch
and in all cases do we then 'goto out', so having 'goto out' right
after the switch is pointless as we can never hit it - remove it.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
drivers/net/wan/hdlc_ppp.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wan/hdlc_ppp.c b/drivers/net/wan/hdlc_ppp.c
index 055a918..5385876 100644
--- a/drivers/net/wan/hdlc_ppp.c
+++ b/drivers/net/wan/hdlc_ppp.c
@@ -547,7 +547,6 @@ static int ppp_rx(struct sk_buff *skb)
ppp_cp_event(dev, pid, RUC, 0, 0, len, cp);
goto out;
}
- goto out;
rx_error:
dev->stats.rx_errors++;
--
1.7.6
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH 2/2] net: minor update to Documentation/networking/scaling.txt
From: Rick Jones @ 2011-08-12 23:32 UTC (permalink / raw)
To: Willem de Bruijn; +Cc: rdunlap, linux-doc, davem, netdev, therbert
In-Reply-To: <4E4476CC.5050900@google.com>
On 08/11/2011 05:41 PM, Willem de Bruijn wrote:
> Incorporate last comments about hyperthreading, interrupt coalescing and
> the definition of cache domains into the network scaling document scaling.txt
>
> Signed-off-by: Willem de Bruijn<willemb@google.com>
>
> ---
> Documentation/networking/scaling.txt | 23 +++++++++++++++--------
> 1 files changed, 15 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/networking/scaling.txt b/Documentation/networking/scaling.txt
> index 3da03c3..6197126 100644
> --- a/Documentation/networking/scaling.txt
> +++ b/Documentation/networking/scaling.txt
> @@ -52,7 +52,8 @@ module parameter for specifying the number of hardware queues to
> configure. In the bnx2x driver, for instance, this parameter is called
> num_queues. A typical RSS configuration would be to have one receive queue
> for each CPU if the device supports enough queues, or otherwise at least
> -one for each cache domain at a particular cache level (L1, L2, etc.).
> +one for each memory domain, where a memory domain is a set of CPUs that
> +share a particular memory level (L1, L2, NUMA node, etc.).
I'd suggest simply "share a particular level in the memory hierarchy
(Cache, NUMA node, etc)" and that way you get away from people asking
nitpicky questions about where cache hierarchy counting starts, and at
what level caches might be shared :)
Apart from that, looks fine.
rick jones
^ permalink raw reply
* Re: [PATCH 2/3] drivers/staging/rtl8192e: Don't pass huge struct by value
From: Larry Finger @ 2011-08-12 23:25 UTC (permalink / raw)
To: Jesper Juhl
Cc: Greg Kroah-Hartman, devel, linux-kernel, Mike McCormack,
Lucas De Marchi, Stefan Weil, Andrea Merello, netdev
In-Reply-To: <alpine.LNX.2.00.1108130058310.7387@swampdragon.chaosbits.net>
On 08/12/2011 06:04 PM, Jesper Juhl wrote:
> From: Jesper Juhl<jj@chaosbits.net>
> Date: Sat, 13 Aug 2011 00:52:32 +0200
>
> struct ieee80211_network is fairly large (more than half a kilobyte),
> so let's pass a pointer instead of passing the entire structure by
> value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
> look at a few members.
> Also remove parentheses around the values being returned from those
> two functions - 'return' is not a function.
>
> Signed-off-by: Jesper Juhl<jj@chaosbits.net>
> ---
> drivers/staging/rtl8192e/ieee80211/ieee80211.h | 4 ++--
> .../staging/rtl8192e/ieee80211/ieee80211_softmac.c | 14 +++++++-------
> 2 files changed, 9 insertions(+), 9 deletions(-)
This patch is a good one; however, in Greg's pile of unmerged patches is a
completely different driver for the RTL8192E. The new driver has the advantage
of being organized much more like the drivers in rtlwifi. That will make it
easier to convert to mac80211 and move to mainline.
I also have a lot of unsubmitted patches to clean up the code in the new driver.
At the moment, it is clear of 'checkpatch -f' errors, and most warnings. In
addition, many of the sparse warnings are fixed. Once Greg merges the patches
already submitted, I will send the others.
Larry
^ permalink raw reply
* Re: [net-next RFC PATCH 4/7] tuntap: multiqueue support
From: Paul E. McKenney @ 2011-08-12 23:21 UTC (permalink / raw)
To: Jason Wang
Cc: krkumar2, kvm, mst, qemu-devel, netdev, rusty, linux-kernel,
virtualization, mirq-linux, davem
In-Reply-To: <20110812015520.31613.99890.stgit@intel-e5620-16-2.englab.nay.redhat.com>
On Fri, Aug 12, 2011 at 09:55:20AM +0800, Jason Wang wrote:
> With the abstraction that each socket were a backend of a
> queue for userspace, this patch adds multiqueue support for
> tap device by allowing multiple sockets to be attached to a
> tap device. Then we could parallize the transmission by put
> them into different socket.
>
> As queue related information were stored in private_data of
> file new, we could simply implement the multiqueue support
> by add an array of pointers to sockets were stored in the
> tap device. Then ioctls may be added to manipulate those
> pointers for adding or removing queues.
>
> In order to let tx path lockless, NETIF_F_LLTX were used for
> multiqueue tap device. And RCU is used for doing
> synchronization between packet handling and system calls
> such as removing queues.
>
> Currently, multiqueue support is limited for tap , but it's
> easy also enable it for tun if we find it was also helpful.
Question below about calls to tun_get_slot().
Thanx, Paul
> Signed-off-by: Jason Wang <jasowang@redhat.com>
> ---
> drivers/net/tun.c | 376 ++++++++++++++++++++++++++++++++++-------------------
> 1 files changed, 243 insertions(+), 133 deletions(-)
>
> diff --git a/drivers/net/tun.c b/drivers/net/tun.c
> index 4cd292a..8bc6dff 100644
> --- a/drivers/net/tun.c
> +++ b/drivers/net/tun.c
> @@ -108,6 +108,8 @@ struct tap_filter {
> unsigned char addr[FLT_EXACT_COUNT][ETH_ALEN];
> };
>
> +#define MAX_TAP_QUEUES (NR_CPUS < 16 ? NR_CPUS : 16)
> +
> struct tun_file {
> struct sock sk;
> struct socket socket;
> @@ -115,7 +117,7 @@ struct tun_file {
> int vnet_hdr_sz;
> struct tap_filter txflt;
> atomic_t count;
> - struct tun_struct *tun;
> + struct tun_struct __rcu *tun;
> struct net *net;
> struct fasync_struct *fasync;
> unsigned int flags;
> @@ -124,7 +126,8 @@ struct tun_file {
> struct tun_sock;
>
> struct tun_struct {
> - struct tun_file *tfile;
> + struct tun_file *tfiles[MAX_TAP_QUEUES];
> + unsigned int numqueues;
> unsigned int flags;
> uid_t owner;
> gid_t group;
> @@ -139,80 +142,183 @@ struct tun_struct {
> #endif
> };
>
> -static int tun_attach(struct tun_struct *tun, struct file *file)
> +static DEFINE_SPINLOCK(tun_lock);
> +
> +/*
> + * get_slot: return a [unused/occupied] slot in tun->tfiles[]:
> + * - if 'f' is NULL, return the first empty slot;
> + * - otherwise, return the slot this pointer occupies.
> + */
> +static int tun_get_slot(struct tun_struct *tun, struct tun_file *tfile)
> {
> - struct tun_file *tfile = file->private_data;
> - int err;
> + int i;
>
> - ASSERT_RTNL();
> + for (i = 0; i < MAX_TAP_QUEUES; i++) {
> + if (rcu_dereference(tun->tfiles[i]) == tfile)
> + return i;
> + }
>
> - netif_tx_lock_bh(tun->dev);
> + /* Should never happen */
> + BUG_ON(1);
> +}
>
> - err = -EINVAL;
> - if (tfile->tun)
> - goto out;
> +/*
> + * tun_get_queue(): calculate the queue index
> + * - if skbs comes from mq nics, we can just borrow
> + * - if not, calculate from the hash
> + */
> +static struct tun_file *tun_get_queue(struct net_device *dev,
> + struct sk_buff *skb)
> +{
> + struct tun_struct *tun = netdev_priv(dev);
> + struct tun_file *tfile = NULL;
> + int numqueues = tun->numqueues;
> + __u32 rxq;
>
> - err = -EBUSY;
> - if (tun->tfile)
> + BUG_ON(!rcu_read_lock_held());
> +
> + if (!numqueues)
> goto out;
>
> - err = 0;
> - tfile->tun = tun;
> - tun->tfile = tfile;
> - netif_carrier_on(tun->dev);
> - dev_hold(tun->dev);
> - sock_hold(&tfile->sk);
> - atomic_inc(&tfile->count);
> + if (likely(skb_rx_queue_recorded(skb))) {
> + rxq = skb_get_rx_queue(skb);
> +
> + while (unlikely(rxq >= numqueues))
> + rxq -= numqueues;
> +
> + tfile = rcu_dereference(tun->tfiles[rxq]);
> + if (tfile)
> + goto out;
> + }
> +
> + /* Check if we can use flow to select a queue */
> + rxq = skb_get_rxhash(skb);
> + if (rxq) {
> + tfile = rcu_dereference(tun->tfiles[rxq % numqueues]);
> + if (tfile)
> + goto out;
> + }
> +
> + /* Everything failed - find first available queue */
> + for (rxq = 0; rxq < MAX_TAP_QUEUES; rxq++) {
> + tfile = rcu_dereference(tun->tfiles[rxq]);
> + if (tfile)
> + break;
> + }
>
> out:
> - netif_tx_unlock_bh(tun->dev);
> - return err;
> + return tfile;
> }
>
> -static void __tun_detach(struct tun_struct *tun)
> +static int tun_detach(struct tun_file *tfile, bool clean)
> {
> - struct tun_file *tfile = tun->tfile;
> - /* Detach from net device */
> - netif_tx_lock_bh(tun->dev);
> - netif_carrier_off(tun->dev);
> - tun->tfile = NULL;
> - netif_tx_unlock_bh(tun->dev);
> -
> - /* Drop read queue */
> - skb_queue_purge(&tfile->socket.sk->sk_receive_queue);
> -
> - /* Drop the extra count on the net device */
> - dev_put(tun->dev);
> -}
> + struct tun_struct *tun;
> + struct net_device *dev = NULL;
> + bool destroy = false;
>
> -static void tun_detach(struct tun_struct *tun)
> -{
> - rtnl_lock();
> - __tun_detach(tun);
> - rtnl_unlock();
> -}
> + spin_lock(&tun_lock);
>
> -static struct tun_struct *__tun_get(struct tun_file *tfile)
> -{
> - struct tun_struct *tun = NULL;
> + tun = rcu_dereference_protected(tfile->tun,
> + lockdep_is_held(&tun_lock));
> + if (tun) {
> + int index = tun_get_slot(tun, tfile);
Don't we need to be in an RCU read-side critical section in order to
safely call tun_get_slot()?
Or is the fact that we are calling with tun_lock held sufficient?
If the latter, then the rcu_dereference() in tun_get_slot() should
use rcu_dereference_protected() rather than rcu_dereference().
> + if (index == -1) {
> + spin_unlock(&tun_lock);
> + return -EINVAL;
> + }
> + dev = tun->dev;
> +
> + rcu_assign_pointer(tun->tfiles[index], NULL);
> + rcu_assign_pointer(tfile->tun, NULL);
> + --tun->numqueues;
> + sock_put(&tfile->sk);
>
> - if (atomic_inc_not_zero(&tfile->count))
> - tun = tfile->tun;
> + if (tun->numqueues == 0 && !(tun->flags & TUN_PERSIST))
> + destroy = true;
> + }
> +
> + spin_unlock(&tun_lock);
> +
> + synchronize_rcu();
> + if (clean)
> + sock_put(&tfile->sk);
>
> - return tun;
> + if (destroy) {
> + rtnl_lock();
> + if (dev->reg_state == NETREG_REGISTERED)
> + unregister_netdevice(dev);
> + rtnl_unlock();
> + }
> +
> + return 0;
> }
>
> -static struct tun_struct *tun_get(struct file *file)
> +static void tun_detach_all(struct net_device *dev)
> {
> - return __tun_get(file->private_data);
> + struct tun_struct *tun = netdev_priv(dev);
> + struct tun_file *tfile, *tfile_list[MAX_TAP_QUEUES];
> + int i, j = 0;
> +
> + spin_lock(&tun_lock);
> +
> + for (i = 0; i < MAX_TAP_QUEUES && tun->numqueues; i++) {
> + tfile = rcu_dereference_protected(tun->tfiles[i],
> + lockdep_is_held(&tun_lock));
> + if (tfile) {
> + wake_up_all(&tfile->wq.wait);
> + tfile_list[i++] = tfile;
> + rcu_assign_pointer(tun->tfiles[i], NULL);
> + rcu_assign_pointer(tfile->tun, NULL);
> + --tun->numqueues;
> + }
> + }
> + BUG_ON(tun->numqueues != 0);
> + spin_unlock(&tun_lock);
> +
> + synchronize_rcu();
> + for(--j; j >= 0; j--)
> + sock_put(&tfile_list[j]->sk);
> }
>
> -static void tun_put(struct tun_struct *tun)
> +static int tun_attach(struct tun_struct *tun, struct file *file)
> {
> - struct tun_file *tfile = tun->tfile;
> + struct tun_file *tfile = file->private_data;
> + int err, index;
> +
> + ASSERT_RTNL();
> +
> + spin_lock(&tun_lock);
>
> - if (atomic_dec_and_test(&tfile->count))
> - tun_detach(tfile->tun);
> + err = -EINVAL;
> + if (rcu_dereference_protected(tfile->tun, lockdep_is_held(&tun_lock)))
> + goto out;
> +
> + err = -EBUSY;
> + if (!(tun->flags & TUN_TAP_MQ) &&
> + rcu_dereference_protected(tun->tfiles[0],
> + lockdep_is_held(&tun_lock))) {
> + /* Multiqueue is only for TAP */
> + goto out;
> + }
> +
> + if (tun->numqueues == MAX_TAP_QUEUES)
> + goto out;
> +
> + err = 0;
> + index = tun_get_slot(tun, NULL);
> + BUG_ON(index == -1);
> + rcu_assign_pointer(tfile->tun, tun);
> + rcu_assign_pointer(tun->tfiles[index], tfile);
> + sock_hold(&tfile->sk);
> + tun->numqueues++;
> +
> + if (tun->numqueues == 1)
> + netif_carrier_on(tun->dev);
> +
> + /* device is allowed to go away first, so no need to hold extra refcnt. */
> +out:
> + spin_unlock(&tun_lock);
> + return err;
> }
>
> /* TAP filtering */
> @@ -332,16 +438,7 @@ static const struct ethtool_ops tun_ethtool_ops;
> /* Net device detach from fd. */
> static void tun_net_uninit(struct net_device *dev)
> {
> - struct tun_struct *tun = netdev_priv(dev);
> - struct tun_file *tfile = tun->tfile;
> -
> - /* Inform the methods they need to stop using the dev.
> - */
> - if (tfile) {
> - wake_up_all(&tfile->wq.wait);
> - if (atomic_dec_and_test(&tfile->count))
> - __tun_detach(tun);
> - }
> + tun_detach_all(dev);
> }
>
> /* Net device open. */
> @@ -361,10 +458,10 @@ static int tun_net_close(struct net_device *dev)
> /* Net device start xmit */
> static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
> {
> - struct tun_struct *tun = netdev_priv(dev);
> - struct tun_file *tfile = tun->tfile;
> + struct tun_file *tfile = NULL;
>
> - tun_debug(KERN_INFO, tun, "tun_net_xmit %d\n", skb->len);
> + rcu_read_lock();
> + tfile = tun_get_queue(dev, skb);
>
> /* Drop packet if interface is not attached */
> if (!tfile)
> @@ -381,7 +478,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
> goto drop;
>
> if (skb_queue_len(&tfile->socket.sk->sk_receive_queue) >= dev->tx_queue_len) {
> - if (!(tun->flags & TUN_ONE_QUEUE)) {
> + if (!(tfile->flags & TUN_ONE_QUEUE) && !(tfile->flags && TUN_TAP_MQ)) {
> /* Normal queueing mode. */
> /* Packet scheduler handles dropping of further packets. */
> netif_stop_queue(dev);
> @@ -390,7 +487,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
> * error is more appropriate. */
> dev->stats.tx_fifo_errors++;
> } else {
> - /* Single queue mode.
> + /* Single queue mode or multi queue mode.
> * Driver handles dropping of all packets itself. */
> goto drop;
> }
> @@ -408,9 +505,11 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev)
> kill_fasync(&tfile->fasync, SIGIO, POLL_IN);
> wake_up_interruptible_poll(&tfile->wq.wait, POLLIN |
> POLLRDNORM | POLLRDBAND);
> + rcu_read_unlock();
> return NETDEV_TX_OK;
>
> drop:
> + rcu_read_unlock();
> dev->stats.tx_dropped++;
> kfree_skb(skb);
> return NETDEV_TX_OK;
> @@ -526,16 +625,22 @@ static void tun_net_init(struct net_device *dev)
> static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
> {
> struct tun_file *tfile = file->private_data;
> - struct tun_struct *tun = __tun_get(tfile);
> + struct tun_struct *tun = NULL;
> struct sock *sk;
> unsigned int mask = 0;
>
> - if (!tun)
> + if (!tfile)
> return POLLERR;
>
> - sk = tfile->socket.sk;
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> + if (!tun) {
> + rcu_read_unlock();
> + return POLLERR;
> + }
> + rcu_read_unlock();
>
> - tun_debug(KERN_INFO, tun, "tun_chr_poll\n");
> + sk = &tfile->sk;
>
> poll_wait(file, &tfile->wq.wait, wait);
>
> @@ -547,10 +652,12 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait)
> sock_writeable(sk)))
> mask |= POLLOUT | POLLWRNORM;
>
> - if (tun->dev->reg_state != NETREG_REGISTERED)
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> + if (!tun || tun->dev->reg_state != NETREG_REGISTERED)
> mask = POLLERR;
> + rcu_read_unlock();
>
> - tun_put(tun);
> return mask;
> }
>
> @@ -706,8 +813,10 @@ static ssize_t tun_get_user(struct tun_file *tfile,
> skb_shinfo(skb)->gso_segs = 0;
> }
>
> - tun = __tun_get(tfile);
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> if (!tun) {
> + rcu_read_unlock();
> return -EBADFD;
> }
>
> @@ -722,7 +831,7 @@ static ssize_t tun_get_user(struct tun_file *tfile,
>
> tun->dev->stats.rx_packets++;
> tun->dev->stats.rx_bytes += len;
> - tun_put(tun);
> + rcu_read_unlock();
>
> netif_rx_ni(skb);
>
> @@ -732,16 +841,17 @@ err_free:
> count = -EINVAL;
> kfree_skb(skb);
> err:
> - tun = __tun_get(tfile);
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> if (!tun) {
> + rcu_read_unlock();
> return -EBADFD;
> }
> -
> if (drop)
> tun->dev->stats.rx_dropped++;
> if (error)
> tun->dev->stats.rx_frame_errors++;
> - tun_put(tun);
> + rcu_read_unlock();
> return count;
> }
>
> @@ -834,12 +944,13 @@ static ssize_t tun_put_user(struct tun_file *tfile,
> skb_copy_datagram_const_iovec(skb, 0, iv, total, len);
> total += skb->len;
>
> - tun = __tun_get(tfile);
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> if (tun) {
> tun->dev->stats.tx_packets++;
> tun->dev->stats.tx_bytes += len;
> - tun_put(tun);
> }
> + rcu_read_unlock();
>
> return total;
> }
> @@ -869,28 +980,31 @@ static ssize_t tun_do_read(struct tun_file *tfile,
> break;
> }
>
> - tun = __tun_get(tfile);
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> if (!tun) {
> - ret = -EIO;
> + ret = -EBADFD;
> + rcu_read_unlock();
> break;
> }
> if (tun->dev->reg_state != NETREG_REGISTERED) {
> ret = -EIO;
> - tun_put(tun);
> + rcu_read_unlock();
> break;
> }
> - tun_put(tun);
> + rcu_read_unlock();
>
> /* Nothing to read, let's sleep */
> schedule();
> continue;
> }
>
> - tun = __tun_get(tfile);
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> if (tun) {
> netif_wake_queue(tun->dev);
> - tun_put(tun);
> }
> + rcu_read_unlock();
>
> ret = tun_put_user(tfile, skb, iv, len);
> kfree_skb(skb);
> @@ -1030,6 +1144,9 @@ static int tun_flags(struct tun_struct *tun)
> if (tun->flags & TUN_VNET_HDR)
> flags |= IFF_VNET_HDR;
>
> + if (tun->flags & TUN_TAP_MQ)
> + flags |= IFF_MULTI_QUEUE;
> +
> return flags;
> }
>
> @@ -1109,6 +1226,10 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
> /* TAP device */
> flags |= TUN_TAP_DEV;
> name = "tap%d";
> + if (ifr->ifr_flags & IFF_MULTI_QUEUE) {
> + flags |= TUN_TAP_MQ;
> + name = "mqtap%d";
> + }
> } else
> return -EINVAL;
>
> @@ -1134,6 +1255,8 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
> dev->hw_features = NETIF_F_SG | NETIF_F_FRAGLIST |
> TUN_USER_FEATURES;
> dev->features = dev->hw_features;
> + if (ifr->ifr_flags & IFF_MULTI_QUEUE)
> + dev->features |= NETIF_F_LLTX;
>
> err = register_netdevice(tun->dev);
> if (err < 0)
> @@ -1166,6 +1289,11 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr)
> else
> tun->flags &= ~TUN_VNET_HDR;
>
> + if (ifr->ifr_flags & IFF_MULTI_QUEUE)
> + tun->flags |= TUN_TAP_MQ;
> + else
> + tun->flags &= ~TUN_TAP_MQ;
> +
> /* Cache flags from tun device */
> tfile->flags = tun->flags;
> /* Make sure persistent devices do not get stuck in
> @@ -1256,38 +1384,39 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
> (unsigned int __user*)argp);
> }
>
> - rtnl_lock();
> -
> - tun = __tun_get(tfile);
> - if (cmd == TUNSETIFF && !tun) {
> + ret = 0;
> + if (cmd == TUNSETIFF) {
> + rtnl_lock();
> ifr.ifr_name[IFNAMSIZ-1] = '\0';
> -
> ret = tun_set_iff(tfile->net, file, &ifr);
> -
> + rtnl_unlock();
> if (ret)
> - goto unlock;
> -
> + return ret;
> if (copy_to_user(argp, &ifr, ifreq_len))
> - ret = -EFAULT;
> - goto unlock;
> + return -EFAULT;
> + return ret;
> }
>
> + rtnl_lock();
> +
> + rcu_read_lock();
> +
> ret = -EBADFD;
> + tun = rcu_dereference(tfile->tun);
> if (!tun)
> goto unlock;
>
> - tun_debug(KERN_INFO, tun, "tun_chr_ioctl cmd %d\n", cmd);
>
> - ret = 0;
> - switch (cmd) {
> + switch(cmd) {
> case TUNGETIFF:
> ret = tun_get_iff(current->nsproxy->net_ns, tun, &ifr);
> + rcu_read_unlock();
> if (ret)
> - break;
> + goto out;
>
> if (copy_to_user(argp, &ifr, ifreq_len))
> ret = -EFAULT;
> - break;
> + goto out;
>
> case TUNSETNOCSUM:
> /* Disable/Enable checksum */
> @@ -1349,9 +1478,10 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
> /* Get hw address */
> memcpy(ifr.ifr_hwaddr.sa_data, tun->dev->dev_addr, ETH_ALEN);
> ifr.ifr_hwaddr.sa_family = tun->dev->type;
> + rcu_read_unlock();
> if (copy_to_user(argp, &ifr, ifreq_len))
> ret = -EFAULT;
> - break;
> + goto out;
>
> case SIOCSIFHWADDR:
> /* Set hw address */
> @@ -1367,9 +1497,9 @@ static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
> }
>
> unlock:
> + rcu_read_unlock();
> +out:
> rtnl_unlock();
> - if (tun)
> - tun_put(tun);
> return ret;
> }
>
> @@ -1541,31 +1671,8 @@ static int tun_chr_open(struct inode *inode, struct file * file)
> static int tun_chr_close(struct inode *inode, struct file *file)
> {
> struct tun_file *tfile = file->private_data;
> - struct tun_struct *tun;
> -
> - tun = __tun_get(tfile);
> - if (tun) {
> - struct net_device *dev = tun->dev;
> -
> - tun_debug(KERN_INFO, tun, "tun_chr_close\n");
> -
> - __tun_detach(tun);
> -
> - /* If desirable, unregister the netdevice. */
> - if (!(tun->flags & TUN_PERSIST)) {
> - rtnl_lock();
> - if (dev->reg_state == NETREG_REGISTERED)
> - unregister_netdevice(dev);
> - rtnl_unlock();
> - }
> -
> - /* drop the reference that netdevice holds */
> - sock_put(&tfile->sk);
> -
> - }
>
> - /* drop the reference that file holds */
> - sock_put(&tfile->sk);
> + tun_detach(tfile, true);
>
> return 0;
> }
> @@ -1693,14 +1800,17 @@ static void tun_cleanup(void)
> * holding a reference to the file for as long as the socket is in use. */
> struct socket *tun_get_socket(struct file *file)
> {
> - struct tun_struct *tun;
> + struct tun_struct *tun = NULL;
> struct tun_file *tfile = file->private_data;
> if (file->f_op != &tun_fops)
> return ERR_PTR(-EINVAL);
> - tun = tun_get(file);
> - if (!tun)
> + rcu_read_lock();
> + tun = rcu_dereference(tfile->tun);
> + if (!tun) {
> + rcu_read_unlock();
> return ERR_PTR(-EBADFD);
> - tun_put(tun);
> + }
> + rcu_read_unlock();
> return &tfile->socket;
> }
> EXPORT_SYMBOL_GPL(tun_get_socket);
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply
* [PATCH 3/3] drivers/staging/rtl8192u: Don't pass huge struct by value
From: Jesper Juhl @ 2011-08-12 23:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: devel, linux-kernel, Lucas De Marchi, David S. Miller,
Stephen Rothwell, Larry Finger, Stefan Weil, Stefan Weil,
David Chosrova, Andrea Merello, netdev
From: Jesper Juhl <jj@chaosbits.net>
Date: Sat, 13 Aug 2011 00:53:07 +0200
struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
drivers/staging/rtl8192u/ieee80211/ieee80211.h | 4 ++--
.../staging/rtl8192u/ieee80211/ieee80211_softmac.c | 14 +++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211.h b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
index 463cc26..1c0a1db 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211.h
@@ -2416,8 +2416,8 @@ extern int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
extern int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
/* ieee80211_softmac.c */
-extern short ieee80211_is_54g(struct ieee80211_network net);
-extern short ieee80211_is_shortslot(struct ieee80211_network net);
+extern short ieee80211_is_54g(const struct ieee80211_network *net);
+extern short ieee80211_is_shortslot(const struct ieee80211_network *net);
extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats, u16 type,
u16 stype);
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index b00eb0e..c2ab5fa 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -31,14 +31,14 @@ u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x05}, //WEP-104
};
-short ieee80211_is_54g(struct ieee80211_network net)
+short ieee80211_is_54g(const struct ieee80211_network *net)
{
- return ((net.rates_ex_len > 0) || (net.rates_len > 4));
+ return (net->rates_ex_len > 0) || (net->rates_len > 4);
}
-short ieee80211_is_shortslot(struct ieee80211_network net)
+short ieee80211_is_shortslot(const struct ieee80211_network *net)
{
- return (net.capability & WLAN_CAPABILITY_SHORT_SLOT);
+ return net->capability & WLAN_CAPABILITY_SHORT_SLOT;
}
/* returns the total length needed for pleacing the RATE MFIE
@@ -718,7 +718,7 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
else
atim_len = 0;
- if(ieee80211_is_54g(ieee->current_network))
+ if(ieee80211_is_54g(&ieee->current_network))
erp_len = 3;
else
erp_len = 0;
@@ -1333,7 +1333,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
{
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
printk(KERN_INFO "Associated successfully\n");
- if(ieee80211_is_54g(ieee->current_network) &&
+ if(ieee80211_is_54g(&ieee->current_network) &&
(ieee->modulation & IEEE80211_OFDM_MODULATION)){
ieee->rate = 108;
@@ -1489,7 +1489,7 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
ieee->state = IEEE80211_ASSOCIATING;
queue_work(ieee->wq, &ieee->associate_procedure_wq);
}else{
- if(ieee80211_is_54g(ieee->current_network) &&
+ if(ieee80211_is_54g(&ieee->current_network) &&
(ieee->modulation & IEEE80211_OFDM_MODULATION)){
ieee->rate = 108;
ieee->SetWirelessMode(ieee->dev, IEEE_G);
--
1.7.6
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* [PATCH 2/3] drivers/staging/rtl8192e: Don't pass huge struct by value
From: Jesper Juhl @ 2011-08-12 23:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: devel, linux-kernel, Mike McCormack, Lucas De Marchi,
Larry Finger, Stefan Weil, Andrea Merello, netdev
From: Jesper Juhl <jj@chaosbits.net>
Date: Sat, 13 Aug 2011 00:52:32 +0200
struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
drivers/staging/rtl8192e/ieee80211/ieee80211.h | 4 ++--
.../staging/rtl8192e/ieee80211/ieee80211_softmac.c | 14 +++++++-------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211.h b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
index 6d7963e..abc7a1b 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211.h
@@ -2425,8 +2425,8 @@ int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
/* ieee80211_softmac.c */
-short ieee80211_is_54g(struct ieee80211_network net);
-short ieee80211_is_shortslot(struct ieee80211_network net);
+short ieee80211_is_54g(const struct ieee80211_network *net);
+short ieee80211_is_shortslot(const struct ieee80211_network *net);
int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats, u16 type,
u16 stype);
diff --git a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
index 60e9a09..4a5e9b2 100644
--- a/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192e/ieee80211/ieee80211_softmac.c
@@ -33,14 +33,14 @@ u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x05}, //WEP-104
};
-short ieee80211_is_54g(struct ieee80211_network net)
+short ieee80211_is_54g(const struct ieee80211_network *net)
{
- return ((net.rates_ex_len > 0) || (net.rates_len > 4));
+ return (net->rates_ex_len > 0) || (net->rates_len > 4);
}
-short ieee80211_is_shortslot(struct ieee80211_network net)
+short ieee80211_is_shortslot(const struct ieee80211_network *net)
{
- return (net.capability & WLAN_CAPABILITY_SHORT_SLOT);
+ return (net->capability & WLAN_CAPABILITY_SHORT_SLOT);
}
/* returns the total length needed for pleacing the RATE MFIE
@@ -723,7 +723,7 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
else
atim_len = 0;
- if(ieee80211_is_54g(ieee->current_network))
+ if(ieee80211_is_54g(&ieee->current_network))
erp_len = 3;
else
erp_len = 0;
@@ -1351,7 +1351,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
printk(KERN_INFO "Associated successfully\n");
ieee->is_roaming = false;
- if(ieee80211_is_54g(ieee->current_network) &&
+ if(ieee80211_is_54g(&ieee->current_network) &&
(ieee->modulation & IEEE80211_OFDM_MODULATION)){
ieee->rate = 108;
@@ -1504,7 +1504,7 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
ieee->state = IEEE80211_ASSOCIATING;
queue_work(ieee->wq, &ieee->associate_procedure_wq);
}else{
- if(ieee80211_is_54g(ieee->current_network) &&
+ if(ieee80211_is_54g(&ieee->current_network) &&
(ieee->modulation & IEEE80211_OFDM_MODULATION)){
ieee->rate = 108;
ieee->SetWirelessMode(ieee, IEEE_G);
--
1.7.6
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* [PATCH 1/3] drivers/staging/rtl8187se: Don't pass huge struct by value
From: Jesper Juhl @ 2011-08-12 23:04 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: devel, linux-kernel, Andrea Merello, Andre Nogueira,
Lucas De Marchi, David S. Miller, Stephen Rothwell, Larry Finger,
Stefan Weil, Ilia Mirkin, netdev
From: Jesper Juhl <jj@chaosbits.net>
Date: Sat, 13 Aug 2011 00:51:40 +0200
struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.
Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
drivers/staging/rtl8187se/ieee80211/ieee80211.h | 4 ++--
.../rtl8187se/ieee80211/ieee80211_softmac.c | 14 +++++++-------
drivers/staging/rtl8187se/r8180_rtl8225z2.c | 4 ++--
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211.h b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
index e79a7e2..40dd715 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211.h
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211.h
@@ -1339,8 +1339,8 @@ int ieee80211_wx_set_mlme(struct ieee80211_device *ieee,
int ieee80211_wx_set_gen_ie(struct ieee80211_device *ieee, u8 *ie, size_t len);
/* ieee80211_softmac.c */
-extern short ieee80211_is_54g(struct ieee80211_network net);
-extern short ieee80211_is_shortslot(struct ieee80211_network net);
+extern short ieee80211_is_54g(const struct ieee80211_network *net);
+extern short ieee80211_is_shortslot(const struct ieee80211_network *net);
extern int ieee80211_rx_frame_softmac(struct ieee80211_device *ieee, struct sk_buff *skb,
struct ieee80211_rx_stats *rx_stats, u16 type,
u16 stype);
diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
index 38e67f0..26bacb9 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_softmac.c
@@ -32,14 +32,14 @@ u8 rsn_authen_cipher_suite[16][4] = {
{0x00,0x0F,0xAC,0x05}, //WEP-104
};
-short ieee80211_is_54g(struct ieee80211_network net)
+short ieee80211_is_54g(const struct ieee80211_network *net)
{
- return ((net.rates_ex_len > 0) || (net.rates_len > 4));
+ return (net->rates_ex_len > 0) || (net->rates_len > 4);
}
-short ieee80211_is_shortslot(struct ieee80211_network net)
+short ieee80211_is_shortslot(const struct ieee80211_network *net)
{
- return (net.capability & WLAN_CAPABILITY_SHORT_SLOT);
+ return net->capability & WLAN_CAPABILITY_SHORT_SLOT;
}
/* returns the total length needed for pleacing the RATE MFIE
@@ -789,7 +789,7 @@ static struct sk_buff* ieee80211_probe_resp(struct ieee80211_device *ieee, u8 *d
else
atim_len = 0;
- if(ieee80211_is_54g(ieee->current_network))
+ if(ieee80211_is_54g(&ieee->current_network))
erp_len = 3;
else
erp_len = 0;
@@ -1258,7 +1258,7 @@ void ieee80211_associate_complete_wq(struct work_struct *work)
struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, associate_complete_wq);
printk(KERN_INFO "Associated successfully\n");
- if(ieee80211_is_54g(ieee->current_network) &&
+ if(ieee80211_is_54g(&ieee->current_network) &&
(ieee->modulation & IEEE80211_OFDM_MODULATION)){
ieee->rate = 540;
@@ -1379,7 +1379,7 @@ inline void ieee80211_softmac_new_net(struct ieee80211_device *ieee, struct ieee
ieee->beinretry = false;
queue_work(ieee->wq, &ieee->associate_procedure_wq);
}else{
- if(ieee80211_is_54g(ieee->current_network) &&
+ if(ieee80211_is_54g(&ieee->current_network) &&
(ieee->modulation & IEEE80211_OFDM_MODULATION)){
ieee->rate = 540;
printk(KERN_INFO"Using G rates\n");
diff --git a/drivers/staging/rtl8187se/r8180_rtl8225z2.c b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
index 3f09f76..ee5b867 100644
--- a/drivers/staging/rtl8187se/r8180_rtl8225z2.c
+++ b/drivers/staging/rtl8187se/r8180_rtl8225z2.c
@@ -596,7 +596,7 @@ static void rtl8225_rf_set_chan(struct net_device *dev, short ch)
{
struct r8180_priv *priv = ieee80211_priv(dev);
short gset = (priv->ieee80211->state == IEEE80211_LINKED &&
- ieee80211_is_54g(priv->ieee80211->current_network)) ||
+ ieee80211_is_54g(&priv->ieee80211->current_network)) ||
priv->ieee80211->iw_mode == IW_MODE_MONITOR;
rtl8225_SetTXPowerLevel(dev, ch);
@@ -615,7 +615,7 @@ static void rtl8225_rf_set_chan(struct net_device *dev, short ch)
}
if (priv->ieee80211->state == IEEE80211_LINKED &&
- ieee80211_is_shortslot(priv->ieee80211->current_network))
+ ieee80211_is_shortslot(&priv->ieee80211->current_network))
write_nic_byte(dev, SLOT, 0x9);
else
write_nic_byte(dev, SLOT, 0x14);
--
1.7.6
--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.
^ permalink raw reply related
* Re: [PATCH] bridge: mask forwarding of IEEE 802 local multicast groups
From: Stephen Hemminger @ 2011-08-12 22:45 UTC (permalink / raw)
To: Ed Swierk; +Cc: netdev
In-Reply-To: <CAF5U64CJTWDn8E9+XVLFsdaSbiu-4Rd9XmxZq7ReziRNZviO6Q@mail.gmail.com>
On Fri, 12 Aug 2011 15:37:54 -0700
Ed Swierk <eswierk@bigswitch.com> wrote:
> I'm using elaborate combinations of bridges, tunnels and vlans to make
> remote switches many hops away appear as though they're locally
> connected to a virtual machine. In this application the bridges are
> just used to forward traffic between a pair of interfaces. I need the
> bridge to behave as much like a dumb 2-port hub as possible,
> forwarding LLDP frames that 802.1d-compliant bridges normally drop.
If you turn off STP that is what it does right now. It forwards STP
and 802.1X frames. The patch was only related to turning on STP
and still expecting 802.1X frames to be forwarded (in violation of
the spec).
^ permalink raw reply
* Re: [PATCH] bridge: mask forwarding of IEEE 802 local multicast groups
From: Ed Swierk @ 2011-08-12 22:37 UTC (permalink / raw)
To: netdev
In-Reply-To: <CAF5U64C+WgQhfJL3zfVnvzE7p=G61humQCObHGUxAvY2-MGAFQ@mail.gmail.com>
Stephen Hemminger wrote:
> No.
> Don't like adding yet another hack user visible API which will have
> to be maintained for too long. But on the other hand I don't have
> a better solution at my finger tips. If better idea doesn't come
> along, then we can go with yours.
+1 for applying Nick Carter's patch adding a group_fwd_mask setting to
the bridge driver
(http://www.spinics.net/lists/netdev/msg169607.html).
I'm using elaborate combinations of bridges, tunnels and vlans to make
remote switches many hops away appear as though they're locally
connected to a virtual machine. In this application the bridges are
just used to forward traffic between a pair of interfaces. I need the
bridge to behave as much like a dumb 2-port hub as possible,
forwarding LLDP frames that 802.1d-compliant bridges normally drop.
I solemnly swear I will not pester the netdev list when I melt down my
LAN by inadvertently forwarding STP frames.
--Ed
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox