]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
wil6210: fix wrong index in wil_vring_free
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Thu, 11 Jul 2013 15:03:38 +0000 (18:03 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Jul 2013 20:54:37 +0000 (16:54 -0400)
When destroying Rx vring, branch for Rx used wrong Tx descriptor:
while SW context was taken for "head", HW descriptor was, by mistake,
taken from "tail"

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/txrx.c

index d240b24e1ccfafdd7d809c4b45951cbe2747a31a..8fde73aa6198cad4d31f701644dd4e52e957542a 100644 (file)
@@ -133,7 +133,7 @@ static void wil_vring_free(struct wil6210_priv *wil, struct vring *vring,
                } else { /* rx */
                        struct vring_rx_desc dd, *d = &dd;
                        volatile struct vring_rx_desc *_d =
-                                       &vring->va[vring->swtail].rx;
+                                       &vring->va[vring->swhead].rx;
 
                        *d = *_d;
                        pa = wil_desc_addr(&d->dma.addr);