Commit d42c8d86 authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by John W. Linville

rt2800usb: add RXINFO_DESC_SIZE definition

Add RXINFO_DESC_SIZE definition and use it instead of abusing
RXD_DESC_SIZE one (TXD_DESC_SIZE and RXD_DESC_SIZE are specific
to PCI version of the chipset).
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Acked-by: default avatarIvo van Doorn <IvDoorn@gmail.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7ef5cc92
...@@ -2152,7 +2152,7 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry, ...@@ -2152,7 +2152,7 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
*/ */
memcpy(skbdesc->desc, rxd, skbdesc->desc_len); memcpy(skbdesc->desc, rxd, skbdesc->desc_len);
rxd = (__le32 *)skbdesc->desc; rxd = (__le32 *)skbdesc->desc;
rxwi = &rxd[RXD_DESC_SIZE / sizeof(__le32)]; rxwi = &rxd[RXINFO_DESC_SIZE / sizeof(__le32)];
/* /*
* It is now safe to read the descriptor on all architectures. * It is now safe to read the descriptor on all architectures.
...@@ -2874,7 +2874,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { ...@@ -2874,7 +2874,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = {
static const struct data_queue_desc rt2800usb_queue_rx = { static const struct data_queue_desc rt2800usb_queue_rx = {
.entry_num = RX_ENTRIES, .entry_num = RX_ENTRIES,
.data_size = AGGREGATION_SIZE, .data_size = AGGREGATION_SIZE,
.desc_size = RXD_DESC_SIZE + RXWI_DESC_SIZE, .desc_size = RXINFO_DESC_SIZE + RXWI_DESC_SIZE,
.priv_size = sizeof(struct queue_entry_priv_usb), .priv_size = sizeof(struct queue_entry_priv_usb),
}; };
......
...@@ -1747,7 +1747,8 @@ struct mac_iveiv_entry { ...@@ -1747,7 +1747,8 @@ struct mac_iveiv_entry {
#define TXD_DESC_SIZE ( 4 * sizeof(__le32) ) #define TXD_DESC_SIZE ( 4 * sizeof(__le32) )
#define TXINFO_DESC_SIZE ( 1 * sizeof(__le32) ) #define TXINFO_DESC_SIZE ( 1 * sizeof(__le32) )
#define TXWI_DESC_SIZE ( 4 * sizeof(__le32) ) #define TXWI_DESC_SIZE ( 4 * sizeof(__le32) )
#define RXD_DESC_SIZE ( 1 * sizeof(__le32) ) #define RXD_DESC_SIZE ( 4 * sizeof(__le32) )
#define RXINFO_DESC_SIZE ( 1 * sizeof(__le32) )
#define RXWI_DESC_SIZE ( 4 * sizeof(__le32) ) #define RXWI_DESC_SIZE ( 4 * sizeof(__le32) )
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment