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:30:49 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 13:51:52 -0500
commit0e781842cb25ed3a9d0a91bdf05c0717150c9343 (patch)
tree5a19056c6bc39ccd62521fad50219837a076646e /drivers/net/wireless/iwlwifi/iwl-op-mode.h
parent6c1011e1918be17f7f8ccca5442cd517f9c29d17 (diff)
iwlwifi: virtualize command queue full behaviour
When the command queue is full, the transport will return -ENOSPC, but the reaction to that depends on the op_mode. Virtualize that, the DVM op_mode checks for CT-kill and restarts the hardware otherwise. We may be able to get rid of this callback by putting the behaviour check into the wrapper but that needs more careful evaluation. 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.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
index 55b8b27a9560..a4a4907803ca 100644
--- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
@@ -122,6 +122,7 @@ struct iwl_fw;
122 * there are Tx packets pending in the transport layer. 122 * there are Tx packets pending in the transport layer.
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 */ 126 */
126struct iwl_op_mode_ops { 127struct iwl_op_mode_ops {
127 struct iwl_op_mode *(*start)(struct iwl_trans *trans, 128 struct iwl_op_mode *(*start)(struct iwl_trans *trans,
@@ -134,6 +135,7 @@ struct iwl_op_mode_ops {
134 void (*hw_rf_kill)(struct iwl_op_mode *op_mode, bool state); 135 void (*hw_rf_kill)(struct iwl_op_mode *op_mode, bool state);
135 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb); 136 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
136 void (*nic_error)(struct iwl_op_mode *op_mode); 137 void (*nic_error)(struct iwl_op_mode *op_mode);
138 void (*cmd_queue_full)(struct iwl_op_mode *op_mode);
137}; 139};
138 140
139/** 141/**
@@ -192,6 +194,11 @@ static inline void iwl_op_mode_nic_error(struct iwl_op_mode *op_mode)
192 op_mode->ops->nic_error(op_mode); 194 op_mode->ops->nic_error(op_mode);
193} 195}
194 196
197static inline void iwl_op_mode_cmd_queue_full(struct iwl_op_mode *op_mode)
198{
199 op_mode->ops->cmd_queue_full(op_mode);
200}
201
195/***************************************************** 202/*****************************************************
196* Op mode layers implementations 203* Op mode layers implementations
197******************************************************/ 204******************************************************/