rt2x00: provide separate information about TXWI & RXWI sizes
On new 2800 hardware sizes of TXWI & RXIW can be different than TXD
& RXD sizes, so we need to difference between them. Let's define
winfo_size as size of in buffer descriptor (TXWI & RXWI), and desc_size
of as size of additional descriptor - in separate DMA coherent buffer
for PCI hardware (TXD & RXD) and yet another in buffer descriptor for
USB hardware (TXINFO & RXINFO).
Change is rt2x00 wild, but should affect only 2800 driver.
Patch also fix beaconing for 5592usb AP mode.
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index def357e..d540ce9 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -735,11 +735,6 @@
* Process the RXWI structure that is at the start of the buffer.
*/
rt2800_process_rxwi(entry, rxdesc);
-
- /*
- * Remove RXWI descriptor from start of buffer.
- */
- skb_pull(entry->skb, RXWI_DESC_SIZE);
}
/*
@@ -1197,6 +1192,7 @@
.entry_num = 128,
.data_size = AGGREGATION_SIZE,
.desc_size = RXD_DESC_SIZE,
+ .winfo_size = RXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_mmio),
};
@@ -1204,13 +1200,15 @@
.entry_num = 64,
.data_size = AGGREGATION_SIZE,
.desc_size = TXD_DESC_SIZE,
+ .winfo_size = TXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_mmio),
};
static const struct data_queue_desc rt2800pci_queue_bcn = {
.entry_num = 8,
.data_size = 0, /* No DMA required for beacons */
- .desc_size = TXWI_DESC_SIZE,
+ .desc_size = TXD_DESC_SIZE,
+ .winfo_size = TXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_mmio),
};