diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2008-11-17 22:40:42 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-11-26 09:47:34 -0500 |
commit | 8f93b8b337763a58fcdf23333ffe752db6c93bae (patch) | |
tree | a28c210cc5382c087be7ba90a96f279e3a0bbd9a /drivers/net/wireless | |
parent | daa9deb359252496796fa2b7420012e252b327b6 (diff) |
ath9k: Use straightforward PCI routines to setup the TX buffer.
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath9k/xmit.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 4c9a03ed8382..50d4105ee4b3 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
@@ -1646,7 +1646,7 @@ static void ath_txq_drain_pending_buffers(struct ath_softc *sc, | |||
1646 | } | 1646 | } |
1647 | 1647 | ||
1648 | static void ath_tx_setup_buffer(struct ath_softc *sc, struct ath_buf *bf, | 1648 | static void ath_tx_setup_buffer(struct ath_softc *sc, struct ath_buf *bf, |
1649 | struct sk_buff *skb, struct scatterlist *sg, | 1649 | struct sk_buff *skb, |
1650 | struct ath_tx_control *txctl) | 1650 | struct ath_tx_control *txctl) |
1651 | { | 1651 | { |
1652 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); | 1652 | struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); |
@@ -1711,7 +1711,6 @@ static void ath_tx_setup_buffer(struct ath_softc *sc, struct ath_buf *bf, | |||
1711 | 1711 | ||
1712 | /* FIXME: tx power */ | 1712 | /* FIXME: tx power */ |
1713 | static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | 1713 | static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, |
1714 | struct scatterlist *sg, u32 n_sg, | ||
1715 | struct ath_tx_control *txctl) | 1714 | struct ath_tx_control *txctl) |
1716 | { | 1715 | { |
1717 | struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; | 1716 | struct sk_buff *skb = (struct sk_buff *)bf->bf_mpdu; |
@@ -1740,10 +1739,10 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct ath_buf *bf, | |||
1740 | bf->bf_keyix, bf->bf_keytype, bf->bf_flags); | 1739 | bf->bf_keyix, bf->bf_keytype, bf->bf_flags); |
1741 | 1740 | ||
1742 | ath9k_hw_filltxdesc(ah, ds, | 1741 | ath9k_hw_filltxdesc(ah, ds, |
1743 | sg_dma_len(sg), /* segment length */ | 1742 | skb->len, /* segment length */ |
1744 | true, /* first segment */ | 1743 | true, /* first segment */ |
1745 | (n_sg == 1) ? true : false, /* last segment */ | 1744 | true, /* last segment */ |
1746 | ds); /* first descriptor */ | 1745 | ds); /* first descriptor */ |
1747 | 1746 | ||
1748 | bf->bf_lastfrm = bf; | 1747 | bf->bf_lastfrm = bf; |
1749 | 1748 | ||
@@ -1783,7 +1782,6 @@ int ath_tx_start(struct ath_softc *sc, struct sk_buff *skb, | |||
1783 | struct ath_tx_control *txctl) | 1782 | struct ath_tx_control *txctl) |
1784 | { | 1783 | { |
1785 | struct ath_buf *bf; | 1784 | struct ath_buf *bf; |
1786 | struct scatterlist sg; | ||
1787 | 1785 | ||
1788 | /* Check if a tx buffer is available */ | 1786 | /* Check if a tx buffer is available */ |
1789 | 1787 | ||
@@ -1794,15 +1792,8 @@ int ath_tx_start(struct ath_softc *sc, struct sk_buff *skb, | |||
1794 | return -1; | 1792 | return -1; |
1795 | } | 1793 | } |
1796 | 1794 | ||
1797 | ath_tx_setup_buffer(sc, bf, skb, &sg, txctl); | 1795 | ath_tx_setup_buffer(sc, bf, skb, txctl); |
1798 | 1796 | ath_tx_start_dma(sc, bf, txctl); | |
1799 | /* Setup S/G */ | ||
1800 | |||
1801 | memset(&sg, 0, sizeof(struct scatterlist)); | ||
1802 | sg_dma_address(&sg) = bf->bf_dmacontext; | ||
1803 | sg_dma_len(&sg) = skb->len; | ||
1804 | |||
1805 | ath_tx_start_dma(sc, bf, &sg, 1, txctl); | ||
1806 | 1797 | ||
1807 | return 0; | 1798 | return 0; |
1808 | } | 1799 | } |