summaryrefslogtreecommitdiff
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAmitkumar Karwar <akarwar@marvell.com>2015-07-22 04:53:45 -0700
committerKalle Valo <kvalo@codeaurora.org>2015-08-06 10:14:00 +0300
commit2728cecdc7d6bf3d216fc406718d88c35f4d09eb (patch)
tree339e0032347a4680c82400aa12d0d0c0268038b9 /drivers/net/wireless
parentd788ac29793ae591801103b714c20ca3ae311c21 (diff)
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/mwifiex/pcie.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
index 77b9055a2d14..33c75d741017 100644
--- a/drivers/net/wireless/mwifiex/pcie.c
+++ b/drivers/net/wireless/mwifiex/pcie.c
@@ -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))