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

Commit e0f08596 authored by Allan Stephens's avatar Allan Stephens Committed by Paul Gortmaker
Browse files

tipc: Avoid pointless masking of fragmented message identifier



Eliminates code that restricts a link's counter of its fragmented
messages to a 16-bit value, since the counter value is automatically
restricted to this range when it is written into the message header.

Signed-off-by: default avatarAllan Stephens <allan.stephens@windriver.com>
Signed-off-by: default avatarPaul Gortmaker <paul.gortmaker@windriver.com>
parent 670c5408
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1276,7 +1276,7 @@ static int link_send_sections_long(struct tipc_port *sender,
	/* Append whole chain to send queue: */
	/* Append whole chain to send queue: */


	buf = buf_chain;
	buf = buf_chain;
	l_ptr->long_msg_seq_no = mod(l_ptr->long_msg_seq_no + 1);
	l_ptr->long_msg_seq_no++;
	if (!l_ptr->next_out)
	if (!l_ptr->next_out)
		l_ptr->next_out = buf_chain;
		l_ptr->next_out = buf_chain;
	l_ptr->stats.sent_fragmented++;
	l_ptr->stats.sent_fragmented++;
@@ -2426,7 +2426,7 @@ static int link_send_long_buf(struct link *l_ptr, struct sk_buff *buf)


	tipc_msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT,
	tipc_msg_init(&fragm_hdr, MSG_FRAGMENTER, FIRST_FRAGMENT,
		 INT_H_SIZE, destaddr);
		 INT_H_SIZE, destaddr);
	msg_set_long_msgno(&fragm_hdr, mod(l_ptr->long_msg_seq_no++));
	msg_set_long_msgno(&fragm_hdr, l_ptr->long_msg_seq_no++);
	msg_set_fragm_no(&fragm_hdr, fragm_no);
	msg_set_fragm_no(&fragm_hdr, fragm_no);
	l_ptr->stats.sent_fragmented++;
	l_ptr->stats.sent_fragmented++;