iwlwifi: allocated rx page accounting cleanup
[safe/jmp/linux-2.6] / drivers / net / wireless / iwlwifi / iwl-hcmd.c
index 905645d..30e9ea6 100644 (file)
@@ -28,6 +28,7 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/sched.h>
 #include <net/mac80211.h>
 
 #include "iwl-dev.h" /* FIXME: remove */
@@ -199,13 +200,13 @@ int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd)
        }
 
        if (test_bit(STATUS_RF_KILL_HW, &priv->status)) {
-               IWL_DEBUG_INFO(priv, "Command %s aborted: RF KILL Switch\n",
+               IWL_ERR(priv, "Command %s aborted: RF KILL Switch\n",
                               get_cmd_string(cmd->id));
                ret = -ECANCELED;
                goto fail;
        }
        if (test_bit(STATUS_FW_ERROR, &priv->status)) {
-               IWL_DEBUG_INFO(priv, "Command %s failed: FW Error\n",
+               IWL_ERR(priv, "Command %s failed: FW Error\n",
                               get_cmd_string(cmd->id));
                ret = -EIO;
                goto fail;
@@ -233,7 +234,7 @@ cancel:
        }
 fail:
        if (cmd->reply_page) {
-               free_pages(cmd->reply_page, priv->hw_params.rx_page_order);
+               iwl_free_pages(priv, cmd->reply_page);
                cmd->reply_page = 0;
        }
 out: