juhosg
445022bc75
backfire: [kernel] swconfig: Check vlan/port indexes for validity. (backport of r20811)
...
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/branches/backfire@21846 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-20 05:42:38 +00:00
juhosg
072e160420
backfire: swconfig: fix lock imbalance in unregister_switch() (backport of r21780)
...
Signed-off-by: Karl Beldan <karl.beldan@sagemcom.com>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21782 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-13 11:45:45 +00:00
juhosg
87adaa5f56
backfire: swconfig: release switch in error path of swconfig_get_attr (backport of r21799)
...
Signed-off-by: Karl Beldan <karl.beldan@sagemcom.com>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21781 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-06-13 11:45:40 +00:00
juhosg
46990e4e4c
backfire: swconfig: Add cpu port index to help output. (backport of 20939)
...
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/branches/backfire@20948 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-16 20:30:06 +00:00
juhosg
f382721827
backfire: Generic: Clean up output of AR8216 driver. (backport of r20773)
...
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>
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@20774 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-10 11:47:33 +00:00
juhosg
c2d7208f8a
backfire: generic: make chip detection more reliable in the AR8216 driver (backport of r20753)
...
Fixes broken ethernet on the Planex MZK-W04NU/W300NH boards.
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@20762 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-09 12:06:17 +00:00
jow
52e77b9e47
[backfire] merge r20722
...
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@20723 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-04-05 23:06:36 +00:00
nbd
bc3d4f5dfd
enable IP175A support in the IP175C PHY driver (based on patch from jh in #6733 )
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20551 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-03-28 18:57:42 +00:00
nbd
02c404ea21
ar8216: fix the mtu register definition
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20110 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-03-09 21:43:16 +00:00
nbd
455e74f063
Several small fixes for ar8216 driver (patch by Jonas Gorski)
...
* 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
2010-03-09 14:35:41 +00:00
juhosg
a5af4ae7d5
kernel: add driver for the RTL8366RB switch
...
Thanks to Andrew Tarabaras.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19837 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-24 13:39:02 +00:00
juhosg
2c16cf4acb
kernel: fix typos in the AR8216 header file
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19834 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-02-24 13:38:48 +00:00
juhosg
48e652dc63
rtl8366_smi: sanitize gpio values to a 0/1 boolean
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19402 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-30 15:25:12 +00:00
juhosg
8a3eb00804
rtl8366s: reset the chip early, this allows ethernet to work as soon as possible
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19355 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-27 21:01:48 +00:00
juhosg
d7d76ebff9
rtl8366: make it available on all platforms
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19329 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-25 15:13:38 +00:00
juhosg
1fc2b717c5
kernel: change debounce logic in the gpio-buttons driver
...
* thanks to Nuno Gonçalves
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19115 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-01-13 10:18:24 +00:00
nbd
f2e8193802
deduplicate kernel source files from 2.6.30-2.6.32 by moving them to generic files/
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18927 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-12-25 10:34:21 +00:00
nbd
00ebe9d87a
rtl8306: manage the wan port as a separate phy device with proper link status reading and autonegotiation - the genphy driver does not handle it properly
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18709 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-12-09 03:25:33 +00:00
nbd
1b18fb38dc
ar71xx: make the rtl8306 switch attach to eth0 instead of eth1 on the wrt160nl, fixes wan port detection ( #6309 )
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18699 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-12-08 14:06:18 +00:00
nbd
b9c2e351d5
fix link status detection in various switch drivers
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18698 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-12-08 14:06:09 +00:00
nbd
8bdac63e6f
move the updated version (for 2.6.30+) of ar8216/mvswitch to the generic files directory and remove patches for older kernel versions (no longer in use)
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17594 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-09-16 12:24:46 +00:00
nbd
1881cb34ec
add a driver for rtl8306 switches
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@17248 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-08-14 00:52:17 +00:00
nbd
71f5d93ef9
ar8216: rename the vlan attribute to enable_vlan to keep it consistent with other drivers
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16770 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-07-11 01:21:01 +00:00
nbd
109963bd6d
ar8216: fix transmission of large frames by setting the switch mtu
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16629 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-29 21:54:16 +00:00
nbd
66fc7bca04
ar8216: add delay for page switching to work around register setting corruption. use packet mangling to fix up the vlan for incoming packets (workaround for hardware bug, which renders normal 802.1q support unusable)
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16442 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-06-14 03:32:01 +00:00
nbd
887ce09dca
fix a crash in ip175c attribute enumeration
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15506 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-30 13:57:22 +00:00
nbd
681d7f126b
Add a driver for Atheros AR8216 switches
...
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
2009-04-29 13:02:41 +00:00
nbd
b645d7df22
swconfig: add a generic switch reset call
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15470 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-28 19:16:17 +00:00
nbd
dfce366310
clean up the ip175c driver some more, add support for setting the pvid and fix querying the phy status
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15308 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-20 21:26:44 +00:00
nbd
52196955df
swconfig: add a generic method for setting the port primary vlan id (used for transparently fixing up pvid for untagged port when setting vlan ports)
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15307 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-20 21:26:39 +00:00
nbd
fd1e16f560
add IC+ IP175C driver (based on Patrick Horn's driver, see #4050 )
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15305 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-20 18:57:55 +00:00
nbd
3a49788081
swconfig: treat struct switch_attr as constant
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15302 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-20 18:57:36 +00:00
nbd
18920f62de
swconfig: remove old debugging stuff
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15301 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-20 18:57:30 +00:00
nbd
8e028d3df0
mvswitch: re-enable header mode
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15186 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-04-10 11:33:49 +00:00
nbd
6623e9fd70
atheros: in later kernels, vlan 0 no longer works as expected, switch to (1,2) instead of (0,1) for lan/wan
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14981 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-22 20:19:23 +00:00
nbd
a285220c58
mvswitch,adm6996: use phy fixups instead of a nonstandard patch for hardware detection
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14977 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-03-22 20:18:36 +00:00
juhosg
7f86296834
[kernel] generic-2.6: make MyLoader parser compatible with the old partition tables
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14155 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-01-23 11:54:44 +00:00
juhosg
28e6c72f66
[adm5120] move MyLoader partition parser into generic files, will be used on ar71xx
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13256 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-11-17 10:14:58 +00:00
nbd
594d20c1a4
improve routing/nat performance for devices using the marvell 88e6060 switch
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13060 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-10-28 17:54:22 +00:00
nbd
79670e1e13
change the way ./files* and the generic kernel files are applied. ./files now applies to *ALL* kernel versions, and is copied along with ./files-* - this gets rid of quite a bit of redundancy in the extra kernel drivers.
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13010 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-10-18 21:43:30 +00:00
juhosg
3e7cd682f4
[kernel] make gpio_dev compatible with GPIOLIB & GPIO_SYSFS ( closes #4016 )
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12864 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-10-05 13:08:12 +00:00
juhosg
677508fba0
[kernel] modules/gpio_dev: move to drivers/char/ on older kernels as well, and create a package for it
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12133 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-08-05 09:52:23 +00:00
blogic
d29ad00711
makes ledtrignetdev work on .26 and fix whitespaces
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@12090 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-08-04 14:05:04 +00:00
nbd
2b0ba098c0
add missing defines for mvswitch
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11895 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-07-21 18:12:38 +00:00
nbd
1274eb90e0
some more mvswitch fixes:
...
- initialize the vlan destination map properly
- workaround for moving node bug: clear the ATU database on every PHY poll
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11881 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-07-19 23:09:56 +00:00
nbd
15333144ce
add extra safety for the packet mangling in the mvswitch driver
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11880 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-07-19 23:09:43 +00:00
nbd
523804cb7c
set marvell switch ATU ageing time to minimum instead of maximum - hopefully fixes some fonera 2.0 ethernet issues
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11410 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-06-09 10:31:46 +00:00
noz
0b6dc7f4b8
Remove bogus zero-length ohci-ssb.c in generic-2.6/files
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11190 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-05-18 20:55:06 +00:00
nbd
b84c7cd55b
enable a different pseudo-vlan mode in the marvell switch (uses a proprietary header instead of a proprietary trailer) - fixes some mtu issues
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10975 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-29 12:55:44 +00:00
nbd
0f2df09b10
allow bigger packets in the marvell switch (does not fix the mtu problems yet)
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10970 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-28 21:59:06 +00:00
nbd
7bd818a6e3
fix vlan mapping for cpu port on the marvell switch
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10934 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-24 01:09:47 +00:00
nbd
f12451cca6
clear VLANTunnel bit on the marvell switch ports - should help with some bridging issues
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10931 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-23 16:28:05 +00:00
nbd
79f8984b04
Add support for the ultra-crappy Marvell 88E6060, which is used in Fonera+ and the upcoming Fonera 2.0
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10876 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-20 08:29:01 +00:00
nbd
6598df69d1
Add stub driver for ADM6996F switches (configured through MII)
...
The driver currently uses a hardcoded VLAN mapping and has no configuration yet
Tested on Accton MR3202a
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10869 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-20 02:53:04 +00:00
juhosg
3e6a0c14b4
[package] move spi_gpio driver into the kernel, clean-up SPI modules
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10844 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-15 07:33:43 +00:00
juhosg
33af3e23b0
[kernel] modules/gpio-buttons: fix build error on older kernels
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10771 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-08 11:49:22 +00:00
mb
c19a584c44
ssb-mips: Fix IRQ routing on the MIPS core.
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10770 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-08 09:15:53 +00:00
juhosg
c874812690
[kernel] add a polled GPIO buttons input driver
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10766 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-04-07 19:54:44 +00:00
mb
bad75cb0eb
GPIODEV: Fix open-count race condition.
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10625 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-03-19 11:32:08 +00:00
blogic
dc2f3c0139
add new led trigger for network traffic, fixes #2776
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10566 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-03-07 21:25:02 +00:00
mb
e6b6adc799
ssb: Update to latest upstream version of ssb.
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10490 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-02-19 01:24:18 +00:00
mb
bdf17f190b
b43: Make probing of NPHY devices possible.
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10487 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-02-18 22:21:29 +00:00
nbd
00158ccffe
"default-on" LED Trigger
...
The current LED subsystem always initialises LEDs in the OFF state. This is fine for most LEDs but some should be on right from boot (e.g. POWER LED). Following some discussion with the LED subsystem maintainers, a trigger was recommended as the best way to implement this functionality.
Here is a patch to add a new trigger "default-on" which will initialise an LED in the ON state. It is not compiled by default.
Particular thanks to Rod Whitby for all his help with this.
Signed-off-by: Nick Forbes <nick.forbes@incepta.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10348 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-02-02 01:21:54 +00:00
blogic
ab09debb66
add userspace tool for gpio_dev
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10267 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-01-26 04:24:05 +00:00
blogic
01721535f2
remove binary file
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10262 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-01-26 03:17:35 +00:00
blogic
57f5643ac3
add generic gpio char dev for CONFIG_GENERIC_GPIO archs
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10261 3c298f89-4303-0410-b956-a3cf2f4a3e73
2008-01-26 03:16:11 +00:00
nbd
64f4da969a
LED driver for PCEngines ALIX boards
...
This patch adds a driver for the three LEDs that exists on the
PCEngines ALIX 2 and 3 series boards.
The driver is also added to the Alix profile.
Signed-off-by: Petr Liebman <petrliebman@gmail.com>
--
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9748 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-12-14 00:52:15 +00:00
florian
95b3525348
Forgot removing that file while applying patch from #2757
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9690 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-12-09 17:52:27 +00:00
juhosg
34047fa1ae
make morse LED trigger available as a package, and fix it to compile with 2.6.23
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9363 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-10-20 14:32:13 +00:00
nbd
532249b507
sync ssb with upstream
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9302 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-10-14 02:47:36 +00:00
nbd
50288c1764
back out change to generic-2.6/files/ and update 310-ssb_pcicore_fixes.patch for 2.6.23
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9281 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-10-13 02:21:24 +00:00
nbd
769ee01960
add patches for 2.6.23 on brcm47xx (not enabled yet)
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9279 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-10-13 02:04:37 +00:00
juhosg
b7a77f6732
add missing file from [9055]
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9056 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-09-28 20:08:55 +00:00
noz
5939035634
Move SSB out of brcm47xx target into generic-2.6 target
...
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7844 3c298f89-4303-0410-b956-a3cf2f4a3e73
2007-07-01 22:44:05 +00:00