aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-07-08 11:46:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-11 15:02:02 -0400
commit06f491ef4b659fa6f6850f31d05a4a03db0d9d96 (patch)
tree83a5bd89cf96ec78f26454d1719dca55e258fbe9 /drivers/net/wireless
parentc170b867cc119fb9f6e9cac3a8245a3347bc718c (diff)
iwlagn: remove code duplication
Code duplication was needed during the move, not needed any more. 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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c21
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.c1
2 files changed, 0 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index f29b31d73be6..db3ec7aaf944 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -830,27 +830,6 @@ drop_unlock_priv:
830 return -1; 830 return -1;
831} 831}
832 832
833static inline int iwlagn_alloc_dma_ptr(struct iwl_priv *priv,
834 struct iwl_dma_ptr *ptr, size_t size)
835{
836 ptr->addr = dma_alloc_coherent(priv->bus.dev, size,
837 &ptr->dma, GFP_KERNEL);
838 if (!ptr->addr)
839 return -ENOMEM;
840 ptr->size = size;
841 return 0;
842}
843
844static inline void iwlagn_free_dma_ptr(struct iwl_priv *priv,
845 struct iwl_dma_ptr *ptr)
846{
847 if (unlikely(!ptr->addr))
848 return;
849
850 dma_free_coherent(priv->bus.dev, ptr->size, ptr->addr, ptr->dma);
851 memset(ptr, 0, sizeof(*ptr));
852}
853
854/* 833/*
855 * Find first available (lowest unused) Tx Queue, mark it "active". 834 * Find first available (lowest unused) Tx Queue, mark it "active".
856 * Called only when finding queue for aggregation. 835 * Called only when finding queue for aggregation.
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.c b/drivers/net/wireless/iwlwifi/iwl-trans.c
index 81716fdd593a..de627f9ae10a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.c
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.c
@@ -197,7 +197,6 @@ static int iwl_trans_rx_stop(struct iwl_priv *priv)
197 FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000); 197 FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000);
198} 198}
199 199
200/* TODO:remove this code duplication */
201static inline int iwlagn_alloc_dma_ptr(struct iwl_priv *priv, 200static inline int iwlagn_alloc_dma_ptr(struct iwl_priv *priv,
202 struct iwl_dma_ptr *ptr, size_t size) 201 struct iwl_dma_ptr *ptr, size_t size)
203{ 202{