iwlagn: move the mapping ac to queue / fifo to transport
This mapping is transport related.
This allows us to remove the notion of tx queue from the tx path in
the upper layer.
iwl_wake_any_queue moved to transport layer since it needs to access
these mappings.
The TX API is nicer now:
int (*tx)(struct iwl_trans *trans, struct sk_buff *skb,
struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id);
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 0691d39..0fee884 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -88,6 +88,7 @@
* probe.
* @tx_start: starts and configures all the Tx fifo - usually done once the fw
* is alive.
+ * @wake_any_queue: wake all the queues of a specfic context IWL_RXON_CTX_*
* @stop_device:stops the whole device (embedded CPU put to reset)
* @send_cmd:send a host command
* @send_cmd_pdu:send a host command: flags can be CMD_*
@@ -113,13 +114,14 @@
void (*stop_device)(struct iwl_trans *trans);
void (*tx_start)(struct iwl_trans *trans);
+ void (*wake_any_queue)(struct iwl_trans *trans, u8 ctx);
+
int (*send_cmd)(struct iwl_trans *trans, struct iwl_host_cmd *cmd);
int (*send_cmd_pdu)(struct iwl_trans *trans, u8 id, u32 flags, u16 len,
const void *data);
- int (*tx)(struct iwl_priv *priv, struct sk_buff *skb,
- struct iwl_device_cmd *dev_cmd,
- int txq_id, __le16 fc, bool ampdu);
+ int (*tx)(struct iwl_trans *trans, struct sk_buff *skb,
+ struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id);
void (*reclaim)(struct iwl_trans *trans, int txq_id, int ssn,
u32 status, struct sk_buff_head *skbs);
@@ -178,6 +180,12 @@
trans->ops->tx_start(trans);
}
+static inline void iwl_trans_wake_any_queue(struct iwl_trans *trans, u8 ctx)
+{
+ trans->ops->wake_any_queue(trans, ctx);
+}
+
+
static inline int iwl_trans_send_cmd(struct iwl_trans *trans,
struct iwl_host_cmd *cmd)
{
@@ -191,10 +199,9 @@
}
static inline int iwl_trans_tx(struct iwl_trans *trans, struct sk_buff *skb,
- struct iwl_device_cmd *dev_cmd,
- int txq_id, __le16 fc, bool ampdu)
+ struct iwl_device_cmd *dev_cmd, u8 ctx, u8 sta_id)
{
- return trans->ops->tx(priv(trans), skb, dev_cmd, txq_id, fc, ampdu);
+ return trans->ops->tx(trans, skb, dev_cmd, ctx, sta_id);
}
static inline void iwl_trans_reclaim(struct iwl_trans *trans, int txq_id,