Commit 86ceb360 authored by Sven Eckelmann's avatar Sven Eckelmann Committed by Marek Lindner

batman-adv: Ignore 80-chars per line limits for strings

Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
parent 7c64fd98
...@@ -132,8 +132,7 @@ static void bat_iv_ogm_send_to_if(struct forw_packet *forw_packet, ...@@ -132,8 +132,7 @@ static void bat_iv_ogm_send_to_if(struct forw_packet *forw_packet,
"Sending own" : "Sending own" :
"Forwarding")); "Forwarding"));
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"%s %spacket (originator %pM, seqno %d, TQ %d, TTL %d," "%s %spacket (originator %pM, seqno %d, TQ %d, TTL %d, IDF %s, ttvn %d) on interface %s [%pM]\n",
" IDF %s, ttvn %d) on interface %s [%pM]\n",
fwd_str, (packet_num > 0 ? "aggregated " : ""), fwd_str, (packet_num > 0 ? "aggregated " : ""),
batman_ogm_packet->orig, batman_ogm_packet->orig,
ntohl(batman_ogm_packet->seqno), ntohl(batman_ogm_packet->seqno),
...@@ -171,8 +170,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet) ...@@ -171,8 +170,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)
directlink = (batman_ogm_packet->flags & DIRECTLINK ? 1 : 0); directlink = (batman_ogm_packet->flags & DIRECTLINK ? 1 : 0);
if (!forw_packet->if_incoming) { if (!forw_packet->if_incoming) {
pr_err("Error - can't forward packet: incoming iface not " pr_err("Error - can't forward packet: incoming iface not specified\n");
"specified\n");
goto out; goto out;
} }
...@@ -193,8 +191,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet) ...@@ -193,8 +191,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)
/* FIXME: what about aggregated packets ? */ /* FIXME: what about aggregated packets ? */
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"%s packet (originator %pM, seqno %d, TTL %d) " "%s packet (originator %pM, seqno %d, TTL %d) on interface %s [%pM]\n",
"on interface %s [%pM]\n",
(forw_packet->own ? "Sending own" : "Forwarding"), (forw_packet->own ? "Sending own" : "Forwarding"),
batman_ogm_packet->orig, batman_ogm_packet->orig,
ntohl(batman_ogm_packet->seqno), ntohl(batman_ogm_packet->seqno),
...@@ -508,8 +505,7 @@ static void bat_iv_ogm_forward(struct orig_node *orig_node, ...@@ -508,8 +505,7 @@ static void bat_iv_ogm_forward(struct orig_node *orig_node,
batman_ogm_packet->tq = hop_penalty(batman_ogm_packet->tq, bat_priv); batman_ogm_packet->tq = hop_penalty(batman_ogm_packet->tq, bat_priv);
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Forwarding packet: tq_orig: %i, tq_avg: %i, " "Forwarding packet: tq_orig: %i, tq_avg: %i, tq_forw: %i, ttl_orig: %i, ttl_forw: %i\n",
"tq_forw: %i, ttl_orig: %i, ttl_forw: %i\n",
in_tq, tq_avg, batman_ogm_packet->tq, in_ttl - 1, in_tq, tq_avg, batman_ogm_packet->tq, in_ttl - 1,
batman_ogm_packet->header.ttl); batman_ogm_packet->header.ttl);
...@@ -589,8 +585,8 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv, ...@@ -589,8 +585,8 @@ static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
struct hlist_node *node; struct hlist_node *node;
uint8_t bcast_own_sum_orig, bcast_own_sum_neigh; uint8_t bcast_own_sum_orig, bcast_own_sum_neigh;
bat_dbg(DBG_BATMAN, bat_priv, "update_originator(): " bat_dbg(DBG_BATMAN, bat_priv,
"Searching and updating originator entry of received packet\n"); "update_originator(): Searching and updating originator entry of received packet\n");
rcu_read_lock(); rcu_read_lock();
hlist_for_each_entry_rcu(tmp_neigh_node, node, hlist_for_each_entry_rcu(tmp_neigh_node, node,
...@@ -802,10 +798,7 @@ static int bat_iv_ogm_calc_tq(struct orig_node *orig_node, ...@@ -802,10 +798,7 @@ static int bat_iv_ogm_calc_tq(struct orig_node *orig_node,
(TQ_MAX_VALUE * TQ_MAX_VALUE)); (TQ_MAX_VALUE * TQ_MAX_VALUE));
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"bidirectional: " "bidirectional: orig = %-15pM neigh = %-15pM => own_bcast = %2i, real recv = %2i, local tq: %3i, asym_penalty: %3i, total tq: %3i\n",
"orig = %-15pM neigh = %-15pM => own_bcast = %2i, "
"real recv = %2i, local tq: %3i, asym_penalty: %3i, "
"total tq: %3i\n",
orig_node->orig, orig_neigh_node->orig, total_count, orig_node->orig, orig_neigh_node->orig, total_count,
neigh_rq_count, tq_own, tq_asym_penalty, batman_ogm_packet->tq); neigh_rq_count, tq_own, tq_asym_penalty, batman_ogm_packet->tq);
...@@ -933,9 +926,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -933,9 +926,7 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
batman_ogm_packet->orig) ? 1 : 0); batman_ogm_packet->orig) ? 1 : 0);
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Received BATMAN packet via NB: %pM, IF: %s [%pM] " "Received BATMAN packet via NB: %pM, IF: %s [%pM] (from OG: %pM, via prev OG: %pM, seqno %d, ttvn %u, crc %u, changes %u, td %d, TTL %d, V %d, IDF %d)\n",
"(from OG: %pM, via prev OG: %pM, seqno %d, ttvn %u, "
"crc %u, changes %u, td %d, TTL %d, V %d, IDF %d)\n",
ethhdr->h_source, if_incoming->net_dev->name, ethhdr->h_source, if_incoming->net_dev->name,
if_incoming->net_dev->dev_addr, batman_ogm_packet->orig, if_incoming->net_dev->dev_addr, batman_ogm_packet->orig,
batman_ogm_packet->prev_sender, batman_ogm_packet->seqno, batman_ogm_packet->prev_sender, batman_ogm_packet->seqno,
...@@ -978,16 +969,15 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -978,16 +969,15 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
if (is_my_addr) { if (is_my_addr) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: received my own broadcast (sender: %pM" "Drop packet: received my own broadcast (sender: %pM)\n",
")\n",
ethhdr->h_source); ethhdr->h_source);
return; return;
} }
if (is_broadcast) { if (is_broadcast) {
bat_dbg(DBG_BATMAN, bat_priv, "Drop packet: " bat_dbg(DBG_BATMAN, bat_priv,
"ignoring all packets with broadcast source addr (sender: %pM" "Drop packet: ignoring all packets with broadcast source addr (sender: %pM)\n",
")\n", ethhdr->h_source); ethhdr->h_source);
return; return;
} }
...@@ -1017,16 +1007,16 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -1017,16 +1007,16 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
spin_unlock_bh(&orig_neigh_node->ogm_cnt_lock); spin_unlock_bh(&orig_neigh_node->ogm_cnt_lock);
} }
bat_dbg(DBG_BATMAN, bat_priv, "Drop packet: " bat_dbg(DBG_BATMAN, bat_priv,
"originator packet from myself (via neighbor)\n"); "Drop packet: originator packet from myself (via neighbor)\n");
orig_node_free_ref(orig_neigh_node); orig_node_free_ref(orig_neigh_node);
return; return;
} }
if (is_my_oldorig) { if (is_my_oldorig) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: ignoring all rebroadcast echos (sender: " "Drop packet: ignoring all rebroadcast echos (sender: %pM)\n",
"%pM)\n", ethhdr->h_source); ethhdr->h_source);
return; return;
} }
...@@ -1039,8 +1029,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -1039,8 +1029,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
if (is_duplicate == -1) { if (is_duplicate == -1) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: packet within seqno protection time " "Drop packet: packet within seqno protection time (sender: %pM)\n",
"(sender: %pM)\n", ethhdr->h_source); ethhdr->h_source);
goto out; goto out;
} }
...@@ -1061,8 +1051,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -1061,8 +1051,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
batman_ogm_packet->prev_sender)) && batman_ogm_packet->prev_sender)) &&
(compare_eth(router->addr, router_router->addr))) { (compare_eth(router->addr, router_router->addr))) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Drop packet: ignoring all rebroadcast packets that " "Drop packet: ignoring all rebroadcast packets that may make me loop (sender: %pM)\n",
"may make me loop (sender: %pM)\n", ethhdr->h_source); ethhdr->h_source);
goto out; goto out;
} }
...@@ -1106,8 +1096,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr, ...@@ -1106,8 +1096,8 @@ static void bat_iv_ogm_process(const struct ethhdr *ethhdr,
bat_iv_ogm_forward(orig_node, ethhdr, batman_ogm_packet, bat_iv_ogm_forward(orig_node, ethhdr, batman_ogm_packet,
1, if_incoming); 1, if_incoming);
bat_dbg(DBG_BATMAN, bat_priv, "Forwarding packet: " bat_dbg(DBG_BATMAN, bat_priv,
"rebroadcast neighbor packet with direct link flag\n"); "Forwarding packet: rebroadcast neighbor packet with direct link flag\n");
goto out_neigh; goto out_neigh;
} }
......
...@@ -255,8 +255,8 @@ static ssize_t store_vis_mode(struct kobject *kobj, struct attribute *attr, ...@@ -255,8 +255,8 @@ static ssize_t store_vis_mode(struct kobject *kobj, struct attribute *attr,
buff[count - 1] = '\0'; buff[count - 1] = '\0';
bat_info(net_dev, bat_info(net_dev,
"Invalid parameter for 'vis mode' setting received: " "Invalid parameter for 'vis mode' setting received: %s\n",
"%s\n", buff); buff);
return -EINVAL; return -EINVAL;
} }
...@@ -330,8 +330,8 @@ static ssize_t store_gw_mode(struct kobject *kobj, struct attribute *attr, ...@@ -330,8 +330,8 @@ static ssize_t store_gw_mode(struct kobject *kobj, struct attribute *attr,
if (gw_mode_tmp < 0) { if (gw_mode_tmp < 0) {
bat_info(net_dev, bat_info(net_dev,
"Invalid parameter for 'gw mode' setting received: " "Invalid parameter for 'gw mode' setting received: %s\n",
"%s\n", buff); buff);
return -EINVAL; return -EINVAL;
} }
...@@ -502,8 +502,8 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr, ...@@ -502,8 +502,8 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
buff[count - 1] = '\0'; buff[count - 1] = '\0';
if (strlen(buff) >= IFNAMSIZ) { if (strlen(buff) >= IFNAMSIZ) {
pr_err("Invalid parameter for 'mesh_iface' setting received: " pr_err("Invalid parameter for 'mesh_iface' setting received: interface name too long '%s'\n",
"interface name too long '%s'\n", buff); buff);
hardif_free_ref(hard_iface); hardif_free_ref(hard_iface);
return -EINVAL; return -EINVAL;
} }
...@@ -677,8 +677,8 @@ int throw_uevent(struct bat_priv *bat_priv, enum uev_type type, ...@@ -677,8 +677,8 @@ int throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
hardif_free_ref(primary_if); hardif_free_ref(primary_if);
if (ret) if (ret)
bat_dbg(DBG_BATMAN, bat_priv, "Impossible to send " bat_dbg(DBG_BATMAN, bat_priv,
"uevent for (%s,%s,%s) event (err: %d)\n", "Impossible to send uevent for (%s,%s,%s) event (err: %d)\n",
uev_type_str[type], uev_action_str[action], uev_type_str[type], uev_action_str[action],
(action == UEV_DEL ? "NULL" : data), ret); (action == UEV_DEL ? "NULL" : data), ret);
return ret; return ret;
......
...@@ -224,16 +224,13 @@ void gw_election(struct bat_priv *bat_priv) ...@@ -224,16 +224,13 @@ void gw_election(struct bat_priv *bat_priv)
} else if ((!curr_gw) && (next_gw)) { } else if ((!curr_gw) && (next_gw)) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Adding route to gateway %pM (gw_flags: %i, tq: %i)\n", "Adding route to gateway %pM (gw_flags: %i, tq: %i)\n",
next_gw->orig_node->orig, next_gw->orig_node->orig, next_gw->orig_node->gw_flags,
next_gw->orig_node->gw_flags,
router->tq_avg); router->tq_avg);
throw_uevent(bat_priv, UEV_GW, UEV_ADD, gw_addr); throw_uevent(bat_priv, UEV_GW, UEV_ADD, gw_addr);
} else { } else {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Changing route to gateway %pM " "Changing route to gateway %pM (gw_flags: %i, tq: %i)\n",
"(gw_flags: %i, tq: %i)\n", next_gw->orig_node->orig, next_gw->orig_node->gw_flags,
next_gw->orig_node->orig,
next_gw->orig_node->gw_flags,
router->tq_avg); router->tq_avg);
throw_uevent(bat_priv, UEV_GW, UEV_CHANGE, gw_addr); throw_uevent(bat_priv, UEV_GW, UEV_CHANGE, gw_addr);
} }
...@@ -287,8 +284,7 @@ void gw_check_election(struct bat_priv *bat_priv, struct orig_node *orig_node) ...@@ -287,8 +284,7 @@ void gw_check_election(struct bat_priv *bat_priv, struct orig_node *orig_node)
goto out; goto out;
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Restarting gateway selection: better gateway found (tq curr: " "Restarting gateway selection: better gateway found (tq curr: %i, tq new: %i)\n",
"%i, tq new: %i)\n",
gw_tq_avg, orig_tq_avg); gw_tq_avg, orig_tq_avg);
deselect: deselect:
...@@ -352,8 +348,7 @@ void gw_node_update(struct bat_priv *bat_priv, ...@@ -352,8 +348,7 @@ void gw_node_update(struct bat_priv *bat_priv,
continue; continue;
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Gateway class of originator %pM changed from " "Gateway class of originator %pM changed from %i to %i\n",
"%i to %i\n",
orig_node->orig, gw_node->orig_node->gw_flags, orig_node->orig, gw_node->orig_node->gw_flags,
new_gwflags); new_gwflags);
...@@ -474,23 +469,23 @@ int gw_client_seq_print_text(struct seq_file *seq, void *offset) ...@@ -474,23 +469,23 @@ int gw_client_seq_print_text(struct seq_file *seq, void *offset)
primary_if = primary_if_get_selected(bat_priv); primary_if = primary_if_get_selected(bat_priv);
if (!primary_if) { if (!primary_if) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - please " ret = seq_printf(seq,
"specify interfaces to enable it\n", "BATMAN mesh %s disabled - please specify interfaces to enable it\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
if (primary_if->if_status != IF_ACTIVE) { if (primary_if->if_status != IF_ACTIVE) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - " ret = seq_printf(seq,
"primary interface not active\n", "BATMAN mesh %s disabled - primary interface not active\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
seq_printf(seq, " %-12s (%s/%i) %17s [%10s]: gw_class ... " seq_printf(seq,
"[B.A.T.M.A.N. adv %s, MainIF/MAC: %s/%pM (%s)]\n", " %-12s (%s/%i) %17s [%10s]: gw_class ... [B.A.T.M.A.N. adv %s, MainIF/MAC: %s/%pM (%s)]\n",
"Gateway", "#", TQ_MAX_VALUE, "Nexthop", "Gateway", "#", TQ_MAX_VALUE, "Nexthop", "outgoingIF",
"outgoingIF", SOURCE_VERSION, primary_if->net_dev->name, SOURCE_VERSION, primary_if->net_dev->name,
primary_if->net_dev->dev_addr, net_dev->name); primary_if->net_dev->dev_addr, net_dev->name);
rcu_read_lock(); rcu_read_lock();
......
...@@ -125,8 +125,8 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff, ...@@ -125,8 +125,8 @@ static bool parse_gw_bandwidth(struct net_device *net_dev, char *buff,
ret = kstrtol(slash_ptr + 1, 10, &lup); ret = kstrtol(slash_ptr + 1, 10, &lup);
if (ret) { if (ret) {
bat_err(net_dev, bat_err(net_dev,
"Upload speed of gateway mode invalid: " "Upload speed of gateway mode invalid: %s\n",
"%s\n", slash_ptr + 1); slash_ptr + 1);
return false; return false;
} }
...@@ -163,8 +163,8 @@ ssize_t gw_bandwidth_set(struct net_device *net_dev, char *buff, size_t count) ...@@ -163,8 +163,8 @@ ssize_t gw_bandwidth_set(struct net_device *net_dev, char *buff, size_t count)
gw_bandwidth_to_kbit((uint8_t)gw_bandwidth_tmp, &down, &up); gw_bandwidth_to_kbit((uint8_t)gw_bandwidth_tmp, &down, &up);
gw_deselect(bat_priv); gw_deselect(bat_priv);
bat_info(net_dev, "Changing gateway bandwidth from: '%i' to: '%ld' " bat_info(net_dev,
"(propagating: %d%s/%d%s)\n", "Changing gateway bandwidth from: '%i' to: '%ld' (propagating: %d%s/%d%s)\n",
atomic_read(&bat_priv->gw_bandwidth), gw_bandwidth_tmp, atomic_read(&bat_priv->gw_bandwidth), gw_bandwidth_tmp,
(down > 2048 ? down / 1024 : down), (down > 2048 ? down / 1024 : down),
(down > 2048 ? "MBit" : "KBit"), (down > 2048 ? "MBit" : "KBit"),
......
...@@ -175,11 +175,9 @@ static void check_known_mac_addr(const struct net_device *net_dev) ...@@ -175,11 +175,9 @@ static void check_known_mac_addr(const struct net_device *net_dev)
net_dev->dev_addr)) net_dev->dev_addr))
continue; continue;
pr_warning("The newly added mac address (%pM) already exists " pr_warning("The newly added mac address (%pM) already exists on: %s\n",
"on: %s\n", net_dev->dev_addr, net_dev->dev_addr, hard_iface->net_dev->name);
hard_iface->net_dev->name); pr_warning("It is strongly recommended to keep mac addresses unique to avoid problems!\n");
pr_warning("It is strongly recommended to keep mac addresses "
"unique to avoid problems!\n");
} }
rcu_read_unlock(); rcu_read_unlock();
} }
...@@ -282,10 +280,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface, ...@@ -282,10 +280,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
/* hard-interface is part of a bridge */ /* hard-interface is part of a bridge */
if (hard_iface->net_dev->priv_flags & IFF_BRIDGE_PORT) if (hard_iface->net_dev->priv_flags & IFF_BRIDGE_PORT)
pr_err("You are about to enable batman-adv on '%s' which " 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",
"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",
hard_iface->net_dev->name); hard_iface->net_dev->name);
soft_iface = dev_get_by_name(&init_net, iface_name); soft_iface = dev_get_by_name(&init_net, iface_name);
...@@ -303,8 +298,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface, ...@@ -303,8 +298,7 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
} }
if (!softif_is_valid(soft_iface)) { if (!softif_is_valid(soft_iface)) {
pr_err("Can't create batman mesh interface %s: " pr_err("Can't create batman mesh interface %s: already exists as regular interface\n",
"already exists as regular interface\n",
soft_iface->name); soft_iface->name);
dev_put(soft_iface); dev_put(soft_iface);
ret = -EINVAL; ret = -EINVAL;
...@@ -317,8 +311,9 @@ int hardif_enable_interface(struct hard_iface *hard_iface, ...@@ -317,8 +311,9 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
bat_priv->bat_algo_ops->bat_ogm_init(hard_iface); bat_priv->bat_algo_ops->bat_ogm_init(hard_iface);
if (!hard_iface->packet_buff) { if (!hard_iface->packet_buff) {
bat_err(hard_iface->soft_iface, "Can't add interface packet " bat_err(hard_iface->soft_iface,
"(%s): out of memory\n", hard_iface->net_dev->name); "Can't add interface packet (%s): out of memory\n",
hard_iface->net_dev->name);
ret = -ENOMEM; ret = -ENOMEM;
goto err; goto err;
} }
...@@ -341,29 +336,22 @@ int hardif_enable_interface(struct hard_iface *hard_iface, ...@@ -341,29 +336,22 @@ int hardif_enable_interface(struct hard_iface *hard_iface,
if (atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu < if (atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu <
ETH_DATA_LEN + BAT_HEADER_LEN) ETH_DATA_LEN + BAT_HEADER_LEN)
bat_info(hard_iface->soft_iface, bat_info(hard_iface->soft_iface,
"The MTU of interface %s is too small (%i) to handle " "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",
"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",
hard_iface->net_dev->name, hard_iface->net_dev->mtu, hard_iface->net_dev->name, hard_iface->net_dev->mtu,
ETH_DATA_LEN + BAT_HEADER_LEN); ETH_DATA_LEN + BAT_HEADER_LEN);
if (!atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu < if (!atomic_read(&bat_priv->fragmentation) && hard_iface->net_dev->mtu <
ETH_DATA_LEN + BAT_HEADER_LEN) ETH_DATA_LEN + BAT_HEADER_LEN)
bat_info(hard_iface->soft_iface, bat_info(hard_iface->soft_iface,
"The MTU of interface %s is too small (%i) to handle " "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",
"the transport of batman-adv packets. If you "
"experience problems getting traffic through try "
"increasing the MTU to %zi.\n",
hard_iface->net_dev->name, hard_iface->net_dev->mtu, hard_iface->net_dev->name, hard_iface->net_dev->mtu,
ETH_DATA_LEN + BAT_HEADER_LEN); ETH_DATA_LEN + BAT_HEADER_LEN);
if (hardif_is_iface_up(hard_iface)) if (hardif_is_iface_up(hard_iface))
hardif_activate_interface(hard_iface); hardif_activate_interface(hard_iface);
else else
bat_err(hard_iface->soft_iface, "Not using interface %s " bat_err(hard_iface->soft_iface,
"(retrying later): interface not active\n", "Not using interface %s (retrying later): interface not active\n",
hard_iface->net_dev->name); hard_iface->net_dev->name);
/* begin scheduling originator messages on that interface */ /* begin scheduling originator messages on that interface */
......
...@@ -59,8 +59,7 @@ static int bat_socket_open(struct inode *inode, struct file *file) ...@@ -59,8 +59,7 @@ static int bat_socket_open(struct inode *inode, struct file *file)
} }
if (i == ARRAY_SIZE(socket_client_hash)) { if (i == ARRAY_SIZE(socket_client_hash)) {
pr_err("Error - can't add another packet client: " pr_err("Error - can't add another packet client: maximum number of clients reached\n");
"maximum number of clients reached\n");
kfree(socket_client); kfree(socket_client);
return -EXFULL; return -EXFULL;
} }
...@@ -162,8 +161,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, ...@@ -162,8 +161,7 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if (len < sizeof(struct icmp_packet)) { if (len < sizeof(struct icmp_packet)) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Error - can't send packet from char device: " "Error - can't send packet from char device: invalid packet size\n");
"invalid packet size\n");
return -EINVAL; return -EINVAL;
} }
...@@ -193,16 +191,14 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff, ...@@ -193,16 +191,14 @@ static ssize_t bat_socket_write(struct file *file, const char __user *buff,
if (icmp_packet->header.packet_type != BAT_ICMP) { if (icmp_packet->header.packet_type != BAT_ICMP) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Error - can't send packet from char device: " "Error - can't send packet from char device: got bogus packet type (expected: BAT_ICMP)\n");
"got bogus packet type (expected: BAT_ICMP)\n");
len = -EINVAL; len = -EINVAL;
goto free_skb; goto free_skb;
} }
if (icmp_packet->msg_type != ECHO_REQUEST) { if (icmp_packet->msg_type != ECHO_REQUEST) {
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"Error - can't send packet from char device: " "Error - can't send packet from char device: got bogus message type (expected: ECHO_REQUEST)\n");
"got bogus message type (expected: ECHO_REQUEST)\n");
len = -EINVAL; len = -EINVAL;
goto free_skb; goto free_skb;
} }
......
...@@ -64,8 +64,8 @@ static int __init batman_init(void) ...@@ -64,8 +64,8 @@ static int __init batman_init(void)
register_netdevice_notifier(&hard_if_notifier); register_netdevice_notifier(&hard_if_notifier);
pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) " pr_info("B.A.T.M.A.N. advanced %s (compatibility version %i) loaded\n",
"loaded\n", SOURCE_VERSION, COMPAT_VERSION); SOURCE_VERSION, COMPAT_VERSION);
return 0; return 0;
} }
...@@ -201,8 +201,8 @@ int bat_algo_register(struct bat_algo_ops *bat_algo_ops) ...@@ -201,8 +201,8 @@ int bat_algo_register(struct bat_algo_ops *bat_algo_ops)
bat_algo_ops_tmp = bat_algo_get(bat_algo_ops->name); bat_algo_ops_tmp = bat_algo_get(bat_algo_ops->name);
if (bat_algo_ops_tmp) { if (bat_algo_ops_tmp) {
pr_info("Trying to register already registered routing " pr_info("Trying to register already registered routing algorithm: %s\n",
"algorithm: %s\n", bat_algo_ops->name); bat_algo_ops->name);
goto out; goto out;
} }
......
...@@ -294,14 +294,12 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv, ...@@ -294,14 +294,12 @@ static bool purge_orig_neighbors(struct bat_priv *bat_priv,
(neigh_node->if_incoming->if_status == (neigh_node->if_incoming->if_status ==
IF_TO_BE_REMOVED)) IF_TO_BE_REMOVED))
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"neighbor purge: originator %pM, " "neighbor purge: originator %pM, neighbor: %pM, iface: %s\n",
"neighbor: %pM, iface: %s\n",
orig_node->orig, neigh_node->addr, orig_node->orig, neigh_node->addr,
neigh_node->if_incoming->net_dev->name); neigh_node->if_incoming->net_dev->name);
else else
bat_dbg(DBG_BATMAN, bat_priv, bat_dbg(DBG_BATMAN, bat_priv,
"neighbor timeout: originator %pM, " "neighbor timeout: originator %pM, neighbor: %pM, last_valid: %lu\n",
"neighbor: %pM, last_valid: %lu\n",
orig_node->orig, neigh_node->addr, orig_node->orig, neigh_node->addr,
(neigh_node->last_valid / HZ)); (neigh_node->last_valid / HZ));
...@@ -416,15 +414,15 @@ int orig_seq_print_text(struct seq_file *seq, void *offset) ...@@ -416,15 +414,15 @@ int orig_seq_print_text(struct seq_file *seq, void *offset)
primary_if = primary_if_get_selected(bat_priv); primary_if = primary_if_get_selected(bat_priv);
if (!primary_if) { if (!primary_if) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - " ret = seq_printf(seq,
"please specify interfaces to enable it\n", "BATMAN mesh %s disabled - please specify interfaces to enable it\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
if (primary_if->if_status != IF_ACTIVE) { if (primary_if->if_status != IF_ACTIVE) {
ret = seq_printf(seq, "BATMAN mesh %s " ret = seq_printf(seq,
"disabled - primary interface not active\n", "BATMAN mesh %s disabled - primary interface not active\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
......
...@@ -83,8 +83,7 @@ static void _update_route(struct bat_priv *bat_priv, ...@@ -83,8 +83,7 @@ static void _update_route(struct bat_priv *bat_priv,
/* route changed */ /* route changed */
} else if (neigh_node && curr_router) { } else if (neigh_node && curr_router) {
bat_dbg(DBG_ROUTES, bat_priv, bat_dbg(DBG_ROUTES, bat_priv,
"Changing route towards: %pM " "Changing route towards: %pM (now via %pM - was via %pM)\n",
"(now via %pM - was via %pM)\n",
orig_node->orig, neigh_node->addr, orig_node->orig, neigh_node->addr,
curr_router->addr); curr_router->addr);
} }
...@@ -345,9 +344,8 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv, ...@@ -345,9 +344,8 @@ static int recv_icmp_ttl_exceeded(struct bat_priv *bat_priv,
/* send TTL exceeded if packet is an echo request (traceroute) */ /* send TTL exceeded if packet is an echo request (traceroute) */
if (icmp_packet->msg_type != ECHO_REQUEST) { if (icmp_packet->msg_type != ECHO_REQUEST) {
pr_debug("Warning - can't forward icmp packet from %pM to " pr_debug("Warning - can't forward icmp packet from %pM to %pM: ttl exceeded\n",
"%pM: ttl exceeded\n", icmp_packet->orig, icmp_packet->orig, icmp_packet->dst);
icmp_packet->dst);
goto out; goto out;
} }
...@@ -674,9 +672,9 @@ int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if) ...@@ -674,9 +672,9 @@ int recv_roam_adv(struct sk_buff *skb, struct hard_iface *recv_if)
if (!orig_node) if (!orig_node)
goto out; goto out;
bat_dbg(DBG_TT, bat_priv, "Received ROAMING_ADV from %pM " bat_dbg(DBG_TT, bat_priv,
"(client %pM)\n", roam_adv_packet->src, "Received ROAMING_ADV from %pM (client %pM)\n",
roam_adv_packet->client); roam_adv_packet->src, roam_adv_packet->client);
tt_global_add(bat_priv, orig_node, roam_adv_packet->client, tt_global_add(bat_priv, orig_node, roam_adv_packet->client,
atomic_read(&orig_node->last_ttvn) + 1, true, false); atomic_read(&orig_node->last_ttvn) + 1, true, false);
...@@ -813,9 +811,8 @@ int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if) ...@@ -813,9 +811,8 @@ int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
/* TTL exceeded */ /* TTL exceeded */
if (unicast_packet->header.ttl < 2) { if (unicast_packet->header.ttl < 2) {
pr_debug("Warning - can't forward unicast packet from %pM to " pr_debug("Warning - can't forward unicast packet from %pM to %pM: ttl exceeded\n",
"%pM: ttl exceeded\n", ethhdr->h_source, ethhdr->h_source, unicast_packet->dest);
unicast_packet->dest);
goto out; goto out;
} }
...@@ -934,10 +931,10 @@ static int check_unicast_ttvn(struct bat_priv *bat_priv, ...@@ -934,10 +931,10 @@ static int check_unicast_ttvn(struct bat_priv *bat_priv,
orig_node_free_ref(orig_node); orig_node_free_ref(orig_node);
} }
bat_dbg(DBG_ROUTES, bat_priv, "TTVN mismatch (old_ttvn %u " bat_dbg(DBG_ROUTES, bat_priv,
"new_ttvn %u)! Rerouting unicast packet (for %pM) to " "TTVN mismatch (old_ttvn %u new_ttvn %u)! Rerouting unicast packet (for %pM) to %pM\n",
"%pM\n", unicast_packet->ttvn, curr_ttvn, unicast_packet->ttvn, curr_ttvn, ethhdr->h_dest,
ethhdr->h_dest, unicast_packet->dest); unicast_packet->dest);
unicast_packet->ttvn = curr_ttvn; unicast_packet->ttvn = curr_ttvn;
} }
......
...@@ -45,8 +45,8 @@ int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface, ...@@ -45,8 +45,8 @@ int send_skb_packet(struct sk_buff *skb, struct hard_iface *hard_iface,
goto send_skb_err; goto send_skb_err;
if (!(hard_iface->net_dev->flags & IFF_UP)) { if (!(hard_iface->net_dev->flags & IFF_UP)) {
pr_warning("Interface %s is not up - can't send packet via " pr_warning("Interface %s is not up - can't send packet via that interface!\n",
"that interface!\n", hard_iface->net_dev->name); hard_iface->net_dev->name);
goto send_skb_err; goto send_skb_err;
} }
......
...@@ -252,8 +252,8 @@ static void softif_neigh_vid_select(struct bat_priv *bat_priv, ...@@ -252,8 +252,8 @@ static void softif_neigh_vid_select(struct bat_priv *bat_priv,
vid, curr_neigh->addr); vid, curr_neigh->addr);
else if ((curr_neigh) && (new_neigh)) else if ((curr_neigh) && (new_neigh))
bat_dbg(DBG_ROUTES, bat_priv, bat_dbg(DBG_ROUTES, bat_priv,
"Changing mesh exit point on vid: %d from %pM " "Changing mesh exit point on vid: %d from %pM to %pM.\n",
"to %pM.\n", vid, curr_neigh->addr, new_neigh->addr); vid, curr_neigh->addr, new_neigh->addr);
else if ((!curr_neigh) && (new_neigh)) else if ((!curr_neigh) && (new_neigh))
bat_dbg(DBG_ROUTES, bat_priv, bat_dbg(DBG_ROUTES, bat_priv,
"Setting mesh exit point on vid: %d to %pM.\n", "Setting mesh exit point on vid: %d to %pM.\n",
...@@ -327,15 +327,15 @@ int softif_neigh_seq_print_text(struct seq_file *seq, void *offset) ...@@ -327,15 +327,15 @@ int softif_neigh_seq_print_text(struct seq_file *seq, void *offset)
primary_if = primary_if_get_selected(bat_priv); primary_if = primary_if_get_selected(bat_priv);
if (!primary_if) { if (!primary_if) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - " ret = seq_printf(seq,
"please specify interfaces to enable it\n", "BATMAN mesh %s disabled - please specify interfaces to enable it\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
if (primary_if->if_status != IF_ACTIVE) { if (primary_if->if_status != IF_ACTIVE) {
ret = seq_printf(seq, "BATMAN mesh %s " ret = seq_printf(seq,
"disabled - primary interface not active\n", "BATMAN mesh %s disabled - primary interface not active\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
...@@ -403,8 +403,7 @@ void softif_neigh_purge(struct bat_priv *bat_priv) ...@@ -403,8 +403,7 @@ void softif_neigh_purge(struct bat_priv *bat_priv)
if (curr_softif_neigh == softif_neigh) { if (curr_softif_neigh == softif_neigh) {
bat_dbg(DBG_ROUTES, bat_priv, bat_dbg(DBG_ROUTES, bat_priv,
"Current mesh exit point on vid: %d " "Current mesh exit point on vid: %d '%pM' vanished.\n",
"'%pM' vanished.\n",
softif_neigh_vid->vid, softif_neigh_vid->vid,
softif_neigh->addr); softif_neigh->addr);
do_deselect = 1; do_deselect = 1;
......
...@@ -309,21 +309,21 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset) ...@@ -309,21 +309,21 @@ int tt_local_seq_print_text(struct seq_file *seq, void *offset)
primary_if = primary_if_get_selected(bat_priv); primary_if = primary_if_get_selected(bat_priv);
if (!primary_if) { if (!primary_if) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - " ret = seq_printf(seq,
"please specify interfaces to enable it\n", "BATMAN mesh %s disabled - please specify interfaces to enable it\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
if (primary_if->if_status != IF_ACTIVE) { if (primary_if->if_status != IF_ACTIVE) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - " ret = seq_printf(seq,
"primary interface not active\n", "BATMAN mesh %s disabled - primary interface not active\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
seq_printf(seq, "Locally retrieved addresses (from %s) " seq_printf(seq,
"announced via TT (TTVN: %u):\n", "Locally retrieved addresses (from %s) announced via TT (TTVN: %u):\n",
net_dev->name, (uint8_t)atomic_read(&bat_priv->ttvn)); net_dev->name, (uint8_t)atomic_read(&bat_priv->ttvn));
for (i = 0; i < hash->size; i++) { for (i = 0; i < hash->size; i++) {
...@@ -365,8 +365,9 @@ static void tt_local_set_pending(struct bat_priv *bat_priv, ...@@ -365,8 +365,9 @@ static void tt_local_set_pending(struct bat_priv *bat_priv,
* response issued before the net ttvn increment (consistency check) */ * response issued before the net ttvn increment (consistency check) */
tt_local_entry->common.flags |= TT_CLIENT_PENDING; tt_local_entry->common.flags |= TT_CLIENT_PENDING;
bat_dbg(DBG_TT, bat_priv, "Local tt entry (%pM) pending to be removed: " bat_dbg(DBG_TT, bat_priv,
"%s\n", tt_local_entry->common.addr, message); "Local tt entry (%pM) pending to be removed: %s\n",
tt_local_entry->common.addr, message);
} }
void tt_local_remove(struct bat_priv *bat_priv, const uint8_t *addr, void tt_local_remove(struct bat_priv *bat_priv, const uint8_t *addr,
...@@ -574,15 +575,15 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset) ...@@ -574,15 +575,15 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
primary_if = primary_if_get_selected(bat_priv); primary_if = primary_if_get_selected(bat_priv);
if (!primary_if) { if (!primary_if) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - please " ret = seq_printf(seq,
"specify interfaces to enable it\n", "BATMAN mesh %s disabled - please specify interfaces to enable it\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
if (primary_if->if_status != IF_ACTIVE) { if (primary_if->if_status != IF_ACTIVE) {
ret = seq_printf(seq, "BATMAN mesh %s disabled - " ret = seq_printf(seq,
"primary interface not active\n", "BATMAN mesh %s disabled - primary interface not active\n",
net_dev->name); net_dev->name);
goto out; goto out;
} }
...@@ -602,8 +603,8 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset) ...@@ -602,8 +603,8 @@ int tt_global_seq_print_text(struct seq_file *seq, void *offset)
tt_global_entry = container_of(tt_common_entry, tt_global_entry = container_of(tt_common_entry,
struct tt_global_entry, struct tt_global_entry,
common); common);
seq_printf(seq, " * %pM (%3u) via %pM (%3u) " seq_printf(seq,
"[%c%c]\n", " * %pM (%3u) via %pM (%3u) [%c%c]\n",
tt_global_entry->common.addr, tt_global_entry->common.addr,
tt_global_entry->ttvn, tt_global_entry->ttvn,
tt_global_entry->orig_node->orig, tt_global_entry->orig_node->orig,
...@@ -710,8 +711,7 @@ void tt_global_del_orig(struct bat_priv *bat_priv, ...@@ -710,8 +711,7 @@ void tt_global_del_orig(struct bat_priv *bat_priv,
common); common);
if (tt_global_entry->orig_node == orig_node) { if (tt_global_entry->orig_node == orig_node) {
bat_dbg(DBG_TT, bat_priv, bat_dbg(DBG_TT, bat_priv,
"Deleting global tt entry %pM " "Deleting global tt entry %pM (via %pM): %s\n",
"(via %pM): %s\n",
tt_global_entry->common.addr, tt_global_entry->common.addr,
tt_global_entry->orig_node->orig, tt_global_entry->orig_node->orig,
message); message);
...@@ -751,8 +751,8 @@ static void tt_global_roam_purge(struct bat_priv *bat_priv) ...@@ -751,8 +751,8 @@ static void tt_global_roam_purge(struct bat_priv *bat_priv)
TT_CLIENT_ROAM_TIMEOUT)) TT_CLIENT_ROAM_TIMEOUT))
continue; continue;
bat_dbg(DBG_TT, bat_priv, "Deleting global " bat_dbg(DBG_TT, bat_priv,
"tt entry (%pM): Roaming timeout\n", "Deleting global tt entry (%pM): Roaming timeout\n",
tt_global_entry->common.addr); tt_global_entry->common.addr);
atomic_dec(&tt_global_entry->orig_node->tt_size); atomic_dec(&tt_global_entry->orig_node->tt_size);
hlist_del_rcu(node); hlist_del_rcu(node);
...@@ -1134,8 +1134,9 @@ static int send_tt_request(struct bat_priv *bat_priv, ...@@ -1134,8 +1134,9 @@ static int send_tt_request(struct bat_priv *bat_priv,
if (!neigh_node) if (!neigh_node)
goto out; goto out;
bat_dbg(DBG_TT, bat_priv, "Sending TT_REQUEST to %pM via %pM " bat_dbg(DBG_TT, bat_priv,
"[%c]\n", dst_orig_node->orig, neigh_node->addr, "Sending TT_REQUEST to %pM via %pM [%c]\n",
dst_orig_node->orig, neigh_node->addr,
(full_table ? 'F' : '.')); (full_table ? 'F' : '.'));
send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr); send_skb_packet(skb, neigh_node->if_incoming, neigh_node->addr);
...@@ -1172,9 +1173,8 @@ static bool send_other_tt_response(struct bat_priv *bat_priv, ...@@ -1172,9 +1173,8 @@ static bool send_other_tt_response(struct bat_priv *bat_priv,
struct tt_query_packet *tt_response; struct tt_query_packet *tt_response;
bat_dbg(DBG_TT, bat_priv, bat_dbg(DBG_TT, bat_priv,
"Received TT_REQUEST from %pM for " "Received TT_REQUEST from %pM for ttvn: %u (%pM) [%c]\n",
"ttvn: %u (%pM) [%c]\n", tt_request->src, tt_request->src, tt_request->ttvn, tt_request->dst,
tt_request->ttvn, tt_request->dst,
(tt_request->flags & TT_FULL_TABLE ? 'F' : '.')); (tt_request->flags & TT_FULL_TABLE ? 'F' : '.'));
/* Let's get the orig node of the REAL destination */ /* Let's get the orig node of the REAL destination */
...@@ -1299,9 +1299,8 @@ static bool send_my_tt_response(struct bat_priv *bat_priv, ...@@ -1299,9 +1299,8 @@ static bool send_my_tt_response(struct bat_priv *bat_priv,
struct tt_query_packet *tt_response; struct tt_query_packet *tt_response;
bat_dbg(DBG_TT, bat_priv, bat_dbg(DBG_TT, bat_priv,
"Received TT_REQUEST from %pM for " "Received TT_REQUEST from %pM for ttvn: %u (me) [%c]\n",
"ttvn: %u (me) [%c]\n", tt_request->src, tt_request->src, tt_request->ttvn,
tt_request->ttvn,
(tt_request->flags & TT_FULL_TABLE ? 'F' : '.')); (tt_request->flags & TT_FULL_TABLE ? 'F' : '.'));
...@@ -1504,10 +1503,9 @@ void handle_tt_response(struct bat_priv *bat_priv, ...@@ -1504,10 +1503,9 @@ void handle_tt_response(struct bat_priv *bat_priv,
struct tt_req_node *node, *safe; struct tt_req_node *node, *safe;
struct orig_node *orig_node = NULL; struct orig_node *orig_node = NULL;
bat_dbg(DBG_TT, bat_priv, "Received TT_RESPONSE from %pM for " bat_dbg(DBG_TT, bat_priv,
"ttvn %d t_size: %d [%c]\n", "Received TT_RESPONSE from %pM for ttvn %d t_size: %d [%c]\n",
tt_response->src, tt_response->ttvn, tt_response->src, tt_response->ttvn, tt_response->tt_data,
tt_response->tt_data,
(tt_response->flags & TT_FULL_TABLE ? 'F' : '.')); (tt_response->flags & TT_FULL_TABLE ? 'F' : '.'));
orig_node = orig_hash_find(bat_priv, tt_response->src); orig_node = orig_hash_find(bat_priv, tt_response->src);
...@@ -1771,8 +1769,9 @@ static void tt_local_purge_pending_clients(struct bat_priv *bat_priv) ...@@ -1771,8 +1769,9 @@ static void tt_local_purge_pending_clients(struct bat_priv *bat_priv)
if (!(tt_common_entry->flags & TT_CLIENT_PENDING)) if (!(tt_common_entry->flags & TT_CLIENT_PENDING))
continue; continue;
bat_dbg(DBG_TT, bat_priv, "Deleting local tt entry " bat_dbg(DBG_TT, bat_priv,
"(%pM): pending\n", tt_common_entry->addr); "Deleting local tt entry (%pM): pending\n",
tt_common_entry->addr);
atomic_dec(&bat_priv->num_local_tt); atomic_dec(&bat_priv->num_local_tt);
hlist_del_rcu(node); hlist_del_rcu(node);
...@@ -1877,12 +1876,10 @@ void tt_update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node, ...@@ -1877,12 +1876,10 @@ void tt_update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node,
if (!orig_node->tt_initialised || ttvn != orig_ttvn || if (!orig_node->tt_initialised || ttvn != orig_ttvn ||
orig_node->tt_crc != tt_crc) { orig_node->tt_crc != tt_crc) {
request_table: request_table:
bat_dbg(DBG_TT, bat_priv, "TT inconsistency for %pM. " bat_dbg(DBG_TT, bat_priv,
"Need to retrieve the correct information " "TT inconsistency for %pM. Need to retrieve the correct information (ttvn: %u last_ttvn: %u crc: %u last_crc: %u num_changes: %u)\n",
"(ttvn: %u last_ttvn: %u crc: %u last_crc: " orig_node->orig, ttvn, orig_ttvn, tt_crc,
"%u num_changes: %u)\n", orig_node->orig, ttvn, orig_node->tt_crc, tt_num_changes);
orig_ttvn, tt_crc, orig_node->tt_crc,
tt_num_changes);
send_tt_request(bat_priv, orig_node, ttvn, tt_crc, send_tt_request(bat_priv, orig_node, ttvn, tt_crc,
full_table); full_table);
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment