The following commit has been merged in the merge/master branch: commit e9eeb9371a60708f9650e473f7dc1a2b518baaee Merge: 56fd0bab9c18f7ea5259f283af47f7464214d0f7 a8c7689669ab27af7da051df467704c4ea011a58 Author: Marek Lindner mareklindner@neomailbox.ch Date: Fri Jul 10 16:15:01 2015 +0800
Merge branch 'next'
Conflicts: net/batman-adv/gateway_client.c
diff --combined net/batman-adv/gateway_client.c index ef78c41,6012e2b..d7ca214 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@@ -153,16 -153,11 +153,12 @@@ batadv_gw_get_best_gw_node(struct batad struct batadv_neigh_node *router; struct batadv_neigh_ifinfo *router_ifinfo; struct batadv_gw_node *gw_node, *curr_gw = NULL; - uint64_t max_gw_factor = 0, tmp_gw_factor = 0; - uint8_t max_tq = 0; - uint8_t tq_avg; + u64 max_gw_factor = 0; + u64 tmp_gw_factor = 0; - u32 gw_divisor; + u8 max_tq = 0; + u8 tq_avg; struct batadv_orig_node *orig_node;
- gw_divisor = BATADV_TQ_LOCAL_WINDOW_SIZE * BATADV_TQ_LOCAL_WINDOW_SIZE; - gw_divisor *= 64; - rcu_read_lock(); hlist_for_each_entry_rcu(gw_node, &bat_priv->gw.list, list) { if (gw_node->deleted) @@@ -188,7 -183,7 +184,7 @@@ tmp_gw_factor = tq_avg * tq_avg; tmp_gw_factor *= gw_node->bandwidth_down; tmp_gw_factor *= 100 * 100; - tmp_gw_factor /= gw_divisor; + tmp_gw_factor >>= 18;
if ((tmp_gw_factor > max_gw_factor) || ((tmp_gw_factor == max_gw_factor) && @@@ -268,8 -263,7 +264,8 @@@ void batadv_gw_check_client_stop(struc
void batadv_gw_election(struct batadv_priv *bat_priv) { - struct batadv_gw_node *curr_gw = NULL, *next_gw = NULL; + struct batadv_gw_node *curr_gw = NULL; + struct batadv_gw_node *next_gw = NULL; struct batadv_neigh_node *router = NULL; struct batadv_neigh_ifinfo *router_ifinfo = NULL; char gw_addr[18] = { '\0' }; @@@ -353,9 -347,8 +349,9 @@@ void batadv_gw_check_election(struct ba struct batadv_neigh_ifinfo *router_orig_tq = NULL; struct batadv_neigh_ifinfo *router_gw_tq = NULL; struct batadv_orig_node *curr_gw_orig; - struct batadv_neigh_node *router_gw = NULL, *router_orig = NULL; - uint8_t gw_tq_avg, orig_tq_avg; + struct batadv_neigh_node *router_gw = NULL; + struct batadv_neigh_node *router_orig = NULL; + u8 gw_tq_avg, orig_tq_avg;
curr_gw_orig = batadv_gw_get_selected_orig(bat_priv); if (!curr_gw_orig) @@@ -695,7 -688,7 +691,7 @@@ out */ enum batadv_dhcp_recipient batadv_gw_dhcp_recipient_get(struct sk_buff *skb, unsigned int *header_len, - uint8_t *chaddr) + u8 *chaddr) { enum batadv_dhcp_recipient ret = BATADV_DHCP_NO; struct ethhdr *ethhdr; @@@ -705,7 -698,7 +701,7 @@@ struct vlan_ethhdr *vhdr; int chaddr_offset; __be16 proto; - uint8_t *p; + u8 *p;
/* check for ethernet header */ if (!pskb_may_pull(skb, *header_len + ETH_HLEN)) @@@ -815,15 -808,13 +811,15 @@@ bool batadv_gw_out_of_range(struct batadv_priv *bat_priv, struct sk_buff *skb) { - struct batadv_neigh_node *neigh_curr = NULL, *neigh_old = NULL; + struct batadv_neigh_node *neigh_curr = NULL; + struct batadv_neigh_node *neigh_old = NULL; struct batadv_orig_node *orig_dst_node = NULL; - struct batadv_gw_node *gw_node = NULL, *curr_gw = NULL; + struct batadv_gw_node *gw_node = NULL; + struct batadv_gw_node *curr_gw = NULL; struct batadv_neigh_ifinfo *curr_ifinfo, *old_ifinfo; struct ethhdr *ethhdr = (struct ethhdr *)skb->data; bool out_of_range = false; - uint8_t curr_tq_avg; + u8 curr_tq_avg; unsigned short vid;
vid = batadv_get_vid(skb, 0);