iwlwifi: iwl_{read,write}_targ_mem_words takes dwords
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 6 Jun 2012 05:18:40 +0000 (08:18 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 13 Jun 2012 07:01:01 +0000 (09:01 +0200)
Change its name to better reflect this.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/mac80211.c
drivers/net/wireless/iwlwifi/iwl-io.c
drivers/net/wireless/iwlwifi/iwl-io.h
drivers/net/wireless/iwlwifi/iwl-test.c

index f60be3993e8175d3e54b7d03706abbe237c6d2b9..7f49526222a8cb0426fc923633c291b757571a70 100644 (file)
@@ -473,7 +473,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
                        }
 
                        if (priv->wowlan_sram)
-                               _iwl_read_targ_mem_words(
+                               _iwl_read_targ_mem_dwords(
                                      priv->trans, 0x800000,
                                      priv->wowlan_sram,
                                      img->sec[IWL_UCODE_SECTION_DATA].len / 4);
index 5f2df70b73c1b24b054f14d172a85d14aab07413..66c873399abad9679093788fe29a22591430c532 100644 (file)
@@ -298,8 +298,8 @@ void iwl_clear_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask)
 }
 EXPORT_SYMBOL_GPL(iwl_clear_bits_prph);
 
-void _iwl_read_targ_mem_words(struct iwl_trans *trans, u32 addr,
-                             void *buf, int words)
+void _iwl_read_targ_mem_dwords(struct iwl_trans *trans, u32 addr,
+                              void *buf, int dwords)
 {
        unsigned long flags;
        int offs;
@@ -308,26 +308,26 @@ void _iwl_read_targ_mem_words(struct iwl_trans *trans, u32 addr,
        spin_lock_irqsave(&trans->reg_lock, flags);
        if (likely(iwl_grab_nic_access(trans))) {
                iwl_write32(trans, HBUS_TARG_MEM_RADDR, addr);
-               for (offs = 0; offs < words; offs++)
+               for (offs = 0; offs < dwords; offs++)
                        vals[offs] = iwl_read32(trans, HBUS_TARG_MEM_RDAT);
                iwl_release_nic_access(trans);
        }
        spin_unlock_irqrestore(&trans->reg_lock, flags);
 }
-EXPORT_SYMBOL_GPL(_iwl_read_targ_mem_words);
+EXPORT_SYMBOL_GPL(_iwl_read_targ_mem_dwords);
 
 u32 iwl_read_targ_mem(struct iwl_trans *trans, u32 addr)
 {
        u32 value;
 
-       _iwl_read_targ_mem_words(trans, addr, &value, 1);
+       _iwl_read_targ_mem_dwords(trans, addr, &value, 1);
 
        return value;
 }
 EXPORT_SYMBOL_GPL(iwl_read_targ_mem);
 
-int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr,
-                               void *buf, int words)
+int _iwl_write_targ_mem_dwords(struct iwl_trans *trans, u32 addr,
+                              void *buf, int dwords)
 {
        unsigned long flags;
        int offs, result = 0;
@@ -336,7 +336,7 @@ int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr,
        spin_lock_irqsave(&trans->reg_lock, flags);
        if (likely(iwl_grab_nic_access(trans))) {
                iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr);
-               for (offs = 0; offs < words; offs++)
+               for (offs = 0; offs < dwords; offs++)
                        iwl_write32(trans, HBUS_TARG_MEM_WDAT, vals[offs]);
                iwl_release_nic_access(trans);
        } else
@@ -345,10 +345,10 @@ int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr,
 
        return result;
 }
-EXPORT_SYMBOL_GPL(_iwl_write_targ_mem_words);
+EXPORT_SYMBOL_GPL(_iwl_write_targ_mem_dwords);
 
 int iwl_write_targ_mem(struct iwl_trans *trans, u32 addr, u32 val)
 {
-       return _iwl_write_targ_mem_words(trans, addr, &val, 1);
+       return _iwl_write_targ_mem_dwords(trans, addr, &val, 1);
 }
 EXPORT_SYMBOL_GPL(iwl_write_targ_mem);
index 45a59c940f81cf35a0983f2c64194d9dc96fd159..50d3819739d12bd8296b3be9dec03425a488f45a 100644 (file)
@@ -76,18 +76,18 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 reg,
                            u32 bits, u32 mask);
 void iwl_clear_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask);
 
-void _iwl_read_targ_mem_words(struct iwl_trans *trans, u32 addr,
-                             void *buf, int words);
+void _iwl_read_targ_mem_dwords(struct iwl_trans *trans, u32 addr,
+                              void *buf, int dwords);
 
 #define iwl_read_targ_mem_bytes(trans, addr, buf, bufsize)     \
        do {                                                    \
                BUILD_BUG_ON((bufsize) % sizeof(u32));          \
-               _iwl_read_targ_mem_words(trans, addr, buf,      \
-                                        (bufsize) / sizeof(u32));\
+               _iwl_read_targ_mem_dwords(trans, addr, buf,     \
+                                         (bufsize) / sizeof(u32));\
        } while (0)
 
-int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr,
-                             void *buf, int words);
+int _iwl_write_targ_mem_dwords(struct iwl_trans *trans, u32 addr,
+                              void *buf, int dwords);
 
 u32 iwl_read_targ_mem(struct iwl_trans *trans, u32 addr);
 int iwl_write_targ_mem(struct iwl_trans *trans, u32 addr, u32 val);
index 7a264aee2534f55a3ee8f8c23a1790bd4c51cdcf..81e8c7126d7293016d91e0a787d9a9991fea08ac 100644 (file)
@@ -476,9 +476,9 @@ static int iwl_test_indirect_read(struct iwl_test *tst, u32 addr, u32 size)
                        iwl_release_nic_access(trans);
                        spin_unlock_irqrestore(&trans->reg_lock, flags);
        } else { /* target memory (SRAM) */
-               _iwl_read_targ_mem_words(trans, addr,
-                                        tst->mem.addr,
-                                        tst->mem.size / 4);
+               _iwl_read_targ_mem_dwords(trans, addr,
+                                         tst->mem.addr,
+                                         tst->mem.size / 4);
        }
 
        tst->mem.nchunks =
@@ -522,7 +522,7 @@ static int iwl_test_indirect_write(struct iwl_test *tst, u32 addr,
                                                       *(u32 *)(buf+i));
                        }
        } else if (iwl_test_valid_hw_addr(tst, addr)) {
-               _iwl_write_targ_mem_words(trans, addr, buf, size/4);
+               _iwl_write_targ_mem_dwords(trans, addr, buf, size / 4);
        } else {
                return -EINVAL;
        }