Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / drivers / net / wireless / iwlwifi / iwl-core.c
index c5fa232..fa3d5ba 100644 (file)
@@ -42,6 +42,7 @@
 #include "iwl-sta.h"
 #include "iwl-helpers.h"
 #include "iwl-agn.h"
+#include "iwl-trans.h"
 
 u32 iwl_debug_level;
 
@@ -375,8 +376,8 @@ int iwl_send_rxon_timing(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
                        le32_to_cpu(ctx->timing.beacon_init_val),
                        le16_to_cpu(ctx->timing.atim_window));
 
-       return iwl_send_cmd_pdu(priv, ctx->rxon_timing_cmd,
-                               sizeof(ctx->timing), &ctx->timing);
+       return trans_send_cmd_pdu(priv, ctx->rxon_timing_cmd,
+                               CMD_SYNC, sizeof(ctx->timing), &ctx->timing);
 }
 
 void iwl_set_rxon_hwcrypto(struct iwl_priv *priv, struct iwl_rxon_context *ctx,
@@ -585,8 +586,7 @@ static void _iwl_set_rxon_ht(struct iwl_priv *priv,
                rxon->flags |= RXON_FLG_CHANNEL_MODE_LEGACY;
        }
 
-       if (priv->cfg->ops->hcmd->set_rxon_chain)
-               priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);
+       iwlagn_set_rxon_chain(priv, ctx);
 
        IWL_DEBUG_ASSOC(priv, "rxon flags 0x%X operation mode :0x%X "
                        "extension channel offset 0x%x\n",
@@ -1132,8 +1132,8 @@ void iwl_send_bt_config(struct iwl_priv *priv)
        IWL_DEBUG_INFO(priv, "BT coex %s\n",
                (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active");
 
-       if (iwl_send_cmd_pdu(priv, REPLY_BT_CONFIG,
-                            sizeof(struct iwl_bt_cmd), &bt_cmd))
+       if (trans_send_cmd_pdu(priv, REPLY_BT_CONFIG,
+                            CMD_SYNC, sizeof(struct iwl_bt_cmd), &bt_cmd))
                IWL_ERR(priv, "failed to send BT Coex Config\n");
 }
 
@@ -1145,11 +1145,13 @@ int iwl_send_statistics_request(struct iwl_priv *priv, u8 flags, bool clear)
        };
 
        if (flags & CMD_ASYNC)
-               return iwl_send_cmd_pdu_async(priv, REPLY_STATISTICS_CMD,
+               return trans_send_cmd_pdu(priv, REPLY_STATISTICS_CMD,
+                                             CMD_ASYNC,
                                               sizeof(struct iwl_statistics_cmd),
-                                              &statistics_cmd, NULL);
+                                              &statistics_cmd);
        else
-               return iwl_send_cmd_pdu(priv, REPLY_STATISTICS_CMD,
+               return trans_send_cmd_pdu(priv, REPLY_STATISTICS_CMD,
+                                       CMD_SYNC,
                                        sizeof(struct iwl_statistics_cmd),
                                        &statistics_cmd);
 }
@@ -1216,8 +1218,7 @@ static int iwl_set_mode(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
 {
        iwl_connection_init_rx_config(priv, ctx);
 
-       if (priv->cfg->ops->hcmd->set_rxon_chain)
-               priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx);
+       iwlagn_set_rxon_chain(priv, ctx);
 
        return iwlagn_commit_rxon(priv, ctx);
 }
@@ -1372,26 +1373,6 @@ void iwl_mac_remove_interface(struct ieee80211_hw *hw,
 
 }
 
-int iwl_alloc_txq_mem(struct iwl_priv *priv)
-{
-       if (!priv->txq)
-               priv->txq = kzalloc(
-                       sizeof(struct iwl_tx_queue) *
-                               priv->cfg->base_params->num_of_queues,
-                       GFP_KERNEL);
-       if (!priv->txq) {
-               IWL_ERR(priv, "Not enough memory for txq\n");
-               return -ENOMEM;
-       }
-       return 0;
-}
-
-void iwl_free_txq_mem(struct iwl_priv *priv)
-{
-       kfree(priv->txq);
-       priv->txq = NULL;
-}
-
 #ifdef CONFIG_IWLWIFI_DEBUGFS
 
 #define IWL_TRAFFIC_DUMP_SIZE  (IWL_TRAFFIC_ENTRY_SIZE * IWL_TRAFFIC_ENTRIES)