diff options
author | Johannes Berg <johannes.berg@intel.com> | 2012-03-06 13:30:49 -0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-03-07 13:51:52 -0500 |
commit | 0e781842cb25ed3a9d0a91bdf05c0717150c9343 (patch) | |
tree | 5a19056c6bc39ccd62521fad50219837a076646e /drivers/net/wireless/iwlwifi/iwl-op-mode.h | |
parent | 6c1011e1918be17f7f8ccca5442cd517f9c29d17 (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.h | 7 |
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 55b8b27a956..a4a4907803c 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; * there are Tx packets pending in the transport layer. * Must be atomic * @nic_error: error notification. Must be atomic + * @cmd_queue_full: Called when the command queue gets full. Must be atomic. */ struct iwl_op_mode_ops { struct iwl_op_mode *(*start)(struct iwl_trans *trans, @@ -134,6 +135,7 @@ struct iwl_op_mode_ops { void (*hw_rf_kill)(struct iwl_op_mode *op_mode, bool state); 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); }; /** @@ -192,6 +194,11 @@ static inline void iwl_op_mode_nic_error(struct iwl_op_mode *op_mode) op_mode->ops->nic_error(op_mode); } +static inline void iwl_op_mode_cmd_queue_full(struct iwl_op_mode *op_mode) +{ + op_mode->ops->cmd_queue_full(op_mode); +} + /***************************************************** * Op mode layers implementations ******************************************************/ |