diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index cb864449c397..6810909f3fef 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/unaligned.h> | 38 | #include <asm/unaligned.h> |
39 | #include <net/mac80211.h> | 39 | #include <net/mac80211.h> |
40 | 40 | ||
41 | #include "iwl-fh.h" | ||
41 | #include "iwl-3945-fh.h" | 42 | #include "iwl-3945-fh.h" |
42 | #include "iwl-commands.h" | 43 | #include "iwl-commands.h" |
43 | #include "iwl-3945.h" | 44 | #include "iwl-3945.h" |
@@ -307,7 +308,7 @@ static void iwl3945_tx_queue_reclaim(struct iwl_priv *priv, | |||
307 | { | 308 | { |
308 | struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; | 309 | struct iwl3945_tx_queue *txq = &priv->txq39[txq_id]; |
309 | struct iwl_queue *q = &txq->q; | 310 | struct iwl_queue *q = &txq->q; |
310 | struct iwl3945_tx_info *tx_info; | 311 | struct iwl_tx_info *tx_info; |
311 | 312 | ||
312 | BUG_ON(txq_id == IWL_CMD_QUEUE_NUM); | 313 | BUG_ON(txq_id == IWL_CMD_QUEUE_NUM); |
313 | 314 | ||
@@ -728,7 +729,7 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, | |||
728 | { | 729 | { |
729 | int count; | 730 | int count; |
730 | u32 pad; | 731 | u32 pad; |
731 | struct iwl3945_tfd_frame *tfd = (struct iwl3945_tfd_frame *)ptr; | 732 | struct iwl3945_tfd *tfd = (struct iwl3945_tfd *)ptr; |
732 | 733 | ||
733 | count = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); | 734 | count = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); |
734 | pad = TFD_CTL_PAD_GET(le32_to_cpu(tfd->control_flags)); | 735 | pad = TFD_CTL_PAD_GET(le32_to_cpu(tfd->control_flags)); |
@@ -739,8 +740,8 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, | |||
739 | return -EINVAL; | 740 | return -EINVAL; |
740 | } | 741 | } |
741 | 742 | ||
742 | tfd->pa[count].addr = cpu_to_le32(addr); | 743 | tfd->tbs[count].addr = cpu_to_le32(addr); |
743 | tfd->pa[count].len = cpu_to_le32(len); | 744 | tfd->tbs[count].len = cpu_to_le32(len); |
744 | 745 | ||
745 | count++; | 746 | count++; |
746 | 747 | ||
@@ -757,8 +758,8 @@ int iwl3945_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, | |||
757 | */ | 758 | */ |
758 | int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq) | 759 | int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq) |
759 | { | 760 | { |
760 | struct iwl3945_tfd_frame *bd_tmp = (struct iwl3945_tfd_frame *)&txq->bd[0]; | 761 | struct iwl3945_tfd *tfd_tmp = (struct iwl3945_tfd *)&txq->tfds[0]; |
761 | struct iwl3945_tfd_frame *bd = &bd_tmp[txq->q.read_ptr]; | 762 | struct iwl3945_tfd *tfd = &tfd_tmp[txq->q.read_ptr]; |
762 | struct pci_dev *dev = priv->pci_dev; | 763 | struct pci_dev *dev = priv->pci_dev; |
763 | int i; | 764 | int i; |
764 | int counter; | 765 | int counter; |
@@ -769,7 +770,7 @@ int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq) | |||
769 | return 0; | 770 | return 0; |
770 | 771 | ||
771 | /* sanity check */ | 772 | /* sanity check */ |
772 | counter = TFD_CTL_COUNT_GET(le32_to_cpu(bd->control_flags)); | 773 | counter = TFD_CTL_COUNT_GET(le32_to_cpu(tfd->control_flags)); |
773 | if (counter > NUM_TFD_CHUNKS) { | 774 | if (counter > NUM_TFD_CHUNKS) { |
774 | IWL_ERR(priv, "Too many chunks: %i\n", counter); | 775 | IWL_ERR(priv, "Too many chunks: %i\n", counter); |
775 | /* @todo issue fatal error, it is quite serious situation */ | 776 | /* @todo issue fatal error, it is quite serious situation */ |
@@ -779,8 +780,8 @@ int iwl3945_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl3945_tx_queue *txq) | |||
779 | /* unmap chunks if any */ | 780 | /* unmap chunks if any */ |
780 | 781 | ||
781 | for (i = 1; i < counter; i++) { | 782 | for (i = 1; i < counter; i++) { |
782 | pci_unmap_single(dev, le32_to_cpu(bd->pa[i].addr), | 783 | pci_unmap_single(dev, le32_to_cpu(tfd->tbs[i].addr), |
783 | le32_to_cpu(bd->pa[i].len), PCI_DMA_TODEVICE); | 784 | le32_to_cpu(tfd->tbs[i].len), PCI_DMA_TODEVICE); |
784 | if (txq->txb[txq->q.read_ptr].skb[0]) { | 785 | if (txq->txb[txq->q.read_ptr].skb[0]) { |
785 | struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[0]; | 786 | struct sk_buff *skb = txq->txb[txq->q.read_ptr].skb[0]; |
786 | if (txq->txb[txq->q.read_ptr].skb[0]) { | 787 | if (txq->txb[txq->q.read_ptr].skb[0]) { |