This is a patch to connect eth0.1 (lan) to the only
ethernet connector available.
D-Link DAP-1350 goes bricked with AA 12.09-beta.
This is because the current esw configuration for the
board connects eth0.2 (wan) to the *ONE and ONLY*
ethernet connector available, preventing initial access
to the board through 192.168.1.1 on eth0.1 after flashing,
effectively bricking the board.
There are things that should be done to make this board
really useful, but for AA 12.09, this one liner is
indispensable.
Signed of by Yoichi Shinoda <shinoda@jaist.ac.jp>
SVN-Revision: 33411
Somehow detecting the RAM size in common/setup.c doesn't
work here, it always detects 64M and then crashes on devices
with less RAM.
Probably using MEMC_REG_SDRAM_CFG1 to know the RAM size is how
it could be, for now I use the mem=32M kernel parameter to get
stuff working.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
SVN-Revision: 33381
Add missing andmask to ramips_esw register read for recv_good value.
Without the mask, recv_bad leaks into the recv_good packet count.
Didn't notice the bug before since you don't usually get bad
packets, so I only saw it when I was playing with overlength packets
earlier...
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33322
Use doubletagging to disable ramips_esw vlan by default, it seems
more reliable.
Daniel Golle found an issue where sometimes (possibly only for
RT3352) the default vlan disable method (clearing en_vlan, untag,
doubletag and putting all ports into vlan 0) doesn't work and the
packets get sent out vlan-tagged with vlan 0.
Instead switch to using the doubletagging method (allow doubletagged
packets, put all ports into vlan 0 with untag enabled) by default.
Unless someone figures out a way to really globally disable vlan for
this switch, this seems like the best (most reliable) option.
I did some tests regarding maximum packet size and did not see any
difference between the two methods, both allow for slightly bigger packets
than the ramips_main.c ethernet driver (ping stops going through
above "ping -s 1472" (1514 bytes), on the switch packets are recv_good until
"ping -s 1490", or about 1532 bytes).
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33321
Power down phy on disabled switch ports.
Haven't measured this myself yet, but according to this
http://www.8devices.com/community/viewtopic.php?f=6&t=156
it can save about 300mW of power.
[juhosg: fix checkpatch warning]
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33304
Add support for 8devices Carambola dev board.
The Carambola is a small RT3050-based development board with two
ethernet ports, on-board chip antenna, usb and plenty of accessible
gpio ports, sold by 8devices.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33303
Rename POC registers.
The current code uses POC1-POC3.
The datasheet uses:
POC1: Port Control 0
POC1: Port Control 1
POC2: Port Control 2
So the first POC1 is a typo that should have been POC0, rename the
registers to POC0-POC2 accordingly.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33302
Stop handling VLAN setup in the kernel.
Removes the obsolete RT305X_ESW_VLAN_CONFIG_BYPASS option I added for
WL-351 and add some extra comments.
Also removes the en_vlan per-port flag that isn't very useful really, it now
is only controlled by the global enable_vlan flag.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33301
Add switch setup to uci network defaults.
The 'lan' attribute is used to decide into which vlan to put the
port.
Currently 'disable' is never set, but the intention is to use this
for devices like the 8devices Carambola, which only has two ports
hooked up to the SoC.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33300
Add swconfig support to ramips_esw.c
This patch adds swconfig support for ramips_esw:
Tested on both D-LINK DIR-300 B1 and Sitecom WL-351 (external
rtl8366rb on internal port 5).
I've made sure that in the enable_vlan=0 case it behaves like a dumb
switch, so external switches should work fine with vlans and
verified this on the WL-351.
The current state shown by swconfig is always read directly from HW
registers, new settings only show after 'swconfig dev rt305x set apply'.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33299
Minor indentation cleanup.
Prepare for the main swconfig patch by cleaning up indentation a bit.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 33298
Generate image for the ALL0239-3G which can be flashed through the
chipset-vendor SDK based firmware's web-interface and bootloader.
The bootloader seems to ignore uImage checksum errors, but does complain about
them once the 0xDEADC0DE was replaced by an actual JFFS2 page.
I'm working on implementing fixtrx for uImage in the mtd package to solve this.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
SVN-Revision: 33206
rt2x00 still needs some patching as the radio doesn't come to life.
Installation via webflash.
[juhosg: fix whitespace issues, remove rt305x_register_usb
from machine setup because the board has no USB port]
Signed-off-by: Mikko Hissa <mikko.hissa@uta.fi>
SVN-Revision: 33205
In order to get OHCI/EHCI working on the Rt3352, the platform device must be
named so rt3883-?hci will recognize it.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
SVN-Revision: 33145
As the userspace has no means to determine the maximum possible timeout, use
that as the default and let the userspace lower it when necessary.
As the result the usual OpenWrt install (with busybox's watchdog trying to set
the timeout to 60s on start) is using a 33s timeout on an RT3052 clocked at
384MHz instead of the current 20s default.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
SVN-Revision: 33144
D-Link's DIR-620 allows to flash a uImage directly from its web-interface but
for that the image name should be set to DIR_620.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
SVN-Revision: 33143
Full functionality runtime tested, installation via OEM web-interface requires
a follow-up patch.
Thanks go to Sergey Vasilyugin for his patch that pointed me at the missing
bits (including the antiparallel wps led).
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
SVN-Revision: 33142
The initial support for the D-Link DAP-1350.
USB related functionality is not tested.
Signed-off-by: Yoichi Shinoda <shinoda@jaist.ac.jp>
SVN-Revision: 32821
Currently, sys_clk/10 is used which is just wrong.
cpu_clk/10 would work for systems with 400MHz CPU clock.
Signed-off-by: Daniel Golle <dgolle@allnet.de>
SVN-Revision: 32812
Detect and apply MAC address of a Fonera 2.0n (ramips)
Signed-off-by: Malte Forkel <malte.forkel@berlin.de>
Signed-off-by: Vasilis Tsiligiannis <b_tsiligiannis@silverton.gr>
SVN-Revision: 32490
This patch adds support for the Korean made Petatel PSR-680W Wireless CDMA Router.
The platform is based on Ralink RT3052.
http://wiki.openwrt.org/toh/petatel/psr-680w
Signed-off-by: Dmitry Shmygov <shmygov at rambler.ru>
SVN-Revision: 32450
Add led devices for D-Link DIR-300-B1 WAN LED.
Note that the GPIO state is also ANDed with the esw switch port 4
LED state, which is why I've set the amber LED to default-on.
Closes: https://dev.openwrt.org/ticket/11326
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
[ juhosg:
- fix comment style in mach-dir-300-revb.c,
- remove the PPP specific LED setup, not everyone uses a PPP connection
on the WAN interface]
SVN-Revision: 31989
Add byte queue limits support to net/ethernet/ramips_main.c
"Byte queue limits are a mechanism to limit the size of the transmit
hardware queue on a NIC by number of bytes. The goal of these byte
limits is too reduce latency (HOL blocking) caused by excessive
queuing in hardware (aka buffer bloat) without sacrificing
throughput."
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 31844
Sysupgrade works just fine on my Sitecom WL-351 after adding this
oneliner.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 31843
Fixed: GPIO typos and confirmed GPIO_BUTTON_RESET
Fixed: Lan & Wan reversed: swaped "eth0.2" with "eth0.1" by
removing a line(default is correct), and reversed the
Lan/wan layout LLLLW to WLLLL.
Added: image/Makefile now builds -factory.bin files. I am
unsure of the accepted way to change the makefile but
the name of the image needs to be 'linkn Kernel Image'
in order to be accepted by the OEM firmware.
Known issue: eth0 (internal switch i think has mac address:
00:11:22:33:44:55 but i think it should be same as
the lan).
Known issue: Pressing the reset button has no noticable effect,
i would expect the router to boot failsafe if being
pressed on boot, reboot if short press and reset all
to default if long press.
[juhosg: remove mtdlayout_W306R and use mtdlayout_4M instead]
Signed-off-by: David Pearce <david_18051985@hotmail.com>
SVN-Revision: 31557
Make serial console for DIR-300-B1 work again.
With some recent change, "console=ttyS1,57600" was removed from the
default kernel command line, this adds the necessary mkcmdline
incantation to image/Makefile to add it there for this target.
This is quite likely broken for other targets as well.
Without this the console switches to ttyS0 instead of ttyS1 and
kernel output is missing, and the userspace comes up with 9600 baud
instead of 57600.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 31556
This patch adds support for the ASUS WL-330N3G
Comparing to the WL-330N, It have 32MB ram, usb support and a bicolor led.
The bi-color led is driven by 2 gpio.
I don't know how to handle this, so I simply made 2 leds : one red, one blue.
But the red light takes precedence over the blue one according to the chart below.
r = led is red
b = led is blue
0 = led is off
xy= x->r for red, b for blue led, y->value of brightness in /sys/class/leds/x/brughtness
initial state action led gpio state
r0 b0 r0->r1 r r0 b0
r0 b0 b0->b1 b r0 b1
r1 b0 r1->r0 0 r0 b0
r1 b0 b0->b1 r r1 *b1*
r1 b1 r1->r0 b r0 b1
r1 b1 b1->b0 r r1 b0
r0 b1 r0->r1 r r1 *b1*
r0 b1 b1->b0 0 r0 r0
Signed-off-by: Frédéric Leroy <fredo@starox.org>
SVN-Revision: 31450
More device info at: http://wiki.openwrt.org/toh/tenda/w306r
Signed-off-by: David Pearce <David_18051985@hotmail.com.au>
[juhosg: fix checkpatch errors, remove kmod-phy and luci-ssl packages
from the profile, change broken GPIO number]
SVN-Revision: 31396
[juhosg: fix indentation in platform scripts, and remove debug
messages from 06_set_iface_mac]
Signed-off-by: Patrick van Staveren <trick@vanstaveren.us>
SVN-Revision: 30808
This patch adds support for the Accton WR6202 Mini 3G broadband router.
Full details for this device are available at
http://www.awbnetworks.com/products03.php?Fullkey=19.
This device is identical to the SMCWBR11S-3GN:
http://www.smc-asia.com/products03.php?Fullkey=210
It's also worth noting that this board has a GPIO line to control the
power to the USB port.
[juhosg:
- fix checkpatch warnings,
- reorder Kconfig entry,
- merge the sysupgrade patch,
- add GPL header]
Signed-off-by: Johnathan Boyce <jon.boyce@globalreach.eu.com>
SVN-Revision: 30434
This patch adds support for the Sitecom WL-341 v3 and other Sercomm
IP1006RRv2 based boards for sysupgrade support and for the initial
flash through pushbutton initiated recovery mode with the special
partition table and fixes for the quirks and things required by the
modified bootloader.
There is a known bug, Wi-Fi is not working on my board probably
because of the lack of RAM (the board only has 16MiB ram -- half of
the normal amount for non rebadged versions, but there is an empty
slot for another ram chip,) but I don't know for sure. The driver
loads but hostapd fails to load so I think it's not related to the
specific device except for the lack of RAM.
Moreover, only 7 of the 11 onboard leds are confirmed working, it
seems that one of the others is always on and the remaining ones are
connected to the wireless card leds already recognized by OpenWrt
[juhosg: reordered some parts in order to keep things sorted
alphabetically]
Signed-off-by: Marco Antonio Mauro <marcus90@gmail.com>
SVN-Revision: 29910
In this patch:
* rename Argus leds to avoid underscores
* rename Belkin F5D8235 v1 leds from f5d8234 to f5d8235
* remove Belkin F5D8235 v1 status led defined as storage led (it was
defined as usb led earlier, just in wrong place) - it should have
router led as in v2
* add Argus, Sparklan and Belkin F5D8235 v2 status leds
* add Belkin F5D8235 v1 and v2 usb leds
* fix Belkin F5D8235 v2 network config generation and mac address axtraction
* fix Sparklan board identification
* add Sparklan usb led (this board doesn't have usb connector by
default and the led is hidden also but if you are going to solder
the connector then you'll see the led too)
* add Sparklan network config generation and mac address extraction
* fix empty string test in network script and...
* ...sort case entries by the first board in the list
Signed-off-by: Roman Yeryomin <roman@advem.lv>
SVN-Revision: 29871
Previously the tx housekeeping was done in a spin_lock_irqsave critical
section which causes irqs to be disabled during that time. Since the
housekeeping is already prepared to be scheduled as a tasklet process
the housekeeping only in softirq context and revise the locking between
the tx path and the housekeeping tasklet by using a normal spin_lock
which in most situations will be a NOP anyway.
This makes sure that interrupts are only disabled for a short time
since in the worst case the housekeeping might have to free up to 256
skbs.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 29762
This add support for the Sitecom WL-351 v1 002.
In principle the Engenius ESR9850 should also work with this, but I
don't have the hardware to test it.
Since an external gigabit switch (RTL8366RB) is used,
I had to modify the ramips_esw driver to add a 'bypass' mode, which
just configures it to not filter the vlan tags.
Also two initialization words (FCT2 and FPA2) are set to different
values by u-boot than what the driver is using and it only seems to
work correctly when they not overridden by the driver, so I
added them to the platform specific data as reg_initval_fct2 and
reg_initval_fpa2.
With this wired lan works as expected, however I'm still having some
trouble with the wireless lan:
It only works after I rmmod & re-insmod rt2800pci and then
reconfigure it in the webinterface, but not directly after
rebooting.
The symptom of this is wpad saying:
Dec 20 15:45:09 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> IEEE 802.11: associated (aid 1)
Dec 20 15:45:09 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> WPA: pairwise key handshake completed (RSN)
Dec 20 15:45:22 OpenWrt daemon.info hostapd: wlan1: STA <notebookmac> IEEE 802.11: authenticated
But wpa_supplicant on the client saying:
Authentication with <wl351mac> timed out.
Signed-off-by: Tobias Diedrich <ranma+openwrt@tdiedrich.de>
SVN-Revision: 29604
This patch adds support for the Omnima MiniEMBWiFi
Ralink RT3050F based board.
Based on a patch by Ivan Ignjatic <ivan at omnima.co.uk>
SVN-Revision: 29533
This uses previously submitted rtl8366 kernel packages.
[juhosg: The kmod-gpio-dev package has been removed from the package list.]
Signed-off-by: Roman Yeryomin <roman@advem.lv>
SVN-Revision: 29391
Inspired by the patch from Roman Yeryomin. Thanks, Roman!
This removes unnecessary duplication and simplifies network setup for new
boards. It would be a one line change most likely.
[juhosg: setup lan and wan interfaces for unspecified rt3x0x based boards
in order to avoid regression]
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
SVN-Revision: 29376
The preconfiguration of the USB LED has benn move to the
/etc/uci-defaults/leds script. [juhosg]
Signed-off-by: Adam Porter <porter.adam at gmail.com>
SVN-Revision: 28571
This removes unnecessary duplication and simplifies led setup for new
boards. It would be a one line change most likely.
Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
SVN-Revision: 28569
This change corrects expected CPU name of Ralink RT3050, which
describes itself as RT3350 (this name is ripped off chip and elevated
to user space via /proc/cpuinfo.)
This patch fixes wired network on DIR-300 rev B and DIR-600 rev B
Signed-off-by: Slawomir Cygan <wiewior@wiewior.eu.org>
SVN-Revision: 27804
This patch adds initial board support for the MoFi Network MOFI3500-3GN
(Ralink RT3052F SoC, 8MB flash, 32MB ram, wireless N, USB-OTG). This
router is basically the NA version of the HW550-3G.
Signed-off-by: Layne Edwards <ledwards76@gmail.com>
SVN-Revision: 26466
This patch adds sysupgrade and status LED support for the Aztech
HW550-3G. Some LED GPIOs were changed for clarity.
Signed-off-by: Layne Edwards <ledwards76@gmail.com>
SVN-Revision: 26320
This patch adds initial support for the Aztech HW550-3G (Ralink
RT3052f SoC, 8MB flash, 32MB dram). Ethernet is not working yet.
Wireless appears to work fine. USB does not work yet (as with other
Ralink boards).
Signed-off-by: Layne Edwards <ledwards76@gmail.com>
SVN-Revision: 26123
The skb_reserve call prior to DMA mapping the RX skb reduced the skb
data len by 2. To not allow DMA to write behind the skb we should pass
the correct skb data len to the device.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 24123
Instead just drop the rx'ed frame silently and reuse the already
available buffer.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 24122
Taking the ramips ethernet interface down and up again resulted in the
driver not receiving any frames anymore. Fix this by correctly disabling
interrupts in the hw on ifdown.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 23243
The attached patch adds a preliminary support for Prolink PWH2004 board
(Ralink RT305x based). LAN and flash appear to work. However, the USB
port and WLAN I have not managed to activate properly yet, but that
problem appears to be present with other rt305x targets as well(?).
Signed-off-by: Esa Hyytia <esa at netlab.tkk.fi>
SVN-Revision: 23129
The current defaults for ramips rt305x does not allow the USB
subsystem to be selected/built.
This patch is just a small step in that direction.
Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
SVN-Revision: 23128
This patch adds support for Sparklan WCR-150GN board.
Network configuration should be tweaked to make it work fully. The
reason it's not in this patch is that ramips target should be modified
to support different /etc/config/network files for different boards.
Signed-off-by: Roman Yeryomin <roman@advem.lv>
SVN-Revision: 22658
When trying to build images with jffs2 filesystem for ramips platform
there is only one jffs2 image produced instead of two (64k and 128k).
Signed-off-by: Roman Yeryomin <roman@advem.lv>
SVN-Revision: 22435
Bridging between the ramips ethernet driver and rt2800pci was somewhat
broken. Frames received by the ethernet driver which were passed to the
wifi driver for transmission were sometimes corrupted or sent out with
huge delays.
The reason for this is the missing assignment of skb->tail in the ramips
ethernet driver's rx path resulting in skb->tail pointing to skb->data.
Since skb->tail is used by mac80211 it writes into skb->data which messes
up the frames content.
Fix this by using skb_put to correctly set skb->len and skb->tail.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
SVN-Revision: 22172