]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
iwlagn: downgrade BUG_ON in interrupt
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 23 Sep 2008 17:18:43 +0000 (19:18 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 24 Sep 2008 20:18:04 +0000 (16:18 -0400)
This BUG_ON really shouldn't trigger, but if it does, as on my machine,
it leaves you wondering what happened because you won't see it. Let's
instead leak a bit of state and memory and at least make it possible to
report it to the kerneloops project to track it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-tx.c

index e9feca4033f93834d39b88f6b3d85a9df1682e3c..907a53ebc6e4dc62fc7a5226b6706af72d1e0d85 100644 (file)
@@ -1200,10 +1200,9 @@ void iwl_tx_cmd_complete(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb)
        /* If a Tx command is being handled and it isn't in the actual
         * command queue then there a command routing bug has been introduced
         * in the queue management code. */
-       if (txq_id != IWL_CMD_QUEUE_NUM)
-               IWL_ERROR("Error wrong command queue %d command id 0x%X\n",
-                         txq_id, pkt->hdr.cmd);
-       BUG_ON(txq_id != IWL_CMD_QUEUE_NUM);
+       if (WARN(txq_id != IWL_CMD_QUEUE_NUM,
+                "wrong command queue %d, command id 0x%X\n", txq_id, pkt->hdr.cmd))
+               return;
 
        cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge);
        cmd = priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index];