]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
rt2x00: rt2800: unify [RT]XWI_SIZE defines
authorGabor Juhos <juhosg@openwrt.org>
Sat, 22 Jun 2013 14:31:59 +0000 (16:31 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 24 Jun 2013 18:44:26 +0000 (14:44 -0400)
Use common names instead of chip specific ones.
The patch contains no functional changes, but
it makes it easier to add support for further
descriptor sizes.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2800.h
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2800usb.c

index a7630d5ec8921cb9c3024e9fcf07e0bbf1a5071c..fe43d011f0045e1f156ced6fbae44f893b8ac8ca 100644 (file)
@@ -2625,11 +2625,13 @@ struct mac_iveiv_entry {
 /*
  * DMA descriptor defines.
  */
-#define TXWI_DESC_SIZE                 (4 * sizeof(__le32))
-#define RXWI_DESC_SIZE                 (4 * sizeof(__le32))
 
-#define TXWI_DESC_SIZE_5592            (5 * sizeof(__le32))
-#define RXWI_DESC_SIZE_5592            (6 * sizeof(__le32))
+#define TXWI_DESC_SIZE_4WORDS          (4 * sizeof(__le32))
+#define TXWI_DESC_SIZE_5WORDS          (5 * sizeof(__le32))
+
+#define RXWI_DESC_SIZE_4WORDS          (4 * sizeof(__le32))
+#define RXWI_DESC_SIZE_6WORDS          (6 * sizeof(__le32))
+
 /*
  * TX WI structure
  */
index e66491829507cf578ac930e00c25447b06983fb4..00055627eb8de41282a8248f0ad855a87fe00c86 100644 (file)
@@ -1194,7 +1194,7 @@ static void rt2800pci_queue_init(struct data_queue *queue)
                queue->limit = 128;
                queue->data_size = AGGREGATION_SIZE;
                queue->desc_size = RXD_DESC_SIZE;
-               queue->winfo_size = RXWI_DESC_SIZE;
+               queue->winfo_size = RXWI_DESC_SIZE_4WORDS;
                queue->priv_size = sizeof(struct queue_entry_priv_mmio);
                break;
 
@@ -1205,7 +1205,7 @@ static void rt2800pci_queue_init(struct data_queue *queue)
                queue->limit = 64;
                queue->data_size = AGGREGATION_SIZE;
                queue->desc_size = TXD_DESC_SIZE;
-               queue->winfo_size = TXWI_DESC_SIZE;
+               queue->winfo_size = TXWI_DESC_SIZE_4WORDS;
                queue->priv_size = sizeof(struct queue_entry_priv_mmio);
                break;
 
@@ -1213,7 +1213,7 @@ static void rt2800pci_queue_init(struct data_queue *queue)
                queue->limit = 8;
                queue->data_size = 0; /* No DMA required for beacons */
                queue->desc_size = TXD_DESC_SIZE;
-               queue->winfo_size = TXWI_DESC_SIZE;
+               queue->winfo_size = TXWI_DESC_SIZE_4WORDS;
                queue->priv_size = sizeof(struct queue_entry_priv_mmio);
                break;
 
index 7edd903dd749dae9d23347c4f3683a20eaa7652e..840833b26bfaeeda520a5ce29fba81bf839af284 100644 (file)
@@ -855,11 +855,11 @@ static void rt2800usb_queue_init(struct data_queue *queue)
        unsigned short txwi_size, rxwi_size;
 
        if (rt2x00_rt(rt2x00dev, RT5592)) {
-               txwi_size = TXWI_DESC_SIZE_5592;
-               rxwi_size = RXWI_DESC_SIZE_5592;
+               txwi_size = TXWI_DESC_SIZE_5WORDS;
+               rxwi_size = RXWI_DESC_SIZE_6WORDS;
        } else {
-               txwi_size = TXWI_DESC_SIZE;
-               rxwi_size = RXWI_DESC_SIZE;
+               txwi_size = TXWI_DESC_SIZE_4WORDS;
+               rxwi_size = RXWI_DESC_SIZE_4WORDS;
        }
 
        switch (queue->qid) {