diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 10:11:24 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 23:30:32 +0400 |
commit | e13c0c59e0ec38558ac853d56555e915b4dc7dc2 (patch) | |
tree | dba6f63fa8da99af7375cc4eeaab05ff586e28b7 /drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | |
parent | dfa2bdbab70901ddda3ec41f2e55f8396af9095f (diff) | |
download | linux-e13c0c59e0ec38558ac853d56555e915b4dc7dc2.tar.xz |
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-tx-pcie.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c index 96ad0afd185e..6af33104228a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c +++ b/drivers/net/wireless/iwlwifi/iwl-trans-tx-pcie.c @@ -424,10 +424,12 @@ void iwl_trans_tx_queue_set_status(struct iwl_priv *priv, scd_retry ? "BA" : "AC/CMD", txq_id, tx_fifo_id); } -static inline int get_fifo_from_tid(struct iwl_rxon_context *ctx, u16 tid) +static inline int get_fifo_from_tid(struct iwl_trans_pcie *trans_pcie, + u8 ctx, u16 tid) { + const u8 *ac_to_fifo = trans_pcie->ac_to_fifo[ctx]; if (likely(tid < ARRAY_SIZE(tid_to_ac))) - return ctx->ac_to_fifo[tid_to_ac[tid]]; + return ac_to_fifo[tid_to_ac[tid]]; /* no support for TIDs 8-15 yet */ return -EINVAL; @@ -451,7 +453,7 @@ void iwl_trans_pcie_txq_agg_setup(struct iwl_priv *priv, if (WARN_ON(tid >= IWL_MAX_TID_COUNT)) return; - tx_fifo = get_fifo_from_tid(&priv->contexts[ctx], tid); + tx_fifo = get_fifo_from_tid(trans_pcie, ctx, tid); if (WARN_ON(tx_fifo < 0)) { IWL_ERR(trans, "txq_agg_setup, bad fifo: %d\n", tx_fifo); return; |