aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-sv-open.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-07-11 03:48:51 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-07-21 10:29:55 -0400
commitd593411084a56124aa9d80aafa15db8463b2d8f7 (patch)
treecbe550ecb8e7c0a7700e0ed168f1553c25b3d183 /drivers/net/wireless/iwlwifi/iwl-sv-open.c
parent41c50542669cd7aec45ad708f5120ff8fdaa1194 (diff)
iwlagn: simplify the bus architecture
Call iwl_probe with a ready iwl_bus struct. This means that the bus layer assigns the irq, dev and iwl_bus_ops pointers to iwl_bus before giving it to iwl_probe. The device specific struct is allocated together with the common iwl_bus struct by the bus specific layer. The pointer to the aggregate struct is passed to the upper layer that holds a pointer to iwl_bus instead of an embedded iw_bus. The private data given to the PCI subsystem is now iwl_bus and not iwl_priv. Provide bus_* inliners on the way in order to simplify the syntax. Rename iwl-pci.h -> iwl-bus.h since it is bus agnostic and represent the external of the bus layer. 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-sv-open.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sv-open.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sv-open.c b/drivers/net/wireless/iwlwifi/iwl-sv-open.c
index d47483561a8..b11f60de4f1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sv-open.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sv-open.c
@@ -181,12 +181,10 @@ void iwl_testmode_init(struct iwl_priv *priv)
181 181
182static void iwl_trace_cleanup(struct iwl_priv *priv) 182static void iwl_trace_cleanup(struct iwl_priv *priv)
183{ 183{
184 struct device *dev = priv->bus.dev;
185
186 if (priv->testmode_trace.trace_enabled) { 184 if (priv->testmode_trace.trace_enabled) {
187 if (priv->testmode_trace.cpu_addr && 185 if (priv->testmode_trace.cpu_addr &&
188 priv->testmode_trace.dma_addr) 186 priv->testmode_trace.dma_addr)
189 dma_free_coherent(dev, 187 dma_free_coherent(priv->bus->dev,
190 priv->testmode_trace.total_size, 188 priv->testmode_trace.total_size,
191 priv->testmode_trace.cpu_addr, 189 priv->testmode_trace.cpu_addr,
192 priv->testmode_trace.dma_addr); 190 priv->testmode_trace.dma_addr);
@@ -486,7 +484,7 @@ static int iwl_testmode_trace(struct ieee80211_hw *hw, struct nlattr **tb)
486 struct iwl_priv *priv = hw->priv; 484 struct iwl_priv *priv = hw->priv;
487 struct sk_buff *skb; 485 struct sk_buff *skb;
488 int status = 0; 486 int status = 0;
489 struct device *dev = priv->bus.dev; 487 struct device *dev = priv->bus->dev;
490 488
491 switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) { 489 switch (nla_get_u32(tb[IWL_TM_ATTR_COMMAND])) {
492 case IWL_TM_CMD_APP2DEV_BEGIN_TRACE: 490 case IWL_TM_CMD_APP2DEV_BEGIN_TRACE: