diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2013-08-16 10:23:29 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-08-16 14:17:50 -0400 |
commit | ae1b1c5dcdef1ebd4b37a7d56ad767add757a660 (patch) | |
tree | a54e5e5035e4604f28706c7151b46a84d1acd37b /drivers/net/wireless/rt2x00/rt2800usb.c | |
parent | d074e8d547853cc8b40cf93a460e8fbf9eaa3d00 (diff) | |
download | op-kernel-dev-ae1b1c5dcdef1ebd4b37a7d56ad767add757a660.zip op-kernel-dev-ae1b1c5dcdef1ebd4b37a7d56ad767add757a660.tar.gz |
rt2x00: rt2800lib: introduce rt2800_get_txwi_rxwi_size helper
The rt2800pci driver uses the same [RT]XWI size
for all chipsets, however some chips requires
different values.
The size of the [RT]XWI structures is a constant
value for a given chipset and it does not depend
on the underlying interface. Add a helper function
which returns the correct values for the actual
chipset and use the new helper both in the rt2800usb
and in the rt2800pci drivers. This ensures that both
drivers are using the correct values.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
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.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index fc9efdf..338034e 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c @@ -854,16 +854,7 @@ static void rt2800usb_queue_init(struct data_queue *queue) struct rt2x00_dev *rt2x00dev = queue->rt2x00dev; unsigned short txwi_size, rxwi_size; - if (rt2x00_rt(rt2x00dev, RT3593)) { - txwi_size = TXWI_DESC_SIZE_4WORDS; - rxwi_size = RXWI_DESC_SIZE_5WORDS; - } else if (rt2x00_rt(rt2x00dev, RT5592)) { - txwi_size = TXWI_DESC_SIZE_5WORDS; - rxwi_size = RXWI_DESC_SIZE_6WORDS; - } else { - txwi_size = TXWI_DESC_SIZE_4WORDS; - rxwi_size = RXWI_DESC_SIZE_4WORDS; - } + rt2800_get_txwi_rxwi_size(rt2x00dev, &txwi_size, &rxwi_size); switch (queue->qid) { case QID_RX: |