Search Linux Wireless

[PATCH 2/4] ath5k: Only one tx descriptor per buffer, no need for ATH_TXDESC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since we don't (and probably won't) support fast frames we'll have
only one descriptor for each buffer so there is no need for
ATH_TXDESC.


Changes-licensed-under: 3-clause-BSD

Signed-Off-by: Nick Kossifidis <mickflemm@xxxxxxxxx>
---
diff --git a/drivers/net/wireless/ath5k/base.c
b/drivers/net/wireless/ath5k/base.c
index 6f55011..3a9652b 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -2030,7 +2030,7 @@ static int ath_desc_alloc(struct ath_softc *sc,
struct pci_dev *pdev)

        /* allocate descriptors */
        sc->desc_len = sizeof(struct ath_desc) *
-                       (ATH_TXBUF * ATH_TXDESC + ATH_RXBUF + ATH_BCBUF + 1);
+                       (ATH_TXBUF + ATH_RXBUF + ATH_BCBUF + 1);
        sc->desc = pci_alloc_consistent(pdev, sc->desc_len, &sc->desc_daddr);
        if (sc->desc == NULL) {
                dev_err(&pdev->dev, "can't allocate descriptors\n");
@@ -2060,8 +2060,8 @@ static int ath_desc_alloc(struct ath_softc *sc,
struct pci_dev *pdev)

        INIT_LIST_HEAD(&sc->txbuf);
        sc->txbuf_len = ATH_TXBUF;
-       for (i = 0; i < ATH_TXBUF; i++, bf++, ds += ATH_TXDESC,
-                       da += ATH_TXDESC * sizeof(*ds)) {
+       for (i = 0; i < ATH_TXBUF; i++, bf++, ds++,
+                       da += sizeof(*ds)) {
                bf->desc = ds;
                bf->daddr = da;
                list_add_tail(&bf->list, &sc->txbuf);
diff --git a/drivers/net/wireless/ath5k/base.h
b/drivers/net/wireless/ath5k/base.h
index 390d3d7..09e8dbe 100644
--- a/drivers/net/wireless/ath5k/base.h
+++ b/drivers/net/wireless/ath5k/base.h
@@ -63,7 +63,6 @@

 #define        ATH_RXBUF       40              /* number of RX buffers */
 #define        ATH_TXBUF       200             /* number of TX buffers */
-#define        ATH_TXDESC      1               /* number of
descriptors per buffer */
 #define ATH_BCBUF      1               /* number of beacon buffers */
 #define        ATH_TXMAXTRY    11              /* max number of
transmit attempts */
 #define        ATH_TXINTR_PERIOD 5             /* max number of
batched tx descriptors */



-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux