ramips: improve tx clean up and add fe_tx_ring struct
[openwrt/svn-archive/archive.git] / target / linux / ramips / files / drivers / net / ethernet / ralink / ralink_soc_eth.h
index ac7c7e54bffadb4132275f526b1fac10ae2ad81b..6614c762dd4d3db2ef7a3857abf1eaa39f291625 100644 (file)
@@ -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;
 };