Upon error, ip175c_set_val() returned 0 instead of -EINVAL.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21711 3c298f89-4303-0410-b956-a3cf2f4a3e73
Trying to unify capitalization and formatting of comments. Writing of periods
at the end of comments is however still inconsistent.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21710 3c298f89-4303-0410-b956-a3cf2f4a3e73
Call mdiobus_{read,write} instead of duplicating their code.
Introduce ip_phy_write_masked(), which changes a part of a register. Will
be used later in this patch series. Please note that it does not hold any
lock between reading and writing, so it is up to the caller to serialize.
Also add DUMP_MII_IO, which enables logging of all MII accesses.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21709 3c298f89-4303-0410-b956-a3cf2f4a3e73
SWITCH_PORT_FLAG_TAGGED is a bit index, not a bit mask.
Signed-off-by: Martin Mares <mj@ucw.cz>
Signed-off-by: Patrick Horn <patrick.horn@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21708 3c298f89-4303-0410-b956-a3cf2f4a3e73
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
Swconfig needs to make sure that requested vlans/ports actually exist,
else it might read or modify memory not belonging to itself.
This patch adds a quick range check in swconfig's kernel part to
prevent accidential or intentional memory modification.
Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20811 3c298f89-4303-0410-b956-a3cf2f4a3e73
This patch is rather a cosmetic patch. It fixes the following issues:
* Demote the unknown device message to debug level to not spam
the log.
* Fix the version print of the unknown device message.
* Output the 'attach' message only when attaching as switch driver,
not when attaching as phy driver.
* Correctly return NET_RX_DROP when dropping packets.
Signed-off-by: Jonas Gorski <jonas.gorski+openwrt@gmail.com>
Cc: bacfire@openwrt.org
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20773 3c298f89-4303-0410-b956-a3cf2f4a3e73
This patch enhances the ar8216 driver with ar8316 support and fixes some minor
issues with the ar8216 driver itself. It should not break anything, but isn't
tested on ar8216 devices.
[PATCH 2/2] ar71xx: Add the ar8316 driver to rs pro/rb-450g.
Add the ar8216 driver to the ar71xx target, and add network
configurations for the RouterStation Pro and the RouterBoard RB-450G.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20722 3c298f89-4303-0410-b956-a3cf2f4a3e73
* Create defines for some magic values/masks.
* Change vlan_id to u16, to allow VIDs > 255.
* Add a range check to set_pvid as it isn't a VID, but the index
in the vlan table.
* Set the max VID to 4094, since 4095 is a reserved value and
should not be used.
* In mangle_rx replace the provided VID with the VID of the table
entry of the port, not the index of the table.
* In hw_apply, remove a redundant emptyness check (was already
checked several lines above).
* In no vlan mode do not set the ingress mode to secure, as there
are no vlan table entries, but to use the port's destination
masks. Otherwise the switch won't forward anything.
* In read_status tell that the phy is up (taken from the rtl8306
driver).
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20083 3c298f89-4303-0410-b956-a3cf2f4a3e73
Thanks to Vertical Communications, Inc. for providing access to the documentation
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15482 3c298f89-4303-0410-b956-a3cf2f4a3e73