diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 62 |
1 files changed, 1 insertions, 61 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index ddc6a42ad7b9..b2e2b091dabb 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include "rt2x00pci.h" | 45 | #include "rt2x00pci.h" |
46 | #include "rt2x00soc.h" | 46 | #include "rt2x00soc.h" |
47 | #include "rt2800lib.h" | 47 | #include "rt2800lib.h" |
48 | #include "rt2800mmio.h" | ||
48 | #include "rt2800.h" | 49 | #include "rt2800.h" |
49 | #include "rt2800pci.h" | 50 | #include "rt2800pci.h" |
50 | 51 | ||
@@ -627,67 +628,6 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
627 | } | 628 | } |
628 | 629 | ||
629 | /* | 630 | /* |
630 | * TX descriptor initialization | ||
631 | */ | ||
632 | static __le32 *rt2800mmio_get_txwi(struct queue_entry *entry) | ||
633 | { | ||
634 | return (__le32 *) entry->skb->data; | ||
635 | } | ||
636 | |||
637 | static void rt2800mmio_write_tx_desc(struct queue_entry *entry, | ||
638 | struct txentry_desc *txdesc) | ||
639 | { | ||
640 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); | ||
641 | struct queue_entry_priv_mmio *entry_priv = entry->priv_data; | ||
642 | __le32 *txd = entry_priv->desc; | ||
643 | u32 word; | ||
644 | const unsigned int txwi_size = entry->queue->winfo_size; | ||
645 | |||
646 | /* | ||
647 | * The buffers pointed by SD_PTR0/SD_LEN0 and SD_PTR1/SD_LEN1 | ||
648 | * must contains a TXWI structure + 802.11 header + padding + 802.11 | ||
649 | * data. We choose to have SD_PTR0/SD_LEN0 only contains TXWI and | ||
650 | * SD_PTR1/SD_LEN1 contains 802.11 header + padding + 802.11 | ||
651 | * data. It means that LAST_SEC0 is always 0. | ||
652 | */ | ||
653 | |||
654 | /* | ||
655 | * Initialize TX descriptor | ||
656 | */ | ||
657 | word = 0; | ||
658 | rt2x00_set_field32(&word, TXD_W0_SD_PTR0, skbdesc->skb_dma); | ||
659 | rt2x00_desc_write(txd, 0, word); | ||
660 | |||
661 | word = 0; | ||
662 | rt2x00_set_field32(&word, TXD_W1_SD_LEN1, entry->skb->len); | ||
663 | rt2x00_set_field32(&word, TXD_W1_LAST_SEC1, | ||
664 | !test_bit(ENTRY_TXD_MORE_FRAG, &txdesc->flags)); | ||
665 | rt2x00_set_field32(&word, TXD_W1_BURST, | ||
666 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | ||
667 | rt2x00_set_field32(&word, TXD_W1_SD_LEN0, txwi_size); | ||
668 | rt2x00_set_field32(&word, TXD_W1_LAST_SEC0, 0); | ||
669 | rt2x00_set_field32(&word, TXD_W1_DMA_DONE, 0); | ||
670 | rt2x00_desc_write(txd, 1, word); | ||
671 | |||
672 | word = 0; | ||
673 | rt2x00_set_field32(&word, TXD_W2_SD_PTR1, | ||
674 | skbdesc->skb_dma + txwi_size); | ||
675 | rt2x00_desc_write(txd, 2, word); | ||
676 | |||
677 | word = 0; | ||
678 | rt2x00_set_field32(&word, TXD_W3_WIV, | ||
679 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); | ||
680 | rt2x00_set_field32(&word, TXD_W3_QSEL, 2); | ||
681 | rt2x00_desc_write(txd, 3, word); | ||
682 | |||
683 | /* | ||
684 | * Register descriptor details in skb frame descriptor. | ||
685 | */ | ||
686 | skbdesc->desc = txd; | ||
687 | skbdesc->desc_len = TXD_DESC_SIZE; | ||
688 | } | ||
689 | |||
690 | /* | ||
691 | * RX control handlers | 631 | * RX control handlers |
692 | */ | 632 | */ |
693 | static void rt2800pci_fill_rxdone(struct queue_entry *entry, | 633 | static void rt2800pci_fill_rxdone(struct queue_entry *entry, |