aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/hard-interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/batman-adv/hard-interface.c')
-rw-r--r--net/batman-adv/hard-interface.c36
1 files changed, 12 insertions, 24 deletions
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 409d0273c9d1..377897701a85 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -175,11 +175,9 @@ static void check_known_mac_addr(const struct net_device *net_dev)
175 net_dev->dev_addr)) 175 net_dev->dev_addr))
176 continue; 176 continue;
177 177
178 pr_warning("The newly added mac address (%pM) already exists " 178 pr_warning("The newly added mac address (%pM) already exists on: %s\n",
179 "on: %s\n", net_dev->dev_addr, 179 net_dev->dev_addr, hard_iface->net_dev->name);
180 hard_iface->net_dev->name); 180 pr_warning("It is strongly recommended to keep mac addresses unique to avoid problems!\n");
181 pr_warning("It is strongly recommended to keep mac addresses "
182 "unique to avoid problems!\n");
183 } 181 }
184 rcu_read_unlock(); 182 rcu_read_unlock();
185} 183}
@@ -282,10 +280,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
282 280
283 /* hard-interface is part of a bridge */ 281 /* hard-interface is part of a bridge */
284 if (hard_iface->net_dev->priv_flags & IFF_BRIDGE_PORT) 282 if (hard_iface->net_dev->priv_flags & IFF_BRIDGE_PORT)
285 pr_err("You are about to enable batman-adv on '%s' which " 283 pr_err("You are about to enable batman-adv on '%s' which already is part of a bridge. Unless you know exactly what you are doing this is probably wrong and won't work the way you think it would.\n",
286 "already is part of a bridge. Unless you know exactly "
287 "what you are doing this is probably wrong and won't "
288 "work the way you think it would.\n",
289 hard_iface->net_dev->name); 284 hard_iface->net_dev->name);
290 285
291 soft_iface = dev_get_by_name(&init_net, iface_name); 286 soft_iface = dev_get_by_name(&init_net, iface_name);
@@ -303,8 +298,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
303 } 298 }
304 299
305 if (!softif_is_valid(soft_iface)) { 300 if (!softif_is_valid(soft_iface)) {
306 pr_err("Can't create batman mesh interface %s: " 301 pr_err("Can't create batman mesh interface %s: already exists as regular interface\n",
307 "already exists as regular interface\n",
308 soft_iface->name); 302 soft_iface->name);
309 dev_put(soft_iface); 303 dev_put(soft_iface);
310 ret = -EINVAL; 304 ret = -EINVAL;
@@ -317,8 +311,9 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
317 bat_priv->bat_algo_ops->bat_ogm_init(hard_iface); 311 bat_priv->bat_algo_ops->bat_ogm_init(hard_iface);
318 312
319 if (!hard_iface->packet_buff) { 313 if (!hard_iface->packet_buff) {
320 bat_err(hard_iface->soft_iface, "Can't add interface packet " 314 bat_err(hard_iface->soft_iface,
321 "(%s): out of memory\n", hard_iface->net_dev->name); 315 "Can't add interface packet (%s): out of memory\n",
316 hard_iface->net_dev->name);
322 ret = -ENOMEM; 317 ret = -ENOMEM;
323 goto err; 318 goto err;
324 } 319 }
@@ -341,29 +336,22 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
341 if (atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu < 336 if (atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu <
342 ETH_DATA_LEN + BAT_HEADER_LEN) 337 ETH_DATA_LEN + BAT_HEADER_LEN)
343 bat_info(hard_iface->soft_iface, 338 bat_info(hard_iface->soft_iface,
344 "The MTU of interface %s is too small (%i) to handle " 339 "The MTU of interface %s is too small (%i) to handle the transport of batman-adv packets. Packets going over this interface will be fragmented on layer2 which could impact the performance. Setting the MTU to %zi would solve the problem.\n",
345 "the transport of batman-adv packets. Packets going "
346 "over this interface will be fragmented on layer2 "
347 "which could impact the performance. Setting the MTU "
348 "to %zi would solve the problem.\n",
349 hard_iface->net_dev->name, hard_iface->net_dev->mtu, 340 hard_iface->net_dev->name, hard_iface->net_dev->mtu,
350 ETH_DATA_LEN + BAT_HEADER_LEN); 341 ETH_DATA_LEN + BAT_HEADER_LEN);
351 342
352 if (!atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu < 343 if (!atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu <
353 ETH_DATA_LEN + BAT_HEADER_LEN) 344 ETH_DATA_LEN + BAT_HEADER_LEN)
354 bat_info(hard_iface->soft_iface, 345 bat_info(hard_iface->soft_iface,
355 "The MTU of interface %s is too small (%i) to handle " 346 "The MTU of interface %s is too small (%i) to handle the transport of batman-adv packets. If you experience problems getting traffic through try increasing the MTU to %zi.\n",
356 "the transport of batman-adv packets. If you "
357 "experience problems getting traffic through try "
358 "increasing the MTU to %zi.\n",
359 hard_iface->net_dev->name, hard_iface->net_dev->mtu, 347 hard_iface->net_dev->name, hard_iface->net_dev->mtu,
360 ETH_DATA_LEN + BAT_HEADER_LEN); 348 ETH_DATA_LEN + BAT_HEADER_LEN);
361 349
362 if (hardif_is_iface_up(hard_iface)) 350 if (hardif_is_iface_up(hard_iface))
363 hardif_activate_interface(hard_iface); 351 hardif_activate_interface(hard_iface);
364 else 352 else
365 bat_err(hard_iface->soft_iface, "Not using interface %s " 353 bat_err(hard_iface->soft_iface,
366 "(retrying later): interface not active\n", 354 "Not using interface %s (retrying later): interface not active\n",
367 hard_iface->net_dev->name); 355 hard_iface->net_dev->name);
368 356
369 /* begin scheduling originator messages on that interface */ 357 /* begin scheduling originator messages on that interface */