From d6ed9408251e62c85e9af7cac67dfdfd6afc3918 Mon Sep 17 00:00:00 2001 From: Christian Lamparter Date: Fri, 23 Dec 2011 20:35:18 +0100 Subject: [PATCH] carl9170 firmware: double check if unlinked desc matches head desc Signed-off-by: Christian Lamparter --- carlfw/src/wlan.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/carlfw/src/wlan.c b/carlfw/src/wlan.c index bae584f..a7c805b 100644 --- a/carlfw/src/wlan.c +++ b/carlfw/src/wlan.c @@ -408,7 +408,11 @@ static bool wlan_tx_status(struct dma_queue *queue, * be aware of this so the frames don't get lost. */ +#ifndef CONFIG_CARL9170FW_DEBUG dma_unlink_head(queue); +#else /* CONFIG_CARL9170FW_DEBUG */ + BUG_ON(dma_unlink_head(queue) != desc); +#endif /* CONFIG_CARL9170FW_DEBUG */ dma_put(&fw.wlan.tx_retry, desc); return true; } @@ -418,7 +422,11 @@ static bool wlan_tx_status(struct dma_queue *queue, } } +#ifndef CONFIG_CARL9170FW_DEBUG dma_unlink_head(queue); +#else /* CONFIG_CARL9170FW_DEBUG */ + BUG_ON(dma_unlink_head(queue) != desc); +#endif /* CONFIG_CARL9170FW_DEBUG */ if (txfail) { /* * Issue the queue bump, -- 2.31.1