b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: convert to using IFF_NO_QUEUE
Date: Wed, 26 Aug 2015 10:24:41 +0200	[thread overview]
Message-ID: <1440577481-14719-1-git-send-email-sven@narfation.org> (raw)
In-Reply-To: <4340969.K0PsB6WH4o@bentobox>

From: Phil Sutter <phil@nwl.cc>

Signed-off-by: Phil Sutter <phil@nwl.cc>
Cc: Marek Lindner <mareklindner@neomailbox.ch>
Cc: Simon Wunderlich <sw@simonwunderlich.de>
Cc: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[sven@narfation.org: added compat hack]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
Yes, I go the "route of shame" and added this weird hack. But at least I
don't substract functions from each other.
---
 compat.h                        | 6 ++++++
 net/batman-adv/soft-interface.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/compat.h b/compat.h
index 05fb4f1a4e77..f6f8c44609f7 100644
--- a/compat.h
+++ b/compat.h
@@ -170,4 +170,10 @@ static int __batadv_interface_kill_vid(struct net_device *dev, __be16 proto,\
 
 #endif /* < KERNEL_VERSION(3, 10, 0) */
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
+
+#define IFF_NO_QUEUE	0; dev->tx_queue_len = 0
+
+#endif /* < KERNEL_VERSION(4, 3, 0) */
+
 #endif /* _NET_BATMAN_ADV_COMPAT_H_ */
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index cce8e896d511..ac4d08de5df4 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -941,7 +941,7 @@ static void batadv_softif_init_early(struct net_device *dev)
 	dev->netdev_ops = &batadv_netdev_ops;
 	dev->destructor = batadv_softif_free;
 	dev->features |= NETIF_F_HW_VLAN_CTAG_FILTER;
-	dev->tx_queue_len = 0;
+	dev->priv_flags |= IFF_NO_QUEUE;
 
 	/* can't call min_mtu, because the needed variables
 	 * have not been initialized yet
-- 
2.5.0


  reply	other threads:[~2015-08-26  8:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26  8:23 [B.A.T.M.A.N.] Patches missing in batman-adv next/maint and net-next Sven Eckelmann
2015-08-26  8:24 ` Sven Eckelmann [this message]
2015-08-30  9:56   ` [B.A.T.M.A.N.] [PATCH] batman-adv: convert to using IFF_NO_QUEUE Marek Lindner
2015-08-28 20:46 ` [B.A.T.M.A.N.] Patches missing in batman-adv next/maint and net-next Antonio Quartulli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1440577481-14719-1-git-send-email-sven@narfation.org \
    --to=sven@narfation.org \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).