Commit 173b0fb4 authored by Dmitry Antipov's avatar Dmitry Antipov Committed by Kalle Valo
Browse files

wifi: rt2x00: simplify rt2x00crypto_rx_insert_iv()



In 'rt2x00crypto_rx_insert_iv()', added alignment can't exceed 3
bytes and ICV size is either 4 or 8 bytes, so skb space adjustment
may be simplified. Compile tested only.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: default avatarDmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231019070750.17911-1-dmantipov@yandex.ru
parent 50180c7f
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -197,10 +197,7 @@ void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
		transfer += header_length;
	} else {
		skb_push(skb, iv_len + align);
		if (align < icv_len)
		skb_put(skb, icv_len - align);
		else if (align > icv_len)
			skb_trim(skb, rxdesc->size + iv_len + icv_len);

		/* Move ieee80211 header */
		memmove(skb->data + transfer,