summaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-06-05 08:59:57 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-06-05 08:59:57 +0000
commit4480fbce62bdd8b726d3da750acaee267c219715 (patch)
tree48145325e8239723456c92fc68ad56f614d1352d /target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.h
parent2a66c9886ff039587169e50014f1d6e95af1d3ae (diff)
downloadmaster-31e0f0ae-4480fbce62bdd8b726d3da750acaee267c219715.tar.gz
master-31e0f0ae-4480fbce62bdd8b726d3da750acaee267c219715.tar.bz2
master-31e0f0ae-4480fbce62bdd8b726d3da750acaee267c219715.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> SVN-Revision: 45895
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.h15
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;
};