From patchwork Tue Feb 7 09:19:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 1537 Return-Path: Received: from nm21-vm4.bullet.mail.ukl.yahoo.com (nm21-vm4.bullet.mail.ukl.yahoo.com [217.12.10.76]) by open-mesh.org (Postfix) with SMTP id 666AF600857 for ; Tue, 7 Feb 2012 10:20:14 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.184] by nm21.bullet.mail.ukl.yahoo.com with NNFMP; 07 Feb 2012 09:20:14 -0000 Received: from [77.238.184.62] by tm15.bullet.mail.ukl.yahoo.com with NNFMP; 07 Feb 2012 09:20:14 -0000 Received: from [127.0.0.1] by smtp131.mail.ukl.yahoo.com with NNFMP; 07 Feb 2012 09:20:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1328606414; bh=ckJJ6G7/jDTNM5iVxAcXC5TyipcBfq2W/Fu7v487288=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=GSb1zTJYfFX6KI82zNN+3TZgerfQTwmdZa09DV8f9H/XlNFN1ve7Ma/PU/vVB3nUIx2jZ1OKWR+231B3V+wUJgkDSQZBqoJm5sMtIdJLNF4zkHhM9BiRZHg2+YvUuFZ3TO9WuuqAiKJUMwJNAGSLLSxIhihXx6pDtb2WiMrHeUo= X-Yahoo-Newman-Id: 217282.51157.bm@smtp131.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: XQ.NU0IVM1nLpdWvvhGrQ_MiB8ZE6pYOMs6on5eEEFNc8MH .rVBXHfCZ60MISswh9kmq55zSe9QbSpCJTx.Om6thYJJZ5_MIPr4umz8V7bo 63yBJLvXW7KkBr5xcgXtJ5RxyGfvHMzfPt5eLBHOzC3O.lAuzCsjLVztL.Ob rfroj8tId9chZfpucFrjs0wFY_JqFswaW.pVuv9rwNJDLZKmxtyANimgJ6e0 1kLDKWRWUlyxSsGtENj2HMLhuYqVGta9EDyTtX14GqVo7IeyQz6V7Kl3wEke TstFQ5CcEO0Q73QATCWGaiZYFbst_uWEOMYxF4tZqgeKKAKEkAAuv5Ej4LUc Qo9aJqzD2iTHq0ZCe023Pwg3JBsAq_lbiiDhntnQviKs.7ZElH0ECMQIqwVX f4w-- X-Yahoo-SMTP: tW.h3tiswBBMXO2coYcbPigGD5Lt6zY_.Zc- Received: from localhost (lindner_marek@210.177.7.38 with plain) by smtp131.mail.ukl.yahoo.com with SMTP; 07 Feb 2012 09:20:13 +0000 GMT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 7 Feb 2012 17:19:58 +0800 Message-Id: <1328606405-2490-1-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <201202071719.22804.lindner_marek@yahoo.de> References: <201202071719.22804.lindner_marek@yahoo.de> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 1/8] batman-adv: move ogm initialization into the proper function X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Feb 2012 09:20:14 -0000 Signed-of-by: Marek Lindner --- hard-interface.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hard-interface.c b/hard-interface.c index 612f2c8..e16c996 100644 --- a/hard-interface.c +++ b/hard-interface.c @@ -337,7 +337,6 @@ int hardif_enable_interface(struct hard_iface *hard_iface, hard_iface->batman_adv_ptype.dev = hard_iface->net_dev; dev_add_pack(&hard_iface->batman_adv_ptype); - atomic_set(&hard_iface->seqno, 1); atomic_set(&hard_iface->frag_seqno, 1); bat_info(hard_iface->soft_iface, "Adding interface: %s\n", hard_iface->net_dev->name); @@ -463,6 +462,13 @@ static struct hard_iface *hardif_add_interface(struct net_device *net_dev) check_known_mac_addr(hard_iface->net_dev); list_add_tail_rcu(&hard_iface->list, &hardif_list); + /** + * This can't be called via a bat_priv callback because + * we have no bat_priv yet. + */ + atomic_set(&hard_iface->seqno, 1); + hard_iface->packet_buff = NULL; + return hard_iface; free_if: