diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-09-06 12:31:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-09-14 13:56:39 -0400 |
commit | 7a10e3e4076d09779da5a02b0ab6ce551d964d48 (patch) | |
tree | 834513ac8bc52836c94f4df3676e4125174f8f74 /drivers/net/wireless/iwlwifi/iwl-trans.c | |
parent | 41f5e0475c7c04b17b207736146187636b04eb4c (diff) |
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.c | 12 |
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 @@ | |||
71 | #include "iwl-prph.h" | 71 | #include "iwl-prph.h" |
72 | #include "iwl-shared.h" | 72 | #include "iwl-shared.h" |
73 | #include "iwl-eeprom.h" | 73 | #include "iwl-eeprom.h" |
74 | 74 | #include "iwl-agn-hw.h" | |
75 | /* TODO: the transport layer should not include this */ | ||
76 | #include "iwl-core.h" | ||
77 | 75 | ||
78 | static int iwl_trans_rx_alloc(struct iwl_trans *trans) | 76 | static int iwl_trans_rx_alloc(struct iwl_trans *trans) |
79 | { | 77 | { |
@@ -638,7 +636,7 @@ static int iwl_nic_init(struct iwl_trans *trans) | |||
638 | 636 | ||
639 | iwl_set_pwr_vmain(trans); | 637 | iwl_set_pwr_vmain(trans); |
640 | 638 | ||
641 | priv(trans)->cfg->lib->nic_config(priv(trans)); | 639 | iwl_nic_config(priv(trans)); |
642 | 640 | ||
643 | /* Allocate the RX queue, or reset if it is already allocated */ | 641 | /* Allocate the RX queue, or reset if it is already allocated */ |
644 | iwl_rx_init(trans); | 642 | iwl_rx_init(trans); |
@@ -831,8 +829,6 @@ static void iwl_trans_txq_set_sched(struct iwl_trans *trans, u32 mask) | |||
831 | static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) | 829 | static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) |
832 | { | 830 | { |
833 | const struct queue_to_fifo_ac *queue_to_fifo; | 831 | const struct queue_to_fifo_ac *queue_to_fifo; |
834 | struct iwl_rxon_context *ctx; | ||
835 | struct iwl_priv *priv = priv(trans); | ||
836 | struct iwl_trans_pcie *trans_pcie = | 832 | struct iwl_trans_pcie *trans_pcie = |
837 | IWL_TRANS_GET_PCIE_TRANS(trans); | 833 | IWL_TRANS_GET_PCIE_TRANS(trans); |
838 | u32 a; | 834 | u32 a; |
@@ -900,7 +896,7 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) | |||
900 | iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7)); | 896 | iwl_trans_txq_set_sched(trans, IWL_MASK(0, 7)); |
901 | 897 | ||
902 | /* map queues to FIFOs */ | 898 | /* map queues to FIFOs */ |
903 | if (priv->valid_contexts != BIT(IWL_RXON_CTX_BSS)) | 899 | if (trans->shrd->valid_contexts != BIT(IWL_RXON_CTX_BSS)) |
904 | queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo; | 900 | queue_to_fifo = iwlagn_ipan_queue_to_tx_fifo; |
905 | else | 901 | else |
906 | queue_to_fifo = iwlagn_default_queue_to_tx_fifo; | 902 | queue_to_fifo = iwlagn_default_queue_to_tx_fifo; |
@@ -912,8 +908,6 @@ static void iwl_trans_pcie_tx_start(struct iwl_trans *trans) | |||
912 | sizeof(trans_pcie->queue_stopped)); | 908 | sizeof(trans_pcie->queue_stopped)); |
913 | for (i = 0; i < 4; i++) | 909 | for (i = 0; i < 4; i++) |
914 | atomic_set(&trans_pcie->queue_stop_count[i], 0); | 910 | atomic_set(&trans_pcie->queue_stop_count[i], 0); |
915 | for_each_context(priv, ctx) | ||
916 | ctx->last_tx_rejected = false; | ||
917 | 911 | ||
918 | /* reset to 0 to enable all the queue first */ | 912 | /* reset to 0 to enable all the queue first */ |
919 | trans_pcie->txq_ctx_active_msk = 0; | 913 | trans_pcie->txq_ctx_active_msk = 0; |