From a48709c5d076aa3a3f9b6426f462abe6bf432b11 Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Tue, 31 May 2011 08:22:30 +0300 Subject: iwlagn: introduce iwl_bus and iwl_bus_ops iwl_bus will represent a bus, and iwl_bus_ops all the operations that can be done on this bus. For the moment only set_prv_data is implemented. More to come... Signed-off-by: Emmanuel Grumbach Signed-off-by: Wey-Yi Guy --- drivers/net/wireless/iwlwifi/iwl-dev.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h') diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 59316fb1e8c2..8865514226b9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h @@ -1188,6 +1188,26 @@ struct iwl_testmode_trace { bool trace_enabled; }; #endif + +struct iwl_bus; + +/** + * struct iwl_bus_ops - bus specific operations + * @set_drv_data: set the priv pointer to the bus layer + */ +struct iwl_bus_ops { + void (*set_drv_data)(struct iwl_bus *bus, void *priv); +}; + +struct iwl_bus { + /* pointer to bus specific struct */ + void *bus_specific; + + /* Common data to all buses */ + struct iwl_priv *priv; /* driver's context */ + struct iwl_bus_ops *ops; +}; + struct iwl_priv { /* ieee device used by generic ieee processing code */ @@ -1255,12 +1275,15 @@ struct iwl_priv { spinlock_t reg_lock; /* protect hw register access */ struct mutex mutex; + /* TODO: remove this after PCI abstraction is done */ /* basic pci-network driver stuff */ struct pci_dev *pci_dev; /* pci hardware address support */ void __iomem *hw_base; + struct iwl_bus bus; /* bus specific data */ + /* microcode/device supports multiple contexts */ u8 valid_contexts; -- cgit v1.2.3