diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 02:10:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 15:25:32 -0400 |
commit | e6bb4c9c00892c488f3218ea317dc6a71674faf4 (patch) | |
tree | 3afe043aee2c5e73978259393b8242baf2acd886 /drivers/net/wireless/iwlwifi/iwl-shared.h | |
parent | f39c95e8d7a152b409977687a999356f0e54bde6 (diff) |
iwlagn: bus layer chooses its transport layer
Remove iwl_transport_register which was a W/A. The bus layer knows what
transport to use. So now, the bus layer gives the upper layer a pointer to the
iwl_trans_ops struct that it wants to use. The upper layer then, allocates the
desired transport layer using iwl_trans_ops->alloc function.
As a result of this, priv->trans, no longer exists, priv holds a pointer to
iwl_shared, which holds a pointer to iwl_trans. This required to change all the
calls to the transport layer from upper layer. While we were at it, trans_X
inlines have been renamed to iwl_trans_X to avoid confusions, which of course
required to rename the functions inside the transport layer because of
conflicts in names. So the static API functions inside the transport layer
implementation have been renamed to iwl_trans_pcie_X.
Until now, the IRQ / Tasklet were initialized in iwl_transport_layer. This is
confusing since the registration doesn't mean to request IRQ, so I added a
handler for that.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-shared.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-shared.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h index 71496bf05104..467cfaacd698 100644 --- a/drivers/net/wireless/iwlwifi/iwl-shared.h +++ b/drivers/net/wireless/iwlwifi/iwl-shared.h | |||
@@ -63,10 +63,14 @@ | |||
63 | #ifndef __iwl_shared_h__ | 63 | #ifndef __iwl_shared_h__ |
64 | #define __iwl_shared_h__ | 64 | #define __iwl_shared_h__ |
65 | 65 | ||
66 | /*This files includes all the types / functions that are exported by the | ||
67 | * upper layer to the bus and transport layer */ | ||
68 | |||
66 | struct iwl_cfg; | 69 | struct iwl_cfg; |
67 | struct iwl_bus; | 70 | struct iwl_bus; |
68 | struct iwl_priv; | 71 | struct iwl_priv; |
69 | struct iwl_sensitivity_ranges; | 72 | struct iwl_sensitivity_ranges; |
73 | struct iwl_trans_ops; | ||
70 | 74 | ||
71 | extern struct iwl_mod_params iwlagn_mod_params; | 75 | extern struct iwl_mod_params iwlagn_mod_params; |
72 | 76 | ||
@@ -164,6 +168,7 @@ struct iwl_shared { | |||
164 | 168 | ||
165 | struct iwl_bus *bus; | 169 | struct iwl_bus *bus; |
166 | struct iwl_priv *priv; | 170 | struct iwl_priv *priv; |
171 | struct iwl_trans *trans; | ||
167 | struct iwl_hw_params hw_params; | 172 | struct iwl_hw_params hw_params; |
168 | 173 | ||
169 | struct workqueue_struct *workqueue; | 174 | struct workqueue_struct *workqueue; |
@@ -175,6 +180,7 @@ struct iwl_shared { | |||
175 | /*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */ | 180 | /*Whatever _m is (iwl_trans, iwl_priv, iwl_bus, these macros will work */ |
176 | #define priv(_m) ((_m)->shrd->priv) | 181 | #define priv(_m) ((_m)->shrd->priv) |
177 | #define bus(_m) ((_m)->shrd->bus) | 182 | #define bus(_m) ((_m)->shrd->bus) |
183 | #define trans(_m) ((_m)->shrd->trans) | ||
178 | #define hw_params(_m) ((_m)->shrd->hw_params) | 184 | #define hw_params(_m) ((_m)->shrd->hw_params) |
179 | 185 | ||
180 | #ifdef CONFIG_IWLWIFI_DEBUG | 186 | #ifdef CONFIG_IWLWIFI_DEBUG |
@@ -204,7 +210,8 @@ int iwl_suspend(struct iwl_priv *priv); | |||
204 | int iwl_resume(struct iwl_priv *priv); | 210 | int iwl_resume(struct iwl_priv *priv); |
205 | #endif /* !CONFIG_PM */ | 211 | #endif /* !CONFIG_PM */ |
206 | 212 | ||
207 | int iwl_probe(struct iwl_bus *bus, struct iwl_cfg *cfg); | 213 | int iwl_probe(struct iwl_bus *bus, const struct iwl_trans_ops *trans_ops, |
214 | struct iwl_cfg *cfg); | ||
208 | void __devexit iwl_remove(struct iwl_priv * priv); | 215 | void __devexit iwl_remove(struct iwl_priv * priv); |
209 | 216 | ||
210 | #endif /* #__iwl_shared_h__ */ | 217 | #endif /* #__iwl_shared_h__ */ |