diff options
author | Zach Brown <zach.brown@ni.com> | 2016-10-19 09:56:57 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-19 15:18:20 -0400 |
commit | b410d13e10db86832026f6ef1a9a7b4ae1c48c19 (patch) | |
tree | e32aca90ebc3105d6fd41b537b972bf9462b7ac3 /drivers/net/ethernet/cadence/macb.h | |
parent | 0f6e87613c3234c6350aaa971bd9434d29405302 (diff) | |
download | op-kernel-dev-b410d13e10db86832026f6ef1a9a7b4ae1c48c19.zip op-kernel-dev-b410d13e10db86832026f6ef1a9a7b4ae1c48c19.tar.gz |
net: macb: Use variables with defaults for tx/rx ring sizes instead of hardcoded values
The macb driver hardcoded the tx/rx ring sizes. This made it
impossible to change the sizes at run time.
Add tx_ring_size, and rx_ring_size variables to macb object, which
are initilized with default vales during macb_init. Change all
references to RX_RING_SIZE and TX_RING_SIZE to their respective
replacements.
Signed-off-by: Zach Brown <zach.brown@ni.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cadence/macb.h')
-rw-r--r-- | drivers/net/ethernet/cadence/macb.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/cadence/macb.h b/drivers/net/ethernet/cadence/macb.h index 8bed4b5..1216950 100644 --- a/drivers/net/ethernet/cadence/macb.h +++ b/drivers/net/ethernet/cadence/macb.h @@ -811,6 +811,9 @@ struct macb { void *rx_buffers; size_t rx_buffer_size; + unsigned int rx_ring_size; + unsigned int tx_ring_size; + unsigned int num_queues; unsigned int queue_mask; struct macb_queue queues[MACB_MAX_QUEUES]; |