aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/originator.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6Linus Torvalds2011-05-201-28/+54
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1446 commits) macvlan: fix panic if lowerdev in a bond tg3: Add braces around 5906 workaround. tg3: Fix NETIF_F_LOOPBACK error macvlan: remove one synchronize_rcu() call networking: NET_CLS_ROUTE4 depends on INET irda: Fix error propagation in ircomm_lmp_connect_response() irda: Kill set but unused variable 'bytes' in irlan_check_command_param() irda: Kill set but unused variable 'clen' in ircomm_connect_indication() rxrpc: Fix set but unused variable 'usage' in rxrpc_get_transport() be2net: Kill set but unused variable 'req' in lancer_fw_download() irda: Kill set but unused vars 'saddr' and 'daddr' in irlan_provider_connect_indication() atl1c: atl1c_resume() is only used when CONFIG_PM_SLEEP is defined. rxrpc: Fix set but unused variable 'usage' in rxrpc_get_peer(). rxrpc: Kill set but unused variable 'local' in rxrpc_UDP_error_handler() rxrpc: Kill set but unused variable 'sp' in rxrpc_process_connection() rxrpc: Kill set but unused variable 'sp' in rxrpc_rotate_tx_window() pkt_sched: Kill set but unused variable 'protocol' in tc_classify() isdn: capi: Use pr_debug() instead of ifdefs. tg3: Update version to 3.119 tg3: Apply rx_discards fix to 5719/5720 ... Fix up trivial conflicts in arch/x86/Kconfig and net/mac80211/agg-tx.c as per Davem.
| * batman-adv: rename everything from *hna* into *tt* (translation table)Antonio Quartulli2011-05-081-4/+4
| | | | | | | | | | | | | | | | To be coherent, all the functions/variables/constants have been renamed to the TranslationTable style Signed-off-by: Antonio Quartulli <ordex@autistici.org> Signed-off-by: Sven Eckelmann <sven@narfation.org>
| * batman-adv: remove misplaced commentMarek Lindner2011-05-081-2/+0
| | | | | | | | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
| * batman-adv: Make bat_priv->primary_if an rcu protected pointerMarek Lindner2011-05-011-13/+21
| | | | | | | | | | | | | | | | | | | | | | The rcu protected macros rcu_dereference() and rcu_assign_pointer() for the bat_priv->primary_if need to be used, as well as spin/rcu locking. Otherwise we might end up using a primary_if pointer pointing to already freed memory. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
| * batman-adv: Protect global TQ window with a spinlockLinus Lüssing2011-04-171-0/+1
| | | | | | | | | | | | 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@narfation.org>
| * batman-adv: Make orig_node->router an rcu protected pointerLinus Lüssing2011-04-171-9/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The rcu protected macros rcu_dereference() and rcu_assign_pointer() for the orig_node->router need to be used, as well as spin/rcu locking. Otherwise we might end up using a router pointer pointing to already freed memory. Therefore this commit introduces the safe getter method orig_node_get_router(). 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@narfation.org>
* | batman,rcu: convert call_rcu(neigh_node_free_rcu) to kfree()Paul E. McKenney2011-05-071-9/+1
|/ | | | | | | | | | | | The RCU callback neigh_node_free_rcu() just calls kfree(), so we can use kfree_rcu() instead of call_rcu(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Marek Lindner <lindner_marek@yahoo.de> Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Acked-by: David S. Miller <davem@davemloft.net> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Acked-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: rename batman_if struct to hard_ifaceMarek Lindner2011-03-051-14/+14
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: rename global if_list to hardif_listMarek Lindner2011-03-051-1/+1
| | | | | | | | Batman-adv works with "hard interfaces" as well as "soft interfaces". The new name should better make clear which kind of interfaces this list stores. Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: remove orig_hash spinlockMarek Lindner2011-03-051-21/+0
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: increase refcount in create_neighbor to be consistentMarek Lindner2011-03-051-1/+3
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Correct rcu refcounting for orig_nodeMarek Lindner2011-03-051-8/+13
| | | | | | | | | | | It might be possible that 2 threads access the same data in the same rcu grace period. The first thread calls call_rcu() to decrement the refcount and free the data while the second thread increases the refcount to use the data. To avoid this race condition all refcount operations have to be atomic. Reported-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: remove extra layer between hash and hash element - hash bucketMarek Lindner2011-03-051-52/+21
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: make broadcast seqno operations atomicMarek Lindner2011-03-051-0/+1
| | | | | | | | | | | | Batman-adv could receive several payload broadcasts at the same time that would trigger access to the broadcast seqno sliding window to determine whether this is a new broadcast or not. If these incoming broadcasts are accessing the sliding window simultaneously it could be left in an inconsistent state. Therefore it is necessary to make sure this access is atomic. Reported-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Correct rcu refcounting for neigh_nodeMarek Lindner2011-03-051-18/+8
| | | | | | | | | | | It might be possible that 2 threads access the same data in the same rcu grace period. The first thread calls call_rcu() to decrement the refcount and free the data while the second thread increases the refcount to use the data. To avoid this race condition all refcount operations have to be atomic. Reported-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect bonding with rcu locksSimon Wunderlich2011-03-051-4/+21
| | | | | | | | | | bonding / alternating candidates need to be secured by rcu locks as well. This patch therefore converts the bonding list from a plain pointer list to a rcu securable lists and references the bonding candidates. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect ogm counter arrays with spinlockMarek Lindner2011-03-051-2/+9
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect originator nodes with reference countersMarek Lindner2011-03-051-9/+52
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect each hash row with rcu locksMarek Lindner2011-03-051-7/+20
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: free neighbors when an interface is deactivatedMarek Lindner2011-03-051-2/+7
| | | | | | | | | hardif_disable_interface() calls purge_orig_ref() to immediately free all neighbors associated with the interface that is going down. purge_orig_neighbors() checked if the interface status is IF_INACTIVE which is set to IF_NOT_IN_USE shortly before calling purge_orig_ref(). Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect neighbor list with rcu locksMarek Lindner2011-03-051-7/+28
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: convert neighbor list to hlistMarek Lindner2011-03-051-15/+15
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: protect neighbor nodes with reference countersMarek Lindner2011-03-051-5/+15
| | | | Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
* batman-adv: Update copyright yearsSven Eckelmann2011-01-311-1/+1
| | | | Signed-off-by: Sven Eckelmann <sven@narfation.org>
* batman-adv: remove unused parametersSimon Wunderlich2011-01-311-1/+1
| | | | | | | | Some function parameters are obsolete now and can be removed. Reported-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Sven Eckelmann <sven@narfation.org>
* net: Add batman-adv meshing protocolSven Eckelmann2010-12-161-0/+564
B.A.T.M.A.N. (better approach to mobile ad-hoc networking) is a routing protocol for multi-hop ad-hoc mesh networks. The networks may be wired or wireless. See http://www.open-mesh.org/ for more information and user space tools. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: David S. Miller <davem@davemloft.net>