Commit 09dbcd8b authored by Lorenzo Bianconi's avatar Lorenzo Bianconi Committed by Felix Fietkau

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
Signed-off-by: default avatarLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent deb9350c
...@@ -383,9 +383,9 @@ static int mt76u_get_rx_entry_len(u8 *data, u32 data_len) ...@@ -383,9 +383,9 @@ static int mt76u_get_rx_entry_len(u8 *data, u32 data_len)
min_len = MT_DMA_HDR_LEN + MT_RX_RXWI_LEN + min_len = MT_DMA_HDR_LEN + MT_RX_RXWI_LEN +
MT_FCE_INFO_LEN; MT_FCE_INFO_LEN;
if (data_len < min_len || WARN_ON(!dma_len) || if (data_len < min_len || !dma_len ||
WARN_ON(dma_len + MT_DMA_HDR_LEN > data_len) || dma_len + MT_DMA_HDR_LEN > data_len ||
WARN_ON(dma_len & 0x3)) (dma_len & 0x3))
return -EINVAL; return -EINVAL;
return dma_len; return dma_len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment