The following commit has been merged in the merge/master branch: commit f2a420406454c9667c25f8e55814e4aee96d21e5 Merge: f7d2e577813a10d9773e79a83df6202c6d2159b7 2fc460e52c85839846ef6f03f53291fbd4b759a0 Author: Marek Lindner mareklindner@neomailbox.ch Date: Sun Jun 28 21:59:21 2015 +0800
Merge branch 'next'
diff --combined net/batman-adv/gateway_client.c index 97f7c44,c386d49..ef78c41 --- a/net/batman-adv/gateway_client.c +++ b/net/batman-adv/gateway_client.c @@@ -153,11 -153,10 +153,11 @@@ 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; - uint32_t gw_divisor; - 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; @@@ -268,8 -267,7 +268,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 -351,8 +353,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) @@@ -442,6 -439,8 +442,8 @@@ static void batadv_gw_node_add(struct b
INIT_HLIST_NODE(&gw_node->list); gw_node->orig_node = orig_node; + gw_node->bandwidth_down = ntohl(gateway->bandwidth_down); + gw_node->bandwidth_up = ntohl(gateway->bandwidth_up); atomic_set(&gw_node->refcount, 1);
spin_lock_bh(&bat_priv->gw.list_lock); @@@ -693,7 -692,7 +695,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; @@@ -703,7 -702,7 +705,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)) @@@ -813,15 -812,13 +815,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); diff --combined net/batman-adv/send.c index 82ed735,191076e..f664324 --- a/net/batman-adv/send.c +++ b/net/batman-adv/send.c @@@ -54,7 -54,7 +54,7 @@@ static void batadv_send_outstanding_bca */ int batadv_send_skb_packet(struct sk_buff *skb, struct batadv_hard_iface *hard_iface, - const uint8_t *dst_addr) + const u8 *dst_addr) { struct batadv_priv *bat_priv = netdev_priv(hard_iface->soft_iface); struct ethhdr *ethhdr; @@@ -172,7 -172,7 +172,7 @@@ batadv_send_skb_push_fill_unicast(struc struct batadv_orig_node *orig_node) { struct batadv_unicast_packet *unicast_packet; - uint8_t ttvn = (uint8_t)atomic_read(&orig_node->last_ttvn); + u8 ttvn = (u8)atomic_read(&orig_node->last_ttvn);
if (batadv_skb_head_push(skb, hdr_size) < 0) return false; @@@ -343,12 -343,12 +343,12 @@@ out */ int batadv_send_skb_via_tt_generic(struct batadv_priv *bat_priv, struct sk_buff *skb, int packet_type, - int packet_subtype, uint8_t *dst_hint, + int packet_subtype, u8 *dst_hint, unsigned short vid) { struct ethhdr *ethhdr = (struct ethhdr *)skb->data; struct batadv_orig_node *orig_node; - uint8_t *src, *dst; + u8 *src, *dst;
src = ethhdr->h_source; dst = ethhdr->h_dest; @@@ -616,7 -616,8 +616,8 @@@ batadv_purge_outstanding_packets(struc * we delete only packets belonging to the given interface */ if ((hard_iface) && - (forw_packet->if_incoming != hard_iface)) + (forw_packet->if_incoming != hard_iface) && + (forw_packet->if_outgoing != hard_iface)) continue;
spin_unlock_bh(&bat_priv->forw_bcast_list_lock);