Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3b3fce0 authored by Ahmad Masri's avatar Ahmad Masri
Browse files

wil6210: zero out the entire RX descriptor during allocation



RX descriptor occasionally contains invalid MCS and other info
that was not properly flushed.

Change-Id: Ib9edd13658be849eaf06f32444606d59d68a348b
Signed-off-by: default avatarAhmad Masri <amasri@codeaurora.org>
parent aea06a3b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
/*
 * Copyright (c) 2012-2017 Qualcomm Atheros, Inc.
 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
@@ -323,14 +324,13 @@ static int wil_vring_alloc_skb(struct wil6210_priv *wil, struct vring *vring,
		return -ENOMEM;
	}

	d->mac.pn_15_0 = 0;
	d->mac.pn_47_16 = 0;
	memset(d, 0, sizeof(*d));
	d->dma.d0 = RX_DMA_D0_CMD_DMA_RT | RX_DMA_D0_CMD_DMA_IT;
	wil_desc_addr_set(&d->dma.addr, pa);
	/* ip_length don't care */
	/* b11 don't care */
	/* error don't care */
	d->dma.status = 0; /* BIT(0) should be 0 for HW_OWNED */
	/* BIT(0) of dma status should be 0 for HW_OWNED */
	d->dma.length = cpu_to_le16(sz);
	*_d = *d;
	vring->ctx[i].skb = skb;