diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-02-09 16:08:15 +0200 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-02-27 13:26:33 -0800 |
commit | ed277c9361e423df2bc19312c60b9d06cac31ee6 (patch) | |
tree | 210cc5dfe7636aa1a525849a4ca05afe1b73c2a6 /drivers/net/wireless/iwlwifi/iwl-op-mode.h | |
parent | cbe6ab4e11603e426e01c6349cd5643f3a287ba4 (diff) |
iwlwifi: virtualize op_mode's free skb
This handler allows the transport layer to free an skb from the
op_mode. This can happen when the driver is stopped while Tx
packets are pending in the transport layer.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-op-mode.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-op-mode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h index c85c8dcabb4..59dd3074bf7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h +++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h @@ -65,6 +65,7 @@ struct iwl_op_mode; struct iwl_trans; +struct sk_buff; /** * struct iwl_op_mode_ops - op_mode specific operations @@ -75,10 +76,15 @@ struct iwl_trans; * May sleep * @stop: stop the op_mode * May sleep + * @free_skb: allows the transport layer to free skbs that haven't been + * reclaimed by the op_mode. This can happen when the driver is freed and + * there are Tx packets pending in the transport layer. + * Must be atomic */ struct iwl_op_mode_ops { struct iwl_op_mode *(*start)(struct iwl_trans *trans); void (*stop)(struct iwl_op_mode *op_mode); + void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb); }; /** @@ -100,6 +106,12 @@ static inline void iwl_op_mode_stop(struct iwl_op_mode *op_mode) op_mode->ops->stop(op_mode); } +static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode, + struct sk_buff *skb) +{ + op_mode->ops->free_skb(op_mode, skb); +} + /***************************************************** * Op mode layers implementations ******************************************************/ |