All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: linux-wireless@vger.kernel.org
Cc: ath5k-devel@lists.ath5k.org
Subject: [PATCH 5/5] ath9k: fix DMA descriptor access on big-endian
Date: Sun, 20 Jul 2008 15:34:02 +0200	[thread overview]
Message-ID: <48833ECA.7040402@openwrt.org> (raw)

Remove the descriptor swap, as the driver already configures the
hardware for descriptor swapping on big endian systems

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
--- a/drivers/net/wireless/ath9k/core.c
+++ b/drivers/net/wireless/ath9k/core.c
@@ -2141,22 +2141,6 @@
  	memzero(dd, sizeof(*dd));
  }

-/*
- *  Endian Swap for transmit descriptor
- *
- * XXX: Move cpu_to_le32() into hw.c and anywhere we set them, then
- * remove this.
-*/
-void ath_desc_swap(struct ath_desc *ds)
-{
-	ds->ds_link = cpu_to_le32(ds->ds_link);
-	ds->ds_data = cpu_to_le32(ds->ds_data);
-	ds->ds_ctl0 = cpu_to_le32(ds->ds_ctl0);
-	ds->ds_ctl1 = cpu_to_le32(ds->ds_ctl1);
-	ds->ds_hw[0] = cpu_to_le32(ds->ds_hw[0]);
-	ds->ds_hw[1] = cpu_to_le32(ds->ds_hw[1]);
-}
-
  /*************/
  /* Utilities */
  /*************/
--- a/drivers/net/wireless/ath9k/beacon.c
+++ b/drivers/net/wireless/ath9k/beacon.c
@@ -140,11 +140,6 @@
  	series[0].RateFlags = (ctsrate) ? HAL_RATESERIES_RTS_CTS : 0;
  	ath9k_hw_set11n_ratescenario(ah, ds, ds, 0,
  		ctsrate, ctsduration, series, 4, 0);
-
-	/* NB: The desc swap function becomes void,
-	 * if descriptor swapping is not enabled
-	 */
-	ath_desc_swap(ds);
  }

  /* Move everything from the vap's mcast queue to the hardware cab queue.
--- a/drivers/net/wireless/ath9k/core.h
+++ b/drivers/net/wireless/ath9k/core.h
@@ -384,7 +384,6 @@
  void ath_descdma_cleanup(struct ath_softc *sc,
  			 struct ath_descdma *dd,
  			 struct list_head *head);
-void ath_desc_swap(struct ath_desc *ds);

  /******/
  /* RX */
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -2062,7 +2062,6 @@
  			    AH_TRUE,            /* first segment */
  			    (n_sg == 1) ? AH_TRUE : AH_FALSE, /* last segment */
  			    ds);                /* first descriptor */
-	ath_desc_swap(ds);

  	bf->bf_lastfrm = bf;
  	bf->bf_ht = txctl->ht;

                 reply	other threads:[~2008-07-20 13:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48833ECA.7040402@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.