Skip to contentSkip to conversation

ath5k: Only one tx descriptor per buffer, no need for ATH_TXDESC

PATCH In review Nick Kossifidis 1 participant 1 message Oct 16, 2007 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

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

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

---

(quoted diff) +0 -0

b/drivers/net/wireless/ath5k/base.c
index 6f55011..3a9652b 100644

drivers/net/wireless/ath5k/base.c +0 -0
@@ -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);
(quoted diff) +0 -0

b/drivers/net/wireless/ath5k/base.h
index 390d3d7..09e8dbe 100644

drivers/net/wireless/ath5k/base.h +0 -1
@@ -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 */

Signature · 3 lines
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick