aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-09-06 09:31:21 -0700
committerJohn W. Linville <linville@tuxdriver.com>2011-09-14 13:56:39 -0400
commit7a10e3e4076d09779da5a02b0ab6ce551d964d48 (patch)
tree834513ac8bc52836c94f4df3676e4125174f8f74 /drivers/net/wireless/iwlwifi/iwl-trans.c
parentiwlagn: move traffic_log back to upper layer (diff)
downloadlinux-dev-7a10e3e4076d09779da5a02b0ab6ce551d964d48.tar.xz
linux-dev-7a10e3e4076d09779da5a02b0ab6ce551d964d48.zip
iwlagn: iwl-trans.c can't dereference iwl_priv any more
This reaches encapsulation for this file. In order to reach this: * move priv->valid_context to iwl_shared * move the last_rejected initialization to the upper layer * define a wrapper iwl_nic_config in the upper layer that calls to cfg->lib->ops->nic_config Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c
index 28fbaa2517a0..5bf6250612ec 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.c
@@ -71,9 +71,7 @@
#include "iwl-prph.h"
#include "iwl-shared.h"
#include "iwl-eeprom.h"
-
-/* TODO: the transport layer should not include this */
-#include "iwl-core.h"
+#include "iwl-agn-hw.h"
static int iwl_trans_rx_alloc(struct iwl_trans *trans)
{
@@ -638,7 +636,7 @@ static int iwl_nic_init(struct iwl_trans *trans)
iwl_set_pwr_vmain(trans);
- priv(trans)->cfg->lib->nic_config(priv(trans));
+ iwl_nic_config(priv(trans));
/* Allocate the RX queue, or reset if it is already allocated */
iwl_rx_init(trans);
@@ -831,8 +829,6 @@ static void iwl_trans_txq_set_sched(struct iwl_trans *trans, u32 mask)
static void iwl_trans_pcie_tx_start(struct iwl_trans *trans)
{
const struct queue_to_fifo_ac *queue_to_fifo;
- struct iwl_rxon_context *ctx;
- struct iwl_priv *priv = priv(trans);
struct iwl_trans_pcie *trans_pcie =
IWL_TRANS_GET_PCIE_TRANS(trans);
u32 a;
@@ -900,7 +896,7 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans)
iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7));
/* map queues to FIFOs */
- if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS))
+ if (trans->shrd->valid_contexts != BIT(IWL_RXON_CTX_BSS))
queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo;
else
queue_to_fifo = iwlagn_default_queue_to_tx_fifo;
@@ -912,8 +908,6 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans)
sizeof(trans_pcie->queue_stopped));
for (i = 0; i < 4; i++)
atomic_set(&trans_pcie->queue_stop_count[i], 0);
- for_each_context(priv, ctx)
- ctx->last_tx_rejected = false;
/* reset to 0 to enable all the queue first */
trans_pcie->txq_ctx_active_msk = 0;