#include <linux/if_arp.h>
-/* protect update critical side of if_list - but not the content */
-static DEFINE_SPINLOCK(if_list_lock);
+/* protect update critical side of hardif_list - but not the content */
+static DEFINE_SPINLOCK(hardif_list_lock);
static int batman_skb_recv(struct sk_buff *skb,
struct batman_if *batman_if;
rcu_read_lock();
- list_for_each_entry_rcu(batman_if, &if_list, list) {
+ list_for_each_entry_rcu(batman_if, &hardif_list, list) {
if (batman_if->net_dev == net_dev &&
atomic_inc_not_zero(&batman_if->refcount))
goto out;
struct batman_if *batman_if;
rcu_read_lock();
- list_for_each_entry_rcu(batman_if, &if_list, list) {
+ list_for_each_entry_rcu(batman_if, &hardif_list, list) {
if (batman_if->soft_iface != soft_iface)
continue;
struct batman_if *batman_if;
rcu_read_lock();
- list_for_each_entry_rcu(batman_if, &if_list, list) {
+ list_for_each_entry_rcu(batman_if, &hardif_list, list) {
if ((batman_if->if_status != IF_ACTIVE) &&
(batman_if->if_status != IF_TO_BE_ACTIVATED))
continue;
goto out;
rcu_read_lock();
- list_for_each_entry_rcu(batman_if, &if_list, list) {
+ list_for_each_entry_rcu(batman_if, &hardif_list, list) {
if ((batman_if->if_status != IF_ACTIVE) &&
(batman_if->if_status != IF_TO_BE_ACTIVATED))
continue;
check_known_mac_addr(batman_if->net_dev);
- spin_lock(&if_list_lock);
- list_add_tail_rcu(&batman_if->list, &if_list);
- spin_unlock(&if_list_lock);
+ spin_lock(&hardif_list_lock);
+ list_add_tail_rcu(&batman_if->list, &hardif_list);
+ spin_unlock(&hardif_list_lock);
return batman_if;
INIT_LIST_HEAD(&if_queue);
- spin_lock(&if_list_lock);
- list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list) {
+ spin_lock(&hardif_list_lock);
+ list_for_each_entry_safe(batman_if, batman_if_tmp, &hardif_list, list) {
list_del_rcu(&batman_if->list);
list_add_tail(&batman_if->list, &if_queue);
}
- spin_unlock(&if_list_lock);
+ spin_unlock(&hardif_list_lock);
rtnl_lock();
list_for_each_entry_safe(batman_if, batman_if_tmp, &if_queue, list) {
hardif_deactivate_interface(batman_if);
break;
case NETDEV_UNREGISTER:
- spin_lock(&if_list_lock);
+ spin_lock(&hardif_list_lock);
list_del_rcu(&batman_if->list);
- spin_unlock(&if_list_lock);
+ spin_unlock(&hardif_list_lock);
hardif_remove_interface(batman_if);
break;
#include "vis.h"
#include "hash.h"
-struct list_head if_list;
+struct list_head hardif_list;
unsigned char broadcast_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
static int __init batman_init(void)
{
- INIT_LIST_HEAD(&if_list);
+ INIT_LIST_HEAD(&hardif_list);
/* the name should not be longer than 10 chars - see
* http://lwn.net/Articles/23634/ */
struct batman_if *batman_if;
rcu_read_lock();
- list_for_each_entry_rcu(batman_if, &if_list, list) {
+ list_for_each_entry_rcu(batman_if, &hardif_list, list) {
if (batman_if->if_status != IF_ACTIVE)
continue;