Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mwifiex: corrections in PCIe event skb handling

Preallocated event SKBs are getting reused for PCIe chipset.
Their physical addresses are shared with firmware so that
firmware can write data into them.

This patch makes sure that SKB is cleared and length is set to
default while submitting it to firmware.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Zhaoyang Liu <liuzy@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Amitkumar Karwar and committed by
Kalle Valo
2728cecd d788ac29

+2
+2
drivers/net/wireless/mwifiex/pcie.c
··· 1807 1807 1808 1808 if (!card->evt_buf_list[rdptr]) { 1809 1809 skb_push(skb, INTF_HEADER_LEN); 1810 + skb_put(skb, MAX_EVENT_SIZE - skb->len); 1811 + memset(skb->data, 0, MAX_EVENT_SIZE); 1810 1812 if (mwifiex_map_pci_memory(adapter, skb, 1811 1813 MAX_EVENT_SIZE, 1812 1814 PCI_DMA_FROMDEVICE))