From patchwork Mon Dec 7 16:45:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 553454 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 15BC21402ED for ; Tue, 8 Dec 2015 03:45:44 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 1151E28C081; Mon, 7 Dec 2015 17:45:31 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 87C2F28C081 for ; Mon, 7 Dec 2015 17:45:23 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from smtprelay.synopsys.com (smtprelay4.synopsys.com [198.182.47.9]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Mon, 7 Dec 2015 17:45:22 +0100 (CET) Received: from us02secmta1.synopsys.com (us02secmta1.synopsys.com [10.12.235.96]) by smtprelay.synopsys.com (Postfix) with ESMTP id DFA8924E1EFA; Mon, 7 Dec 2015 08:45:27 -0800 (PST) Received: from us02secmta1.internal.synopsys.com (us02secmta1.internal.synopsys.com [127.0.0.1]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id 139B24E219; Mon, 7 Dec 2015 08:45:27 -0800 (PST) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by us02secmta1.internal.synopsys.com (Service) with ESMTP id DE6BD4E217; Mon, 7 Dec 2015 08:45:26 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id CAF83EC4; Mon, 7 Dec 2015 08:45:26 -0800 (PST) Received: from ltrimas-z400.internal.synopsys.com (ltrimas-z400.internal.synopsys.com [10.121.8.168]) by mailhost.synopsys.com (Postfix) with ESMTP id 6E8CAEB7; Mon, 7 Dec 2015 08:45:25 -0800 (PST) From: Alexey Brodkin To: openwrt-devel@lists.openwrt.org Date: Mon, 7 Dec 2015 19:45:18 +0300 Message-Id: <1449506718-16547-1-git-send-email-abrodkin@synopsys.com> X-Mailer: git-send-email 2.5.0 Cc: Alexey Brodkin , Jonas Gorski Subject: [OpenWrt-Devel] [PATCH v2] axs10x: initilaze network for wireless access-point 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" ARC SDP board sports only 1 network interface - eth0, so to operate as an access point it requires at least another interface (preferably wireless), so USB Wi-Fi dongle is what we want. And with USB Wi-Fi dongle attached ARC SDP board could be used as a "dumb" wireless access point. Now with modified network setup script it is only required to enable wireless radio on the first boot with -------------->8------------ uci set wireless.radio0.disabled=0 uci commit wireless wifi -------------->8------------ Note if by the time initscripts are executed USB Wi-Fi dongle not yet recognized and set up by Linux kernel its autodetection by "wifi" tool may not happen automatically. In that case before issuing command above one needs to populate /etc/config/wireless config: -------------->8------------ wifi detect > /etc/config/wireless -------------->8------------ Signed-off-by: Alexey Brodkin Cc: Felix Fietkau Cc: Jo-Philipp Wich Cc: Jonas Gorski --- Changes compared to v1: * Rebased on top of current master target/linux/arc770/base-files/etc/board.d/02_network | 1 + 1 file changed, 1 insertion(+) diff --git a/target/linux/arc770/base-files/etc/board.d/02_network b/target/linux/arc770/base-files/etc/board.d/02_network index cd5ad2d..7c74d2d 100755 --- a/target/linux/arc770/base-files/etc/board.d/02_network +++ b/target/linux/arc770/base-files/etc/board.d/02_network @@ -11,6 +11,7 @@ board_config_update case "$( arc_board_name )" in "arc-sdp"*) ucidef_set_interface_lan "eth0" "dhcp" + uci set network.lan.type='bridge' ;; esac