check len on cmd complete
This commit is contained in:
parent
198e84c4f7
commit
bb23bd6b66
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue