aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-06 13:31:03 -0800
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 13:56:34 -0500
commitecdb975c92c6ff63673f6380b87ab1e696dfae38 (patch)
tree7e6e401122a46b93e8bc165ca826b0ba406b7d77 /drivers/net/wireless/iwlwifi/iwl-op-mode.h
parentf8d7c1a18d5e77b17b5cc1ebefa21eaea7f2d0fa (diff)
iwlwifi: virtualize nic_config
The nic_config sets uCode dependent register bits, so it must be virtual in the op_mode. Signed-off-by: Johannes Berg <johannes.berg@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-op-mode.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-op-mode.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
index a4a4907803c..6ea4163ff56 100644
--- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
@@ -123,6 +123,8 @@ struct iwl_fw;
* Must be atomic
* @nic_error: error notification. Must be atomic
* @cmd_queue_full: Called when the command queue gets full. Must be atomic.
+ * @nic_config: configure NIC, called before firmware is started.
+ * May sleep
*/
struct iwl_op_mode_ops {
struct iwl_op_mode *(*start)(struct iwl_trans *trans,
@@ -136,6 +138,7 @@ struct iwl_op_mode_ops {
void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
void (*nic_error)(struct iwl_op_mode *op_mode);
void (*cmd_queue_full)(struct iwl_op_mode *op_mode);
+ void (*nic_config)(struct iwl_op_mode *op_mode);
};
/**
@@ -199,6 +202,12 @@ static inline void iwl_op_mode_cmd_queue_full(struct iwl_op_mode *op_mode)
op_mode->ops->cmd_queue_full(op_mode);
}
+static inline void iwl_op_mode_nic_config(struct iwl_op_mode *op_mode)
+{
+ might_sleep();
+ op_mode->ops->nic_config(op_mode);
+}
+
/*****************************************************
* Op mode layers implementations
******************************************************/