diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2012-02-07 04:20:50 -0500 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-18 03:54:00 -0400 |
commit | 76e3d7fc1a49ea8c377ddc91a4ec40f326404833 (patch) | |
tree | 297060a4b0651ab2d5744130cbda20e9953bc412 /net/batman-adv/bat_iv_ogm.c | |
parent | cd8b78e7e9d1d9625634dc1ec2bb4b5a14d1295a (diff) |
batman-adv: rename BATMAN_OGM_LEN to BATMAN_OGM_HLEN
Using BATMAN_OGM_LEN leaves one with the impression that this is
the full packet size which is not the case. Therefore the variable
is renamed.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net/batman-adv/bat_iv_ogm.c')
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index c0bdb90cc024..a2af2896769f 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -40,7 +40,7 @@ static int bat_iv_ogm_iface_enable(struct hard_iface *hard_iface) | |||
40 | get_random_bytes(&random_seqno, sizeof(random_seqno)); | 40 | get_random_bytes(&random_seqno, sizeof(random_seqno)); |
41 | atomic_set(&hard_iface->seqno, random_seqno); | 41 | atomic_set(&hard_iface->seqno, random_seqno); |
42 | 42 | ||
43 | hard_iface->packet_len = BATMAN_OGM_LEN; | 43 | hard_iface->packet_len = BATMAN_OGM_HLEN; |
44 | hard_iface->packet_buff = kmalloc(hard_iface->packet_len, GFP_ATOMIC); | 44 | hard_iface->packet_buff = kmalloc(hard_iface->packet_len, GFP_ATOMIC); |
45 | 45 | ||
46 | if (!hard_iface->packet_buff) | 46 | if (!hard_iface->packet_buff) |
@@ -112,7 +112,7 @@ static uint8_t hop_penalty(uint8_t tq, const struct bat_priv *bat_priv) | |||
112 | static int bat_iv_ogm_aggr_packet(int buff_pos, int packet_len, | 112 | static int bat_iv_ogm_aggr_packet(int buff_pos, int packet_len, |
113 | int tt_num_changes) | 113 | int tt_num_changes) |
114 | { | 114 | { |
115 | int next_buff_pos = buff_pos + BATMAN_OGM_LEN + tt_len(tt_num_changes); | 115 | int next_buff_pos = buff_pos + BATMAN_OGM_HLEN + tt_len(tt_num_changes); |
116 | 116 | ||
117 | return (next_buff_pos <= packet_len) && | 117 | return (next_buff_pos <= packet_len) && |
118 | (next_buff_pos <= MAX_AGGREGATION_BYTES); | 118 | (next_buff_pos <= MAX_AGGREGATION_BYTES); |
@@ -162,7 +162,7 @@ static void bat_iv_ogm_send_to_if(struct forw_packet *forw_packet, | |||
162 | batman_ogm_packet->ttvn, hard_iface->net_dev->name, | 162 | batman_ogm_packet->ttvn, hard_iface->net_dev->name, |
163 | hard_iface->net_dev->dev_addr); | 163 | hard_iface->net_dev->dev_addr); |
164 | 164 | ||
165 | buff_pos += BATMAN_OGM_LEN + | 165 | buff_pos += BATMAN_OGM_HLEN + |
166 | tt_len(batman_ogm_packet->tt_num_changes); | 166 | tt_len(batman_ogm_packet->tt_num_changes); |
167 | packet_num++; | 167 | packet_num++; |
168 | batman_ogm_packet = (struct batman_ogm_packet *) | 168 | batman_ogm_packet = (struct batman_ogm_packet *) |
@@ -540,7 +540,7 @@ static void bat_iv_ogm_forward(struct orig_node *orig_node, | |||
540 | batman_ogm_packet->flags &= ~DIRECTLINK; | 540 | batman_ogm_packet->flags &= ~DIRECTLINK; |
541 | 541 | ||
542 | bat_iv_ogm_queue_add(bat_priv, (unsigned char *)batman_ogm_packet, | 542 | bat_iv_ogm_queue_add(bat_priv, (unsigned char *)batman_ogm_packet, |
543 | BATMAN_OGM_LEN + tt_len(tt_num_changes), | 543 | BATMAN_OGM_HLEN + tt_len(tt_num_changes), |
544 | if_incoming, 0, bat_iv_ogm_fwd_send_time()); | 544 | if_incoming, 0, bat_iv_ogm_fwd_send_time()); |
545 | } | 545 | } |
546 | 546 | ||
@@ -1173,12 +1173,12 @@ static void bat_iv_ogm_receive(struct hard_iface *if_incoming, | |||
1173 | batman_ogm_packet->seqno = ntohl(batman_ogm_packet->seqno); | 1173 | batman_ogm_packet->seqno = ntohl(batman_ogm_packet->seqno); |
1174 | batman_ogm_packet->tt_crc = ntohs(batman_ogm_packet->tt_crc); | 1174 | batman_ogm_packet->tt_crc = ntohs(batman_ogm_packet->tt_crc); |
1175 | 1175 | ||
1176 | tt_buff = packet_buff + buff_pos + BATMAN_OGM_LEN; | 1176 | tt_buff = packet_buff + buff_pos + BATMAN_OGM_HLEN; |
1177 | 1177 | ||
1178 | bat_iv_ogm_process(ethhdr, batman_ogm_packet, | 1178 | bat_iv_ogm_process(ethhdr, batman_ogm_packet, |
1179 | tt_buff, if_incoming); | 1179 | tt_buff, if_incoming); |
1180 | 1180 | ||
1181 | buff_pos += BATMAN_OGM_LEN + | 1181 | buff_pos += BATMAN_OGM_HLEN + |
1182 | tt_len(batman_ogm_packet->tt_num_changes); | 1182 | tt_len(batman_ogm_packet->tt_num_changes); |
1183 | 1183 | ||
1184 | batman_ogm_packet = (struct batman_ogm_packet *) | 1184 | batman_ogm_packet = (struct batman_ogm_packet *) |