diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c b/drivers/net/wireless/marvell/mwifiex/pcie.c index ac62bce50..293607e63 100644 --- a/drivers/net/wireless/marvell/mwifiex/pcie.c +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c @@ -1716,6 +1716,16 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter) } rx_len = get_unaligned_le16(skb->data); + + + if (rx_len == 0) { + mwifiex_dbg(adapter, ERROR, + "0 byte cmdrsp\n"); + mwifiex_map_pci_memory(adapter, skb, MWIFIEX_UPLD_SIZE, + PCI_DMA_FROMDEVICE); + return 0; + } + skb_put(skb, MWIFIEX_UPLD_SIZE - skb->len); skb_trim(skb, rx_len);