Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6a218f6f3b1679c3f12c487131f0be5b2841bfbe
Commit:     6a218f6f3b1679c3f12c487131f0be5b2841bfbe
Parent:     440d42c30cb86eb1b6dbc0d84b9b52e2476fa5e3
Author:     Tomas Winkler <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 14 17:46:15 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:09:55 2008 -0800

    iwlwifi: move iwl4965_get_dma_hi_address function to iwl-helpers.h
    
    This patch moves iwl4965_get_dma_hi_address function to iwl-headers.h
    as iwl_get_dma_hi_address. This function will be used in more chipsets
    than only 4965.
    
    Signed-off-by: Tomas Winkler <[EMAIL PROTECTED]>
    Signed-off-by: Zhu Yi <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 drivers/net/wireless/iwlwifi/iwl-4965.c    |    9 ++-------
 drivers/net/wireless/iwlwifi/iwl-helpers.h |    5 +++++
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c 
b/drivers/net/wireless/iwlwifi/iwl-4965.c
index b913c6b..a945788 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -2797,11 +2797,6 @@ int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, 
struct iwl4965_tx_queue
        return 0;
 }
 
-static inline u8 iwl4965_get_dma_hi_address(dma_addr_t addr)
-{
-       return sizeof(addr) > sizeof(u32) ? (addr >> 16) >> 16 : 0;
-}
-
 int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr,
                                 dma_addr_t addr, u16 len)
 {
@@ -2822,7 +2817,7 @@ int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv 
*priv, void *ptr,
        if (!is_odd) {
                tfd->pa[index].tb1_addr = cpu_to_le32(addr);
                IWL_SET_BITS(tfd->pa[index], tb1_addr_hi,
-                            iwl4965_get_dma_hi_address(addr));
+                            iwl_get_dma_hi_address(addr));
                IWL_SET_BITS(tfd->pa[index], tb1_len, len);
        } else {
                IWL_SET_BITS(tfd->pa[index], tb2_addr_lo16,
@@ -3289,7 +3284,7 @@ int iwl4965_tx_cmd(struct iwl4965_priv *priv, struct 
iwl4965_cmd *out_cmd,
        scratch_phys = txcmd_phys + sizeof(struct iwl4965_cmd_header) +
            offsetof(struct iwl4965_tx_cmd, scratch);
        tx->dram_lsb_ptr = cpu_to_le32(scratch_phys);
-       tx->dram_msb_ptr = iwl4965_get_dma_hi_address(scratch_phys);
+       tx->dram_msb_ptr = iwl_get_dma_hi_address(scratch_phys);
 
        /* Hard coded to start at the highest retry fallback position
         * until the 4965 specific rate control algorithm is tied in */
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h 
b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index e2a8d95..5228834 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -252,4 +252,9 @@ static inline unsigned long elapsed_jiffies(unsigned long 
start,
        return end + (MAX_JIFFY_OFFSET - start);
 }
 
+static inline u8 iwl_get_dma_hi_address(dma_addr_t addr)
+{
+       return sizeof(addr) > sizeof(u32) ? (addr >> 16) >> 16 : 0;
+}
+
 #endif                         /* __iwl_helpers_h__ */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to