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

Commit e40a9768 authored by Yeshwanth Sriram Guntuka's avatar Yeshwanth Sriram Guntuka Committed by Madan Koyyalamudi
Browse files

qcacmn: Modify check to ensure consecutive PN for frags

Modify check to ensure packet number is consecutive for
fragments and drop the fragments if the check fails.

Change-Id: I2ca0ef6211594ba35aae894e6a385d3d5778bff6
CRs-Fixed: 2874369
parent 1b1fc5a6
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2017-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021 The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -853,9 +853,9 @@ static int dp_rx_defrag_pn_check(qdf_nbuf_t msdu,
		((uint64_t)rx_mpdu_info_details->pn_127_96 << 32);

	if (cur_pn128[1] == prev_pn128[1])
		out_of_order = (cur_pn128[0] <= prev_pn128[0]);
		out_of_order = (cur_pn128[0] - prev_pn128[0] != 1);
	else
		out_of_order = (cur_pn128[1] < prev_pn128[1]);
		out_of_order = (cur_pn128[1] - prev_pn128[1] != 1);

	return out_of_order;
}