From patchwork Mon May 2 03:50:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Gambaletta X-Patchwork-Id: 617350 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (caladan.dune.hu [78.24.191.180]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qyr1d20ddz9t5c for ; Mon, 2 May 2016 13:50:45 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (4096-bit key; unprotected) header.d=vittgam.net header.i=@vittgam.net header.b=L8IOFtXF; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 58EA9B912CB; Mon, 2 May 2016 05:50:39 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP; Mon, 2 May 2016 05:50:39 +0200 (CEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C9EBDB912B6 for ; Mon, 2 May 2016 05:50:35 +0200 (CEST) X-policyd-weight: using cached result; rate:hard: -6.1 Received: from mail.vittgam.net (server1.vittgam.net [213.239.197.142]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 2 May 2016 05:50:35 +0200 (CEST) Delivered-To: X-DKIM: OpenDKIM Filter v2.4.2 mail.vittgam.net u423oYla184929 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=vittgam.net; s=20150519; t=1462161034; bh=zqFGXIS1UcgvoxyWr2dkgzUdsD3fnIrsV6xusHntk7M=; h=From:To:Subject:Content-Type:Message-ID; b=L8IOFtXFK4arQPhkTpBD9NJCckLUfI0Fwx6m5X+OoY4aPk53lAUCKYWTL+dulQCMQ 7fKlXUW+ipkbSH/VoWw0jPtl+x4rUv2xkYHNhdAPAjfevVr8p0qDuVb8AKngf8L0w3 7A971Im1NCfaGtZf/fh8Za17AQ33ygPzJaqYhxJUwnG0w2C9lD8V3JwRgsU1p0mz/Q NELb6nA+VVAIbNxvqiWPCqAeyeOJlTXmNK2VtxvzXQb1LathYgwq3gQM7LF2nKdFZj JOmzYZgN99CXwNn6pZU2/Nv9p1CAsFMFilBkilRlzuGPh4/qeUlUSJnMCR3Ol5MX+/ QqANDgXfWwefb2rAixehwKtvma+GCJT4Qmy7xqcApuHZPASglmgnSL0j22ScqwHRZ9 mXvI0j6aFL8e/V15uPjGbVH55lFBtiQ2fC4jp6NPIQsV1bRwsHartVc4ByAO6C1tk/ yjgtzVNm1PwFYDUJ8hg2msjzqjoqt0hZnDF++EM+qXc/sxxuje5TKcijqSTuEZIu+y vdDuX8V4r0susTW1e4W1yh6n3kjGIRX09cF6FnksxiOY3ZpTT5Ikto6jcLJV1oKDKJ f+Ee1zLErinMuLrGlm9fESuYn0o06iiTBWsKgzvfS0HBKQDX30LVejhJZWCKlbUXzZ GhW/1rgk52ABY93liHggrZRY= Received: from vl3 (vl3.r12.network.mietitrebbia.rocks [10.48.6.117]) by mail.vittgam.net with SMTP id u423oYla184929 for ; Mon, 2 May 2016 05:50:34 +0200 Date: Mon, 2 May 2016 05:50:34 +0200 From: "Vittorio Gambaletta (VittGam)" To: Message-ID: Subject: [OpenWrt-Devel] [PATCH 1/2] ramips: Fix network for routers without VLANs on eth0. X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.20 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" Some routers only have one port, so eth0 is used without VLANs for them. Revision r47720 introduced some changes, but wrongly confused "enable" with "reset". VLANs need to be disabled for those routers, and the switch may be reset. Fix this, by explicitly disabling VLANs instead of resetting the switch for these routers. Also merge duplicate configuration for the "m2m". Signed-off-by: Vittorio Gambaletta --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -44,13 +44,14 @@ ramips_setup_interfaces() ht-tm02|\ linkits7688 | \ linkits7688d | \ + m2m|\ microwrt|\ ncs601w|\ w150m|\ wnce2001|\ zte-q7) ucidef_add_switch "switch0" - ucidef_add_switch_attr "switch0" "reset" "false" + ucidef_add_switch_attr "switch0" "enable" "false" ucidef_set_interface_lan "eth0" ;; 3g-6200nl|\ @@ -180,11 +181,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0" ;; - m2m) - ucidef_add_switch "switch0" - ucidef_add_switch_attr "switch0" "reset" "false" - ucidef_set_interface_lan "eth0" - ;; mlwg2|\ wizard8800|\ wl-330n|\