diff options
author | Marek Lindner <lindner_marek@yahoo.de> | 2012-02-07 13:20:50 +0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-04-18 11:54:00 +0400 |
commit | 76e3d7fc1a49ea8c377ddc91a4ec40f326404833 (patch) | |
tree | 297060a4b0651ab2d5744130cbda20e9953bc412 /net/batman-adv/send.c | |
parent | cd8b78e7e9d1d9625634dc1ec2bb4b5a14d1295a (diff) | |
download | linux-76e3d7fc1a49ea8c377ddc91a4ec40f326404833.tar.xz |
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.c | 12 |
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, /* keep old buffer if kmalloc should fail */ if (new_buff) { memcpy(new_buff, hard_iface->packet_buff, - BATMAN_OGM_LEN); + BATMAN_OGM_HLEN); kfree(hard_iface->packet_buff); hard_iface->packet_buff = new_buff; @@ -101,13 +101,13 @@ static int prepare_packet_buffer(struct bat_priv *bat_priv, { int new_len; - new_len = BATMAN_OGM_LEN + + new_len = BATMAN_OGM_HLEN + tt_len((uint8_t)atomic_read(&bat_priv->tt_local_changes)); /* if we have too many changes for one packet don't send any * and wait for the tt table request which will be fragmented */ if (new_len > hard_iface->soft_iface->mtu) - new_len = BATMAN_OGM_LEN; + new_len = BATMAN_OGM_HLEN; realloc_packet_buffer(hard_iface, new_len); @@ -117,14 +117,14 @@ static int prepare_packet_buffer(struct bat_priv *bat_priv, atomic_set(&bat_priv->tt_ogm_append_cnt, TT_OGM_APPEND_MAX); return tt_changes_fill_buffer(bat_priv, - hard_iface->packet_buff + BATMAN_OGM_LEN, - hard_iface->packet_len - BATMAN_OGM_LEN); + hard_iface->packet_buff + BATMAN_OGM_HLEN, + hard_iface->packet_len - BATMAN_OGM_HLEN); } static int reset_packet_buffer(struct bat_priv *bat_priv, struct hard_iface *hard_iface) { - realloc_packet_buffer(hard_iface, BATMAN_OGM_LEN); + realloc_packet_buffer(hard_iface, BATMAN_OGM_HLEN); return 0; } |