Remove NETDEV_TX_LOCKED
authorAdrian-Ken Rueegsegger <ken@codelabs.ch>
Mon, 6 Mar 2017 15:19:53 +0000 (16:19 +0100)
committerAdrian-Ken Rueegsegger <ken@codelabs.ch>
Mon, 6 Mar 2017 16:11:25 +0000 (17:11 +0100)
The TX_LOCKED return value was removed in upstream commit a6086a8...

writer.c

index 8fdc3af..05ef4b8 100644 (file)
--- a/writer.c
+++ b/writer.c
@@ -165,8 +165,6 @@ int initialize_writer(struct dev_info *dev_info,
  * @param dev the networking interface to use
  *
  * @return NET_XMIT_SUCCESS if packet could be transmitted or was dropped
- * @return NETDEV_TX_LOCKED if another writer is blocking access to
- *                          the data structure (should never happen)
  */
 int muennet_xmit(struct sk_buff *skb, struct net_device *dev)
 {
@@ -190,9 +188,7 @@ int muennet_xmit(struct sk_buff *skb, struct net_device *dev)
                }
        }
 
-       /* check if exclusive access is granted, if not request a requeue */
-       if (!spin_trylock_irqsave(&dev_info->writer_lock, flags))
-               return NETDEV_TX_LOCKED;
+       spin_lock_irqsave(&dev_info->writer_lock, flags);
 
        if (dev_info->pmtu != NULL &&
            1 <= skb->mark && skb->mark <= dev_info->pmtu_elements) {