aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2011-01-12 13:26:56 -0500
committerBen Hutchings <bhutchings@solarflare.com>2011-01-13 17:08:43 -0500
commit976534319b0823aae29237d02e29a32ebcd5f910 (patch)
tree7ded52acd405d90e05fe38aff3592c08be0abda3 /drivers/net/sfc/net_driver.h
parent5b919f833d9d60588d026ad82d17f17e8872c7a9 (diff)
sfc: Make efx_get_tx_queue() an inline function
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index bdce66ddf93..28df8665256 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -735,6 +735,7 @@ struct efx_nic {
735 unsigned next_buffer_table; 735 unsigned next_buffer_table;
736 unsigned n_channels; 736 unsigned n_channels;
737 unsigned n_rx_channels; 737 unsigned n_rx_channels;
738 unsigned tx_channel_offset;
738 unsigned n_tx_channels; 739 unsigned n_tx_channels;
739 unsigned int rx_buffer_len; 740 unsigned int rx_buffer_len;
740 unsigned int rx_buffer_order; 741 unsigned int rx_buffer_order;
@@ -929,8 +930,13 @@ efx_get_channel(struct efx_nic *efx, unsigned index)
929 _channel = (_channel->channel + 1 < (_efx)->n_channels) ? \ 930 _channel = (_channel->channel + 1 < (_efx)->n_channels) ? \
930 (_efx)->channel[_channel->channel + 1] : NULL) 931 (_efx)->channel[_channel->channel + 1] : NULL)
931 932
932extern struct efx_tx_queue * 933static inline struct efx_tx_queue *
933efx_get_tx_queue(struct efx_nic *efx, unsigned index, unsigned type); 934efx_get_tx_queue(struct efx_nic *efx, unsigned index, unsigned type)
935{
936 EFX_BUG_ON_PARANOID(index >= efx->n_tx_channels ||
937 type >= EFX_TXQ_TYPES);
938 return &efx->channel[efx->tx_channel_offset + index]->tx_queue[type];
939}
934 940
935static inline struct efx_tx_queue * 941static inline struct efx_tx_queue *
936efx_channel_get_tx_queue(struct efx_channel *channel, unsigned type) 942efx_channel_get_tx_queue(struct efx_channel *channel, unsigned type)