Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c60f3fa authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by David S. Miller
Browse files

[CCID3]: Separate most of the packet history code



This also changes the list_for_each_entry_safe_continue behaviour to match its
kerneldoc comment, that is, to start after the pos passed.

Also adds several helper functions from previously open coded fragments, making
the code more clear.

Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
parent 540722ff
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -427,7 +427,8 @@ static inline void list_splice_init(struct list_head *list,
 * @member:	the name of the list_struct within the struct.
 */
#define list_for_each_entry_safe_continue(pos, n, head, member) 		\
	for (pos = n, n = list_entry(n->member.next, typeof(*n), member);	\
	for (pos = list_entry(pos->member.next, typeof(*pos), member), 		\
		n = list_entry(pos->member.next, typeof(*pos), member);		\
	     &pos->member != (head);						\
	     pos = n, n = list_entry(n->member.next, typeof(*n), member))

+2 −1
Original line number Diff line number Diff line
obj-$(CONFIG_IP_DCCP) += dccp.o

dccp-y := ccid.o input.o ipv4.o minisocks.o options.o output.o proto.o timer.o
dccp-y := ccid.o input.o ipv4.o minisocks.o options.o output.o proto.o \
	  timer.o packet_history.o

obj-y += ccids/
+134 −193

File changed.

Preview size limit exceeded, changes collapsed.

+0 −18
Original line number Diff line number Diff line
@@ -38,15 +38,6 @@

#include <linux/types.h>
#include <linux/list.h>
#include <linux/timer.h>

struct ccid3_tx_hist_entry {
	struct list_head	ccid3htx_node;
	u64			ccid3htx_seqno:48,
				ccid3htx_win_count:8,
				ccid3htx_sent:1;
	struct timeval		ccid3htx_tstamp;
};

struct ccid3_options_received {
	u64 ccid3or_seqno:48,
@@ -102,15 +93,6 @@ struct ccid3_loss_interval_hist_entry {
	u32			ccid3lih_interval;
};

struct ccid3_rx_hist_entry {
	struct list_head	ccid3hrx_node;
	u64			ccid3hrx_seqno:48,
				ccid3hrx_win_count:4,
				ccid3hrx_type:4;
	u32			ccid3hrx_ndp; /* In fact it is from 8 to 24 bits */
	struct timeval		ccid3hrx_tstamp;
};

struct ccid3_hc_rx_sock {
  	u64			ccid3hcrx_seqno_last_counter:48,
				ccid3hcrx_state:8,
+198 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading