aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-02-09 09:08:15 -0500
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-02-27 16:26:33 -0500
commited277c9361e423df2bc19312c60b9d06cac31ee6 (patch)
tree210cc5dfe7636aa1a525849a4ca05afe1b73c2a6 /drivers/net/wireless/iwlwifi/iwl-op-mode.h
parentcbe6ab4e11603e426e01c6349cd5643f3a287ba4 (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.h12
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 c85c8dcabb49..59dd3074bf73 100644
--- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
@@ -65,6 +65,7 @@
65 65
66struct iwl_op_mode; 66struct iwl_op_mode;
67struct iwl_trans; 67struct iwl_trans;
68struct sk_buff;
68 69
69/** 70/**
70 * struct iwl_op_mode_ops - op_mode specific operations 71 * struct iwl_op_mode_ops - op_mode specific operations
@@ -75,10 +76,15 @@ struct iwl_trans;
75 * May sleep 76 * May sleep
76 * @stop: stop the op_mode 77 * @stop: stop the op_mode
77 * May sleep 78 * May sleep
79 * @free_skb: allows the transport layer to free skbs that haven't been
80 * reclaimed by the op_mode. This can happen when the driver is freed and
81 * there are Tx packets pending in the transport layer.
82 * Must be atomic
78 */ 83 */
79struct iwl_op_mode_ops { 84struct iwl_op_mode_ops {
80 struct iwl_op_mode *(*start)(struct iwl_trans *trans); 85 struct iwl_op_mode *(*start)(struct iwl_trans *trans);
81 void (*stop)(struct iwl_op_mode *op_mode); 86 void (*stop)(struct iwl_op_mode *op_mode);
87 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
82}; 88};
83 89
84/** 90/**
@@ -100,6 +106,12 @@ static inline void iwl_op_mode_stop(struct iwl_op_mode *op_mode)
100 op_mode->ops->stop(op_mode); 106 op_mode->ops->stop(op_mode);
101} 107}
102 108
109static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode,
110 struct sk_buff *skb)
111{
112 op_mode->ops->free_skb(op_mode, skb);
113}
114
103/***************************************************** 115/*****************************************************
104* Op mode layers implementations 116* Op mode layers implementations
105******************************************************/ 117******************************************************/