summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-12-24 15:01:24 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-01-03 15:29:46 +0100
commit7a65d17053c758109477f420e813ba2d826b0eae (patch)
tree9c53772ba9085c3afc72d75b3091f51fb37cf1ed /drivers/net/wireless/iwlwifi/iwl-trans.h
parentf317243a8ba1b05338bc03c6606a51021f249a67 (diff)
downloadtalos-op-linux-7a65d17053c758109477f420e813ba2d826b0eae.tar.gz
talos-op-linux-7a65d17053c758109477f420e813ba2d826b0eae.zip
iwlwifi: virtualize iwl_{grab,release}_nic_access
Since different transports have different ways to wake the up the NIC, we need to virtualize it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 16a82b5a4671..1d1f5d0e5726 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -394,6 +394,8 @@ struct iwl_trans;
* the op_mode. May be called several times before start_fw, can't be
* called after that.
* @set_pmi: set the power pmi state
+ * @grab_nic_access: wake the NIC to be able to access non-HBUS regs
+ * @release_nic_access: let the NIC go to sleep
*/
struct iwl_trans_ops {
@@ -431,6 +433,8 @@ struct iwl_trans_ops {
void (*configure)(struct iwl_trans *trans,
const struct iwl_trans_config *trans_cfg);
void (*set_pmi)(struct iwl_trans *trans, bool state);
+ bool (*grab_nic_access)(struct iwl_trans *trans, bool silent);
+ void (*release_nic_access)(struct iwl_trans *trans);
};
/**
@@ -689,6 +693,17 @@ static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state)
trans->ops->set_pmi(trans, state);
}
+static inline bool iwl_trans_grab_nic_access(struct iwl_trans *trans,
+ bool silent)
+{
+ return trans->ops->grab_nic_access(trans, silent);
+}
+
+static inline void iwl_trans_release_nic_access(struct iwl_trans *trans)
+{
+ trans->ops->release_nic_access(trans);
+}
+
/*****************************************************
* driver (transport) register/unregister functions
******************************************************/
OpenPOWER on IntegriCloud