Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 015758d0 authored by Antonio Quartulli's avatar Antonio Quartulli Committed by Marek Lindner
Browse files

batman-adv: correct several typ0s in the comments



Several typos have been corrected and some sentences have been rephrased

Signed-off-by: default avatarAntonio Quartulli <ordex@autistici.org>
Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
parent 1a1f37d9
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -97,12 +97,12 @@ static void bit_shift(unsigned long *seq_bits, int32_t n)
			(seq_bits[i - word_num - 1] >>
			 (WORD_BIT_SIZE-word_offset));
		/* and the upper part of the right half and shift it left to
		 * it's position */
		 * its position */
		/* for our example that would be: word[0] = 9800 + 0076 =
		 * 9876 */
	}
	/* now for our last word, i==word_num, we only have the it's "left"
	 * half. that's the 1000 word in our example.*/
	/* now for our last word, i==word_num, we only have its "left" half.
	 * that's the 1000 word in our example.*/

	seq_bits[i] = (seq_bits[i - word_num] << word_offset);

+5 −5
Original line number Diff line number Diff line
@@ -532,14 +532,14 @@ static bool is_type_dhcprequest(struct sk_buff *skb, int header_len)
	pkt_len -= header_len + DHCP_OPTIONS_OFFSET + 1;

	/* Access the dhcp option lists. Each entry is made up by:
	 * - octect 1: option type
	 * - octect 2: option data len (only if type != 255 and 0)
	 * - octect 3: option data */
	 * - octet 1: option type
	 * - octet 2: option data len (only if type != 255 and 0)
	 * - octet 3: option data */
	while (*p != 255 && !ret) {
		/* p now points to the first octect: option type */
		/* p now points to the first octet: option type */
		if (*p == 53) {
			/* type 53 is the message type option.
			 * Jump the len octect and go to the data octect */
			 * Jump the len octet and go to the data octet */
			if (pkt_len < 2)
				goto out;
			p += 2;
+2 −2
Original line number Diff line number Diff line
@@ -249,7 +249,7 @@ static void hardif_activate_interface(struct hard_iface *hard_iface)

	/**
	 * the first active interface becomes our primary interface or
	 * the next active interface after the old primay interface was removed
	 * the next active interface after the old primary interface was removed
	 */
	primary_if = primary_if_get_selected(bat_priv);
	if (!primary_if)
@@ -573,7 +573,7 @@ out:
	return NOTIFY_DONE;
}

/* receive a packet with the batman ethertype coming on a hard
/* incoming packets with the batman ethertype received on any active hard
 * interface */
static int batman_skb_recv(struct sk_buff *skb, struct net_device *dev,
			   struct packet_type *ptype,
+2 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@
#define PURGE_TIMEOUT 200
#define TT_LOCAL_TIMEOUT 3600 /* in seconds */
#define TT_CLIENT_ROAM_TIMEOUT 600
/* sliding packet range of received originator messages in squence numbers
/* sliding packet range of received originator messages in sequence numbers
 * (should be a multiple of our word size) */
#define TQ_LOCAL_WINDOW_SIZE 64
#define TT_REQUEST_TIMEOUT 3 /* seconds we have to keep pending tt_req */
@@ -133,7 +133,7 @@ enum dbg_level {
#include <linux/mutex.h>	/* mutex */
#include <linux/module.h>	/* needed by all modules */
#include <linux/netdevice.h>	/* netdevice */
#include <linux/etherdevice.h>  /* ethernet address classifaction */
#include <linux/etherdevice.h>  /* ethernet address classification */
#include <linux/if_ether.h>	/* ethernet header */
#include <linux/poll.h>		/* poll_table */
#include <linux/kthread.h>	/* kernel threads */
+9 −10
Original line number Diff line number Diff line
@@ -75,10 +75,9 @@ static void update_transtable(struct bat_priv *bat_priv,

	/* the ttvn increased by one -> we can apply the attached changes */
	if (ttvn - orig_ttvn == 1) {
		/* the OGM could not contain the changes because they were too
		 * many to fit in one frame or because they have already been
		 * sent TT_OGM_APPEND_MAX times. In this case send a tt
		 * request */
		/* the OGM could not contain the changes due to their size or
		 * because they have already been sent TT_OGM_APPEND_MAX times.
		 * In this case send a tt request */
		if (!tt_num_changes) {
			full_table = false;
			goto request_table;
@@ -87,13 +86,13 @@ static void update_transtable(struct bat_priv *bat_priv,
		tt_update_changes(bat_priv, orig_node, tt_num_changes, ttvn,
				  (struct tt_change *)tt_buff);

		/* Even if we received the crc into the OGM, we prefer
		 * to recompute it to spot any possible inconsistency
		/* Even if we received the precomputed crc with the OGM, we
		 * prefer to recompute it to spot any possible inconsistency
		 * in the global table */
		orig_node->tt_crc = tt_global_crc(bat_priv, orig_node);

		/* The ttvn alone is not enough to guarantee consistency
		 * because a single value could repesent different states
		 * because a single value could represent different states
		 * (due to the wrap around). Thus a node has to check whether
		 * the resulting table (after applying the changes) is still
		 * consistent or not. E.g. a node could disconnect while its
@@ -228,7 +227,7 @@ static int is_bidirectional_neigh(struct orig_node *orig_node,
	if (!neigh_node)
		goto out;

	/* if orig_node is direct neighbour update neigh_node last_valid */
	/* if orig_node is direct neighbor update neigh_node last_valid */
	if (orig_node == orig_neigh_node)
		neigh_node->last_valid = jiffies;

@@ -473,7 +472,7 @@ static void update_orig(struct bat_priv *bat_priv, struct orig_node *orig_node,
	if (router && (router->tq_avg > neigh_node->tq_avg))
		goto update_tt;

	/* if the TQ is the same and the link not more symetric we
	/* if the TQ is the same and the link not more symmetric we
	 * won't consider it either */
	if (router && (neigh_node->tq_avg == router->tq_avg)) {
		orig_node_tmp = router->orig_node;
@@ -1243,7 +1242,7 @@ int recv_tt_query(struct sk_buff *skb, struct hard_iface *recv_if)
		}
		break;
	case TT_RESPONSE:
		/* packet needs to be linearised to access the TT changes */
		/* packet needs to be linearized to access the TT changes */
		if (skb_linearize(skb) < 0)
			goto out;

Loading