From patchwork Wed Aug 26 08:24:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 4681 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dkim=pass reason="1024-bit key; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=o2tAwbbL; dkim-adsp=pass; dkim-atps=neutral Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id A13A5811A1 for ; Wed, 26 Aug 2015 10:25:00 +0200 (CEST) Received: from sven-desktop.home.narfation.org (xd9ba8ce6.dyn.telefonica.de [217.186.140.230]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 514481100A5 for ; Wed, 26 Aug 2015 10:25:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=20121; t=1440577500; bh=+TavabBEgmSJ2UvO0MFYC/Q4snJcosZbeF+ULu4t0RY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=o2tAwbbLf1HDOEdAjIZmmycZ0+77WioW6JxlOZCVYUFlozeljGhnR1N7ma0A8TZ67 UXfBwReUfTTI39gPvF+VSuqemk3EwDuTab9b5NgrqART/cdVZAfIaufNqZwXp1yQdQ UWcAAFcoW9z6uTWm8lHBa+Y/MAmv5d4wyTZ8edFI= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Wed, 26 Aug 2015 10:24:41 +0200 Message-Id: <1440577481-14719-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.5.0 In-Reply-To: <4340969.K0PsB6WH4o@bentobox> References: <4340969.K0PsB6WH4o@bentobox> Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: convert to using IFF_NO_QUEUE X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Aug 2015 08:25:00 -0000 From: Phil Sutter Signed-off-by: Phil Sutter Cc: Marek Lindner Cc: Simon Wunderlich Cc: Antonio Quartulli Signed-off-by: David S. Miller [sven@narfation.org: added compat hack] Signed-off-by: Sven Eckelmann --- 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