diff options
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index de9bd36e00dc..4a2e6e33ebc0 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c | |||
@@ -31,8 +31,8 @@ | |||
31 | 31 | ||
32 | #include <linux/if_arp.h> | 32 | #include <linux/if_arp.h> |
33 | 33 | ||
34 | /* protect update critical side of if_list - but not the content */ | 34 | /* protect update critical side of hardif_list - but not the content */ |
35 | static DEFINE_SPINLOCK(if_list_lock); | 35 | static DEFINE_SPINLOCK(hardif_list_lock); |
36 | 36 | ||
37 | 37 | ||
38 | static int batman_skb_recv(struct sk_buff *skb, | 38 | static int batman_skb_recv(struct sk_buff *skb, |
@@ -54,7 +54,7 @@ struct batman_if *get_batman_if_by_netdev(struct net_device *net_dev) | |||
54 | struct batman_if *batman_if; | 54 | struct batman_if *batman_if; |
55 | 55 | ||
56 | rcu_read_lock(); | 56 | rcu_read_lock(); |
57 | list_for_each_entry_rcu(batman_if, &if_list, list) { | 57 | list_for_each_entry_rcu(batman_if, &hardif_list, list) { |
58 | if (batman_if->net_dev == net_dev && | 58 | if (batman_if->net_dev == net_dev && |
59 | atomic_inc_not_zero(&batman_if->refcount)) | 59 | atomic_inc_not_zero(&batman_if->refcount)) |
60 | goto out; | 60 | goto out; |
@@ -99,7 +99,7 @@ static struct batman_if *get_active_batman_if(struct net_device *soft_iface) | |||
99 | struct batman_if *batman_if; | 99 | struct batman_if *batman_if; |
100 | 100 | ||
101 | rcu_read_lock(); | 101 | rcu_read_lock(); |
102 | list_for_each_entry_rcu(batman_if, &if_list, list) { | 102 | list_for_each_entry_rcu(batman_if, &hardif_list, list) { |
103 | if (batman_if->soft_iface != soft_iface) | 103 | if (batman_if->soft_iface != soft_iface) |
104 | continue; | 104 | continue; |
105 | 105 | ||
@@ -179,7 +179,7 @@ static void check_known_mac_addr(struct net_device *net_dev) | |||
179 | struct batman_if *batman_if; | 179 | struct batman_if *batman_if; |
180 | 180 | ||
181 | rcu_read_lock(); | 181 | rcu_read_lock(); |
182 | list_for_each_entry_rcu(batman_if, &if_list, list) { | 182 | list_for_each_entry_rcu(batman_if, &hardif_list, list) { |
183 | if ((batman_if->if_status != IF_ACTIVE) && | 183 | if ((batman_if->if_status != IF_ACTIVE) && |
184 | (batman_if->if_status != IF_TO_BE_ACTIVATED)) | 184 | (batman_if->if_status != IF_TO_BE_ACTIVATED)) |
185 | continue; | 185 | continue; |
@@ -212,7 +212,7 @@ int hardif_min_mtu(struct net_device *soft_iface) | |||
212 | goto out; | 212 | goto out; |
213 | 213 | ||
214 | rcu_read_lock(); | 214 | rcu_read_lock(); |
215 | list_for_each_entry_rcu(batman_if, &if_list, list) { | 215 | list_for_each_entry_rcu(batman_if, &hardif_list, list) { |
216 | if ((batman_if->if_status != IF_ACTIVE) && | 216 | if ((batman_if->if_status != IF_ACTIVE) && |
217 | (batman_if->if_status != IF_TO_BE_ACTIVATED)) | 217 | (batman_if->if_status != IF_TO_BE_ACTIVATED)) |
218 | continue; | 218 | continue; |
@@ -449,9 +449,9 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev) | |||
449 | 449 | ||
450 | check_known_mac_addr(batman_if->net_dev); | 450 | check_known_mac_addr(batman_if->net_dev); |
451 | 451 | ||
452 | spin_lock(&if_list_lock); | 452 | spin_lock(&hardif_list_lock); |
453 | list_add_tail_rcu(&batman_if->list, &if_list); | 453 | list_add_tail_rcu(&batman_if->list, &hardif_list); |
454 | spin_unlock(&if_list_lock); | 454 | spin_unlock(&hardif_list_lock); |
455 | 455 | ||
456 | return batman_if; | 456 | return batman_if; |
457 | 457 | ||
@@ -484,12 +484,12 @@ void hardif_remove_interfaces(void) | |||
484 | 484 | ||
485 | INIT_LIST_HEAD(&if_queue); | 485 | INIT_LIST_HEAD(&if_queue); |
486 | 486 | ||
487 | spin_lock(&if_list_lock); | 487 | spin_lock(&hardif_list_lock); |
488 | list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list) { | 488 | list_for_each_entry_safe(batman_if, batman_if_tmp, &hardif_list, list) { |
489 | list_del_rcu(&batman_if->list); | 489 | list_del_rcu(&batman_if->list); |
490 | list_add_tail(&batman_if->list, &if_queue); | 490 | list_add_tail(&batman_if->list, &if_queue); |
491 | } | 491 | } |
492 | spin_unlock(&if_list_lock); | 492 | spin_unlock(&hardif_list_lock); |
493 | 493 | ||
494 | rtnl_lock(); | 494 | rtnl_lock(); |
495 | list_for_each_entry_safe(batman_if, batman_if_tmp, &if_queue, list) { | 495 | list_for_each_entry_safe(batman_if, batman_if_tmp, &if_queue, list) { |
@@ -520,9 +520,9 @@ static int hard_if_event(struct notifier_block *this, | |||
520 | hardif_deactivate_interface(batman_if); | 520 | hardif_deactivate_interface(batman_if); |
521 | break; | 521 | break; |
522 | case NETDEV_UNREGISTER: | 522 | case NETDEV_UNREGISTER: |
523 | spin_lock(&if_list_lock); | 523 | spin_lock(&hardif_list_lock); |
524 | list_del_rcu(&batman_if->list); | 524 | list_del_rcu(&batman_if->list); |
525 | spin_unlock(&if_list_lock); | 525 | spin_unlock(&hardif_list_lock); |
526 | 526 | ||
527 | hardif_remove_interface(batman_if); | 527 | hardif_remove_interface(batman_if); |
528 | break; | 528 | break; |