The following commit has been merged in the merge/master branch: commit 03cb7fe4f4883c2e7ff71fd7de81aaceef69b11d Merge: 5f01697e1b43ade7c99fa08552d21c8809e1b956 57f7452727a99fb4bf8edb402f3ef2c78c1da568 Author: Marek Lindner mareklindner@neomailbox.ch Date: Wed Dec 30 19:49:10 2015 +0800
Merge branch 'next'
diff --combined net/batman-adv/bat_iv_ogm.c index 12bdffa,a6d389b..24ec371 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c @@@ -185,7 -185,8 +185,8 @@@ unlock static int batadv_iv_ogm_orig_del_if(struct batadv_orig_node *orig_node, int max_if_num, int del_if_num) { - int chunk_size, ret = -ENOMEM, if_offset; + int ret = -ENOMEM; + size_t chunk_size, if_offset; void *data_ptr = NULL;
spin_lock_bh(&orig_node->bat_iv.ogm_cnt_lock); @@@ -203,8 -204,9 +204,9 @@@ memcpy(data_ptr, orig_node->bat_iv.bcast_own, del_if_num * chunk_size);
/* copy second part */ + if_offset = (del_if_num + 1) * chunk_size; memcpy((char *)data_ptr + del_if_num * chunk_size, - orig_node->bat_iv.bcast_own + ((del_if_num + 1) * chunk_size), + (uint8_t *)orig_node->bat_iv.bcast_own + if_offset, (max_if_num - del_if_num) * chunk_size);
free_bcast_own: @@@ -394,14 -396,7 +396,14 @@@ static u8 batadv_hop_penalty(u8 tq, con return new_tq; }
-/* is there another aggregated packet here? */ +/** + * batadv_iv_ogm_aggr_packet - checks if there is another OGM attached + * @buff_pos: current position in the skb + * @packet_len: total length of the skb + * @tvlv_len: tvlv length of the previously considered OGM + * + * Return: true if there is enough space for another OGM, false otherwise. + */ static bool batadv_iv_ogm_aggr_packet(int buff_pos, int packet_len, __be16 tvlv_len) { @@@ -1313,8 -1308,7 +1315,8 @@@ batadv_iv_ogm_update_seqnos(const struc /* signalize caller that the packet is to be dropped. */ if (!hlist_empty(&orig_node->neigh_list) && batadv_window_protected(bat_priv, seq_diff, - &orig_ifinfo->batman_seqno_reset)) { + BATADV_TQ_LOCAL_WINDOW_SIZE, + &orig_ifinfo->batman_seqno_reset, NULL)) { ret = BATADV_PROTECTED; goto out; }