mt76: usb: remove WARN_ON in mt76u_get_rx_entry_len
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): cover.1537272524.git.lorenzo.bianconi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
PATCH 1/1 mt76: usb: remove WARN_ON in mt76u_get_rx_entry_len
Remove not useful WARN_ON macros in mt76u_get_rx_entry_len routine since corrupted frames should just be silently discarded
--- drivers/net/wireless/mediatek/mt76/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/mediatek/mt76/usb.c +3 -3
@@ -326,9 +326,9 @@ static int mt76u_get_rx_entry_len(u8 *data, u32 data_len) min_len =MT_DMA_HDR_LEN +MT_RX_RXWI_LEN +MT_FCE_INFO_LEN ; -if (data_len < min_len ||WARN_ON (!dma_len) || -WARN_ON (dma_len +MT_DMA_HDR_LEN > data_len) || -WARN_ON (dma_len &0x3 )) +if (data_len < min_len || !dma_len || + dma_len +MT_DMA_HDR_LEN > data_len || + (dma_len &0x3 ))return -EINVAL ;return dma_len; }
Signature · 1 line
2.17.1
A message that is not in the archive (sent off-list or not yet received): c9d8d73f3353c2ad953d8a298c52a32922ed2bcc.1537272524.git.lorenzo.bianconi-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
Felix Fietkau
AppliedQuoted 4 lines · Lorenzo Bianconi
Remove not useful
WARN_ONmacros inmt76u_get_rx_entry_lenroutine since corrupted frames should just be silently discardedSigned-off-by Lorenzo Bianconi <[email protected]>
Merged, thanks.