diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-09-10 02:41:36 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-10 15:27:32 -0400 |
commit | ba1e8a35b77f3bc7d109696dbd2a7fd5af208b62 (patch) | |
tree | 5c65eea772e85b7e31b3488fa09e523bbd68b272 /drivers/net/sfc/net_driver.h | |
parent | 58758aa505edc5b8f8393cee45b54c7485d76de5 (diff) |
sfc: Abstract channel and index lookup for RX queues
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r-- | drivers/net/sfc/net_driver.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h index 64e7caa4bbb5..89c6e02c57dd 100644 --- a/drivers/net/sfc/net_driver.h +++ b/drivers/net/sfc/net_driver.h | |||
@@ -943,6 +943,17 @@ struct efx_nic_type { | |||
943 | continue; \ | 943 | continue; \ |
944 | else | 944 | else |
945 | 945 | ||
946 | static inline struct efx_channel * | ||
947 | efx_rx_queue_channel(struct efx_rx_queue *rx_queue) | ||
948 | { | ||
949 | return rx_queue->channel; | ||
950 | } | ||
951 | |||
952 | static inline int efx_rx_queue_index(struct efx_rx_queue *rx_queue) | ||
953 | { | ||
954 | return rx_queue->queue; | ||
955 | } | ||
956 | |||
946 | /* Returns a pointer to the specified receive buffer in the RX | 957 | /* Returns a pointer to the specified receive buffer in the RX |
947 | * descriptor queue. | 958 | * descriptor queue. |
948 | */ | 959 | */ |