diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-04-16 19:32:40 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-04-16 19:32:40 +0000 |
commit | f11f6fe4002f7b5a83f064f7d339d3258f50810c (patch) | |
tree | c58ce83caf0b37bca1a0297d586b5b8ae5cd24e0 /target/linux | |
parent | 1a53666807a5192e3177651b7b5ef54d92505c4f (diff) | |
download | upstream-f11f6fe4002f7b5a83f064f7d339d3258f50810c.tar.gz upstream-f11f6fe4002f7b5a83f064f7d339d3258f50810c.tar.bz2 upstream-f11f6fe4002f7b5a83f064f7d339d3258f50810c.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>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20939 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/generic-2.6/files/drivers/net/phy/swconfig.c | 1 | ||||
-rw-r--r-- | target/linux/generic-2.6/files/include/linux/switch.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c b/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c index bb49df83eb..376dec16f9 100644 --- a/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c +++ b/target/linux/generic-2.6/files/drivers/net/phy/swconfig.c @@ -761,6 +761,7 @@ swconfig_send_switch(struct sk_buff *msg, u32 pid, u32 seq, int flags, NLA_PUT_STRING(msg, SWITCH_ATTR_DEV_NAME, dev->devname); NLA_PUT_U32(msg, SWITCH_ATTR_VLANS, dev->vlans); NLA_PUT_U32(msg, SWITCH_ATTR_PORTS, dev->ports); + NLA_PUT_U32(msg, SWITCH_ATTR_CPU_PORT, dev->cpu_port); return genlmsg_end(msg, hdr); nla_put_failure: diff --git a/target/linux/generic-2.6/files/include/linux/switch.h b/target/linux/generic-2.6/files/include/linux/switch.h index 98b86e8514..25aedb83b0 100644 --- a/target/linux/generic-2.6/files/include/linux/switch.h +++ b/target/linux/generic-2.6/files/include/linux/switch.h @@ -40,6 +40,7 @@ enum { SWITCH_ATTR_DEV_NAME, SWITCH_ATTR_VLANS, SWITCH_ATTR_PORTS, + SWITCH_ATTR_CPU_PORT, /* attributes */ SWITCH_ATTR_OP_ID, SWITCH_ATTR_OP_TYPE, |