diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-06-05 08:59:57 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-06-05 08:59:57 +0000 |
commit | bcd4d2d80ce5038c10289c50c6a11e786cc1a04c (patch) | |
tree | 14580b804e341fb9e792f515c33f20886adf6c9f /target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h | |
parent | b8de0b2ee1ef6db4f7ee2e71299ab0168ba562c2 (diff) | |
download | master-187ad058-bcd4d2d80ce5038c10289c50c6a11e786cc1a04c.tar.gz master-187ad058-bcd4d2d80ce5038c10289c50c6a11e786cc1a04c.tar.bz2 master-187ad058-bcd4d2d80ce5038c10289c50c6a11e786cc1a04c.zip |
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 <igvtee@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@45895 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h | 15 |
1 files changed, 10 insertions, 5 deletions
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; }; |