diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-25 23:11:24 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 15:30:32 -0400 |
commit | e13c0c59e0ec38558ac853d56555e915b4dc7dc2 (patch) | |
tree | dba6f63fa8da99af7375cc4eeaab05ff586e28b7 /drivers/net/wireless/iwlwifi/iwl-trans.h | |
parent | dfa2bdbab70901ddda3ec41f2e55f8396af9095f (diff) |
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-trans.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h index 0691d39bce0..0fee8840c0a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/iwlwifi/iwl-trans.h @@ -88,6 +88,7 @@ struct iwl_device_cmd; * 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 @@ struct iwl_trans_ops { 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 @@ static inline void iwl_trans_tx_start(struct iwl_trans *trans) 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_send_cmd_pdu(struct iwl_trans *trans, u8 id, } 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, |