From patchwork Fri May 13 16:24:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 16188 Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 1D8178226A; Fri, 13 May 2016 18:24:47 +0200 (CEST) Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a01:4f8:171:314c::100:a1; helo=mail.aperture-lab.de; envelope-from=linus.luessing@c0d3.blue; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=none header.from=c0d3.blue Received: from mail.aperture-lab.de (mail.aperture-lab.de [IPv6:2a01:4f8:171:314c::100:a1]) by open-mesh.org (Postfix) with ESMTPS id 67D2782264 for ; Fri, 13 May 2016 18:24:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail.aperture-lab.de (Postfix) with ESMTP id 743BDE160E; Fri, 13 May 2016 18:24:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at aperture-lab.de Received: from mail.aperture-lab.de ([127.0.0.1]) by localhost (mail.aperture-lab.de [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id ei8jkA5MoSYZ; Fri, 13 May 2016 18:24:35 +0200 (CEST) Received: from localhost (unknown [IPv6:2001:67c:2d50:0:c85:8cff:fe0f:63fe]) (Authenticated sender: linus.luessing@c0d3.blue) by mail.aperture-lab.de (Postfix) with ESMTPSA; Fri, 13 May 2016 18:24:35 +0200 (CEST) From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Fri, 13 May 2016 18:24:33 +0200 Message-Id: <1463156673-6658-1-git-send-email-linus.luessing@c0d3.blue> X-Mailer: git-send-email 2.8.0.rc3 MIME-Version: 1.0 Subject: [B.A.T.M.A.N.] [PATCH] batman-adv: Fix mcast_flags debugfs output 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: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" We recently switched to the atomic variants set_bit() / clear_bit() / test_bit() for originator capabilities. Unfortunately, this was missed for the new multicast debugfs entry, resulting in an empty multicast flags table. Fixing this by using test_bit(). Fixes: f1f0fbb2c956 ("batman-adv: Add debugfs table for mcast flags") Signed-off-by: Linus Lüssing --- net/batman-adv/multicast.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c index abb12f1..2dd5aec 100644 --- a/net/batman-adv/multicast.c +++ b/net/batman-adv/multicast.c @@ -1205,12 +1205,12 @@ int batadv_mcast_flags_seq_print_text(struct seq_file *seq, void *offset) rcu_read_lock(); hlist_for_each_entry_rcu(orig_node, head, hash_entry) { - if (!(orig_node->capa_initialized & - BATADV_ORIG_CAPA_HAS_MCAST)) + if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST, + &orig_node->capa_initialized)) continue; - if (!(orig_node->capabilities & - BATADV_ORIG_CAPA_HAS_MCAST)) { + if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST, + &orig_node->capabilities)) { seq_printf(seq, "%pM -\n", orig_node->orig); continue; }