summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-op-mode.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:47 +0400
commit02e3835884f352ac707dcf14d8bf455c0c0acbc5 (patch)
treeb01eff7c10f52c042e747dde46bdbe04a9fb825e /drivers/net/wireless/iwlwifi/iwl-op-mode.h
parentdb70f290e1a88f11815e50acd8ac1c36f89b0da2 (diff)
downloadlinux-02e3835884f352ac707dcf14d8bf455c0c0acbc5.tar.xz
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.h17
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;
* May sleep
* @rx: Rx notification to the op_mode. rxb is the Rx buffer itself. Cmd is the
* HCMD the this Rx responds to.
+ * @queue_full: notifies that a HW queue is full. Ac is the ac of the queue
+ * Must be atomic
+ * @queue_not_full: notifies that a HW queue is not full any more.
+ * Ac is the ac of the queue. Must be atomic
* @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.
@@ -90,6 +94,8 @@ struct iwl_op_mode_ops {
void (*stop)(struct iwl_op_mode *op_mode);
int (*rx)(struct iwl_op_mode *op_mode, struct iwl_rx_mem_buffer *rxb,
struct iwl_device_cmd *cmd);
+ void (*queue_full)(struct iwl_op_mode *op_mode, u8 ac);
+ void (*queue_not_full)(struct iwl_op_mode *op_mode, u8 ac);
void (*free_skb)(struct iwl_op_mode *op_mode, struct sk_buff *skb);
};
@@ -119,6 +125,17 @@ static inline int iwl_op_mode_rx(struct iwl_op_mode *op_mode,
return op_mode->ops->rx(op_mode, rxb, cmd);
}
+static inline void iwl_op_mode_queue_full(struct iwl_op_mode *op_mode, u8 ac)
+{
+ op_mode->ops->queue_full(op_mode, ac);
+}
+
+static inline void iwl_op_mode_queue_not_full(struct iwl_op_mode *op_mode,
+ u8 ac)
+{
+ op_mode->ops->queue_not_full(op_mode, ac);
+}
+
static inline void iwl_op_mode_free_skb(struct iwl_op_mode *op_mode,
struct sk_buff *skb)
{