From patchwork Tue May 26 12:41:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Dedecker X-Patchwork-Id: 476438 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 84A1C1402A7 for ; Tue, 26 May 2015 22:42:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b=NRjzhJXM; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6EB83280632; Tue, 26 May 2015 14:40:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 29E4E2804D6 for ; Tue, 26 May 2015 14:40:43 +0200 (CEST) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wi0-f182.google.com (mail-wi0-f182.google.com [209.85.212.182]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Tue, 26 May 2015 14:40:42 +0200 (CEST) Received: by wicmc15 with SMTP id mc15so63615463wic.1 for ; Tue, 26 May 2015 05:42:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=RZ0jqFLMgDK5bXtt/GJ7I70hbqLgareed7eHGZLWfSc=; b=NRjzhJXM2lmUEXYa9LKd2IWLSaFrXBMxfXbmHcy1mMhDxqgIrbHWFBgbNKEnDkWGmB XaYV8xDi/t3xFxjqojSnDGyRkHwsh/43prd2GO4DV2BY0sqPuCkX984ilEq05qn1gV6M zSX5cZhTtLrzfD1xbXrTeuYl8jOsoPtE4HOyKiENbt4oXmvXf+SNkur8OhMAmfhqkpze Lvt7vQeDYPC0+mcRV8Dn3W9c2XZnz/V5BM5xrRPDQwljVhncC5Wavprc8rKSLuVc9EaK AccDLCaFI1qUcVbzpj3LECIlmWySSzru2LUS4p1TJbgYGp0v79ueFPiEZTq4clg67TdG d7IQ== X-Received: by 10.194.184.14 with SMTP id eq14mr39524153wjc.58.1432644129550; Tue, 26 May 2015 05:42:09 -0700 (PDT) Received: from cplx43.eu.thmulti.com ([141.11.62.7]) by mx.google.com with ESMTPSA id x10sm21588415wjf.45.2015.05.26.05.42.07 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 26 May 2015 05:42:09 -0700 (PDT) From: Hans Dedecker To: openwrt-devel@lists.openwrt.org Date: Tue, 26 May 2015 14:41:47 +0200 Message-Id: <1432644107-5647-1-git-send-email-dedeckeh@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: Hans Dedecker , cyrus@openwrt.org Subject: [OpenWrt-Devel] [PATCH] netifd: Add old style vlan devices to device list X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Just like other device types old vlan style devices are added to the device list which means they're displayed when the device list is displayed via ubus. Additionally global device setting config like default packet steering behavior is now also applied for old style vlan devices when doing a network reload. Signed-off-by: Hans Dedecker --- vlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlan.c b/vlan.c index 354e12f..3d0a4cf 100644 --- a/vlan.c +++ b/vlan.c @@ -130,7 +130,7 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create) vldev->id = id; vlan_dev_set_name(vldev, dev); - device_init_virtual(&vldev->dev, &vlan_type, NULL); + device_init(&vldev->dev, &vlan_type, vldev->dev.ifname); vldev->dev.default_config = true; vldev->set_state = vldev->dev.set_state;