mt76: dma: do not build skb if reported len does not fit in buf_size
authorLorenzo Bianconi <lorenzo.bianconi@redhat.com>
Mon, 3 Dec 2018 14:34:24 +0000 (15:34 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 11 Jan 2019 14:10:18 +0000 (15:10 +0100)
commit87e86f90196fa074f8f6ac0e77d1287d9239878b
tree3a5dd165afb11c5e46a174736a60ebdf8740b9ab
parentc09f4d0a1f81720342d4d0e1d4a2b601903f132a
mt76: dma: do not build skb if reported len does not fit in buf_size

Precompute data length in order to avoid to allocate the related
skb data structure if reported length does not fit in queue buf_size

Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c