Commit Graph

298998 Commits

Author SHA1 Message Date
Simon Wunderlich
db08e6e557 batman-adv: allow multiple entries in tt_global_entries
as backbone gateways will all independently announce the same clients,
also the tt global table must be able to hold multiple originators per
client entry.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:59 +02:00
Simon Wunderlich
9bf8e4d425 batman-adv: export claim tables through debugfs
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:59 +02:00
Simon Wunderlich
c867305509 batman-adv: make bridge loop avoidance switchable
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:59 +02:00
Simon Wunderlich
23721387c4 batman-adv: add basic bridge loop avoidance code
This second version of the bridge loop avoidance for batman-adv
avoids loops between the mesh and a backbone (usually a LAN).

By connecting multiple batman-adv mesh nodes to the same ethernet
segment a loop can be created when the soft-interface is bridged
into that ethernet segment. A simple visualization of the loop
involving the most common case - a LAN as ethernet segment:

node1  <-- LAN  -->  node2
  |                   |
wifi   <-- mesh -->  wifi

Packets from the LAN (e.g. ARP broadcasts) will circle forever from
node1 or node2 over the mesh back into the LAN.

With this patch, batman recognizes backbone gateways, nodes which are
part of the mesh and backbone/LAN at the same time. Each backbone
gateway "claims" clients from within the mesh to handle them
exclusively. By restricting that only responsible backbone gateways
may handle their claimed clients traffic, loops are effectively
avoided.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
Simon Wunderlich
a7f6ee9493 batman-adv: remove old bridge loop avoidance code
The functionality is to be replaced by an improved implementation,
so first clean up.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
Marek Lindner
8681a1c4dd batman-adv: encourage batman to take shorter routes by changing the default hop penalty
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
Sven Eckelmann
de7aae6570 batman-adv: Remove declaration of only locally used functions
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
Sven Eckelmann
0079d2cef1 batman-adv: Replace bitarray operations with bitmap
bitarray.c consists mostly of functionality that is already available as part
of the standard kernel API. batman-adv could use architecture optimized code
and reduce the binary size by switching to the standard functions.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
Antonio Quartulli
c1faead333 batman-adv: use ETH_ALEN instead of hardcoded numeric constants
In packet.h the numeric constant 6 is used instead of the more portable ETH_ALEN
define. This patch substitute any hardcoded value with such define.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Acked-by: Sven Eckelmann <sven@narfation.org>
2012-04-11 14:28:58 +02:00
Antonio Quartulli
10e3cd6a25 batman-adv: clean up Kconfig
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
Antonio Quartulli
cf9ab887c5 MAINTAINERS: add additional maintainer for net/batman-adv
Add myself as maintainer for net/batman-adv as announced by Marek Linder

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
2012-04-11 14:28:58 +02:00
David S. Miller
06eb4eafbd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-10 14:30:45 -04:00
David S. Miller
32ed53b83e wiznet: Fix Kconfig dependencies.
Both drivers need to depend upon HAS_IOMEM, otherwise we
get a build failure on platforms like S390.

All the driver specific config options need to depend upon
the drivers themselves.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-10 09:25:46 -04:00
David S. Miller
2f6f9d6fe5 fealnx: Remove unused local label 'out' in netdev_open().
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-04-07 09:02:32 -04:00
Francois Romieu
019d077a53 ipw2100: remove useless tests in the PCI device remove path.
Everything has been set up in the PCI probe function.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
2012-04-07 11:58:39 +02:00
Francois Romieu
9b717075e9 ipw2100: stop using net_device.base_addr.
No net_device.irq removal yet. The driver probe, remove and failure
paths need some care beforehand.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
2012-04-07 11:58:38 +02:00
Francois Romieu
a3442794c5 ipw2200: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Stanislav Yakovlev <stas.yakovlev@gmail.com>
2012-04-07 11:58:38 +02:00
Francois Romieu
0193fc5efd rrunner: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:58:38 +02:00
Francois Romieu
a742545887 myri10ge: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <mason@myri.com>
Acked-by: Andrew Gallatin <gallatin@myri.com>
2012-04-07 11:58:09 +02:00
Francois Romieu
57d6d456cf sis900: stop using net_device.{base_addr, irq} and convert to __iomem.
- pci_resource_start() can be removed from sis900_get_mac_addr() because
  the IO range is maped and stored into the device private struct early
  in the device probe function.
- the driver contains a few direct accesses to low IO ports that forbid
  to re(#)define the usual out{l, w, b} macros.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Daniele Venzano <venza@brownhat.org>
2012-04-07 11:47:18 +02:00
Francois Romieu
5820e97a29 dmfe: stop using net_device.{base_addr, irq} and convert to __iomem.
This is a pure PCI driver, no ISA here.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:47:18 +02:00
Francois Romieu
aae9bc302d epic100: stop using net_device.{base_addr, irq} and convert to __iomem.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:47:18 +02:00
Francois Romieu
3acf4b5cde uli526x: stop using net_device.{base_addr, irq} and convert to __iomem.
The bulk of the patch comes from the __iomem changes.

- the phy read and write operations were carrying the chip id deep
  down the call chain. Let's waste a pointer and contain the flying
  spaghetti monster.
- phy_{read, write}_1bit only need to access the DCR9 register. The loss
  of generality here should not hurt.
- removed a leftover printk of the EISA era. This is a pure PCI device.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:47:17 +02:00
Francois Romieu
5e3cc4e3aa dl2k: stop using net_device.{base_addr, irq} and convert to __iomem.
The eeprom registers always use the same PCI bar whereas the general
registers may either use the same mapping as the eeprom registers or
a different one. It is thus possible to simplify parse_eeprom().

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:47:17 +02:00
Francois Romieu
65712ec016 8139too: dev->{base_addr, irq} removal.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:47:17 +02:00
Francois Romieu
d710ce1357 natsemi: stop using net_device.{base_addr, irq}.
It's useless to check mem_start on a newly allocated device.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Tim Hockin <thockin@hockin.org>
2012-04-07 11:47:16 +02:00
Francois Romieu
b5a80837b7 smsc9420: stop using net_device.{base_addr, irq}.
The device private data pointer can not be NULL in smsc9420_open().

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
2012-04-07 11:47:16 +02:00
Francois Romieu
308f2888a3 de2104x: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:47:16 +02:00
Francois Romieu
ebaf7f8f78 xircom_cb: stop using net_device.{base_addr, irq} and convert to __iomem.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:47:16 +02:00
Francois Romieu
d59a1881c0 xircom_cb: fix device probe error path.
- unbalanced pci_disable_device
- PCI ressources were not released
- mismatching pci_alloc_.../kfree pairs are replaced by DMA alloc helpers.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ack-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:47:15 +02:00
Francois Romieu
5e58deb917 uli526x: fix regions leak in driver probe error path.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ack-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:47:15 +02:00
Francois Romieu
7deb118217 sunhme: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:47:03 +02:00
Francois Romieu
a173460a63 tulip_core: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Ack-by: Grant Grundler <grundler@parisc-linux.org>
2012-04-07 11:45:27 +02:00
Francois Romieu
480c28642d sis190: stop using net_device.{base_addr, irq}
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:27 +02:00
Francois Romieu
c4a9f0854b sc92031: stop using net_device.{base_addr, irq}
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:27 +02:00
Francois Romieu
c0bd55efd7 winbond840: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:26 +02:00
Francois Romieu
c0357e975a bnx2: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Acked-by: Michael Chan <mchan@broadcom.com>
2012-04-07 11:45:26 +02:00
Francois Romieu
2d5fb6283c starfire: remove deprecated options.
Some settings are duplicated between ethtool link management and module
options. The latter is trimmed. The half duplex, speed and autonegotiation
defaults are kept unchanged.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ion Badulescu <ionut@badula.org>
2012-04-07 11:45:26 +02:00
Francois Romieu
ea8f2ed0f1 starfire: stop using net_device.{base_addr, irq}.
It's useless to check mem_start on a newly allocated device as well.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Ion Badulescu <ionut@badula.org>
2012-04-07 11:45:26 +02:00
Francois Romieu
0c18acc1ed yellowfin: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:26 +02:00
Francois Romieu
a69afe3263 8139cp: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:25 +02:00
Francois Romieu
80777c54d2 s2io: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <jdmason@kudzu.us>
2012-04-07 11:45:25 +02:00
Francois Romieu
b5efab99ed atl1e: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <chris.snook@gmail.com>
2012-04-07 11:45:25 +02:00
Francois Romieu
436dfc461b fealnx: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:25 +02:00
Francois Romieu
32e819e46e vxge: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jon Mason <jdmason@kudzu.us>
2012-04-07 11:45:24 +02:00
Francois Romieu
c514f285c3 sundance: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:24 +02:00
Francois Romieu
dfda357886 via-velocity: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Lv <DavidLv@viatech.com.cn>
2012-04-07 11:45:24 +02:00
Francois Romieu
0ca0aa08eb hamachi: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
2012-04-07 11:45:24 +02:00
Francois Romieu
05d334eca9 via-rhine: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: David Lv <DavidLv@viatech.com.cn>
2012-04-07 11:45:24 +02:00
Francois Romieu
93f7fab433 atl1c: stop using net_device.{base_addr, irq}.
Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Jay Cliburn <jcliburn@gmail.com>
Cc: Chris Snook <chris.snook@gmail.com>
2012-04-07 11:45:23 +02:00