From bcd4d2d80ce5038c10289c50c6a11e786cc1a04c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 5 Jun 2015 08:59:57 +0000 Subject: ramips: improve tx clean up and add fe_tx_ring struct if there is any new tx need to clean up. do it in next napi poll. collect tx related members to fe_tx_ring struct. for better cache usage and more readable. Signed-off-by: michael lee git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45895 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- .../files/drivers/net/ethernet/ralink/ralink_soc_eth.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h') diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h index ac7c7e54bf..6614c762dd 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h @@ -454,6 +454,15 @@ struct fe_tx_buf DEFINE_DMA_UNMAP_LEN(dma_len1); }; +struct fe_tx_ring +{ + struct fe_tx_dma *tx_dma; + struct fe_tx_buf *tx_buf; + dma_addr_t tx_phys; + u16 tx_ring_size; + u16 tx_free_idx; +}; + struct fe_priv { spinlock_t page_lock; @@ -473,10 +482,7 @@ struct fe_priv dma_addr_t rx_phys; struct napi_struct rx_napi; - struct fe_tx_dma *tx_dma; - struct fe_tx_buf *tx_buf; - dma_addr_t tx_phys; - unsigned int tx_free_idx; + struct fe_tx_ring tx_ring; struct fe_phy *phy; struct mii_bus *mii_bus; @@ -489,7 +495,6 @@ struct fe_priv unsigned long vlan_map; struct work_struct pending_work; DECLARE_BITMAP(pending_flags, FE_FLAG_MAX); - u16 tx_ring_size; u16 rx_ring_size; }; -- cgit v1.2.3