Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314585
b: refs/heads/master
c: e5d8925
h: refs/heads/master
i:
  314583: 93fc9af
v: v3
  • Loading branch information
Sven Eckelmann authored and Antonio Quartulli committed Jun 24, 2012
1 parent f5b4483 commit 958a1be
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 84 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b4a1159dff76f938aa64f7000621552e4d9ad18
refs/heads/master: e5d89254bf763da35b42a3c65289c9962f7240c2
14 changes: 7 additions & 7 deletions trunk/net/batman-adv/bat_iv_ogm.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)
if (forw_packet->if_incoming->if_status != IF_ACTIVE)
goto out;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto out;

Expand Down Expand Up @@ -273,7 +273,7 @@ static void bat_iv_ogm_emit(struct forw_packet *forw_packet)

out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

/* return true if new_packet can be aggregated with forw_packet */
Expand Down Expand Up @@ -311,7 +311,7 @@ static bool bat_iv_ogm_can_aggregate(const struct batman_ogm_packet
* a "global" packet as well as the base
* packet
*/
primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto out;

Expand Down Expand Up @@ -352,7 +352,7 @@ static bool bat_iv_ogm_can_aggregate(const struct batman_ogm_packet

out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
return res;
}

Expand Down Expand Up @@ -431,7 +431,7 @@ static void bat_iv_ogm_aggregate_new(const unsigned char *packet_buff,

return;
out:
hardif_free_ref(if_incoming);
batadv_hardif_free_ref(if_incoming);
}

/* aggregate a new packet into the existing ogm packet */
Expand Down Expand Up @@ -570,7 +570,7 @@ static void bat_iv_ogm_schedule(struct hard_iface *hard_iface)
int vis_server, tt_num_changes = 0;

vis_server = atomic_read(&bat_priv->vis_mode);
primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);

if (hard_iface == primary_if)
tt_num_changes = batadv_tt_append_diff(bat_priv,
Expand Down Expand Up @@ -608,7 +608,7 @@ static void bat_iv_ogm_schedule(struct hard_iface *hard_iface)
bat_iv_ogm_emit_send_time(bat_priv));

if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

static void bat_iv_ogm_orig_update(struct bat_priv *bat_priv,
Expand Down
16 changes: 8 additions & 8 deletions trunk/net/batman-adv/bat_sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ ssize_t store_##_name(struct kobject *kobj, struct attribute *attr, \
length = __store_uint_attr(buff, count, _min, _max, _post_func, \
attr, &hard_iface->_name, net_dev); \
\
hardif_free_ref(hard_iface); \
batadv_hardif_free_ref(hard_iface); \
return length; \
}

Expand All @@ -150,7 +150,7 @@ ssize_t show_##_name(struct kobject *kobj, \
\
length = sprintf(buff, "%i\n", atomic_read(&hard_iface->_name));\
\
hardif_free_ref(hard_iface); \
batadv_hardif_free_ref(hard_iface); \
return length; \
}

Expand Down Expand Up @@ -535,7 +535,7 @@ static ssize_t show_mesh_iface(struct kobject *kobj, struct attribute *attr,
length = sprintf(buff, "%s\n", hard_iface->if_status == IF_NOT_IN_USE ?
"none" : hard_iface->soft_iface->name);

hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);

return length;
}
Expand All @@ -557,7 +557,7 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
if (strlen(buff) >= IFNAMSIZ) {
pr_err("Invalid parameter for 'mesh_iface' setting received: interface name too long '%s'\n",
buff);
hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);
return -EINVAL;
}

Expand Down Expand Up @@ -592,7 +592,7 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
unlock:
rtnl_unlock();
out:
hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);
return ret;
}

Expand Down Expand Up @@ -625,7 +625,7 @@ static ssize_t show_iface_status(struct kobject *kobj, struct attribute *attr,
break;
}

hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);

return length;
}
Expand Down Expand Up @@ -688,7 +688,7 @@ int batadv_throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
struct kobject *bat_kobj;
char *uevent_env[4] = { NULL, NULL, NULL, NULL };

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto out;

Expand Down Expand Up @@ -727,7 +727,7 @@ int batadv_throw_uevent(struct bat_priv *bat_priv, enum uev_type type,
kfree(uevent_env[2]);

if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);

if (ret)
bat_dbg(DBG_BATMAN, bat_priv,
Expand Down
28 changes: 14 additions & 14 deletions trunk/net/batman-adv/bridge_loop_avoidance.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ static void bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
struct bla_claim_dst local_claim_dest;
__be32 zeroip = 0;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
return;

Expand Down Expand Up @@ -339,7 +339,7 @@ static void bla_send_claim(struct bat_priv *bat_priv, uint8_t *mac,
netif_rx(skb);
out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

/* @bat_priv: the bat priv with all the soft interface information
Expand Down Expand Up @@ -1075,7 +1075,7 @@ static void bla_periodic_work(struct work_struct *work)
struct hard_iface *primary_if;
int i;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto out;

Expand Down Expand Up @@ -1106,7 +1106,7 @@ static void bla_periodic_work(struct work_struct *work)
}
out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);

bla_start_timer(bat_priv);
}
Expand All @@ -1131,12 +1131,12 @@ int batadv_bla_init(struct bat_priv *bat_priv)
/* setting claim destination address */
memcpy(&bat_priv->claim_dest.magic, claim_dest, 3);
bat_priv->claim_dest.type = 0;
primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (primary_if) {
bat_priv->claim_dest.group =
htons(crc16(0, primary_if->net_dev->dev_addr,
ETH_ALEN));
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
} else {
bat_priv->claim_dest.group = 0; /* will be set later */
}
Expand Down Expand Up @@ -1319,7 +1319,7 @@ void batadv_bla_free(struct bat_priv *bat_priv)
struct hard_iface *primary_if;

cancel_delayed_work_sync(&bat_priv->bla_work);
primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);

if (bat_priv->claim_hash) {
bla_purge_claims(bat_priv, primary_if, 1);
Expand All @@ -1332,7 +1332,7 @@ void batadv_bla_free(struct bat_priv *bat_priv)
bat_priv->backbone_hash = NULL;
}
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

/* @bat_priv: the bat priv with all the soft interface information
Expand All @@ -1356,7 +1356,7 @@ int batadv_bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)

ethhdr = (struct ethhdr *)skb_mac_header(skb);

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto handled;

Expand Down Expand Up @@ -1416,7 +1416,7 @@ int batadv_bla_rx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)

out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
if (claim)
claim_free_ref(claim);
return ret;
Expand All @@ -1441,7 +1441,7 @@ int batadv_bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)
struct hard_iface *primary_if;
int ret = 0;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto out;

Expand Down Expand Up @@ -1502,7 +1502,7 @@ int batadv_bla_tx(struct bat_priv *bat_priv, struct sk_buff *skb, short vid)
ret = 1;
out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
if (claim)
claim_free_ref(claim);
return ret;
Expand All @@ -1521,7 +1521,7 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset)
bool is_own;
int ret = 0;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if) {
ret = seq_printf(seq,
"BATMAN mesh %s disabled - please specify interfaces to enable it\n",
Expand Down Expand Up @@ -1559,6 +1559,6 @@ int batadv_bla_claim_table_seq_print_text(struct seq_file *seq, void *offset)
}
out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
return ret;
}
4 changes: 2 additions & 2 deletions trunk/net/batman-adv/gateway_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset)
struct hlist_node *node;
int gw_count = 0, ret = 0;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if) {
ret = seq_printf(seq,
"BATMAN mesh %s disabled - please specify interfaces to enable it\n",
Expand Down Expand Up @@ -503,7 +503,7 @@ int batadv_gw_client_seq_print_text(struct seq_file *seq, void *offset)

out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
return ret;
}

Expand Down
28 changes: 14 additions & 14 deletions trunk/net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ static void primary_if_update_addr(struct bat_priv *bat_priv,
struct vis_packet *vis_packet;
struct hard_iface *primary_if;

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto out;

Expand All @@ -115,7 +115,7 @@ static void primary_if_update_addr(struct bat_priv *bat_priv,
batadv_bla_update_orig_address(bat_priv, primary_if, oldif);
out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

static void primary_if_select(struct bat_priv *bat_priv,
Expand All @@ -139,7 +139,7 @@ static void primary_if_select(struct bat_priv *bat_priv,

out:
if (curr_hard_iface)
hardif_free_ref(curr_hard_iface);
batadv_hardif_free_ref(curr_hard_iface);
}

static bool hardif_is_iface_up(const struct hard_iface *hard_iface)
Expand Down Expand Up @@ -229,7 +229,7 @@ static void hardif_activate_interface(struct hard_iface *hard_iface)
/* the first active interface becomes our primary interface or
* the next active interface after the old primary interface was removed
*/
primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
primary_if_select(bat_priv, hard_iface);

Expand All @@ -240,7 +240,7 @@ static void hardif_activate_interface(struct hard_iface *hard_iface)

out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

static void hardif_deactivate_interface(struct hard_iface *hard_iface)
Expand Down Expand Up @@ -347,7 +347,7 @@ int batadv_hardif_enable_interface(struct hard_iface *hard_iface,
err_dev:
dev_put(soft_iface);
err:
hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);
return ret;
}

Expand All @@ -369,15 +369,15 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface)
bat_priv->num_ifaces--;
batadv_orig_hash_del_if(hard_iface, bat_priv->num_ifaces);

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (hard_iface == primary_if) {
struct hard_iface *new_if;

new_if = hardif_get_active(hard_iface->soft_iface);
primary_if_select(bat_priv, new_if);

if (new_if)
hardif_free_ref(new_if);
batadv_hardif_free_ref(new_if);
}

bat_priv->bat_algo_ops->bat_iface_disable(hard_iface);
Expand All @@ -393,11 +393,11 @@ void batadv_hardif_disable_interface(struct hard_iface *hard_iface)
batadv_softif_destroy(hard_iface->soft_iface);

hard_iface->soft_iface = NULL;
hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);

out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
}

static struct hard_iface *hardif_add_interface(struct net_device *net_dev)
Expand Down Expand Up @@ -461,7 +461,7 @@ static void hardif_remove_interface(struct hard_iface *hard_iface)

hard_iface->if_status = IF_TO_BE_REMOVED;
batadv_sysfs_del_hardif(&hard_iface->hardif_obj);
hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);
}

void batadv_hardif_remove_interfaces(void)
Expand Down Expand Up @@ -517,7 +517,7 @@ static int hard_if_event(struct notifier_block *this,
bat_priv = netdev_priv(hard_iface->soft_iface);
bat_priv->bat_algo_ops->bat_iface_update_mac(hard_iface);

primary_if = primary_if_get_selected(bat_priv);
primary_if = batadv_primary_if_get_selected(bat_priv);
if (!primary_if)
goto hardif_put;

Expand All @@ -529,10 +529,10 @@ static int hard_if_event(struct notifier_block *this,
}

hardif_put:
hardif_free_ref(hard_iface);
batadv_hardif_free_ref(hard_iface);
out:
if (primary_if)
hardif_free_ref(primary_if);
batadv_hardif_free_ref(primary_if);
return NOTIFY_DONE;
}

Expand Down
Loading

0 comments on commit 958a1be

Please sign in to comment.