diff options
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r-- | net/batman-adv/hard-interface.c | 40 |
1 files changed, 20 insertions, 20 deletions
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); |