carl9170 firmware: fix terminator assert
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 23 Dec 2011 00:22:28 +0000 (01:22 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 23 Dec 2011 00:22:28 +0000 (01:22 +0100)
While calculating the number of assigned
terminator descriptors is easy enough for
an human at "compile" time, gcc isn't that
clever. Therefore the check has to run at
runtime.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
carlfw/src/dma.c

index d79552272381d6ba7f6e1f9fcd52fa1f1be3e6cc..9b83fcf9b4777ff2ff048a66af94695479d2fe37 100644 (file)
@@ -93,7 +93,7 @@ void dma_init_descriptors(void)
                init_queue(&fw.wlan.cab_queue[j], &dma_mem.terminator[i++]);
 #endif /* CONFIG_CARL9170FW_CAB_QUEUE */
 
-       BUILD_BUG_ON(AR9170_TERMINATOR_NUMBER != j);
+       BUG_ON(AR9170_TERMINATOR_NUMBER != i);
 
        DBG("Blocks:%d [tx:%d, rx:%d] Terminators:%d/%d\n",
            AR9170_BLOCK_NUMBER, AR9170_TX_BLOCK_NUMBER,