Skip to content

Commit 2728cec

Browse files
Amitkumar KarwarKalle Valo
authored andcommitted
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>
1 parent d788ac2 commit 2728cec

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/wireless/mwifiex

1 file changed

+2
-0
lines changed

drivers/net/wireless/mwifiex/pcie.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,6 +1807,8 @@ static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter,
18071807

18081808
if (!card->evt_buf_list[rdptr]) {
18091809
skb_push(skb, INTF_HEADER_LEN);
1810+
skb_put(skb, MAX_EVENT_SIZE - skb->len);
1811+
memset(skb->data, 0, MAX_EVENT_SIZE);
18101812
if (mwifiex_map_pci_memory(adapter, skb,
18111813
MAX_EVENT_SIZE,
18121814
PCI_DMA_FROMDEVICE))

0 commit comments

Comments
 (0)