aboutsummaryrefslogtreecommitdiffstats
path: root/package/swconfig/src/swlib.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2010-04-16 19:32:40 +0000
committerGabor Juhos <juhosg@openwrt.org>2010-04-16 19:32:40 +0000
commitf7cc3d576cec068f7722da7d86885164cdf99823 (patch)
tree86b92e62ab0b6fc27012d8950b2168155cd4056a /package/swconfig/src/swlib.c
parente1079c515a1d2ff08d829e11de6827741d2154f7 (diff)
downloadupstream-f7cc3d576cec068f7722da7d86885164cdf99823.tar.gz
upstream-f7cc3d576cec068f7722da7d86885164cdf99823.tar.bz2
upstream-f7cc3d576cec068f7722da7d86885164cdf99823.zip
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> SVN-Revision: 20939
Diffstat (limited to 'package/swconfig/src/swlib.c')
-rw-r--r--package/swconfig/src/swlib.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/swconfig/src/swlib.c b/package/swconfig/src/swlib.c
index 8a9fd7a29c..59456a33d9 100644
--- a/package/swconfig/src/swlib.c
+++ b/package/swconfig/src/swlib.c
@@ -586,6 +586,8 @@ add_switch(struct nl_msg *msg, void *arg)
dev->ports = nla_get_u32(tb[SWITCH_ATTR_PORTS]);
if (tb[SWITCH_ATTR_VLANS])
dev->vlans = nla_get_u32(tb[SWITCH_ATTR_VLANS]);
+ if (tb[SWITCH_ATTR_CPU_PORT])
+ dev->cpu_port = nla_get_u32(tb[SWITCH_ATTR_CPU_PORT]);
if (!sa->head) {
sa->head = dev;