* [PATCH] ath9k: fix another endianness issue
@ 2008-07-20 16:31 Felix Fietkau
2008-07-20 18:42 ` [PATCH v2] " Felix Fietkau
2008-07-20 22:01 ` [PATCH v3] " Felix Fietkau
0 siblings, 2 replies; 4+ messages in thread
From: Felix Fietkau @ 2008-07-20 16:31 UTC (permalink / raw)
To: linux-wireless, ath9k-devel
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 <nbd@openwrt.org>
---
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -168,7 +168,7 @@
__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,
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2] ath9k: fix another endianness issue
2008-07-20 16:31 [PATCH] ath9k: fix another endianness issue Felix Fietkau
@ 2008-07-20 18:42 ` Felix Fietkau
2008-07-20 22:01 ` [PATCH v3] " Felix Fietkau
1 sibling, 0 replies; 4+ messages in thread
From: Felix Fietkau @ 2008-07-20 18:42 UTC (permalink / raw)
To: linux-wireless, ath9k-devel
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 <nbd@openwrt.org>
---
updated version, found some more instances of the same thing
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -121,7 +121,7 @@
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 @@
__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,
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -159,7 +159,7 @@
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 @@
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++;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v3] ath9k: fix another endianness issue
2008-07-20 16:31 [PATCH] ath9k: fix another endianness issue Felix Fietkau
2008-07-20 18:42 ` [PATCH v2] " Felix Fietkau
@ 2008-07-20 22:01 ` Felix Fietkau
2008-07-20 22:26 ` Luis R. Rodriguez
1 sibling, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2008-07-20 22:01 UTC (permalink / raw)
To: linux-wireless
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 <nbd@openwrt.org>
---
sorry, my mail client broke the last one (whitespace crap)
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -121,7 +121,7 @@
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 @@
__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,
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -159,7 +159,7 @@
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 @@
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++;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3] ath9k: fix another endianness issue
2008-07-20 22:01 ` [PATCH v3] " Felix Fietkau
@ 2008-07-20 22:26 ` Luis R. Rodriguez
0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2008-07-20 22:26 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, ath9k-devel
On Sun, Jul 20, 2008 at 3:01 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> 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 <nbd@openwrt.org>
> ---
> sorry, my mail client broke the last one (whitespace crap)
Thanks!
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-07-20 22:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-20 16:31 [PATCH] ath9k: fix another endianness issue Felix Fietkau
2008-07-20 18:42 ` [PATCH v2] " Felix Fietkau
2008-07-20 22:01 ` [PATCH v3] " Felix Fietkau
2008-07-20 22:26 ` Luis R. Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).