From: Christian Lamparter Date: Fri, 23 Dec 2011 19:35:18 +0000 (+0100) Subject: carl9170 firmware: double check if unlinked desc matches head desc X-Git-Tag: 1.9.5~7 X-Git-Url: https://jxself.org/git/?p=carl9170fw.git;a=commitdiff_plain;h=d6ed9408251e62c85e9af7cac67dfdfd6afc3918 carl9170 firmware: double check if unlinked desc matches head desc Signed-off-by: Christian Lamparter --- 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,