]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ath9k: fix possible hang on flush
authorTim Harvey <tharvey@gateworks.com>
Mon, 21 Apr 2014 23:14:56 +0000 (16:14 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 22 Apr 2014 18:09:37 +0000 (14:09 -0400)
If a flush is requested, make sure to clear the descriptor once we've
processed it.

This resolves a hang that will occur if all RX descriptors are full when a
flush is requested.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/recv.c

index 6c9accdb52e4140076d7378f530e975c34f68433..e77a2536b818e986ad617bbbdf2413de353199ec 100644 (file)
@@ -1113,14 +1113,13 @@ requeue_drop_frag:
                }
 requeue:
                list_add_tail(&bf->list, &sc->rx.rxbuf);
-               if (flush)
-                       continue;
 
                if (edma) {
                        ath_rx_edma_buf_link(sc, qtype);
                } else {
                        ath_rx_buf_relink(sc, bf);
-                       ath9k_hw_rxena(ah);
+                       if (!flush)
+                               ath9k_hw_rxena(ah);
                }
        } while (1);