diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-07 01:31:03 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 22:56:34 +0400 |
commit | ecdb975c92c6ff63673f6380b87ab1e696dfae38 (patch) | |
tree | 7e6e401122a46b93e8bc165ca826b0ba406b7d77 /drivers/net/wireless/iwlwifi/iwl-op-mode.h | |
parent | f8d7c1a18d5e77b17b5cc1ebefa21eaea7f2d0fa (diff) | |
download | linux-ecdb975c92c6ff63673f6380b87ab1e696dfae38.tar.xz |
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.h | 9 |
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; * 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 ******************************************************/ |