summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-trans.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2012-02-09 18:08:15 +0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2012-02-28 01:26:33 +0400
commited277c9361e423df2bc19312c60b9d06cac31ee6 (patch)
tree210cc5dfe7636aa1a525849a4ca05afe1b73c2a6 /drivers/net/wireless/iwlwifi/iwl-trans.h
parentcbe6ab4e11603e426e01c6349cd5643f3a287ba4 (diff)
downloadlinux-ed277c9361e423df2bc19312c60b9d06cac31ee6.tar.xz
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-trans.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index f42328605356..fbb09f684670 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -114,6 +114,7 @@
struct iwl_priv;
struct iwl_shared;
+struct iwl_op_mode;
/**
* DOC: Host command section
@@ -312,6 +313,7 @@ enum iwl_trans_state {
* struct iwl_trans - transport common data
*
* @ops - pointer to iwl_trans_ops
+ * @op_mode - pointer to the op_mode
* @shrd - pointer to iwl_shared which holds shared data from the upper layer
* @hcmd_lock: protects HCMD
* @reg_lock - protect hw register access
@@ -327,6 +329,7 @@ enum iwl_trans_state {
*/
struct iwl_trans {
const struct iwl_trans_ops *ops;
+ struct iwl_op_mode *op_mode;
struct iwl_shared *shrd;
enum iwl_trans_state state;
spinlock_t hcmd_lock;
@@ -350,6 +353,16 @@ struct iwl_trans {
char trans_specific[0] __aligned(sizeof(void *));
};
+static inline void iwl_trans_configure(struct iwl_trans *trans,
+ struct iwl_op_mode *op_mode)
+{
+ /*
+ * only set the op_mode for the moment. Later on, this function will do
+ * more
+ */
+ trans->op_mode = op_mode;
+}
+
static inline int iwl_trans_start_hw(struct iwl_trans *trans)
{
might_sleep();