From 9f67080492cf47e81ed7397c22d3c73ae44d9554 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 20 Jul 2008 15:02:33 -0700 Subject: [PATCH] DMA descriptors must always be accessed in native endianness. DMA descriptors must always be accessed in native endianness. With this patch and my previous series, Atheros AR9160 now works for me in STA mode (tested on an IXP4xx board, big-endian) Signed-off-by: Felix Fietkau Signed-off-by: Luis R. Rodriguez --- drivers/net/wireless/ath9k/beacon.c | 8 ++------ drivers/net/wireless/ath9k/xmit.c | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c index e94ddc8..1a23fd1 100644 --- a/drivers/net/wireless/ath9k/beacon.c +++ b/drivers/net/wireless/ath9k/beacon.c @@ -159,7 +159,7 @@ static void empty_mcastq_into_cabq(struct ath_hal *ah, if (!cabq->axq_link) ath9k_hw_puttxbuf(ah, cabq->axq_qnum, bfmcast->bf_daddr); else - *cabq->axq_link = cpu_to_le32(bfmcast->bf_daddr); + *cabq->axq_link = bfmcast->bf_daddr; /* append the private vap mcast list to the cabq */ @@ -688,11 +688,7 @@ void ath9k_beacon_tasklet(unsigned long data) if (if_id != ATH_IF_ID_ANY) { bf = ath_beacon_generate(sc, if_id); if (bf != NULL) { - if (bflink != &bfaddr) - *bflink = cpu_to_le32( - bf->bf_daddr); - else - *bflink = bf->bf_daddr; + *bflink = bf->bf_daddr; bflink = &bf->bf_desc->ds_link; bc++; } diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 5caa85b..6374bf8 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c @@ -121,7 +121,7 @@ static void ath_tx_mcastqaddbuf(struct ath_softc *sc, DPRINTF(sc, ATH_DEBUG_TX_PROC, "%s: txq depth = %d\n", __func__, txq->axq_depth); if (txq->axq_link != NULL) { - *txq->axq_link = cpu_to_le32(bf->bf_daddr); + *txq->axq_link = bf->bf_daddr; DPRINTF(sc, ATH_DEBUG_XMIT, "%s: link[%u](%p)=%llx (%p)\n", __func__, @@ -168,7 +168,7 @@ static void ath_tx_txqaddbuf(struct ath_softc *sc, __func__, txq->axq_qnum, ito64(bf->bf_daddr), bf->bf_desc); } else { - *txq->axq_link = cpu_to_le32(bf->bf_daddr); + *txq->axq_link = bf->bf_daddr; DPRINTF(sc, ATH_DEBUG_XMIT, "%s: link[%u] (%p)=%llx (%p)\n", __func__, txq->axq_qnum, txq->axq_link, -- 1.5.4.3