]> Git Repo - linux.git/commitdiff
mwifiex: corrections in PCIe event skb handling
authorAmitkumar Karwar <[email protected]>
Wed, 22 Jul 2015 11:53:45 +0000 (04:53 -0700)
committerKalle Valo <[email protected]>
Thu, 6 Aug 2015 07:14:00 +0000 (10:14 +0300)
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 <[email protected]>
Signed-off-by: Zhaoyang Liu <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
drivers/net/wireless/mwifiex/pcie.c

index 77b9055a2d147411515b5875f67b90210938ac9b..33c75d7410175264af3fb1a4cbb68be50a716a74 100644 (file)
@@ -1807,6 +1807,8 @@ static int mwifiex_pcie_event_complete(struct mwifiex_adapter *adapter,
 
        if (!card->evt_buf_list[rdptr]) {
                skb_push(skb, INTF_HEADER_LEN);
+               skb_put(skb, MAX_EVENT_SIZE - skb->len);
+               memset(skb->data, 0, MAX_EVENT_SIZE);
                if (mwifiex_map_pci_memory(adapter, skb,
                                           MAX_EVENT_SIZE,
                                           PCI_DMA_FROMDEVICE))
This page took 0.064326 seconds and 4 git commands to generate.