summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2800usb.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <stf_xl@wp.pl>2013-04-17 16:30:47 +0400
committerJohn W. Linville <linville@tuxdriver.com>2013-04-22 23:20:20 +0400
commitf0bda571047746365569fccaede86adf6c0dfe8a (patch)
treec6d17cb67c4bb0e64c3e4fae4dcb5b4daf22399a /drivers/net/wireless/rt2x00/rt2800usb.c
parent074f25295b78dca7a0f65b87a16bebe493aab4f9 (diff)
downloadlinux-f0bda571047746365569fccaede86adf6c0dfe8a.tar.xz
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index f32282009146..0cb6bbee7f32 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -485,7 +485,7 @@ static void rt2800usb_write_tx_desc(struct queue_entry *entry,
*/
skbdesc->flags |= SKBDESC_DESC_IN_SKB;
skbdesc->desc = txi;
- skbdesc->desc_len = entry->queue->desc_size;
+ skbdesc->desc_len = TXINFO_DESC_SIZE + entry->queue->winfo_size;
}
/*
@@ -730,11 +730,6 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
* Process the RXWI structure.
*/
rt2800_process_rxwi(entry, rxdesc);
-
- /*
- * Remove RXWI descriptor from start of buffer.
- */
- skb_pull(entry->skb, entry->queue->desc_size - RXINFO_DESC_SIZE);
}
/*
@@ -858,21 +853,24 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
static const struct data_queue_desc rt2800usb_queue_rx = {
.entry_num = 128,
.data_size = AGGREGATION_SIZE,
- .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE,
+ .desc_size = RXINFO_DESC_SIZE,
+ .winfo_size = RXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_usb),
};
static const struct data_queue_desc rt2800usb_queue_tx = {
.entry_num = 16,
.data_size = AGGREGATION_SIZE,
- .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE,
+ .desc_size = TXINFO_DESC_SIZE,
+ .winfo_size = TXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_usb),
};
static const struct data_queue_desc rt2800usb_queue_bcn = {
.entry_num = 8,
.data_size = MGMT_FRAME_SIZE,
- .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE,
+ .desc_size = TXINFO_DESC_SIZE,
+ .winfo_size = TXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_usb),
};
@@ -898,21 +896,24 @@ static const struct rt2x00_ops rt2800usb_ops = {
static const struct data_queue_desc rt2800usb_queue_rx_5592 = {
.entry_num = 128,
.data_size = AGGREGATION_SIZE,
- .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE_5592,
+ .desc_size = RXINFO_DESC_SIZE,
+ .winfo_size = RXWI_DESC_SIZE_5592,
.priv_size = sizeof(struct queue_entry_priv_usb),
};
static const struct data_queue_desc rt2800usb_queue_tx_5592 = {
.entry_num = 16,
.data_size = AGGREGATION_SIZE,
- .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE_5592,
+ .desc_size = TXINFO_DESC_SIZE,
+ .winfo_size = TXWI_DESC_SIZE_5592,
.priv_size = sizeof(struct queue_entry_priv_usb),
};
static const struct data_queue_desc rt2800usb_queue_bcn_5592 = {
.entry_num = 8,
.data_size = MGMT_FRAME_SIZE,
- .desc_size = TXINFO_DESC_SIZE + TXWI_DESC_SIZE_5592,
+ .desc_size = TXINFO_DESC_SIZE,
+ .winfo_size = TXWI_DESC_SIZE_5592,
.priv_size = sizeof(struct queue_entry_priv_usb),
};