aboutsummaryrefslogtreecommitdiffstats
path: root/net/batman-adv/send.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2012-02-07 04:20:50 -0500
committerAntonio Quartulli <ordex@autistici.org>2012-04-18 03:54:00 -0400
commit76e3d7fc1a49ea8c377ddc91a4ec40f326404833 (patch)
tree297060a4b0651ab2d5744130cbda20e9953bc412 /net/batman-adv/send.c
parentcd8b78e7e9d1d9625634dc1ec2bb4b5a14d1295a (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/send.c')
-rw-r--r--net/batman-adv/send.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/batman-adv/send.c b/net/batman-adv/send.c
index af7a6741a685..b5f078cacc09 100644
--- a/net/batman-adv/send.c
+++ b/net/batman-adv/send.c
@@ -87,7 +87,7 @@ static void realloc_packet_buffer(struct hard_iface *hard_iface,
87 /* keep old buffer if kmalloc should fail */ 87 /* keep old buffer if kmalloc should fail */
88 if (new_buff) { 88 if (new_buff) {
89 memcpy(new_buff, hard_iface->packet_buff, 89 memcpy(new_buff, hard_iface->packet_buff,
90 BATMAN_OGM_LEN); 90 BATMAN_OGM_HLEN);
91 91
92 kfree(hard_iface->packet_buff); 92 kfree(hard_iface->packet_buff);
93 hard_iface->packet_buff = new_buff; 93 hard_iface->packet_buff = new_buff;
@@ -101,13 +101,13 @@ static int prepare_packet_buffer(struct bat_priv *bat_priv,
101{ 101{
102 int new_len; 102 int new_len;
103 103
104 new_len = BATMAN_OGM_LEN + 104 new_len = BATMAN_OGM_HLEN +
105 tt_len((uint8_t)atomic_read(&bat_priv->tt_local_changes)); 105 tt_len((uint8_t)atomic_read(&bat_priv->tt_local_changes));
106 106
107 /* if we have too many changes for one packet don't send any 107 /* if we have too many changes for one packet don't send any
108 * and wait for the tt table request which will be fragmented */ 108 * and wait for the tt table request which will be fragmented */
109 if (new_len > hard_iface->soft_iface->mtu) 109 if (new_len > hard_iface->soft_iface->mtu)
110 new_len = BATMAN_OGM_LEN; 110 new_len = BATMAN_OGM_HLEN;
111 111
112 realloc_packet_buffer(hard_iface, new_len); 112 realloc_packet_buffer(hard_iface, new_len);
113 113
@@ -117,14 +117,14 @@ static int prepare_packet_buffer(struct bat_priv *bat_priv,
117 atomic_set(&bat_priv->tt_ogm_append_cnt, TT_OGM_APPEND_MAX); 117 atomic_set(&bat_priv->tt_ogm_append_cnt, TT_OGM_APPEND_MAX);
118 118
119 return tt_changes_fill_buffer(bat_priv, 119 return tt_changes_fill_buffer(bat_priv,
120 hard_iface->packet_buff + BATMAN_OGM_LEN, 120 hard_iface->packet_buff + BATMAN_OGM_HLEN,
121 hard_iface->packet_len - BATMAN_OGM_LEN); 121 hard_iface->packet_len - BATMAN_OGM_HLEN);
122} 122}
123 123
124static int reset_packet_buffer(struct bat_priv *bat_priv, 124static int reset_packet_buffer(struct bat_priv *bat_priv,
125 struct hard_iface *hard_iface) 125 struct hard_iface *hard_iface)
126{ 126{
127 realloc_packet_buffer(hard_iface, BATMAN_OGM_LEN); 127 realloc_packet_buffer(hard_iface, BATMAN_OGM_HLEN);
128 return 0; 128 return 0;
129} 129}
130 130