summaryrefslogtreecommitdiff
path: root/drivers/staging/batman-adv
AgeCommit message (Collapse)Author
2010-12-16Staging: batman-adv: Remove batman-adv from stagingSven Eckelmann
batman-adv is now moved to net/batman-adv/ and can be removed from staging. Signed-off-by: Sven Eckelmann <sven@narfation.org> Cc: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-12-07Staging: Merge 2.6.37-rc5 into staging-nextGreg Kroah-Hartman
This was done to handle a number of conflicts in the batman-adv and winbond drivers properly. It also now allows us to fix up the sysfs attributes properly that were not in the .37 release due to them being only in this tree at the time. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Use kernel functions to identify broadcastsSven Eckelmann
linux/etherdevice.h already provides functions to classify different ethernet addresses. These inlineable functions should be used instead of custom functions. The check for multicast together with multicast can also be replaced with a single test for multicast because for every ethernet address x following is always true: is_broadcast_ether_addr(x) => is_multicast_ether_addr(x) or when looking more at the implementation: (FF:FF:FF:FF:FF:FF == x) => [(01:00:00:00:00:00 & x) != 00:00:00:00:00:00] Reported-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Use kernel version min macroSven Eckelmann
The kernel headers already provide different versions of a min/max macro which should be used by all modules according to Documentation/CodingStyle. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: add gateway IPv6 support by filtering DHCPv6 messagesMarek Lindner
Some additional checks will be needed in case of extension headers like the fragmentation or hop-by-hop (for jumbo frames for example) headers or ipsec stuff. But this patch should do for most people for now, the rest can be added with a later one. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Acked-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: best gw DHCP filter 802.1Q supportMarek Lindner
The DHCP filter inspects packets to determine whether or not to send them via ethernet unicast. This patch adds 802.1Q (vlan) support for this check. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> [sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: send DHCP requests directly to the chosen gwMarek Lindner
If the gateway client mode is active batman-adv will send the broadcasted DHCP requests via unicast to the currently selected best gateway. Therefore attached clients can profit from batman's knowledge about the network topology. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> [sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: adding gateway functionalityMarek Lindner
Via the /sys filesystem you can change the gateway mode of a node using gw_mode. Adjustments to it can be done using gw_bandwidth for server mode and gw_sel_class for client mode. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> [sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Limit spin_locks to spin_lock_bhSven Eckelmann
spin_lock_irqsave disables the IRQs and stores them inside the flags provided by the caller. This is needed to protect a bottom half handler or a user context critical section from being interrupted by an interrupt handler which also tries to acquire the spinlock and locks forever. The linux device drivers will receive the packets inside an interrupt handler and the network infrastructure will process them inside bottom half. Thus batman-adv will only run in user context and bottom half handlers. We can conclude that batman-adv doesn't share its own spinlocks with real interrupt handlers. This makes it possible to exchange the quite complex spin_lock_irqsave with spin_lock_bh which only stops bottom halves from running on the current cpu, but allows interrupt handlers to take over to keep the interrupt latency low. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Rewrite hash using hlist_*Sven Eckelmann
The hash implementation is a complete implementation of a hash using buckets as hash entries and overflow buckets attached to them. The kernel already provides datastructures hlist_head and hlist_node which can be used to implement an hash using lists as hash buckets. So it is better to implement heavily used functionality on top of those instead of providing a full hash implementation. The rewrite changes the behavior of some functions slightly: * hash_add add elements to the front instead of the tail * hash_iterate doesn't provide pointer to access bucket->data directly, but it can be accessed using hlist_entry Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Make hash_iterate inlineableSven Eckelmann
hash_iterate is next to the function pointers the most called function related to hashes which benefits from inlining as it is uses in loops. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Move hash callback related function to headerSven Eckelmann
To enable inlining of the function pointers hashdata_choose_cb, hashdata_choose_cb and hashdata_free_cb, also the hash functions which uses them must be inlined by the called function. This should increase the performance, but also increases the size of the generated machine code slightly. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Remove hashdata_choose_cb from hashSven Eckelmann
Function pointers cannot be inlined by a compiler and thus always has the overhead of an call. hashdata_choose_cb's are one of the most often called function pointers and its overhead must kept relative low. As first step, every function which uses this function pointer takes it as parameter instead of storing it inside the hash abstraction structure. This not generate any performance gain right now. The called functions must also be able to be inlined by the calling functions to enable inlining of the function pointer. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Remove hashdata_compare_cb from hashSven Eckelmann
Function pointers cannot be inlined by a compiler and thus always has the overhead of an call. hashdata_compare_cb's are one of the most often called function pointers and its overhead must kept relative low. As first step, every function which uses this function pointer takes it as parameter instead of storing it inside the hash abstraction structure. This not generate any performance gain right now. The called functions must also be able to be inlined by the calling functions to enable inlining of the function pointer. Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Make hop_penalty configurable via sysfsLinus Lüssing
When having a mixed topology of both very mobile and rather static nodes, you are usually best advised to set the originator interval on all nodes to a level best suited for the most mobile node. However, if most of the nodes are rather static, this can create a lot of undesired overhead as a trade-off then. If setting the interval too low on the static nodes, a mobile node might be chosen as a router for too long, not switching away from it fast enough because of its mobility and the low frequency of ogms of static nodes. Exposing the hop_penalty is especially useful for the stated scenario: A static node can keep the default originator interval, a mobile node can select a quicker one resulting in faster route updates towards this mobile node. Additionally, such a mobile node could select a higher hop penalty (or even set it to 255 to disable acting as a router for other nodes) to make it less desirable, letting other nodes avoid selecting this mobile node as a router. Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Ommit storing struct device in sysfs functionsLinus Lüssing
We actually do not need an extra struct device variable, therefore replacing them with defines that directly get the bat_priv or net_device. This further reduces the code size in bat_sysfs.c and especially shortens some macros. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Wrapper functions for sysfs storingLinus Lüssing
Sysfs configuration options that just took a boolean value (enable(d)/disable(d)/0/1) and integer setting basically all had the same structure. To avoid even more copy and pasting in the future and to make introducing new configuration parameters for batman-adv simpler, more generic wrapper functions are being introduced with this commit. They can deal with boolean and unsigned integer parameters, storing them in the specified atomic_t variables. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Unify sysfs file names with their bat_priv atomicsLinus Lüssing
Both sysfs entries and variable names shall be as descriptive as possible while not exceeding a certain length. This patch renames bat_priv atomics to be equally descriptive with their according sysfs entries. Unifying sysfs and bat_priv atomic names also makes it easier to find each others pendant. The reduced ("type"-)information which was previously indicated with a _enabled for booleans got substituted by a comment in bat_priv. This patch has also been done in regards for the future BAT_ATTR_* macros (they only need one name argument instead of a file and variable name). Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: softif bridge loop avoidanceMarek Lindner
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. This patch adds the functionality to detect other batman-adv nodes connected to the LAN and select a 'gateway' to talk to the non-batman-adv devices on this LAN. All traffic from and to the mesh will be handled by this gateway to avoid the loop. OGMs received via the soft-interface are interpreted as 'port announcements' to locate potential batman-adv nodes. The patch can also deal with vlans on top of batX and offers a list of LAN neighbors via debugfs. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> [sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: reassemble fragmented skb if mtu allows itAndreas Langer
Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: fragment forwarded packetsAndreas Langer
If a packet is too big to be forwarded over an interface it will be fragmented on-the-fly (if fragmentation is enabled). Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: remove redundant is_my_mac() check in route_unicast_packetAndreas Langer
Callers should check the if the received packet is for us before it calls route_unicast_packet. Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: move skb reassembly of fragmented packets into ↵Andreas Langer
dedicated function Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: add frag_ prefix to all fragmentation related functionsAndreas Langer
Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: restructure fragmentation to handle batman unicast packetsAndreas Langer
The unicast_frag_send_skb() function expected 'raw' packets (without any batman-adv header) to fragment them. This needs to be changed, so that this function is able to fragment packets that already traveled inside the mesh but need to be fragmented now. Signed-off-by: Andreas Langer <an.langer@gmx.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: use rcu callbacks when freeing batman_ifMarek Lindner
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: convert batman_if custom refcounting to kref functionsMarek Lindner
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Don't remove interface with spinlock heldSven Eckelmann
We call a lot of the netdevice code when holding if_list_lock which will spin the whole time. This is not necessary because we only want to protect the access to the list to be serialized. An extra queue can be used which hold all interfaces which should be removed and then use that queue without any locks for netdevice cleanup. Reported-by: Rafal Lesniak <lesniak@eresi-project.org> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Add new sysfs files to READMESven Eckelmann
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: ensure that eth_type_trans gets linear memoryMarek Lindner
eth_type_trans tries to pull data with the length of the ethernet header from the skb. We only ensured that enough data for the first ethernet header and the batman header is available in non-paged memory of the skb and not for the ethernet after the batman header. eth_type_trans would fail sometimes with drivers which don't ensure that all there data is perfectly linearised. Reported-by: Rafal Lesniak <lesniak@eresi-project.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Replace Andrew Lunn as Staging maintainerSven Eckelmann
Andrew Lunn didn't submit patches to staging since a while and may not be the right person for new patches. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: ensure that eth_type_trans gets linear memoryMarek Lindner
eth_type_trans tries to pull data with the length of the ethernet header from the skb. We only ensured that enough data for the first ethernet header and the batman header is available in non-paged memory of the skb and not for the ethernet after the batman header. eth_type_trans would fail sometimes with drivers which don't ensure that all there data is perfectly linearised. The failure was noticed through a kernel bug Oops generated by the skb_pull inside eth_type_trans. Reported-by: Rafal Lesniak <lesniak@eresi-project.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-29Staging: batman-adv: Don't remove interface with spinlock heldSven Eckelmann
We call a lot of the netdevice code when holding if_list_lock which will spin the whole time. This is not necessary because we only want to protect the access to the list to be serialized. An extra queue can be used which hold all interfaces which should be removed and then use that queue without any locks for netdevice cleanup. We create a "scheduling while atomic" Oops when calling different netdevice related functions inside a spinlock protected area on a preemtible kernel. Reported-by: Rafal Lesniak <lesniak@eresi-project.org> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-16Staging: Merge 2.6.37-rc2 into staging-nextGreg Kroah-Hartman
This was necessary in order to resolve some conflicts that happened between -rc1 and -rc2 with the following files: drivers/staging/bcm/Bcmchar.c drivers/staging/intel_sst/intel_sst_app_interface.c All should be resolved now. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-11Revert "staging: batman-adv: Use linux/etherdevice.h address helper functions"Greg Kroah-Hartman
This reverts commit 5712dc7fc812d1bdbc5e634d389bc759d4e7550c. Turns out the batman maintainers didn't like the implementation of it, and the original author was going to rework it to meet their approval, and I applied it without fully realizing all of this. My fault. Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10Staging: batman-adv: suppress false warning when changing the mac addressMarek Lindner
Whenever the mac address of an batman interface is changed check_known_mac_addr() is called to print a warning if the newly added mac address exists an another batman interface. While looping through the batman interface list check_known_mac_addr() only compares mac addresses and does not make sure they belong to different interfaces, thus always printing a warning. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10Staging: batman-adv: fix interface alternating and bonding reggressionChris Lang
55d1666b521cbed95924c8d4775fe272c103f08c incidentally disabled bonding of packets first entering the mesh along with also disabling interface alternating regardless of where the packet came from. This re-enables these options. Signed-off-by: Chris Lang <clang@gateworks.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-10staging: batman-adv: Use linux/etherdevice.h address helper functionsTobias Klauser
Replace custom ethernet address check functions by calls to the helpers in linux/etherdevice.h In one case where the address was tested for broadcast and multicast address, the broadcast address check can be omitted as broadcast is also a multicast address. The patch is only compile-tested. Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09Staging: batman-adv: Remove useless bracesSven Eckelmann
77099f0afe94928b5b0066a7efa5fa9f81696b54 added changes to vis.c which trigger a checkpatch.pl warning about braces which are not necessary anymore. WARNING: braces {} are not necessary for any arm of this statement + if (entry->primary) [...] + else { [...] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Cc: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-20staging: batman-adv: remove useless addr_to_string()Andy Shevchenko
Since all *printf() methods in the kernel understand '%pM' modifier the conversion to the string is useless beforehand. Additionally this patch decreases batman_if structure by 20 bytes. Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com> Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Cc: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: process OGMs bigger than MAX_AGGREGATION_BYTESMarek Lindner
Reported-by: Sam Yeung <sam.cwyeung@gmail.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: fix crash when new OGM is generatedMarek Lindner
If aggregation is not enabled the local translation table can grow much bigger and expects to fill a full ethernet packet. Reported-by: Sam Yeung <sam.cwyeung@gmail.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: protect against ogm packet overflow by checking table ↵Marek Lindner
length Reported-by: Sam Yeung <sam.cwyeung@gmail.com> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: document fragmentation sysfs APIMarek Lindner
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: Fix resizing of broadcast seqno buffers on if deletionLinus Lüssing
Not only the entries of the deleted interface got erased, but also all ones with a lower if_num. This commit fixes this issue by setting the destination appropriately. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: Don't dereference unchecked incoming soft_ifaceSven Eckelmann
send_packet derefenced forw_packet->if_incoming and checked if forw_packet->if_incoming is NULL. This cannot happen, but still makes irritates when reading through the functions. Reported-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-19Staging: batman-adv: Add hash recommendations to TODOSven Eckelmann
David Miller <davem@davemloft.net> recommended in 20100924.134334.28812338.davem@davemloft.net that we must make the hash abstraction helper more efficient and may remove it completely. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-10-08Staging: batman-adv: Makefile: replace the use of <module>-objs with <module>-yTracey Dent
Changed <module>-objs to <module>-y n Makefile. Signed-off-by: Tracey Dent <tdent48227@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Introduce update_primary_addr to update mac addressMarek Lindner
set_primary_if is currently misused to update the mac address in vis packets. This unneeded and introduces overhead due to other operations which must be done when updating the primary interface. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-20Staging: batman-adv: Track references of batman_if in set_primary_ifSven Eckelmann
set_primary_if exchanges the current primary interfaces with a new one. This is a new reference and thus we have to count it and decrease the count of the old primary interface. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>