The following commit has been merged in the master branch:
commit 74b84f460614c6b04fc8e06083edc7af4ef1e7dd
Merge: b0f3829d152db3dd98d0bcd894762e4a5788b135 a9f3b78bd28a3f876fc5ecbb1e0d65ff965f5f1e
Author: Marek Lindner <lindner_marek(a)yahoo.de>
Date: Wed Apr 18 17:28:02 2012 +0800
Merge branch 'next'
diff --combined bat_iv_ogm.c
index ed743a4,2a1845e..095aa64
--- a/bat_iv_ogm.c
+++ b/bat_iv_ogm.c
@@@ -58,12 -58,12 +58,12 @@@ out
static int bat_iv_ogm_iface_enable(struct hard_iface *hard_iface)
{
struct batman_ogm_packet *batman_ogm_packet;
- unsigned long random_seqno;
- int res = -1;
+ uint32_t random_seqno;
+ int res = -ENOMEM;
/* randomize initial seqno to avoid collision */
- get_random_bytes(&random_seqno, sizeof(unsigned long));
- atomic_set(&hard_iface->seqno, (uint32_t)random_seqno);
+ get_random_bytes(&random_seqno, sizeof(random_seqno));
+ atomic_set(&hard_iface->seqno, random_seqno);
hard_iface->packet_len = BATMAN_OGM_HLEN;
hard_iface->packet_buff = kmalloc(hard_iface->packet_len, GFP_ATOMIC);
@@@ -576,7 -576,8 +576,7 @@@ static void bat_iv_ogm_schedule(struct
htonl((uint32_t)atomic_read(&hard_iface->seqno));
batman_ogm_packet->ttvn = atomic_read(&bat_priv->ttvn);
- batman_ogm_packet->tt_crc = htons((uint16_t)
- atomic_read(&bat_priv->tt_crc));
+ batman_ogm_packet->tt_crc = htons(bat_priv->tt_crc);
if (tt_num_changes >= 0)
batman_ogm_packet->tt_num_changes = tt_num_changes;
--
batman-adv