diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-14 15:32:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:31 -0400 |
commit | b88b15dfbddc8837569c6dea49348791357de4aa (patch) | |
tree | 968a639c4e592fd48cd16f2969c5e983f7dc898d | |
parent | 499b1883038a7db2dcf8b64229f8533ce2c8f0fc (diff) |
iwlwifi: tx command must run on same tfd as packet
This patch makes clear that tx command is attached to the same tfd as
the tx packet
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-tx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index c3656c46f55f..6cf4a7c428dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -817,7 +817,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
817 | dma_addr_t phys_addr; | 817 | dma_addr_t phys_addr; |
818 | dma_addr_t txcmd_phys; | 818 | dma_addr_t txcmd_phys; |
819 | dma_addr_t scratch_phys; | 819 | dma_addr_t scratch_phys; |
820 | u16 len, idx, len_org; | 820 | u16 len, len_org; |
821 | u16 seq_number = 0; | 821 | u16 seq_number = 0; |
822 | __le16 fc; | 822 | __le16 fc; |
823 | u8 hdr_len, unicast; | 823 | u8 hdr_len, unicast; |
@@ -904,14 +904,13 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
904 | /* Set up first empty TFD within this queue's circular TFD buffer */ | 904 | /* Set up first empty TFD within this queue's circular TFD buffer */ |
905 | tfd = &txq->tfds[q->write_ptr]; | 905 | tfd = &txq->tfds[q->write_ptr]; |
906 | memset(tfd, 0, sizeof(*tfd)); | 906 | memset(tfd, 0, sizeof(*tfd)); |
907 | idx = get_cmd_index(q, q->write_ptr, 0); | ||
908 | 907 | ||
909 | /* Set up driver data for this TFD */ | 908 | /* Set up driver data for this TFD */ |
910 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); | 909 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct iwl_tx_info)); |
911 | txq->txb[q->write_ptr].skb[0] = skb; | 910 | txq->txb[q->write_ptr].skb[0] = skb; |
912 | 911 | ||
913 | /* Set up first empty entry in queue's array of Tx/cmd buffers */ | 912 | /* Set up first empty entry in queue's array of Tx/cmd buffers */ |
914 | out_cmd = txq->cmd[idx]; | 913 | out_cmd = txq->cmd[q->write_ptr]; |
915 | tx_cmd = &out_cmd->cmd.tx; | 914 | tx_cmd = &out_cmd->cmd.tx; |
916 | memset(&out_cmd->hdr, 0, sizeof(out_cmd->hdr)); | 915 | memset(&out_cmd->hdr, 0, sizeof(out_cmd->hdr)); |
917 | memset(tx_cmd, 0, sizeof(struct iwl_tx_cmd)); | 916 | memset(tx_cmd, 0, sizeof(struct iwl_tx_cmd)); |