The following commit has been merged in the merge/master branch: commit 7061bf6949daa70b66a4fd1c45f6a146156596bc Merge: 7b6f8f94d1134e4aeae9fa1e9b429933cc5e2bb5 e15b7378a55b8a068ac1c76cccfc32f112b0bdec Author: Antonio Quartulli ordex@autistici.org Date: Sun Mar 10 21:27:21 2013 +0100
Merge remote-tracking branch 'pkg/next' into merge/master
Conflicts: net/batman-adv/compat.h
diff --combined net/batman-adv/bat_iv_ogm.c index c8a0b65,071f288..071f288 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@@ -1293,7 -1293,8 +1293,8 @@@ static int batadv_iv_ogm_receive(struc batadv_ogm_packet = (struct batadv_ogm_packet *)packet_buff;
/* unpack the aggregated packets and process them one by one */ - do { + while (batadv_iv_ogm_aggr_packet(buff_pos, packet_len, + batadv_ogm_packet->tt_num_changes)) { tt_buff = packet_buff + buff_pos + BATADV_OGM_HLEN;
batadv_iv_ogm_process(ethhdr, batadv_ogm_packet, tt_buff, @@@ -1304,8 -1305,7 +1305,7 @@@
packet_pos = packet_buff + buff_pos; batadv_ogm_packet = (struct batadv_ogm_packet *)packet_pos; - } while (batadv_iv_ogm_aggr_packet(buff_pos, packet_len, - batadv_ogm_packet->tt_num_changes)); + }
kfree_skb(skb); return NET_RX_SUCCESS; diff --combined net/batman-adv/network-coding.c index e6b192c,5728079..5728079 --- a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c @@@ -285,7 -285,6 +285,6 @@@ void batadv_nc_purge_orig(struct batadv static void batadv_nc_purge_orig_hash(struct batadv_priv *bat_priv) { struct batadv_hashtable *hash = bat_priv->orig_hash; - struct hlist_node *node; struct hlist_head *head; struct batadv_orig_node *orig_node; uint32_t i; @@@ -298,7 -297,7 +297,7 @@@ head = &hash->table[i];
rcu_read_lock(); - hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) + hlist_for_each_entry_rcu(orig_node, head, hash_entry) batadv_nc_purge_orig(bat_priv, orig_node, batadv_nc_to_purge_nc_node); rcu_read_unlock(); @@@ -321,7 -320,7 +320,7 @@@ static void batadv_nc_purge_paths(struc struct batadv_nc_path *)) { struct hlist_head *head; - struct hlist_node *node, *node_tmp; + struct hlist_node *node_tmp; struct batadv_nc_path *nc_path; spinlock_t *lock; /* Protects lists in hash */ uint32_t i; @@@ -332,8 -331,7 +331,7 @@@
/* For each nc_path in this bin */ spin_lock_bh(lock); - hlist_for_each_entry_safe(nc_path, node, node_tmp, - head, hash_entry) { + hlist_for_each_entry_safe(nc_path, node_tmp, head, hash_entry) { /* if an helper function has been passed as parameter, * ask it if the entry has to be purged or not */ @@@ -358,7 -356,7 +356,7 @@@ batadv_dbg(BATADV_DBG_NC, bat_priv, "Remove nc_path %pM -> %pM\n", nc_path->prev_hop, nc_path->next_hop); - hlist_del_rcu(node); + hlist_del_rcu(&nc_path->hash_entry); batadv_nc_path_free_ref(nc_path); } spin_unlock_bh(lock); @@@ -442,7 -440,6 +440,6 @@@ batadv_nc_hash_find(struct batadv_hasht void *data) { struct hlist_head *head; - struct hlist_node *node; struct batadv_nc_path *nc_path, *nc_path_tmp = NULL; int index;
@@@ -453,8 -450,8 +450,8 @@@ head = &hash->table[index];
rcu_read_lock(); - hlist_for_each_entry_rcu(nc_path, node, head, hash_entry) { - if (!batadv_nc_hash_compare(node, data)) + hlist_for_each_entry_rcu(nc_path, head, hash_entry) { + if (!batadv_nc_hash_compare(&nc_path->hash_entry, data)) continue;
if (!atomic_inc_not_zero(&nc_path->refcount)) @@@ -570,7 -567,6 +567,6 @@@ batadv_nc_process_nc_paths(struct batad struct batadv_nc_path *, struct batadv_nc_packet *)) { - struct hlist_node *node; struct hlist_head *head; struct batadv_nc_packet *nc_packet, *nc_packet_tmp; struct batadv_nc_path *nc_path; @@@ -586,7 -582,7 +582,7 @@@
/* Loop coding paths */ rcu_read_lock(); - hlist_for_each_entry_rcu(nc_path, node, head, hash_entry) { + hlist_for_each_entry_rcu(nc_path, head, hash_entry) { /* Loop packets */ spin_lock_bh(&nc_path->packet_list_lock); list_for_each_entry_safe(nc_packet, nc_packet_tmp, @@@ -1137,7 -1133,6 +1133,6 @@@ batadv_nc_path_search(struct batadv_pri struct batadv_nc_path *nc_path, nc_path_key; struct batadv_nc_packet *nc_packet_out = NULL; struct batadv_nc_packet *nc_packet, *nc_packet_tmp; - struct hlist_node *node; struct batadv_hashtable *hash = bat_priv->nc.coding_hash; int idx;
@@@ -1151,7 -1146,7 +1146,7 @@@
/* Check for coding opportunities in this nc_path */ rcu_read_lock(); - hlist_for_each_entry_rcu(nc_path, node, &hash->table[idx], hash_entry) { + hlist_for_each_entry_rcu(nc_path, &hash->table[idx], hash_entry) { if (!batadv_compare_eth(nc_path->prev_hop, in_nc_node->addr)) continue;
@@@ -1602,7 -1597,6 +1597,6 @@@ batadv_nc_find_decoding_packet(struct b struct batadv_coded_packet *coded) { struct batadv_hashtable *hash = bat_priv->nc.decoding_hash; - struct hlist_node *hnode; struct batadv_nc_packet *tmp_nc_packet, *nc_packet = NULL; struct batadv_nc_path *nc_path, nc_path_key; uint8_t *dest, *source; @@@ -1627,8 -1621,7 +1621,7 @@@
/* Search for matching coding path */ rcu_read_lock(); - hlist_for_each_entry_rcu(nc_path, hnode, &hash->table[index], - hash_entry) { + hlist_for_each_entry_rcu(nc_path, &hash->table[index], hash_entry) { /* Find matching nc_packet */ spin_lock_bh(&nc_path->packet_list_lock); list_for_each_entry(tmp_nc_packet, @@@ -1749,7 -1742,6 +1742,6 @@@ int batadv_nc_nodes_seq_print_text(stru struct batadv_priv *bat_priv = netdev_priv(net_dev); struct batadv_hashtable *hash = bat_priv->orig_hash; struct batadv_hard_iface *primary_if; - struct hlist_node *node; struct hlist_head *head; struct batadv_orig_node *orig_node; struct batadv_nc_node *nc_node; @@@ -1765,7 -1757,7 +1757,7 @@@
/* For each orig_node in this bin */ rcu_read_lock(); - hlist_for_each_entry_rcu(orig_node, node, head, hash_entry) { + hlist_for_each_entry_rcu(orig_node, head, hash_entry) { seq_printf(seq, "Node: %pM\n", orig_node->orig);
seq_printf(seq, " Ingoing: "); diff --combined net/batman-adv/network-coding.h index 352c693,4fa6d0c..4fa6d0c --- a/net/batman-adv/network-coding.h +++ b/net/batman-adv/network-coding.h @@@ -17,8 -17,8 +17,8 @@@ * 02110-1301, USA */
- #ifndef _NET_BATMAN_ADV_NETWORK_CODING_H - #define _NET_BATMAN_ADV_NETWORK_CODING_H + #ifndef _NET_BATMAN_ADV_NETWORK_CODING_H_ + #define _NET_BATMAN_ADV_NETWORK_CODING_H_
#ifdef CONFIG_BATMAN_ADV_NC
@@@ -120,4 -120,4 +120,4 @@@ static inline int batadv_nc_init_debugf
#endif /* ifdef CONFIG_BATMAN_ADV_NC */
- #endif /* _NET_BATMAN_ADV_NETWORK_CODING_H */ + #endif /* _NET_BATMAN_ADV_NETWORK_CODING_H_ */