diff options
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 6 | ||||
-rw-r--r-- | net/batman-adv/bat_sysfs.c | 27 | ||||
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 2 | ||||
-rw-r--r-- | net/batman-adv/gateway_client.c | 2 | ||||
-rw-r--r-- | net/batman-adv/hard-interface.c | 40 | ||||
-rw-r--r-- | net/batman-adv/hard-interface.h | 14 | ||||
-rw-r--r-- | net/batman-adv/icmp_socket.c | 2 | ||||
-rw-r--r-- | net/batman-adv/main.c | 4 | ||||
-rw-r--r-- | net/batman-adv/originator.c | 16 | ||||
-rw-r--r-- | net/batman-adv/routing.c | 2 | ||||
-rw-r--r-- | net/batman-adv/send.c | 10 | ||||
-rw-r--r-- | net/batman-adv/translation-table.c | 4 | ||||
-rw-r--r-- | net/batman-adv/vis.c | 2 |
13 files changed, 68 insertions, 63 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index d3fc58172c8b..a59e317284ad 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -165,7 +165,7 @@ static void batadv_iv_ogm_send_to_if(struct forw_packet *forw_packet, | |||
165 | struct batman_ogm_packet *batman_ogm_packet; | 165 | struct batman_ogm_packet *batman_ogm_packet; |
166 | struct sk_buff *skb; | 166 | struct sk_buff *skb; |
167 | 167 | ||
168 | if (hard_iface->if_status != IF_ACTIVE) | 168 | if (hard_iface->if_status != BATADV_IF_ACTIVE) |
169 | return; | 169 | return; |
170 | 170 | ||
171 | packet_num = 0; | 171 | packet_num = 0; |
@@ -238,7 +238,7 @@ static void batadv_iv_ogm_emit(struct forw_packet *forw_packet) | |||
238 | soft_iface = forw_packet->if_incoming->soft_iface; | 238 | soft_iface = forw_packet->if_incoming->soft_iface; |
239 | bat_priv = netdev_priv(soft_iface); | 239 | bat_priv = netdev_priv(soft_iface); |
240 | 240 | ||
241 | if (forw_packet->if_incoming->if_status != IF_ACTIVE) | 241 | if (forw_packet->if_incoming->if_status != BATADV_IF_ACTIVE) |
242 | goto out; | 242 | goto out; |
243 | 243 | ||
244 | primary_if = batadv_primary_if_get_selected(bat_priv); | 244 | primary_if = batadv_primary_if_get_selected(bat_priv); |
@@ -1017,7 +1017,7 @@ static void batadv_iv_ogm_process(const struct ethhdr *ethhdr, | |||
1017 | 1017 | ||
1018 | rcu_read_lock(); | 1018 | rcu_read_lock(); |
1019 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { | 1019 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { |
1020 | if (hard_iface->if_status != IF_ACTIVE) | 1020 | if (hard_iface->if_status != BATADV_IF_ACTIVE) |
1021 | continue; | 1021 | continue; |
1022 | 1022 | ||
1023 | if (hard_iface->soft_iface != if_incoming->soft_iface) | 1023 | if (hard_iface->soft_iface != if_incoming->soft_iface) |
diff --git a/net/batman-adv/bat_sysfs.c b/net/batman-adv/bat_sysfs.c index 561ec31fdfb9..680caca697e2 100644 --- a/net/batman-adv/bat_sysfs.c +++ b/net/batman-adv/bat_sysfs.c | |||
@@ -559,12 +559,17 @@ static ssize_t batadv_show_mesh_iface(struct kobject *kobj, | |||
559 | struct net_device *net_dev = batadv_kobj_to_netdev(kobj); | 559 | struct net_device *net_dev = batadv_kobj_to_netdev(kobj); |
560 | struct hard_iface *hard_iface = batadv_hardif_get_by_netdev(net_dev); | 560 | struct hard_iface *hard_iface = batadv_hardif_get_by_netdev(net_dev); |
561 | ssize_t length; | 561 | ssize_t length; |
562 | const char *ifname; | ||
562 | 563 | ||
563 | if (!hard_iface) | 564 | if (!hard_iface) |
564 | return 0; | 565 | return 0; |
565 | 566 | ||
566 | length = sprintf(buff, "%s\n", hard_iface->if_status == IF_NOT_IN_USE ? | 567 | if (hard_iface->if_status == BATADV_IF_NOT_IN_USE) |
567 | "none" : hard_iface->soft_iface->name); | 568 | ifname = "none"; |
569 | else | ||
570 | ifname = hard_iface->soft_iface->name; | ||
571 | |||
572 | length = sprintf(buff, "%s\n", ifname); | ||
568 | 573 | ||
569 | batadv_hardif_free_ref(hard_iface); | 574 | batadv_hardif_free_ref(hard_iface); |
570 | 575 | ||
@@ -594,9 +599,9 @@ static ssize_t batadv_store_mesh_iface(struct kobject *kobj, | |||
594 | } | 599 | } |
595 | 600 | ||
596 | if (strncmp(buff, "none", 4) == 0) | 601 | if (strncmp(buff, "none", 4) == 0) |
597 | status_tmp = IF_NOT_IN_USE; | 602 | status_tmp = BATADV_IF_NOT_IN_USE; |
598 | else | 603 | else |
599 | status_tmp = IF_I_WANT_YOU; | 604 | status_tmp = BATADV_IF_I_WANT_YOU; |
600 | 605 | ||
601 | if (hard_iface->if_status == status_tmp) | 606 | if (hard_iface->if_status == status_tmp) |
602 | goto out; | 607 | goto out; |
@@ -610,13 +615,13 @@ static ssize_t batadv_store_mesh_iface(struct kobject *kobj, | |||
610 | goto out; | 615 | goto out; |
611 | } | 616 | } |
612 | 617 | ||
613 | if (status_tmp == IF_NOT_IN_USE) { | 618 | if (status_tmp == BATADV_IF_NOT_IN_USE) { |
614 | batadv_hardif_disable_interface(hard_iface); | 619 | batadv_hardif_disable_interface(hard_iface); |
615 | goto unlock; | 620 | goto unlock; |
616 | } | 621 | } |
617 | 622 | ||
618 | /* if the interface already is in use */ | 623 | /* if the interface already is in use */ |
619 | if (hard_iface->if_status != IF_NOT_IN_USE) | 624 | if (hard_iface->if_status != BATADV_IF_NOT_IN_USE) |
620 | batadv_hardif_disable_interface(hard_iface); | 625 | batadv_hardif_disable_interface(hard_iface); |
621 | 626 | ||
622 | ret = batadv_hardif_enable_interface(hard_iface, buff); | 627 | ret = batadv_hardif_enable_interface(hard_iface, buff); |
@@ -639,19 +644,19 @@ static ssize_t batadv_show_iface_status(struct kobject *kobj, | |||
639 | return 0; | 644 | return 0; |
640 | 645 | ||
641 | switch (hard_iface->if_status) { | 646 | switch (hard_iface->if_status) { |
642 | case IF_TO_BE_REMOVED: | 647 | case BATADV_IF_TO_BE_REMOVED: |
643 | length = sprintf(buff, "disabling\n"); | 648 | length = sprintf(buff, "disabling\n"); |
644 | break; | 649 | break; |
645 | case IF_INACTIVE: | 650 | case BATADV_IF_INACTIVE: |
646 | length = sprintf(buff, "inactive\n"); | 651 | length = sprintf(buff, "inactive\n"); |
647 | break; | 652 | break; |
648 | case IF_ACTIVE: | 653 | case BATADV_IF_ACTIVE: |
649 | length = sprintf(buff, "active\n"); | 654 | length = sprintf(buff, "active\n"); |
650 | break; | 655 | break; |
651 | case IF_TO_BE_ACTIVATED: | 656 | case BATADV_IF_TO_BE_ACTIVATED: |
652 | length = sprintf(buff, "enabling\n"); | 657 | length = sprintf(buff, "enabling\n"); |
653 | break; | 658 | break; |
654 | case IF_NOT_IN_USE: | 659 | case BATADV_IF_NOT_IN_USE: |
655 | default: | 660 | default: |
656 | length = sprintf(buff, "not in use\n"); | 661 | length = sprintf(buff, "not in use\n"); |
657 | break; | 662 | break; |
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index db20b688ee25..13afc6527521 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c | |||
@@ -1552,7 +1552,7 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset) | |||
1552 | goto out; | 1552 | goto out; |
1553 | } | 1553 | } |
1554 | 1554 | ||
1555 | if (primary_if->if_status != IF_ACTIVE) { | 1555 | if (primary_if->if_status != BATADV_IF_ACTIVE) { |
1556 | ret = seq_printf(seq, | 1556 | ret = seq_printf(seq, |
1557 | "BATMAN mesh %s disabled - primary interface not active\n", | 1557 | "BATMAN mesh %s disabled - primary interface not active\n", |
1558 | net_dev->name); | 1558 | net_dev->name); |
diff --git a/net/batman-adv/gateway_client.c b/net/batman-adv/gateway_client.c index 2fcf26f5b9c5..3b50c3143310 100644 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c | |||
@@ -475,7 +475,7 @@ int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset) | |||
475 | goto out; | 475 | goto out; |
476 | } | 476 | } |
477 | 477 | ||
478 | if (primary_if->if_status != IF_ACTIVE) { | 478 | if (primary_if->if_status != BATADV_IF_ACTIVE) { |
479 | ret = seq_printf(seq, | 479 | ret = seq_printf(seq, |
480 | "BATMAN mesh %s disabled - primary interface not active\n", | 480 | "BATMAN mesh %s disabled - primary interface not active\n", |
481 | net_dev->name); | 481 | net_dev->name); |
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c index e7eba9c32e70..e109d65c6803 100644 --- a/net/batman-adv/hard-interface.c +++ b/net/batman-adv/hard-interface.c | |||
@@ -85,7 +85,7 @@ batadv_hardif_get_active(const struct net_device *soft_iface) | |||
85 | if (hard_iface->soft_iface != soft_iface) | 85 | if (hard_iface->soft_iface != soft_iface) |
86 | continue; | 86 | continue; |
87 | 87 | ||
88 | if (hard_iface->if_status == IF_ACTIVE && | 88 | if (hard_iface->if_status == BATADV_IF_ACTIVE && |
89 | atomic_inc_not_zero(&hard_iface->refcount)) | 89 | atomic_inc_not_zero(&hard_iface->refcount)) |
90 | goto out; | 90 | goto out; |
91 | } | 91 | } |
@@ -157,8 +157,8 @@ static void batadv_check_known_mac_addr(const struct net_device *net_dev) | |||
157 | 157 | ||
158 | rcu_read_lock(); | 158 | rcu_read_lock(); |
159 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { | 159 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { |
160 | if ((hard_iface->if_status != IF_ACTIVE) && | 160 | if ((hard_iface->if_status != BATADV_IF_ACTIVE) && |
161 | (hard_iface->if_status != IF_TO_BE_ACTIVATED)) | 161 | (hard_iface->if_status != BATADV_IF_TO_BE_ACTIVATED)) |
162 | continue; | 162 | continue; |
163 | 163 | ||
164 | if (hard_iface->net_dev == net_dev) | 164 | if (hard_iface->net_dev == net_dev) |
@@ -189,8 +189,8 @@ int batadv_hardif_min_mtu(struct net_device *soft_iface) | |||
189 | 189 | ||
190 | rcu_read_lock(); | 190 | rcu_read_lock(); |
191 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { | 191 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { |
192 | if ((hard_iface->if_status != IF_ACTIVE) && | 192 | if ((hard_iface->if_status != BATADV_IF_ACTIVE) && |
193 | (hard_iface->if_status != IF_TO_BE_ACTIVATED)) | 193 | (hard_iface->if_status != BATADV_IF_TO_BE_ACTIVATED)) |
194 | continue; | 194 | continue; |
195 | 195 | ||
196 | if (hard_iface->soft_iface != soft_iface) | 196 | if (hard_iface->soft_iface != soft_iface) |
@@ -220,13 +220,13 @@ static void batadv_hardif_activate_interface(struct hard_iface *hard_iface) | |||
220 | struct bat_priv *bat_priv; | 220 | struct bat_priv *bat_priv; |
221 | struct hard_iface *primary_if = NULL; | 221 | struct hard_iface *primary_if = NULL; |
222 | 222 | ||
223 | if (hard_iface->if_status != IF_INACTIVE) | 223 | if (hard_iface->if_status != BATADV_IF_INACTIVE) |
224 | goto out; | 224 | goto out; |
225 | 225 | ||
226 | bat_priv = netdev_priv(hard_iface->soft_iface); | 226 | bat_priv = netdev_priv(hard_iface->soft_iface); |
227 | 227 | ||
228 | bat_priv->bat_algo_ops->bat_iface_update_mac(hard_iface); | 228 | bat_priv->bat_algo_ops->bat_iface_update_mac(hard_iface); |
229 | hard_iface->if_status = IF_TO_BE_ACTIVATED; | 229 | hard_iface->if_status = BATADV_IF_TO_BE_ACTIVATED; |
230 | 230 | ||
231 | /* the first active interface becomes our primary interface or | 231 | /* the first active interface becomes our primary interface or |
232 | * the next active interface after the old primary interface was removed | 232 | * the next active interface after the old primary interface was removed |
@@ -247,11 +247,11 @@ out: | |||
247 | 247 | ||
248 | static void batadv_hardif_deactivate_interface(struct hard_iface *hard_iface) | 248 | static void batadv_hardif_deactivate_interface(struct hard_iface *hard_iface) |
249 | { | 249 | { |
250 | if ((hard_iface->if_status != IF_ACTIVE) && | 250 | if ((hard_iface->if_status != BATADV_IF_ACTIVE) && |
251 | (hard_iface->if_status != IF_TO_BE_ACTIVATED)) | 251 | (hard_iface->if_status != BATADV_IF_TO_BE_ACTIVATED)) |
252 | return; | 252 | return; |
253 | 253 | ||
254 | hard_iface->if_status = IF_INACTIVE; | 254 | hard_iface->if_status = BATADV_IF_INACTIVE; |
255 | 255 | ||
256 | batadv_info(hard_iface->soft_iface, "Interface deactivated: %s\n", | 256 | batadv_info(hard_iface->soft_iface, "Interface deactivated: %s\n", |
257 | hard_iface->net_dev->name); | 257 | hard_iface->net_dev->name); |
@@ -267,7 +267,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface, | |||
267 | __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN); | 267 | __be16 ethertype = __constant_htons(BATADV_ETH_P_BATMAN); |
268 | int ret; | 268 | int ret; |
269 | 269 | ||
270 | if (hard_iface->if_status != IF_NOT_IN_USE) | 270 | if (hard_iface->if_status != BATADV_IF_NOT_IN_USE) |
271 | goto out; | 271 | goto out; |
272 | 272 | ||
273 | if (!atomic_inc_not_zero(&hard_iface->refcount)) | 273 | if (!atomic_inc_not_zero(&hard_iface->refcount)) |
@@ -308,7 +308,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface, | |||
308 | 308 | ||
309 | hard_iface->if_num = bat_priv->num_ifaces; | 309 | hard_iface->if_num = bat_priv->num_ifaces; |
310 | bat_priv->num_ifaces++; | 310 | bat_priv->num_ifaces++; |
311 | hard_iface->if_status = IF_INACTIVE; | 311 | hard_iface->if_status = BATADV_IF_INACTIVE; |
312 | batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces); | 312 | batadv_orig_hash_add_if(hard_iface, bat_priv->num_ifaces); |
313 | 313 | ||
314 | hard_iface->batman_adv_ptype.type = ethertype; | 314 | hard_iface->batman_adv_ptype.type = ethertype; |
@@ -359,10 +359,10 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface) | |||
359 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 359 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
360 | struct hard_iface *primary_if = NULL; | 360 | struct hard_iface *primary_if = NULL; |
361 | 361 | ||
362 | if (hard_iface->if_status == IF_ACTIVE) | 362 | if (hard_iface->if_status == BATADV_IF_ACTIVE) |
363 | batadv_hardif_deactivate_interface(hard_iface); | 363 | batadv_hardif_deactivate_interface(hard_iface); |
364 | 364 | ||
365 | if (hard_iface->if_status != IF_INACTIVE) | 365 | if (hard_iface->if_status != BATADV_IF_INACTIVE) |
366 | goto out; | 366 | goto out; |
367 | 367 | ||
368 | batadv_info(hard_iface->soft_iface, "Removing interface: %s\n", | 368 | batadv_info(hard_iface->soft_iface, "Removing interface: %s\n", |
@@ -384,7 +384,7 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface) | |||
384 | } | 384 | } |
385 | 385 | ||
386 | bat_priv->bat_algo_ops->bat_iface_disable(hard_iface); | 386 | bat_priv->bat_algo_ops->bat_iface_disable(hard_iface); |
387 | hard_iface->if_status = IF_NOT_IN_USE; | 387 | hard_iface->if_status = BATADV_IF_NOT_IN_USE; |
388 | 388 | ||
389 | /* delete all references to this hard_iface */ | 389 | /* delete all references to this hard_iface */ |
390 | batadv_purge_orig_ref(bat_priv); | 390 | batadv_purge_orig_ref(bat_priv); |
@@ -428,7 +428,7 @@ batadv_hardif_add_interface(struct net_device *net_dev) | |||
428 | hard_iface->if_num = -1; | 428 | hard_iface->if_num = -1; |
429 | hard_iface->net_dev = net_dev; | 429 | hard_iface->net_dev = net_dev; |
430 | hard_iface->soft_iface = NULL; | 430 | hard_iface->soft_iface = NULL; |
431 | hard_iface->if_status = IF_NOT_IN_USE; | 431 | hard_iface->if_status = BATADV_IF_NOT_IN_USE; |
432 | INIT_LIST_HEAD(&hard_iface->list); | 432 | INIT_LIST_HEAD(&hard_iface->list); |
433 | /* extra reference for return */ | 433 | /* extra reference for return */ |
434 | atomic_set(&hard_iface->refcount, 2); | 434 | atomic_set(&hard_iface->refcount, 2); |
@@ -457,13 +457,13 @@ static void batadv_hardif_remove_interface(struct hard_iface *hard_iface) | |||
457 | ASSERT_RTNL(); | 457 | ASSERT_RTNL(); |
458 | 458 | ||
459 | /* first deactivate interface */ | 459 | /* first deactivate interface */ |
460 | if (hard_iface->if_status != IF_NOT_IN_USE) | 460 | if (hard_iface->if_status != BATADV_IF_NOT_IN_USE) |
461 | batadv_hardif_disable_interface(hard_iface); | 461 | batadv_hardif_disable_interface(hard_iface); |
462 | 462 | ||
463 | if (hard_iface->if_status != IF_NOT_IN_USE) | 463 | if (hard_iface->if_status != BATADV_IF_NOT_IN_USE) |
464 | return; | 464 | return; |
465 | 465 | ||
466 | hard_iface->if_status = IF_TO_BE_REMOVED; | 466 | hard_iface->if_status = BATADV_IF_TO_BE_REMOVED; |
467 | batadv_sysfs_del_hardif(&hard_iface->hardif_obj); | 467 | batadv_sysfs_del_hardif(&hard_iface->hardif_obj); |
468 | batadv_hardif_free_ref(hard_iface); | 468 | batadv_hardif_free_ref(hard_iface); |
469 | } | 469 | } |
@@ -513,7 +513,7 @@ static int batadv_hard_if_event(struct notifier_block *this, | |||
513 | batadv_update_min_mtu(hard_iface->soft_iface); | 513 | batadv_update_min_mtu(hard_iface->soft_iface); |
514 | break; | 514 | break; |
515 | case NETDEV_CHANGEADDR: | 515 | case NETDEV_CHANGEADDR: |
516 | if (hard_iface->if_status == IF_NOT_IN_USE) | 516 | if (hard_iface->if_status == BATADV_IF_NOT_IN_USE) |
517 | goto hardif_put; | 517 | goto hardif_put; |
518 | 518 | ||
519 | batadv_check_known_mac_addr(hard_iface->net_dev); | 519 | batadv_check_known_mac_addr(hard_iface->net_dev); |
diff --git a/net/batman-adv/hard-interface.h b/net/batman-adv/hard-interface.h index d66dabd620b7..4b60d580d290 100644 --- a/net/batman-adv/hard-interface.h +++ b/net/batman-adv/hard-interface.h | |||
@@ -20,13 +20,13 @@ | |||
20 | #ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_ | 20 | #ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_ |
21 | #define _NET_BATMAN_ADV_HARD_INTERFACE_H_ | 21 | #define _NET_BATMAN_ADV_HARD_INTERFACE_H_ |
22 | 22 | ||
23 | enum hard_if_state { | 23 | enum batadv_hard_if_state { |
24 | IF_NOT_IN_USE, | 24 | BATADV_IF_NOT_IN_USE, |
25 | IF_TO_BE_REMOVED, | 25 | BATADV_IF_TO_BE_REMOVED, |
26 | IF_INACTIVE, | 26 | BATADV_IF_INACTIVE, |
27 | IF_ACTIVE, | 27 | BATADV_IF_ACTIVE, |
28 | IF_TO_BE_ACTIVATED, | 28 | BATADV_IF_TO_BE_ACTIVATED, |
29 | IF_I_WANT_YOU | 29 | BATADV_IF_I_WANT_YOU, |
30 | }; | 30 | }; |
31 | 31 | ||
32 | extern struct notifier_block batadv_hard_if_notifier; | 32 | extern struct notifier_block batadv_hard_if_notifier; |
diff --git a/net/batman-adv/icmp_socket.c b/net/batman-adv/icmp_socket.c index f2f578b1d9f0..f5373a2a4d0b 100644 --- a/net/batman-adv/icmp_socket.c +++ b/net/batman-adv/icmp_socket.c | |||
@@ -225,7 +225,7 @@ static ssize_t batadv_socket_write(struct file *file, const char __user *buff, | |||
225 | if (!neigh_node->if_incoming) | 225 | if (!neigh_node->if_incoming) |
226 | goto dst_unreach; | 226 | goto dst_unreach; |
227 | 227 | ||
228 | if (neigh_node->if_incoming->if_status != IF_ACTIVE) | 228 | if (neigh_node->if_incoming->if_status != BATADV_IF_ACTIVE) |
229 | goto dst_unreach; | 229 | goto dst_unreach; |
230 | 230 | ||
231 | memcpy(icmp_packet->orig, | 231 | memcpy(icmp_packet->orig, |
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index df7335c4217a..23f5c8e4b675 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -179,7 +179,7 @@ int batadv_is_my_mac(const uint8_t *addr) | |||
179 | 179 | ||
180 | rcu_read_lock(); | 180 | rcu_read_lock(); |
181 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { | 181 | list_for_each_entry_rcu(hard_iface, &batadv_hardif_list, list) { |
182 | if (hard_iface->if_status != IF_ACTIVE) | 182 | if (hard_iface->if_status != BATADV_IF_ACTIVE) |
183 | continue; | 183 | continue; |
184 | 184 | ||
185 | if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { | 185 | if (batadv_compare_eth(hard_iface->net_dev->dev_addr, addr)) { |
@@ -234,7 +234,7 @@ int batadv_batman_skb_recv(struct sk_buff *skb, struct net_device *dev, | |||
234 | goto err_free; | 234 | goto err_free; |
235 | 235 | ||
236 | /* discard frames on not active interfaces */ | 236 | /* discard frames on not active interfaces */ |
237 | if (hard_iface->if_status != IF_ACTIVE) | 237 | if (hard_iface->if_status != BATADV_IF_ACTIVE) |
238 | goto err_free; | 238 | goto err_free; |
239 | 239 | ||
240 | batman_ogm_packet = (struct batman_ogm_packet *)skb->data; | 240 | batman_ogm_packet = (struct batman_ogm_packet *)skb->data; |
diff --git a/net/batman-adv/originator.c b/net/batman-adv/originator.c index f04f591f4668..9e60cc0e6a7f 100644 --- a/net/batman-adv/originator.c +++ b/net/batman-adv/originator.c | |||
@@ -286,13 +286,13 @@ static bool batadv_purge_orig_neighbors(struct bat_priv *bat_priv, | |||
286 | if_incoming = neigh_node->if_incoming; | 286 | if_incoming = neigh_node->if_incoming; |
287 | 287 | ||
288 | if ((batadv_has_timed_out(last_seen, BATADV_PURGE_TIMEOUT)) || | 288 | if ((batadv_has_timed_out(last_seen, BATADV_PURGE_TIMEOUT)) || |
289 | (if_incoming->if_status == IF_INACTIVE) || | 289 | (if_incoming->if_status == BATADV_IF_INACTIVE) || |
290 | (if_incoming->if_status == IF_NOT_IN_USE) || | 290 | (if_incoming->if_status == BATADV_IF_NOT_IN_USE) || |
291 | (if_incoming->if_status == IF_TO_BE_REMOVED)) { | 291 | (if_incoming->if_status == BATADV_IF_TO_BE_REMOVED)) { |
292 | 292 | ||
293 | if ((if_incoming->if_status == IF_INACTIVE) || | 293 | if ((if_incoming->if_status == BATADV_IF_INACTIVE) || |
294 | (if_incoming->if_status == IF_NOT_IN_USE) || | 294 | (if_incoming->if_status == BATADV_IF_NOT_IN_USE) || |
295 | (if_incoming->if_status == IF_TO_BE_REMOVED)) | 295 | (if_incoming->if_status == BATADV_IF_TO_BE_REMOVED)) |
296 | batadv_dbg(DBG_BATMAN, bat_priv, | 296 | batadv_dbg(DBG_BATMAN, bat_priv, |
297 | "neighbor purge: originator %pM, neighbor: %pM, iface: %s\n", | 297 | "neighbor purge: originator %pM, neighbor: %pM, iface: %s\n", |
298 | orig_node->orig, neigh_node->addr, | 298 | orig_node->orig, neigh_node->addr, |
@@ -422,7 +422,7 @@ int batadv_orig_seq_print_text(struct seq_file *seq, void *offset) | |||
422 | goto out; | 422 | goto out; |
423 | } | 423 | } |
424 | 424 | ||
425 | if (primary_if->if_status != IF_ACTIVE) { | 425 | if (primary_if->if_status != BATADV_IF_ACTIVE) { |
426 | ret = seq_printf(seq, | 426 | ret = seq_printf(seq, |
427 | "BATMAN mesh %s disabled - primary interface not active\n", | 427 | "BATMAN mesh %s disabled - primary interface not active\n", |
428 | net_dev->name); | 428 | net_dev->name); |
@@ -627,7 +627,7 @@ int batadv_orig_hash_del_if(struct hard_iface *hard_iface, int max_if_num) | |||
627 | /* renumber remaining batman interfaces _inside_ of orig_hash_lock */ | 627 | /* renumber remaining batman interfaces _inside_ of orig_hash_lock */ |
628 | rcu_read_lock(); | 628 | rcu_read_lock(); |
629 | list_for_each_entry_rcu(hard_iface_tmp, &batadv_hardif_list, list) { | 629 | list_for_each_entry_rcu(hard_iface_tmp, &batadv_hardif_list, list) { |
630 | if (hard_iface_tmp->if_status == IF_NOT_IN_USE) | 630 | if (hard_iface_tmp->if_status == BATADV_IF_NOT_IN_USE) |
631 | continue; | 631 | continue; |
632 | 632 | ||
633 | if (hard_iface == hard_iface_tmp) | 633 | if (hard_iface == hard_iface_tmp) |
diff --git a/net/batman-adv/routing.c b/net/batman-adv/routing.c index b3fd61c90f32..4d632215f92f 100644 --- a/net/batman-adv/routing.c +++ b/net/batman-adv/routing.c | |||
@@ -792,7 +792,7 @@ struct neigh_node *batadv_find_router(struct bat_priv *bat_priv, | |||
792 | router = batadv_find_ifalter_router(primary_orig_node, recv_if); | 792 | router = batadv_find_ifalter_router(primary_orig_node, recv_if); |
793 | 793 | ||
794 | return_router: | 794 | return_router: |
795 | if (router && router->if_incoming->if_status != IF_ACTIVE) | 795 | if (router && router->if_incoming->if_status != BATADV_IF_ACTIVE) |
796 | goto err_unlock; | 796 | goto err_unlock; |
797 | 797 | ||
798 | rcu_read_unlock(); | 798 | rcu_read_unlock(); |
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c index 72542cb01662..8de6e25fcc38 100644 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c | |||
@@ -37,7 +37,7 @@ int batadv_send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, | |||
37 | { | 37 | { |
38 | struct ethhdr *ethhdr; | 38 | struct ethhdr *ethhdr; |
39 | 39 | ||
40 | if (hard_iface->if_status != IF_ACTIVE) | 40 | if (hard_iface->if_status != BATADV_IF_ACTIVE) |
41 | goto send_skb_err; | 41 | goto send_skb_err; |
42 | 42 | ||
43 | if (unlikely(!hard_iface->net_dev)) | 43 | if (unlikely(!hard_iface->net_dev)) |
@@ -80,8 +80,8 @@ void batadv_schedule_bat_ogm(struct hard_iface *hard_iface) | |||
80 | { | 80 | { |
81 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); | 81 | struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface); |
82 | 82 | ||
83 | if ((hard_iface->if_status == IF_NOT_IN_USE) || | 83 | if ((hard_iface->if_status == BATADV_IF_NOT_IN_USE) || |
84 | (hard_iface->if_status == IF_TO_BE_REMOVED)) | 84 | (hard_iface->if_status == BATADV_IF_TO_BE_REMOVED)) |
85 | return; | 85 | return; |
86 | 86 | ||
87 | /* the interface gets activated here to avoid race conditions between | 87 | /* the interface gets activated here to avoid race conditions between |
@@ -90,8 +90,8 @@ void batadv_schedule_bat_ogm(struct hard_iface *hard_iface) | |||
90 | * outdated packets (especially uninitialized mac addresses) in the | 90 | * outdated packets (especially uninitialized mac addresses) in the |
91 | * packet queue | 91 | * packet queue |
92 | */ | 92 | */ |
93 | if (hard_iface->if_status == IF_TO_BE_ACTIVATED) | 93 | if (hard_iface->if_status == BATADV_IF_TO_BE_ACTIVATED) |
94 | hard_iface->if_status = IF_ACTIVE; | 94 | hard_iface->if_status = BATADV_IF_ACTIVE; |
95 | 95 | ||
96 | bat_priv->bat_algo_ops->bat_ogm_schedule(hard_iface); | 96 | bat_priv->bat_algo_ops->bat_ogm_schedule(hard_iface); |
97 | } | 97 | } |
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index a0487e9f18c7..156c3094c12b 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -433,7 +433,7 @@ int batadv_tt_local_seq_print_text(struct seq_file *seq, void *offset) | |||
433 | goto out; | 433 | goto out; |
434 | } | 434 | } |
435 | 435 | ||
436 | if (primary_if->if_status != IF_ACTIVE) { | 436 | if (primary_if->if_status != BATADV_IF_ACTIVE) { |
437 | ret = seq_printf(seq, | 437 | ret = seq_printf(seq, |
438 | "BATMAN mesh %s disabled - primary interface not active\n", | 438 | "BATMAN mesh %s disabled - primary interface not active\n", |
439 | net_dev->name); | 439 | net_dev->name); |
@@ -785,7 +785,7 @@ int batadv_tt_global_seq_print_text(struct seq_file *seq, void *offset) | |||
785 | goto out; | 785 | goto out; |
786 | } | 786 | } |
787 | 787 | ||
788 | if (primary_if->if_status != IF_ACTIVE) { | 788 | if (primary_if->if_status != BATADV_IF_ACTIVE) { |
789 | ret = seq_printf(seq, | 789 | ret = seq_printf(seq, |
790 | "BATMAN mesh %s disabled - primary interface not active\n", | 790 | "BATMAN mesh %s disabled - primary interface not active\n", |
791 | net_dev->name); | 791 | net_dev->name); |
diff --git a/net/batman-adv/vis.c b/net/batman-adv/vis.c index 74181696eef6..c920b4b8516b 100644 --- a/net/batman-adv/vis.c +++ b/net/batman-adv/vis.c | |||
@@ -599,7 +599,7 @@ static int batadv_generate_vis_packet(struct bat_priv *bat_priv) | |||
599 | if (!batadv_compare_eth(router->addr, orig_node->orig)) | 599 | if (!batadv_compare_eth(router->addr, orig_node->orig)) |
600 | goto next; | 600 | goto next; |
601 | 601 | ||
602 | if (router->if_incoming->if_status != IF_ACTIVE) | 602 | if (router->if_incoming->if_status != BATADV_IF_ACTIVE) |
603 | goto next; | 603 | goto next; |
604 | 604 | ||
605 | if (router->tq_avg < 1) | 605 | if (router->tq_avg < 1) |