]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rt2x00: Move common txdone handling to rt2x00lib_txdone.
authorGertjan van Wingerde <gwingerde@gmail.com>
Tue, 29 Jun 2010 19:41:40 +0000 (21:41 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 30 Jun 2010 19:00:50 +0000 (15:00 -0400)
Now that the write_tx_data functions are merged, also merge the relevant
parts of the txdone handling into common code, rather than {usb,pci}
specific code.

Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rt2x00/rt2400pci.c
drivers/net/wireless/rt2x00/rt2500pci.c
drivers/net/wireless/rt2x00/rt2800pci.c
drivers/net/wireless/rt2x00/rt2x00dev.c
drivers/net/wireless/rt2x00/rt2x00pci.c
drivers/net/wireless/rt2x00/rt2x00pci.h
drivers/net/wireless/rt2x00/rt2x00usb.c
drivers/net/wireless/rt2x00/rt61pci.c

index 1ad3596cb41e13fd91e1fc00668c50cef335a946..3bedf566c8ee95c4b8418923e357c2481efb0b10 100644 (file)
@@ -1229,7 +1229,7 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev,
                }
                txdesc.retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT);
 
-               rt2x00pci_txdone(entry, &txdesc);
+               rt2x00lib_txdone(entry, &txdesc);
        }
 }
 
index 2771ae707a3414bcd07ae640e71c13dd0cb2ada3..69d231d83952759feb0a25c9d6ef0b6b5f64b5f6 100644 (file)
@@ -1365,7 +1365,7 @@ static void rt2500pci_txdone(struct rt2x00_dev *rt2x00dev,
                }
                txdesc.retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT);
 
-               rt2x00pci_txdone(entry, &txdesc);
+               rt2x00lib_txdone(entry, &txdesc);
        }
 }
 
index 615a865351a22df92ca352d7961f985eec82d9b3..894a43a8909ed4696dcf9d08f2e10c7e6bc45124 100644 (file)
@@ -905,7 +905,7 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
                if (txdesc.retry)
                        __set_bit(TXDONE_FALLBACK, &txdesc.flags);
 
-               rt2x00pci_txdone(entry, &txdesc);
+               rt2x00lib_txdone(entry, &txdesc);
        }
 }
 
index a914855099b741f183a7313e455cfb9abed67e6e..12ee7bdedd02600aa61e5ee61362e47198b86151 100644 (file)
@@ -210,6 +210,21 @@ void rt2x00lib_txdone(struct queue_entry *entry,
        unsigned int i;
        bool success;
 
+       /*
+        * Unmap the skb.
+        */
+       rt2x00queue_unmap_skb(rt2x00dev, entry->skb);
+
+       /*
+        * Remove the extra tx headroom from the skb.
+        */
+       skb_pull(entry->skb, rt2x00dev->ops->extra_tx_headroom);
+
+       /*
+        * Signal that the TX descriptor is no longer in the skb.
+        */
+       skbdesc->flags &= ~SKBDESC_DESC_IN_SKB;
+
        /*
         * Remove L2 padding which was added during
         */
index 1c9ccc30b6a47a31e521f356677c69bad6420a0d..fc9da83587840a812b4ca265b07b667b7450de4d 100644 (file)
@@ -60,37 +60,6 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev,
 }
 EXPORT_SYMBOL_GPL(rt2x00pci_regbusy_read);
 
-/*
- * TX/RX data handlers.
- */
-void rt2x00pci_txdone(struct queue_entry *entry,
-                     struct txdone_entry_desc *txdesc)
-{
-       struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
-       struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
-
-       /*
-        * Unmap the skb.
-        */
-       rt2x00queue_unmap_skb(rt2x00dev, entry->skb);
-
-       /*
-        * Remove the extra tx headroom from the skb.
-        */
-       skb_pull(entry->skb, rt2x00dev->ops->extra_tx_headroom);
-
-       /*
-        * Signal that the TX descriptor is no longer in the skb.
-        */
-       skbdesc->flags &= ~SKBDESC_DESC_IN_SKB;
-
-       /*
-        * Pass on to rt2x00lib.
-        */
-       rt2x00lib_txdone(entry, txdesc);
-}
-EXPORT_SYMBOL_GPL(rt2x00pci_txdone);
-
 void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
 {
        struct data_queue *queue = rt2x00dev->rx;
index 2dca18532f2ecc479f1ef86e9ba05a0179f286e7..b854d62ff99bde9e3ada5bbd4811a6797ac1c677 100644 (file)
@@ -98,14 +98,6 @@ struct queue_entry_priv_pci {
        dma_addr_t desc_dma;
 };
 
-/**
- * rt2x00pci_txdone - Handle TX done events.
- * @entry: The queue entry for which a TX done event was received.
- * @txdesc: The TX done descriptor for the entry.
- */
-void rt2x00pci_txdone(struct queue_entry *entry,
-                     struct txdone_entry_desc *txdesc);
-
 /**
  * rt2x00pci_rxdone - Handle RX done events
  * @rt2x00dev: Device pointer, see &struct rt2x00_dev.
index f78ebb4d8cf19b03588a5f5fd556443ecdb440bc..a22837c560fdfda28306f1b617c55fee3cb592d9 100644 (file)
@@ -171,23 +171,12 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
 {
        struct queue_entry *entry = (struct queue_entry *)urb->context;
        struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
-       struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
        struct txdone_entry_desc txdesc;
 
        if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
            !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
                return;
 
-       /*
-        * Remove the descriptor from the front of the skb.
-        */
-       skb_pull(entry->skb, entry->queue->desc_size);
-
-       /*
-        * Signal that the TX descriptor is no longer in the skb.
-        */
-       skbdesc->flags &= ~SKBDESC_DESC_IN_SKB;
-
        /*
         * Obtain the status about this packet.
         * Note that when the status is 0 it does not mean the
index cb6e20a1046e1e32047e8d2159abf91fe85e9ab9..1e74f8c1b9c55d741dcfd4183d145d3e1484ab8d 100644 (file)
@@ -2108,7 +2108,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
                        __set_bit(TXDONE_UNKNOWN, &txdesc.flags);
                        txdesc.retry = 0;
 
-                       rt2x00pci_txdone(entry_done, &txdesc);
+                       rt2x00lib_txdone(entry_done, &txdesc);
                        entry_done = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
                }
 
@@ -2135,7 +2135,7 @@ static void rt61pci_txdone(struct rt2x00_dev *rt2x00dev)
                if (txdesc.retry)
                        __set_bit(TXDONE_FALLBACK, &txdesc.flags);
 
-               rt2x00pci_txdone(entry, &txdesc);
+               rt2x00lib_txdone(entry, &txdesc);
        }
 }