From patchwork Tue Feb 7 09:20:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Lindner X-Patchwork-Id: 1516 Return-Path: Received: from nm23-vm1.bullet.mail.ukl.yahoo.com (nm23-vm1.bullet.mail.ukl.yahoo.com [217.146.177.100]) by open-mesh.org (Postfix) with SMTP id 1CD3360086C for ; Tue, 7 Feb 2012 10:21:27 +0100 (CET) Authentication-Results: open-mesh.org; dkim=pass (1024-bit key) header.i=@yahoo.de; dkim-adsp=none Received: from [217.146.183.209] by nm23.bullet.mail.ukl.yahoo.com with NNFMP; 07 Feb 2012 09:21:26 -0000 Received: from [77.238.184.62] by tm2.bullet.mail.ukl.yahoo.com with NNFMP; 07 Feb 2012 09:21:26 -0000 Received: from [127.0.0.1] by smtp131.mail.ukl.yahoo.com with NNFMP; 07 Feb 2012 09:21:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.de; s=s1024; t=1328606486; bh=dLs1VWyCbMwhwHfYpaOmOz6dOlFnxXow4zmjdZ0SxX0=; 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=s6o/iDcHux5jvsx5scuH+N47cAGTZyHHf9tS21o6k8ocysAhLACLINsWUHLq6fcOK0PzOoPmn8uojxB3Sq830a5xZGrNml8ZCZZHcA5v5sLSLNIsJd2iKsRfSjZYT/T39akAJyMk4oVZJpzM0e3AvIUhs1MOWZ6UlTiFdvm7hoU= X-Yahoo-Newman-Id: 689903.53392.bm@smtp131.mail.ukl.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: He83Pg0VM1mznKy5yAx8sYheYFOe4uTDZ9pI5Ro9pRAOMCK puKjj85DRqhDdN7wGiyGExaTo.RaGet8ZTbCW28Ufskmx._CwFVMPrKFFVaU vTyrELo0lLxaYBoZzub8Z7pkhL6G9J4MabZjs2U45d1Ikzc_hqjLlL_cjfqK aP4o9qw1iF9Jj1ZZBL.nmrq7_wwTKXGJbNkazZU2ZJziCRgD_MzqidSxocWd Rc7qo9gQo4W8UZguZ4gDO_dh8d_kQ2Fu_W1khHTZ0WaisJaqbBN9mAmeWNEj HstJ5GufYEHQi1_fAYgS9jrgU7WfvSLcLrUrzz0WRkLjEaf4SrTZBuxpcZvh _KzThYuSFYdIjB9wozXUe3v6OsXDr5EMuEgHrLZbTVXuvJxXVmb6vctXzX2F mRQ-- 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:21:25 +0000 GMT From: Marek Lindner To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 7 Feb 2012 17:20:49 +0800 Message-Id: <1328606451-3418-5-git-send-email-lindner_marek@yahoo.de> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1328606451-3418-1-git-send-email-lindner_marek@yahoo.de> References: <201202071719.22804.lindner_marek@yahoo.de> <1328606451-3418-1-git-send-email-lindner_marek@yahoo.de> Cc: Marek Lindner Subject: [B.A.T.M.A.N.] [PATCH 6/8] batman-adv: refactoring API: find generalized name for bat_ogm_init_primary callback 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:21:27 -0000 Signed-off-by: Marek Lindner --- bat_iv_ogm.c | 4 ++-- hard-interface.c | 2 +- main.c | 2 +- types.h | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bat_iv_ogm.c b/bat_iv_ogm.c index d944a0b..b82a772 100644 --- a/bat_iv_ogm.c +++ b/bat_iv_ogm.c @@ -67,7 +67,7 @@ static void bat_iv_ogm_iface_disable(struct hard_iface *hard_iface) hard_iface->packet_buff = NULL; } -static void bat_iv_ogm_init_primary(struct hard_iface *hard_iface) +static void bat_iv_ogm_primary_iface_set(struct hard_iface *hard_iface) { struct batman_ogm_packet *batman_ogm_packet; @@ -1202,7 +1202,7 @@ static struct bat_algo_ops batman_iv __read_mostly = { .name = "BATMAN IV", .bat_iface_enable = bat_iv_ogm_iface_enable, .bat_iface_disable = bat_iv_ogm_iface_disable, - .bat_ogm_init_primary = bat_iv_ogm_init_primary, + .bat_primary_iface_set = bat_iv_ogm_primary_iface_set, .bat_ogm_update_mac = bat_iv_ogm_update_mac, .bat_ogm_schedule = bat_iv_ogm_schedule, .bat_ogm_emit = bat_iv_ogm_emit, diff --git a/hard-interface.c b/hard-interface.c index d6b25e0..2a435ec 100644 --- a/hard-interface.c +++ b/hard-interface.c @@ -146,7 +146,7 @@ static void primary_if_select(struct bat_priv *bat_priv, if (!new_hard_iface) goto out; - bat_priv->bat_algo_ops->bat_ogm_init_primary(new_hard_iface); + bat_priv->bat_algo_ops->bat_primary_iface_set(new_hard_iface); primary_if_update_addr(bat_priv, curr_hard_iface); out: diff --git a/main.c b/main.c index c4a9b2b..87b75a9 100644 --- a/main.c +++ b/main.c @@ -210,7 +210,7 @@ int bat_algo_register(struct bat_algo_ops *bat_algo_ops) /* all algorithms must implement all ops (for now) */ if (!bat_algo_ops->bat_iface_enable || !bat_algo_ops->bat_iface_disable || - !bat_algo_ops->bat_ogm_init_primary || + !bat_algo_ops->bat_primary_iface_set || !bat_algo_ops->bat_ogm_update_mac || !bat_algo_ops->bat_ogm_schedule || !bat_algo_ops->bat_ogm_emit || diff --git a/types.h b/types.h index 3df38df..e3d2f1f 100644 --- a/types.h +++ b/types.h @@ -373,8 +373,8 @@ struct bat_algo_ops { int (*bat_iface_enable)(struct hard_iface *hard_iface); /* de-init routing info when hard-interface is disabled */ void (*bat_iface_disable)(struct hard_iface *hard_iface); - /* init primary OGM when primary interface is selected */ - void (*bat_ogm_init_primary)(struct hard_iface *hard_iface); + /* called when primary interface is selected / changed */ + void (*bat_primary_iface_set)(struct hard_iface *hard_iface); /* init mac addresses of the OGM belonging to this hard-interface */ void (*bat_ogm_update_mac)(struct hard_iface *hard_iface); /* prepare a new outgoing OGM for the send queue */