diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-02-09 09:08:15 -0500 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2012-02-27 16:26:47 -0500 |
commit | 02e3835884f352ac707dcf14d8bf455c0c0acbc5 (patch) | |
tree | b01eff7c10f52c042e747dde46bdbe04a9fb825e /drivers/net/wireless/iwlwifi/iwl-op-mode.h | |
parent | db70f290e1a88f11815e50acd8ac1c36f89b0da2 (diff) |
iwlwifi: virtualize op_mode's stop/start queue
Export them as "queue_full" and "queue_not_full" notification.
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 | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h index b0272fd9b537..c1664e1fd26a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h +++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h | |||
@@ -80,6 +80,10 @@ struct iwl_rx_mem_buffer; | |||
80 | * May sleep | 80 | * May sleep |
81 | * @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the | 81 | * @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the |
82 | * HCMD the this Rx responds to. | 82 | * HCMD the this Rx responds to. |
83 | * @queue_full: notifies that a HW queue is full. Ac is the ac of the queue | ||
84 | * Must be atomic | ||
85 | * @queue_not_full: notifies that a HW queue is not full any more. | ||
86 | * Ac is the ac of the queue. Must be atomic | ||
83 | * @free_skb: allows the transport layer to free skbs that haven't been | 87 | * @free_skb: allows the transport layer to free skbs that haven't been |
84 | * reclaimed by the op_mode. This can happen when the driver is freed and | 88 | * reclaimed by the op_mode. This can happen when the driver is freed and |
85 | * there are Tx packets pending in the transport layer. | 89 | * there are Tx packets pending in the transport layer. |
@@ -90,6 +94,8 @@ struct iwl_op_mode_ops { | |||
90 | void (*stop)(struct iwl_op_mode *op_mode); | 94 | void (*stop)(struct iwl_op_mode *op_mode); |
91 | int (*rx)(struct iwl_op_mode *op_mode, struct iwl_rx_mem_buffer *rxb, | 95 | int (*rx)(struct iwl_op_mode *op_mode, struct iwl_rx_mem_buffer *rxb, |
92 | struct iwl_device_cmd *cmd); | 96 | struct iwl_device_cmd *cmd); |
97 | void (*queue_full)(struct iwl_op_mode *op_mode, u8 ac); | ||
98 | void (*queue_not_full)(struct iwl_op_mode *op_mode, u8 ac); | ||
93 | void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb); | 99 | void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb); |
94 | }; | 100 | }; |
95 | 101 | ||
@@ -119,6 +125,17 @@ static inline int iwl_op_mode_rx(struct iwl_op_mode *op_mode, | |||
119 | return op_mode->ops->rx(op_mode, rxb, cmd); | 125 | return op_mode->ops->rx(op_mode, rxb, cmd); |
120 | } | 126 | } |
121 | 127 | ||
128 | static inline void iwl_op_mode_queue_full(struct iwl_op_mode *op_mode, u8 ac) | ||
129 | { | ||
130 | op_mode->ops->queue_full(op_mode, ac); | ||
131 | } | ||
132 | |||
133 | static inline void iwl_op_mode_queue_not_full(struct iwl_op_mode *op_mode, | ||
134 | u8 ac) | ||
135 | { | ||
136 | op_mode->ops->queue_not_full(op_mode, ac); | ||
137 | } | ||
138 | |||
122 | static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode, | 139 | static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode, |
123 | struct sk_buff *skb) | 140 | struct sk_buff *skb) |
124 | { | 141 | { |