1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-05 15:34:59 +02:00
Commit Graph

20 Commits

Author SHA1 Message Date
jogo
b7d3d9d3ce swconfig: fix vlan/port configs being applied to all switches
Check devn instead of dev (which will never be null at this point).

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28362 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-10-03 23:39:31 +00:00
nbd
54bc65b843 swconfig: hide inactive vlans on "swconfig dev switch0 show"
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28133 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-08-30 21:00:01 +00:00
juhosg
746c2a7d3c swconfig: fix backward compatibility
swconfig fails to load uci configuration after the generic switch
identifier changes.

root@OpenWrt:/# uci show network | grep switch
network.@switch[0]=switch
network.@switch[0].name=eth0
network.@switch[0].reset=1
network.@switch[0].enable_vlan=1
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device=eth0
network.@switch_vlan[0].vlan=1
network.@switch_vlan[0].ports=0t 2 3 4 5
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device=eth0
network.@switch_vlan[1].vlan=2
network.@switch_vlan[1].ports=0t 1
root@OpenWrt:/# swconfig dev eth0 load /etc/config/network
Failed to apply configuration for switch 'switch0'
root@OpenWrt:/# swconfig dev switch0 load /etc/config/network
Failed to apply configuration for switch 'switch0'

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27820 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-28 19:54:11 +00:00
jogo
6c853478d6 swconfig: Add generic switch identifiers
Also make switches available under a generic name "switch<num>" for device
name agnostic access. The old device name is used as an alias for backward
compatibility.

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27800 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-27 18:00:18 +00:00
nbd
da46ade1fe swconfig: make reset and enable_vlan default to 1 (based on patch by Nikolay Martynov)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27375 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-03 04:20:18 +00:00
nbd
050e164d86 swconfig: avoid setting "NOVAL" attributes if "0" was provided as a value
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27374 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-03 04:19:59 +00:00
nbd
e9313440fc swconfig: add -lnl-genl (patch by Philip Prindeville) - purely cosmetic, swconfig uses libnl-tiny anyway
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@25509 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-02-13 02:52:44 +00:00
juhosg
69e8309e23 package/swconfig: add sanity checks to prevent a segfault
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24932 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-01-08 17:30:33 +00:00
juhosg
56f15bb5f9 swconfig: Add cpu port index to help output.
Let swconfig provide the cpu port index in its help page. This is
needed as e.g. Atheros switches have their cpu port at port 0, not
port 5.

This could allow e.g. luci to get a rough overview of the layout of
the switch.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20939 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-16 19:32:40 +00:00
juhosg
29b1cd327d swconfig: Fix switch name.
This patch fixes a small typo in swconfig's client side that caused
it to print the interface name instead of the switch's device name
on the help page.

Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20938 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-16 19:32:32 +00:00
nbd
4a16263771 swconfig: Remove unused code
Signed-off-by: Martin Mares <mj@ucw.cz>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19758 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-19 17:33:46 +00:00
nbd
74d7ae6816 swconfig: add copyright for Martin Mares
Signed-off-by: Martin Mares <mj@ucw.cz>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19642 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-15 17:29:07 +00:00
nbd
8fdfe51f29 swconfig: use print_attr_val() in CMD_GET
Use the print_attr_val() function introduced by the previous patch
to simplify the get command.

Signed-off-by: Martin Mares <mj@ucw.cz>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19641 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-15 17:29:04 +00:00
nbd
62634962e9 swconfig: add show command
Add a "show" command, which displays all attributes of the selected port,
VLAN, or of the whole switch.

Signed-off-by: Martin Mares <mj@ucw.cz>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19640 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-15 17:29:00 +00:00
nbd
958c69f1aa swconfig: clean up command line parsing
The command line parser was unsystematic and it silently ignored
many illegal combinations of options. Try to clean that up.

Signed-off-by: Martin Mares <mj@ucw.cz>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19639 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-15 17:28:56 +00:00
juhosg
03429968ab swconfig: show tagged port flag
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19238 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-20 07:06:12 +00:00
nbd
65c8d28d39 swconfig: support providing the switch device name in an option instead of the section name - necessary to support switches that contain characters such as "-"
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19208 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-18 00:38:04 +00:00
nbd
7bc22cd099 swconfig: use libnl-tiny instead of libnl
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15508 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-30 13:57:38 +00:00
nbd
17a8f7b655 swconfig: implement uci loading support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15315 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-21 01:35:30 +00:00
nbd
a662d5b130 add new switch configuration api
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13009 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-10-18 20:44:53 +00:00