aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-testmode.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-01-03 09:56:15 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-02-02 17:35:45 -0500
commit1042db2af183b96cdce5972014d85e8bca0634ad (patch)
treea2180c74bd080da8ae6cb9ab9b8d3494ee50e6cc /drivers/net/wireless/iwlwifi/iwl-testmode.c
parent0390549571cb614ac5cd3327b63f95155a75c673 (diff)
iwlwifi: give trans to all the read / write functions
From now on, the transport layer in charge of providing access to the device. So change all the driver to give a pointer to the transport to all the low level functions that actually access the device. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-testmode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-testmode.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-testmode.c b/drivers/net/wireless/iwlwifi/iwl-testmode.c
index a56a77b8f926..922d841faba2 100644
--- a/drivers/net/wireless/iwlwifi/iwl-testmode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-testmode.c
@@ -208,7 +208,7 @@ static void iwl_trace_cleanup(struct iwl_priv *priv)
208 if (priv->testmode_trace.trace_enabled) { 208 if (priv->testmode_trace.trace_enabled) {
209 if (priv->testmode_trace.cpu_addr && 209 if (priv->testmode_trace.cpu_addr &&
210 priv->testmode_trace.dma_addr) 210 priv->testmode_trace.dma_addr)
211 dma_free_coherent(bus(priv)->dev, 211 dma_free_coherent(trans(priv)->dev,
212 priv->testmode_trace.total_size, 212 priv->testmode_trace.total_size,
213 priv->testmode_trace.cpu_addr, 213 priv->testmode_trace.cpu_addr,
214 priv->testmode_trace.dma_addr); 214 priv->testmode_trace.dma_addr);
@@ -302,7 +302,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb)
302 302
303 switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { 303 switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
304 case IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32: 304 case IWL_TM_CMD_APP2DEV_DIRECT_REG_READ32:
305 val32 = iwl_read_direct32(bus(priv), ofs); 305 val32 = iwl_read_direct32(trans(priv), ofs);
306 IWL_INFO(priv, "32bit value to read 0x%x\n", val32); 306 IWL_INFO(priv, "32bit value to read 0x%x\n", val32);
307 307
308 skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); 308 skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
@@ -324,7 +324,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb)
324 } else { 324 } else {
325 val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]); 325 val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]);
326 IWL_INFO(priv, "32bit value to write 0x%x\n", val32); 326 IWL_INFO(priv, "32bit value to write 0x%x\n", val32);
327 iwl_write_direct32(bus(priv), ofs, val32); 327 iwl_write_direct32(trans(priv), ofs, val32);
328 } 328 }
329 break; 329 break;
330 case IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8: 330 case IWL_TM_CMD_APP2DEV_DIRECT_REG_WRITE8:
@@ -334,11 +334,11 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb)
334 } else { 334 } else {
335 val8 = nla_get_u8(tb[IWL_TM_ATTR_REG_VALUE8]); 335 val8 = nla_get_u8(tb[IWL_TM_ATTR_REG_VALUE8]);
336 IWL_INFO(priv, "8bit value to write 0x%x\n", val8); 336 IWL_INFO(priv, "8bit value to write 0x%x\n", val8);
337 iwl_write8(bus(priv), ofs, val8); 337 iwl_write8(trans(priv), ofs, val8);
338 } 338 }
339 break; 339 break;
340 case IWL_TM_CMD_APP2DEV_INDIRECT_REG_READ32: 340 case IWL_TM_CMD_APP2DEV_INDIRECT_REG_READ32:
341 val32 = iwl_read_prph(bus(priv), ofs); 341 val32 = iwl_read_prph(trans(priv), ofs);
342 IWL_INFO(priv, "32bit value to read 0x%x\n", val32); 342 IWL_INFO(priv, "32bit value to read 0x%x\n", val32);
343 343
344 skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20); 344 skb = cfg80211_testmode_alloc_reply_skb(hw->wiphy, 20);
@@ -360,7 +360,7 @@ static int iwl_testmode_reg(struct ieee80211_hw *hw, struct nlattr **tb)
360 } else { 360 } else {
361 val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]); 361 val32 = nla_get_u32(tb[IWL_TM_ATTR_REG_VALUE32]);
362 IWL_INFO(priv, "32bit value to write 0x%x\n", val32); 362 IWL_INFO(priv, "32bit value to write 0x%x\n", val32);
363 iwl_write_prph(bus(priv), ofs, val32); 363 iwl_write_prph(trans(priv), ofs, val32);
364 } 364 }
365 break; 365 break;
366 default: 366 default:
@@ -615,7 +615,7 @@ static int iwl_testmode_trace(struct ieee80211_hw *hw, struct nlattr **tb)
615 struct iwl_priv *priv = hw->priv; 615 struct iwl_priv *priv = hw->priv;
616 struct sk_buff *skb; 616 struct sk_buff *skb;
617 int status = 0; 617 int status = 0;
618 struct device *dev = bus(priv)->dev; 618 struct device *dev = trans(priv)->dev;
619 619
620 switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { 620 switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
621 case IWL_TM_CMD_APP2DEV_BEGIN_TRACE: 621 case IWL_TM_CMD_APP2DEV_BEGIN_TRACE:
@@ -814,7 +814,7 @@ static int iwl_testmode_sram(struct ieee80211_hw *hw, struct nlattr **tb)
814 IWL_ERR(priv, "Error allocating memory\n"); 814 IWL_ERR(priv, "Error allocating memory\n");
815 return -ENOMEM; 815 return -ENOMEM;
816 } 816 }
817 _iwl_read_targ_mem_words(bus(priv), ofs, 817 _iwl_read_targ_mem_words(trans(priv), ofs,
818 priv->testmode_sram.buff_addr, 818 priv->testmode_sram.buff_addr,
819 priv->testmode_sram.buff_size / 4); 819 priv->testmode_sram.buff_size / 4);
820 priv->testmode_sram.num_chunks = 820 priv->testmode_sram.num_chunks =