aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-op-mode.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-op-mode.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
index 59dd3074bf7..b0272fd9b53 100644
--- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h
+++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h
@@ -66,6 +66,8 @@
66struct iwl_op_mode; 66struct iwl_op_mode;
67struct iwl_trans; 67struct iwl_trans;
68struct sk_buff; 68struct sk_buff;
69struct iwl_device_cmd;
70struct iwl_rx_mem_buffer;
69 71
70/** 72/**
71 * struct iwl_op_mode_ops - op_mode specific operations 73 * struct iwl_op_mode_ops - op_mode specific operations
@@ -76,6 +78,8 @@ struct sk_buff;
76 * May sleep 78 * May sleep
77 * @stop: stop the op_mode 79 * @stop: stop the op_mode
78 * May sleep 80 * May sleep
81 * @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the
82 * HCMD the this Rx responds to.
79 * @free_skb: allows the transport layer to free skbs that haven't been 83 * @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 84 * reclaimed by the op_mode. This can happen when the driver is freed and
81 * there are Tx packets pending in the transport layer. 85 * there are Tx packets pending in the transport layer.
@@ -84,6 +88,8 @@ struct sk_buff;
84struct iwl_op_mode_ops { 88struct iwl_op_mode_ops {
85 struct iwl_op_mode *(*start)(struct iwl_trans *trans); 89 struct iwl_op_mode *(*start)(struct iwl_trans *trans);
86 void (*stop)(struct iwl_op_mode *op_mode); 90 void (*stop)(struct iwl_op_mode *op_mode);
91 int (*rx)(struct iwl_op_mode *op_mode, struct iwl_rx_mem_buffer *rxb,
92 struct iwl_device_cmd *cmd);
87 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb); 93 void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
88}; 94};
89 95
@@ -106,6 +112,13 @@ static inline void iwl_op_mode_stop(struct iwl_op_mode *op_mode)
106 op_mode->ops->stop(op_mode); 112 op_mode->ops->stop(op_mode);
107} 113}
108 114
115static inline int iwl_op_mode_rx(struct iwl_op_mode *op_mode,
116 struct iwl_rx_mem_buffer *rxb,
117 struct iwl_device_cmd *cmd)
118{
119 return op_mode->ops->rx(op_mode, rxb, cmd);
120}
121
109static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode, 122static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode,
110 struct sk_buff *skb) 123 struct sk_buff *skb)
111{ 124{