Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5616a6ef authored by Gabor Juhos's avatar Gabor Juhos Committed by John W. Linville
Browse files

rt2x00: move extra_tx_headroom field from rt2x00_ops to rt2x00_dev



The extra_tx_headroom field of struct rt2x00_ops
indicates the extra TX headroom size required for
a given device. This data is redundant, the value
can be computed from the desc_size and winfo_size
fields of the TX queues.

Move the extra_tx_headroom field to struct rt2x00_dev,
compute its value in the probe routine and use the
cached value in the rest of the code.

Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
Acked-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent d619c62f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1813,7 +1813,6 @@ static const struct rt2x00_ops rt2400pci_ops = {
	.eeprom_size		= EEPROM_SIZE,
	.rf_size		= RF_SIZE,
	.tx_queues		= NUM_TX_QUEUES,
	.extra_tx_headroom	= 0,
	.queue_init		= rt2400pci_queue_init,
	.lib			= &rt2400pci_rt2x00_ops,
	.hw			= &rt2400pci_mac80211_ops,
+0 −1
Original line number Diff line number Diff line
@@ -2102,7 +2102,6 @@ static const struct rt2x00_ops rt2500pci_ops = {
	.eeprom_size		= EEPROM_SIZE,
	.rf_size		= RF_SIZE,
	.tx_queues		= NUM_TX_QUEUES,
	.extra_tx_headroom	= 0,
	.queue_init		= rt2500pci_queue_init,
	.lib			= &rt2500pci_rt2x00_ops,
	.hw			= &rt2500pci_mac80211_ops,
+0 −1
Original line number Diff line number Diff line
@@ -1913,7 +1913,6 @@ static const struct rt2x00_ops rt2500usb_ops = {
	.eeprom_size		= EEPROM_SIZE,
	.rf_size		= RF_SIZE,
	.tx_queues		= NUM_TX_QUEUES,
	.extra_tx_headroom	= TXD_DESC_SIZE,
	.queue_init		= rt2500usb_queue_init,
	.lib			= &rt2500usb_rt2x00_ops,
	.hw			= &rt2500usb_mac80211_ops,
+0 −1
Original line number Diff line number Diff line
@@ -1231,7 +1231,6 @@ static const struct rt2x00_ops rt2800pci_ops = {
	.eeprom_size		= EEPROM_SIZE,
	.rf_size		= RF_SIZE,
	.tx_queues		= NUM_TX_QUEUES,
	.extra_tx_headroom	= TXWI_DESC_SIZE,
	.queue_init		= rt2800pci_queue_init,
	.lib			= &rt2800pci_rt2x00_ops,
	.drv			= &rt2800pci_rt2800_ops,
+0 −2
Original line number Diff line number Diff line
@@ -905,7 +905,6 @@ static const struct rt2x00_ops rt2800usb_ops = {
	.eeprom_size		= EEPROM_SIZE,
	.rf_size		= RF_SIZE,
	.tx_queues		= NUM_TX_QUEUES,
	.extra_tx_headroom	= TXINFO_DESC_SIZE + TXWI_DESC_SIZE,
	.queue_init		= rt2800usb_queue_init,
	.lib			= &rt2800usb_rt2x00_ops,
	.drv			= &rt2800usb_rt2800_ops,
@@ -922,7 +921,6 @@ static const struct rt2x00_ops rt2800usb_ops_5592 = {
	.eeprom_size		= EEPROM_SIZE,
	.rf_size		= RF_SIZE,
	.tx_queues		= NUM_TX_QUEUES,
	.extra_tx_headroom	= TXINFO_DESC_SIZE + TXWI_DESC_SIZE_5592,
	.queue_init		= rt2800usb_queue_init,
	.lib			= &rt2800usb_rt2x00_ops,
	.drv			= &rt2800usb_rt2800_ops,
Loading