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: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://msgid.link/20231019070750.17911-1-dmantipov@yandex.ru
This commit is contained in:
committed by
Kalle Valo
parent
50180c7f8e
commit
173b0fb47c
@@ -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);
|
||||
skb_put(skb, icv_len - align);
|
||||
|
||||
/* Move ieee80211 header */
|
||||
memmove(skb->data + transfer,
|
||||
|
||||
Reference in New Issue
Block a user