fragmentation.c (6b5e971a282c0e7b18b47823103d695352b5a3c2) | fragmentation.c (5274cd68d744b4bc59b32d87cbde70803130eb3f) |
---|---|
1/* Copyright (C) 2013-2015 B.A.T.M.A.N. contributors: 2 * 3 * Martin Hundebøll <martin@hundeboll.net> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of version 2 of the GNU General Public 7 * License as published by the Free Software Foundation. 8 * --- 11 unchanged lines hidden (view full) --- 20 21#include <linux/atomic.h> 22#include <linux/byteorder/generic.h> 23#include <linux/etherdevice.h> 24#include <linux/fs.h> 25#include <linux/if_ether.h> 26#include <linux/jiffies.h> 27#include <linux/kernel.h> | 1/* Copyright (C) 2013-2015 B.A.T.M.A.N. contributors: 2 * 3 * Martin Hundebøll <martin@hundeboll.net> 4 * 5 * This program is free software; you can redistribute it and/or 6 * modify it under the terms of version 2 of the GNU General Public 7 * License as published by the Free Software Foundation. 8 * --- 11 unchanged lines hidden (view full) --- 20 21#include <linux/atomic.h> 22#include <linux/byteorder/generic.h> 23#include <linux/etherdevice.h> 24#include <linux/fs.h> 25#include <linux/if_ether.h> 26#include <linux/jiffies.h> 27#include <linux/kernel.h> |
28#include <linux/lockdep.h> |
|
28#include <linux/netdevice.h> 29#include <linux/pkt_sched.h> 30#include <linux/skbuff.h> 31#include <linux/slab.h> 32#include <linux/spinlock.h> 33#include <linux/string.h> 34 35#include "hard-interface.h" --- 71 unchanged lines hidden (view full) --- 107 * Caller must hold chain->lock. 108 * 109 * Returns true if chain is empty and caller can just insert the new fragment 110 * without searching for the right position. 111 */ 112static bool batadv_frag_init_chain(struct batadv_frag_table_entry *chain, 113 u16 seqno) 114{ | 29#include <linux/netdevice.h> 30#include <linux/pkt_sched.h> 31#include <linux/skbuff.h> 32#include <linux/slab.h> 33#include <linux/spinlock.h> 34#include <linux/string.h> 35 36#include "hard-interface.h" --- 71 unchanged lines hidden (view full) --- 108 * Caller must hold chain->lock. 109 * 110 * Returns true if chain is empty and caller can just insert the new fragment 111 * without searching for the right position. 112 */ 113static bool batadv_frag_init_chain(struct batadv_frag_table_entry *chain, 114 u16 seqno) 115{ |
116 lockdep_assert_held(&chain->lock); 117 |
|
115 if (chain->seqno == seqno) 116 return false; 117 118 if (!hlist_empty(&chain->head)) 119 batadv_frag_clear_chain(&chain->head); 120 121 chain->size = 0; 122 chain->seqno = seqno; --- 391 unchanged lines hidden --- | 118 if (chain->seqno == seqno) 119 return false; 120 121 if (!hlist_empty(&chain->head)) 122 batadv_frag_clear_chain(&chain->head); 123 124 chain->size = 0; 125 chain->seqno = seqno; --- 391 unchanged lines hidden --- |