aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-06 16:31:03 -0500
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 a4a4907803ca..6ea4163ff56a 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;
123 * Must be atomic 123 * Must be atomic
124 * @nic_error: error notification. Must be atomic 124 * @nic_error: error notification. Must be atomic
125 * @cmd_queue_full: Called when the command queue gets full. Must be atomic. 125 * @cmd_queue_full: Called when the command queue gets full. Must be atomic.
126 * @nic_config: configure NIC, called before firmware is started.
127 * May sleep
126 */ 128 */
127struct iwl_op_mode_ops { 129struct iwl_op_mode_ops {
128 struct iwl_op_mode *(*start)(struct iwl_trans *trans, 130 struct iwl_op_mode *(*start)(struct iwl_trans *trans,
@@ -136,6 +138,7 @@ struct iwl_op_mode_ops {
136 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb); 138 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
137 void (*nic_error)(struct iwl_op_mode *op_mode); 139 void (*nic_error)(struct iwl_op_mode *op_mode);
138 void (*cmd_queue_full)(struct iwl_op_mode *op_mode); 140 void (*cmd_queue_full)(struct iwl_op_mode *op_mode);
141 void (*nic_config)(struct iwl_op_mode *op_mode);
139}; 142};
140 143
141/** 144/**
@@ -199,6 +202,12 @@ static inline void iwl_op_mode_cmd_queue_full(struct iwl_op_mode *op_mode)
199 op_mode->ops->cmd_queue_full(op_mode); 202 op_mode->ops->cmd_queue_full(op_mode);
200} 203}
201 204
205static inline void iwl_op_mode_nic_config(struct iwl_op_mode *op_mode)
206{
207 might_sleep();
208 op_mode->ops->nic_config(op_mode);
209}
210
202/***************************************************** 211/*****************************************************
203* Op mode layers implementations 212* Op mode layers implementations
204******************************************************/ 213******************************************************/